Class: MessageBird::Voice::List
- Defined in:
- lib/messagebird/voice/list.rb
Constant Summary collapse
- PER_PAGE =
20- CURRENT_PAGE =
1
Instance Attribute Summary collapse
-
#current_page ⇒ Object
Returns the value of attribute current_page.
-
#page_count ⇒ Object
Returns the value of attribute page_count.
-
#per_page ⇒ Object
Returns the value of attribute per_page.
-
#total_count ⇒ Object
Returns the value of attribute total_count.
Attributes inherited from List
#count, #items, #limit, #links, #offset
Instance Method Summary collapse
- #data=(value) ⇒ Object
-
#pagination=(value) ⇒ Object
map the pagination data to root level properties.
Methods inherited from List
Methods inherited from Base
#initialize, #map_hash_elements_to_self, #value_to_time
Constructor Details
This class inherits a constructor from MessageBird::List
Instance Attribute Details
#current_page ⇒ Object
Returns the value of attribute current_page.
8 9 10 |
# File 'lib/messagebird/voice/list.rb', line 8 def current_page @current_page end |
#page_count ⇒ Object
Returns the value of attribute page_count.
8 9 10 |
# File 'lib/messagebird/voice/list.rb', line 8 def page_count @page_count end |
#per_page ⇒ Object
Returns the value of attribute per_page.
8 9 10 |
# File 'lib/messagebird/voice/list.rb', line 8 def per_page @per_page end |
#total_count ⇒ Object
Returns the value of attribute total_count.
8 9 10 |
# File 'lib/messagebird/voice/list.rb', line 8 def total_count @total_count end |
Instance Method Details
#data=(value) ⇒ Object
12 13 14 15 16 17 |
# File 'lib/messagebird/voice/list.rb', line 12 def data=(value) # Call List API retruns data object instead of items # to make it consistence with the rest of the SDK we shall # propagate it to items= method self.items = value.nil? ? [] : value end |
#pagination=(value) ⇒ Object
map the pagination data to root level properties
20 21 22 |
# File 'lib/messagebird/voice/list.rb', line 20 def pagination=(value) map_hash_elements_to_self(value) end |