Class: Twilio::REST::Preview::Wireless::CommandListResponse

Inherits:
InstanceListResource show all
Defined in:
lib/twilio-ruby/rest/preview/wireless/command.rb,
lib/twilio-ruby/rest/preview/wireless/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)


387
388
389
390
391
392
393
# File 'lib/twilio-ruby/rest/preview/wireless/command.rb', line 387

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



476
477
478
# File 'lib/twilio-ruby/rest/preview/wireless/command.rb', line 476

def command
    @command
end

#command_instanceObject



395
396
397
# File 'lib/twilio-ruby/rest/preview/wireless/command.rb', line 395

def command_instance
    @instance
end

#headersObject



480
481
482
# File 'lib/twilio-ruby/rest/preview/wireless/command.rb', line 480

def headers
  @headers
end

#status_codeObject



484
485
486
# File 'lib/twilio-ruby/rest/preview/wireless/command.rb', line 484

def status_code
  @status_code
end