Class: Twilio::REST::FlexApi::V1::InteractionContext::InteractionChannelContext::InteractionTransferPageMetadata

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

Returns a new instance of InteractionTransferPageMetadata.



311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
# File 'lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel/interaction_transfer.rb', line 311

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

#interaction_transfer_pageObject (readonly)

Returns the value of attribute interaction_transfer_page.



309
310
311
# File 'lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel/interaction_transfer.rb', line 309

def interaction_transfer_page
  @interaction_transfer_page
end

Instance Method Details

#eachObject



327
328
329
330
331
# File 'lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel/interaction_transfer.rb', line 327

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

#to_sObject



333
334
335
# File 'lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel/interaction_transfer.rb', line 333

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