class Twilio::REST::Supersim::V1::SmsCommandInstance
PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
Public Class Methods
Initialize the SmsCommandInstance
@param [Version] version Version
that contains the resource @param [Hash] payload payload that contains response from Twilio
@param [String] sid The SID of the SMS Command resource to fetch. @return [SmsCommandInstance] SmsCommandInstance
Twilio::REST::InstanceResource::new
# File lib/twilio-ruby/rest/supersim/v1/sms_command.rb 261 def initialize(version, payload, sid: nil) 262 super(version) 263 264 # Marshaled Properties 265 @properties = { 266 'sid' => payload['sid'], 267 'account_sid' => payload['account_sid'], 268 'sim_sid' => payload['sim_sid'], 269 'payload' => payload['payload'], 270 'status' => payload['status'], 271 'direction' => payload['direction'], 272 'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']), 273 'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']), 274 'url' => payload['url'], 275 } 276 277 # Context 278 @instance_context = nil 279 @params = {'sid' => sid || @properties['sid'], } 280 end
Public Instance Methods
@return [String] The SID of the Account that created the resource
# File lib/twilio-ruby/rest/supersim/v1/sms_command.rb 301 def account_sid 302 @properties['account_sid'] 303 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 [SmsCommandContext] SmsCommandContext
for this SmsCommandInstance
# File lib/twilio-ruby/rest/supersim/v1/sms_command.rb 286 def context 287 unless @instance_context 288 @instance_context = SmsCommandContext.new(@version, @params['sid'], ) 289 end 290 @instance_context 291 end
@return [Time] The ISO 8601 date and time in GMT when the resource was created
# File lib/twilio-ruby/rest/supersim/v1/sms_command.rb 331 def date_created 332 @properties['date_created'] 333 end
@return [Time] The ISO 8601 date and time in GMT when the resource was last updated
# File lib/twilio-ruby/rest/supersim/v1/sms_command.rb 337 def date_updated 338 @properties['date_updated'] 339 end
@return [sms_command.Direction] The direction of the SMS Command
# File lib/twilio-ruby/rest/supersim/v1/sms_command.rb 325 def direction 326 @properties['direction'] 327 end
Fetch the SmsCommandInstance
@return [SmsCommandInstance] Fetched SmsCommandInstance
# File lib/twilio-ruby/rest/supersim/v1/sms_command.rb 350 def fetch 351 context.fetch 352 end
Provide a detailed, user friendly representation
# File lib/twilio-ruby/rest/supersim/v1/sms_command.rb 363 def inspect 364 values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") 365 "<Twilio.Supersim.V1.SmsCommandInstance #{values}>" 366 end
@return [String] The message body of the SMS Command sent to or from the SIM
# File lib/twilio-ruby/rest/supersim/v1/sms_command.rb 313 def payload 314 @properties['payload'] 315 end
@return [String] The unique string that identifies the resource
# File lib/twilio-ruby/rest/supersim/v1/sms_command.rb 295 def sid 296 @properties['sid'] 297 end
@return [String] The SID of the SIM that this SMS Command was sent to or from
# File lib/twilio-ruby/rest/supersim/v1/sms_command.rb 307 def sim_sid 308 @properties['sim_sid'] 309 end
@return [sms_command.Status] The status of the SMS Command
# File lib/twilio-ruby/rest/supersim/v1/sms_command.rb 319 def status 320 @properties['status'] 321 end
Provide a user friendly representation
# File lib/twilio-ruby/rest/supersim/v1/sms_command.rb 356 def to_s 357 values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") 358 "<Twilio.Supersim.V1.SmsCommandInstance #{values}>" 359 end
@return [String] The absolute URL of the SMS Command resource
# File lib/twilio-ruby/rest/supersim/v1/sms_command.rb 343 def url 344 @properties['url'] 345 end