Class: Twilio::REST::Numbers::V2::RegulatoryComplianceList::BundleContext::ItemAssignmentPageMetadata

Inherits:
PageMetadata
  • Object
show all
Defined in:
lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle/item_assignment.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) ⇒ ItemAssignmentPageMetadata

Returns a new instance of ItemAssignmentPageMetadata.



405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
# File 'lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle/item_assignment.rb', line 405

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

#item_assignment_pageObject (readonly)

Returns the value of attribute item_assignment_page.



403
404
405
# File 'lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle/item_assignment.rb', line 403

def item_assignment_page
  @item_assignment_page
end

Instance Method Details

#eachObject



421
422
423
424
425
# File 'lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle/item_assignment.rb', line 421

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

#to_sObject



427
428
429
# File 'lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle/item_assignment.rb', line 427

def to_s
  '<Twilio::REST::Numbers::V2PageMetadata>';
end