Class: Twilio::REST::FlexApi::V2::WebChannelsPageMetadata

Inherits:
PageMetadata
  • Object
show all
Defined in:
lib/twilio-ruby/rest/flex_api/v2/web_channels.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) ⇒ WebChannelsPageMetadata

Returns a new instance of WebChannelsPageMetadata.



160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
# File 'lib/twilio-ruby/rest/flex_api/v2/web_channels.rb', line 160

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

#web_channels_pageObject (readonly)

Returns the value of attribute web_channels_page.



158
159
160
# File 'lib/twilio-ruby/rest/flex_api/v2/web_channels.rb', line 158

def web_channels_page
  @web_channels_page
end

Instance Method Details

#eachObject



176
177
178
179
180
# File 'lib/twilio-ruby/rest/flex_api/v2/web_channels.rb', line 176

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

#to_sObject



182
183
184
# File 'lib/twilio-ruby/rest/flex_api/v2/web_channels.rb', line 182

def to_s
  '<Twilio::REST::FlexApi::V2PageMetadata>';
end