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)


419
420
421
422
423
424
425
# File 'lib/twilio-ruby/rest/wireless/v1/command.rb', line 419

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



508
509
510
# File 'lib/twilio-ruby/rest/wireless/v1/command.rb', line 508

def command
    @command
end

#command_instanceObject



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

def command_instance
    @instance
end

#headersObject



512
513
514
# File 'lib/twilio-ruby/rest/wireless/v1/command.rb', line 512

def headers
  @headers
end

#status_codeObject



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

def status_code
  @status_code
end