Class: Twilio::REST::Voice::V1::DialingPermissionsList::BulkCountryUpdatePageMetadata

Inherits:
PageMetadata
  • Object
show all
Defined in:
lib/twilio-ruby/rest/voice/v1/dialing_permissions/bulk_country_update.rb

Constant Summary

Constants inherited from PageMetadata

PageMetadata::META_KEYS

Instance Attribute Summary collapse

Instance Method Summary collapse

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) ⇒ BulkCountryUpdatePageMetadata

Returns a new instance of BulkCountryUpdatePageMetadata.



134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
# File 'lib/twilio-ruby/rest/voice/v1/dialing_permissions/bulk_country_update.rb', line 134

def initialize(version, response, solution, limit)
    super(version, response)
    @bulk_country_update_page = []
    @limit = limit
    key = get_key(response.body)
    records = 0
    while( limit != :unset && records < limit )
        @bulk_country_update_page << BulkCountryUpdateListResponse.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_country_update_pageObject (readonly)

Returns the value of attribute bulk_country_update_page.



132
133
134
# File 'lib/twilio-ruby/rest/voice/v1/dialing_permissions/bulk_country_update.rb', line 132

def bulk_country_update_page
  @bulk_country_update_page
end

Instance Method Details

#eachObject



150
151
152
153
154
# File 'lib/twilio-ruby/rest/voice/v1/dialing_permissions/bulk_country_update.rb', line 150

def each
    @bulk_country_update_page.each do |record|
      yield record
    end
end

#to_sObject



156
157
158
# File 'lib/twilio-ruby/rest/voice/v1/dialing_permissions/bulk_country_update.rb', line 156

def to_s
  '<Twilio::REST::Voice::V1PageMetadata>';
end