Class: Twilio::REST::Wireless::V1::CommandListResponse

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

Instance Method Summary collapse

Constructor Details

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

Returns a new instance of CommandListResponse.

Parameters:

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


427
428
429
430
431
432
433
# File 'lib/twilio-ruby/rest/wireless/v1/command.rb', line 427

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

Instance Method Details

#commandObject



516
517
518
# File 'lib/twilio-ruby/rest/wireless/v1/command.rb', line 516

def command
    @command
end

#command_instanceObject



435
436
437
# File 'lib/twilio-ruby/rest/wireless/v1/command.rb', line 435

def command_instance
    @instance
end

#headersObject



520
521
522
# File 'lib/twilio-ruby/rest/wireless/v1/command.rb', line 520

def headers
  @headers
end

#status_codeObject



524
525
526
# File 'lib/twilio-ruby/rest/wireless/v1/command.rb', line 524

def status_code
  @status_code
end