Class: Twilio::REST::Accounts::V1::BulkContactsPageMetadata
- Inherits:
-
PageMetadata
- Object
- PageMetadata
- Twilio::REST::Accounts::V1::BulkContactsPageMetadata
- Defined in:
- lib/twilio-ruby/rest/accounts/v1/bulk_contacts.rb
Constant Summary
Constants inherited from PageMetadata
Instance Attribute Summary collapse
-
#bulk_contacts_page ⇒ Object
readonly
Returns the value of attribute bulk_contacts_page.
Instance Method Summary collapse
- #each ⇒ Object
-
#initialize(version, response, solution, limit) ⇒ BulkContactsPageMetadata
constructor
A new instance of BulkContactsPageMetadata.
- #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) ⇒ BulkContactsPageMetadata
Returns a new instance of BulkContactsPageMetadata.
132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 |
# File 'lib/twilio-ruby/rest/accounts/v1/bulk_contacts.rb', line 132 def initialize(version, response, solution, limit) super(version, response) @bulk_contacts_page = [] @limit = limit key = get_key(response.body) records = 0 while( limit != :unset && records < limit ) @bulk_contacts_page << BulkContactsListResponse.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
#bulk_contacts_page ⇒ Object (readonly)
Returns the value of attribute bulk_contacts_page.
130 131 132 |
# File 'lib/twilio-ruby/rest/accounts/v1/bulk_contacts.rb', line 130 def bulk_contacts_page @bulk_contacts_page end |
Instance Method Details
#each ⇒ Object
148 149 150 151 152 |
# File 'lib/twilio-ruby/rest/accounts/v1/bulk_contacts.rb', line 148 def each @bulk_contacts_page.each do |record| yield record end end |
#to_s ⇒ Object
154 155 156 |
# File 'lib/twilio-ruby/rest/accounts/v1/bulk_contacts.rb', line 154 def to_s '<Twilio::REST::Accounts::V1PageMetadata>'; end |