Class: Twilio::REST::Supersim::V1::IpCommandInstance
- Inherits:
-
InstanceResource
- Object
- InstanceResource
- Twilio::REST::Supersim::V1::IpCommandInstance
- Defined in:
- lib/twilio-ruby/rest/supersim/v1/ip_command.rb
Overview
PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
Instance Method Summary collapse
-
#account_sid ⇒ String
The SID of the Account that created the resource.
-
#context ⇒ IpCommandContext
Generate an instance context for the instance, the context is capable of performing various actions.
-
#date_created ⇒ Time
The ISO 8601 date and time in GMT when the resource was created.
-
#date_updated ⇒ Time
The ISO 8601 date and time in GMT when the resource was last updated.
-
#device_ip ⇒ String
The IP address of the device that the IP Command was sent to or received from.
-
#device_port ⇒ String
The port that the IP Command either originated from or was sent to.
-
#direction ⇒ ip_command.Direction
The direction of the IP Command.
-
#fetch ⇒ IpCommandInstance
Fetch the IpCommandInstance.
-
#initialize(version, payload, sid: nil) ⇒ IpCommandInstance
constructor
Initialize the IpCommandInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#payload ⇒ String
The payload of the IP Command sent to or from the Super SIM.
-
#payload_type ⇒ ip_command.PayloadType
The payload type of the IP Command.
-
#sid ⇒ String
The unique string that identifies the resource.
-
#sim_iccid ⇒ String
The ICCID of the Super SIM that this IP Command was sent to or from.
-
#sim_sid ⇒ String
The SID of the Super SIM that this IP Command was sent to or from.
-
#status ⇒ ip_command.Status
The status of the IP Command.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#url ⇒ String
The absolute URL of the IP Command resource.
Constructor Details
#initialize(version, payload, sid: nil) ⇒ IpCommandInstance
Initialize the IpCommandInstance
278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 |
# File 'lib/twilio-ruby/rest/supersim/v1/ip_command.rb', line 278 def initialize(version, payload, sid: nil) super(version) # Marshaled Properties @properties = { 'sid' => payload['sid'], 'account_sid' => payload['account_sid'], 'sim_sid' => payload['sim_sid'], 'sim_iccid' => payload['sim_iccid'], 'status' => payload['status'], 'direction' => payload['direction'], 'device_ip' => payload['device_ip'], 'device_port' => payload['device_port'].to_i, 'payload_type' => payload['payload_type'], 'payload' => payload['payload'], 'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']), 'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']), 'url' => payload['url'], } # Context @instance_context = nil @params = {'sid' => sid || @properties['sid'], } end |
Instance Method Details
#account_sid ⇒ String
Returns The SID of the Account that created the resource.
322 323 324 |
# File 'lib/twilio-ruby/rest/supersim/v1/ip_command.rb', line 322 def account_sid @properties['account_sid'] end |
#context ⇒ IpCommandContext
Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context
307 308 309 310 311 312 |
# File 'lib/twilio-ruby/rest/supersim/v1/ip_command.rb', line 307 def context unless @instance_context @instance_context = IpCommandContext.new(@version, @params['sid'], ) end @instance_context end |
#date_created ⇒ Time
Returns The ISO 8601 date and time in GMT when the resource was created.
376 377 378 |
# File 'lib/twilio-ruby/rest/supersim/v1/ip_command.rb', line 376 def date_created @properties['date_created'] end |
#date_updated ⇒ Time
Returns The ISO 8601 date and time in GMT when the resource was last updated.
382 383 384 |
# File 'lib/twilio-ruby/rest/supersim/v1/ip_command.rb', line 382 def date_updated @properties['date_updated'] end |
#device_ip ⇒ String
Returns The IP address of the device that the IP Command was sent to or received from.
352 353 354 |
# File 'lib/twilio-ruby/rest/supersim/v1/ip_command.rb', line 352 def device_ip @properties['device_ip'] end |
#device_port ⇒ String
Returns The port that the IP Command either originated from or was sent to.
358 359 360 |
# File 'lib/twilio-ruby/rest/supersim/v1/ip_command.rb', line 358 def device_port @properties['device_port'] end |
#direction ⇒ ip_command.Direction
Returns The direction of the IP Command.
346 347 348 |
# File 'lib/twilio-ruby/rest/supersim/v1/ip_command.rb', line 346 def direction @properties['direction'] end |
#fetch ⇒ IpCommandInstance
Fetch the IpCommandInstance
395 396 397 |
# File 'lib/twilio-ruby/rest/supersim/v1/ip_command.rb', line 395 def fetch context.fetch end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
408 409 410 411 |
# File 'lib/twilio-ruby/rest/supersim/v1/ip_command.rb', line 408 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Supersim.V1.IpCommandInstance #{values}>" end |
#payload ⇒ String
Returns The payload of the IP Command sent to or from the Super SIM.
370 371 372 |
# File 'lib/twilio-ruby/rest/supersim/v1/ip_command.rb', line 370 def payload @properties['payload'] end |
#payload_type ⇒ ip_command.PayloadType
Returns The payload type of the IP Command.
364 365 366 |
# File 'lib/twilio-ruby/rest/supersim/v1/ip_command.rb', line 364 def payload_type @properties['payload_type'] end |
#sid ⇒ String
Returns The unique string that identifies the resource.
316 317 318 |
# File 'lib/twilio-ruby/rest/supersim/v1/ip_command.rb', line 316 def sid @properties['sid'] end |
#sim_iccid ⇒ String
Returns The ICCID of the Super SIM that this IP Command was sent to or from.
334 335 336 |
# File 'lib/twilio-ruby/rest/supersim/v1/ip_command.rb', line 334 def sim_iccid @properties['sim_iccid'] end |
#sim_sid ⇒ String
Returns The SID of the Super SIM that this IP Command was sent to or from.
328 329 330 |
# File 'lib/twilio-ruby/rest/supersim/v1/ip_command.rb', line 328 def sim_sid @properties['sim_sid'] end |
#status ⇒ ip_command.Status
Returns The status of the IP Command.
340 341 342 |
# File 'lib/twilio-ruby/rest/supersim/v1/ip_command.rb', line 340 def status @properties['status'] end |
#to_s ⇒ Object
Provide a user friendly representation
401 402 403 404 |
# File 'lib/twilio-ruby/rest/supersim/v1/ip_command.rb', line 401 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Supersim.V1.IpCommandInstance #{values}>" end |
#url ⇒ String
Returns The absolute URL of the IP Command resource.
388 389 390 |
# File 'lib/twilio-ruby/rest/supersim/v1/ip_command.rb', line 388 def url @properties['url'] end |