Class: Twilio::REST::Sync::V1::ServiceContext::SyncMapContext::SyncMapItemPageMetadata
- Inherits:
-
PageMetadata
- Object
- PageMetadata
- Twilio::REST::Sync::V1::ServiceContext::SyncMapContext::SyncMapItemPageMetadata
- Defined in:
- lib/twilio-ruby/rest/sync/v1/service/sync_map/sync_map_item.rb
Constant Summary
Constants inherited from PageMetadata
Instance Attribute Summary collapse
-
#sync_map_item_page ⇒ Object
readonly
Returns the value of attribute sync_map_item_page.
Instance Method Summary collapse
- #each ⇒ Object
-
#initialize(version, response, solution, limit) ⇒ SyncMapItemPageMetadata
constructor
A new instance of SyncMapItemPageMetadata.
- #to_s ⇒ Object
Methods inherited from PageMetadata
#get_key, #next_page, #next_page_url, #previous_page, #previous_page_url, #process_response
Constructor Details
#initialize(version, response, solution, limit) ⇒ SyncMapItemPageMetadata
Returns a new instance of SyncMapItemPageMetadata.
548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 |
# File 'lib/twilio-ruby/rest/sync/v1/service/sync_map/sync_map_item.rb', line 548 def initialize(version, response, solution, limit) super(version, response) @sync_map_item_page = [] @limit = limit key = get_key(response.body) records = 0 while( limit != :unset && records < limit ) @sync_map_item_page << SyncMapItemListResponse.new(version, @payload, key, limit - records) @payload = self.next_page break unless @payload records += @payload.body[key].size end # Path Solution @solution = solution end |
Instance Attribute Details
#sync_map_item_page ⇒ Object (readonly)
Returns the value of attribute sync_map_item_page.
546 547 548 |
# File 'lib/twilio-ruby/rest/sync/v1/service/sync_map/sync_map_item.rb', line 546 def sync_map_item_page @sync_map_item_page end |
Instance Method Details
#each ⇒ Object
564 565 566 567 568 |
# File 'lib/twilio-ruby/rest/sync/v1/service/sync_map/sync_map_item.rb', line 564 def each @sync_map_item_page.each do |record| yield record end end |
#to_s ⇒ Object
570 571 572 |
# File 'lib/twilio-ruby/rest/sync/v1/service/sync_map/sync_map_item.rb', line 570 def to_s '<Twilio::REST::Sync::V1PageMetadata>'; end |