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
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
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
@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
@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
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
@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
@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
@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 the CommandInstance
@return [CommandInstance] Fetched CommandInstance
# File lib/twilio-ruby/rest/supersim/v1/command.rb 347 def fetch 348 context.fetch 349 end
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
@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
@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
@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
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
@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