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.



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

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.



141
142
143
# File 'lib/twilio-ruby/rest/content/v1/content/approval_create.rb', line 141

def approval_create_page
  @approval_create_page
end

Instance Method Details

#eachObject



159
160
161
162
163
# File 'lib/twilio-ruby/rest/content/v1/content/approval_create.rb', line 159

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

#to_sObject



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

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