Class: Twilio::REST::Voice::V1::ByocTrunkListResponse

Inherits:
InstanceListResource show all
Defined in:
lib/twilio-ruby/rest/voice/v1/byoc_trunk.rb,
lib/twilio-ruby/rest/voice/v1/byoc_trunk.rb

Instance Method Summary collapse

Constructor Details

#initialize(version, payload, key, limit = :unset) ⇒ ByocTrunkListResponse

Returns a new instance of ByocTrunkListResponse.

Parameters:

  • instance (Array<ByocTrunkInstance>)
  • headers (Hash{String => Object})
  • status_code (Integer)


525
526
527
528
529
530
531
# File 'lib/twilio-ruby/rest/voice/v1/byoc_trunk.rb', line 525

def initialize(version, payload, key)
   @byoc_trunk_instance = payload.body[key].map do |data|
    ByocTrunkInstance.new(version, data)
   end
   @headers = payload.headers
   @status_code = payload.status_code
end

Instance Method Details

#byoc_trunkObject



614
615
616
# File 'lib/twilio-ruby/rest/voice/v1/byoc_trunk.rb', line 614

def byoc_trunk
    @byoc_trunk
end

#byoc_trunk_instanceObject



533
534
535
# File 'lib/twilio-ruby/rest/voice/v1/byoc_trunk.rb', line 533

def byoc_trunk_instance
    @instance
end

#headersObject



618
619
620
# File 'lib/twilio-ruby/rest/voice/v1/byoc_trunk.rb', line 618

def headers
  @headers
end

#status_codeObject



622
623
624
# File 'lib/twilio-ruby/rest/voice/v1/byoc_trunk.rb', line 622

def status_code
  @status_code
end