Class: Twilio::REST::Iam::V1::OAuthAppPageMetadata

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

Returns a new instance of OAuthAppPageMetadata.



428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
# File 'lib/twilio-ruby/rest/iam/v1/o_auth_app.rb', line 428

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

#o_auth_app_pageObject (readonly)

Returns the value of attribute o_auth_app_page.



426
427
428
# File 'lib/twilio-ruby/rest/iam/v1/o_auth_app.rb', line 426

def o_auth_app_page
  @o_auth_app_page
end

Instance Method Details

#eachObject



444
445
446
447
448
# File 'lib/twilio-ruby/rest/iam/v1/o_auth_app.rb', line 444

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

#to_sObject



450
451
452
# File 'lib/twilio-ruby/rest/iam/v1/o_auth_app.rb', line 450

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