Class: Twilio::REST::FlexApi::V1::InsightsUserRolesPageMetadata

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

Returns a new instance of InsightsUserRolesPageMetadata.



203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_user_roles.rb', line 203

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

#insights_user_roles_pageObject (readonly)

Returns the value of attribute insights_user_roles_page.



201
202
203
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_user_roles.rb', line 201

def insights_user_roles_page
  @insights_user_roles_page
end

Instance Method Details

#eachObject



219
220
221
222
223
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_user_roles.rb', line 219

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

#to_sObject



225
226
227
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_user_roles.rb', line 225

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