Class: Twilio::REST::Content::V1::ContentContext::ApprovalCreatePageMetadata

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

Returns a new instance of ApprovalCreatePageMetadata.



146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
# File 'lib/twilio-ruby/rest/content/v1/content/approval_create.rb', line 146

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

#approval_create_pageObject (readonly)

Returns the value of attribute approval_create_page.



144
145
146
# File 'lib/twilio-ruby/rest/content/v1/content/approval_create.rb', line 144

def approval_create_page
  @approval_create_page
end

Instance Method Details

#eachObject



162
163
164
165
166
# File 'lib/twilio-ruby/rest/content/v1/content/approval_create.rb', line 162

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

#to_sObject



168
169
170
# File 'lib/twilio-ruby/rest/content/v1/content/approval_create.rb', line 168

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