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)


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

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



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

def command
    @command
end

#command_instanceObject



403
404
405
# File 'lib/twilio-ruby/rest/preview/wireless/command.rb', line 403

def command_instance
    @instance
end

#headersObject



488
489
490
# File 'lib/twilio-ruby/rest/preview/wireless/command.rb', line 488

def headers
  @headers
end

#status_codeObject



492
493
494
# File 'lib/twilio-ruby/rest/preview/wireless/command.rb', line 492

def status_code
  @status_code
end