Class: Twilio::REST::Api::V2010::AccountContext::CallContext::UserDefinedMessagePageMetadata

Inherits:
PageMetadata
  • Object
show all
Defined in:
lib/twilio-ruby/rest/api/v2010/account/call/user_defined_message.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) ⇒ UserDefinedMessagePageMetadata



145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
# File 'lib/twilio-ruby/rest/api/v2010/account/call/user_defined_message.rb', line 145

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

#user_defined_message_pageObject (readonly)

Returns the value of attribute user_defined_message_page.



143
144
145
# File 'lib/twilio-ruby/rest/api/v2010/account/call/user_defined_message.rb', line 143

def user_defined_message_page
  @user_defined_message_page
end

Instance Method Details

#eachObject



161
162
163
164
165
# File 'lib/twilio-ruby/rest/api/v2010/account/call/user_defined_message.rb', line 161

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

#to_sObject



167
168
169
# File 'lib/twilio-ruby/rest/api/v2010/account/call/user_defined_message.rb', line 167

def to_s
  '<Twilio::REST::Api::V2010PageMetadata>';
end