class Twilio::REST::Supersim::V1::CommandInstance

PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.

Public Class Methods

new(version, payload, sid: nil) click to toggle source

Initialize the CommandInstance @param [Version] version Version that contains the resource @param [Hash] payload payload that contains response from Twilio @param [String] sid The SID of the Command resource to fetch. @return [CommandInstance] CommandInstance

Calls superclass method Twilio::REST::InstanceResource::new
    # File lib/twilio-ruby/rest/supersim/v1/command.rb
258 def initialize(version, payload, sid: nil)
259   super(version)
260 
261   # Marshaled Properties
262   @properties = {
263       'sid' => payload['sid'],
264       'account_sid' => payload['account_sid'],
265       'sim_sid' => payload['sim_sid'],
266       'command' => payload['command'],
267       'status' => payload['status'],
268       'direction' => payload['direction'],
269       'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
270       'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
271       'url' => payload['url'],
272   }
273 
274   # Context
275   @instance_context = nil
276   @params = {'sid' => sid || @properties['sid'], }
277 end

Public Instance Methods

account_sid() click to toggle source

@return [String] The SID of the Account that created the resource

    # File lib/twilio-ruby/rest/supersim/v1/command.rb
298 def account_sid
299   @properties['account_sid']
300 end
command() click to toggle source

@return [String] The message body of the command sent to or from the SIM

    # File lib/twilio-ruby/rest/supersim/v1/command.rb
310 def command
311   @properties['command']
312 end
context() click to toggle source

Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context @return [CommandContext] CommandContext for this CommandInstance

    # File lib/twilio-ruby/rest/supersim/v1/command.rb
283 def context
284   unless @instance_context
285     @instance_context = CommandContext.new(@version, @params['sid'], )
286   end
287   @instance_context
288 end
date_created() click to toggle source

@return [Time] The ISO 8601 date and time in GMT when the resource was created

    # File lib/twilio-ruby/rest/supersim/v1/command.rb
328 def date_created
329   @properties['date_created']
330 end
date_updated() click to toggle source

@return [Time] The ISO 8601 date and time in GMT when the resource was last updated

    # File lib/twilio-ruby/rest/supersim/v1/command.rb
334 def date_updated
335   @properties['date_updated']
336 end
direction() click to toggle source

@return [command.Direction] The direction of the Command

    # File lib/twilio-ruby/rest/supersim/v1/command.rb
322 def direction
323   @properties['direction']
324 end
fetch() click to toggle source

Fetch the CommandInstance @return [CommandInstance] Fetched CommandInstance

    # File lib/twilio-ruby/rest/supersim/v1/command.rb
347 def fetch
348   context.fetch
349 end
inspect() click to toggle source

Provide a detailed, user friendly representation

    # File lib/twilio-ruby/rest/supersim/v1/command.rb
360 def inspect
361   values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
362   "<Twilio.Supersim.V1.CommandInstance #{values}>"
363 end
sid() click to toggle source

@return [String] The unique string that identifies the resource

    # File lib/twilio-ruby/rest/supersim/v1/command.rb
292 def sid
293   @properties['sid']
294 end
sim_sid() click to toggle source

@return [String] The SID of the SIM that this Command was sent to or from

    # File lib/twilio-ruby/rest/supersim/v1/command.rb
304 def sim_sid
305   @properties['sim_sid']
306 end
status() click to toggle source

@return [command.Status] The status of the Command

    # File lib/twilio-ruby/rest/supersim/v1/command.rb
316 def status
317   @properties['status']
318 end
to_s() click to toggle source

Provide a user friendly representation

    # File lib/twilio-ruby/rest/supersim/v1/command.rb
353 def to_s
354   values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
355   "<Twilio.Supersim.V1.CommandInstance #{values}>"
356 end
url() click to toggle source

@return [String] The absolute URL of the Command resource

    # File lib/twilio-ruby/rest/supersim/v1/command.rb
340 def url
341   @properties['url']
342 end