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
Instance Method Summary collapse
-
#account_sid ⇒ String
The SID of the [Account](www.twilio.com/docs/iam/api/account) that created the IP Command resource.
-
#context ⇒ IpCommandContext
Generate an instance context for the instance, the context is capable of performing various actions.
-
#date_created ⇒ Time
The date and time in GMT when the resource was created specified in [ISO 8601](en.wikipedia.org/wiki/ISO_8601) format.
-
#date_updated ⇒ Time
The date and time in GMT when the resource was last updated specified in [ISO 8601](en.wikipedia.org/wiki/ISO_8601) format.
-
#device_ip ⇒ String
The IP address of the device that the IP Command was sent to or received from.
-
#device_port ⇒ String
For an IP Command sent to a Super SIM, it would be the destination port of the IP message.
- #direction ⇒ Direction
-
#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 that is carried in the IP/UDP message.
- #payload_type ⇒ PayloadType
-
#sid ⇒ String
The unique string that we created to identify the IP Command resource.
-
#sim_iccid ⇒ String
The [ICCID](en.wikipedia.org/wiki/Subscriber_identity_module#ICCID) of the [Super SIM](www.twilio.com/docs/iot/supersim/api/sim-resource) that this IP Command was sent to or from.
-
#sim_sid ⇒ String
The SID of the [Super SIM](www.twilio.com/docs/iot/supersim/api/sim-resource) that this IP Command was sent to or from.
- #status ⇒ Status
-
#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
282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 |
# File 'lib/twilio-ruby/rest/supersim/v1/ip_command.rb', line 282 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'] == nil ? payload['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](www.twilio.com/docs/iam/api/account) that created the IP Command resource.
326 327 328 |
# File 'lib/twilio-ruby/rest/supersim/v1/ip_command.rb', line 326 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
311 312 313 314 315 316 |
# File 'lib/twilio-ruby/rest/supersim/v1/ip_command.rb', line 311 def context unless @instance_context @instance_context = IpCommandContext.new(@version , @params['sid']) end @instance_context end |
#date_created ⇒ Time
Returns The date and time in GMT when the resource was created specified in [ISO 8601](en.wikipedia.org/wiki/ISO_8601) format.
380 381 382 |
# File 'lib/twilio-ruby/rest/supersim/v1/ip_command.rb', line 380 def date_created @properties['date_created'] end |
#date_updated ⇒ Time
Returns The date and time in GMT when the resource was last updated specified in [ISO 8601](en.wikipedia.org/wiki/ISO_8601) format.
386 387 388 |
# File 'lib/twilio-ruby/rest/supersim/v1/ip_command.rb', line 386 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. For an IP Command sent to a Super SIM, ‘device_ip` starts out as `null`, and once the IP Command is “sent”, the `device_ip` will be filled out. An IP Command sent from a Super SIM have its `device_ip` always set.
356 357 358 |
# File 'lib/twilio-ruby/rest/supersim/v1/ip_command.rb', line 356 def device_ip @properties['device_ip'] end |
#device_port ⇒ String
Returns For an IP Command sent to a Super SIM, it would be the destination port of the IP message. For an IP Command sent from a Super SIM, it would be the source port of the IP message.
362 363 364 |
# File 'lib/twilio-ruby/rest/supersim/v1/ip_command.rb', line 362 def device_port @properties['device_port'] end |
#direction ⇒ Direction
350 351 352 |
# File 'lib/twilio-ruby/rest/supersim/v1/ip_command.rb', line 350 def direction @properties['direction'] end |
#fetch ⇒ IpCommandInstance
Fetch the IpCommandInstance
399 400 401 402 |
# File 'lib/twilio-ruby/rest/supersim/v1/ip_command.rb', line 399 def fetch context.fetch end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
413 414 415 416 |
# File 'lib/twilio-ruby/rest/supersim/v1/ip_command.rb', line 413 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Supersim.V1.IpCommandInstance #{values}>" end |
#payload ⇒ String
Returns The payload that is carried in the IP/UDP message. The payload can be encoded in either text or binary format. For text payload, UTF-8 encoding must be used. For an IP Command sent to a Super SIM, the payload is appended to the IP/UDP message “as is”. The payload should not exceed 1300 bytes. For an IP Command sent from a Super SIM, the payload from the received IP/UDP message is extracted and sent in binary encoding. For an IP Command sent from a Super SIM, the payload should not exceed 1300 bytes. If it is larger than 1300 bytes, there might be fragmentation on the upstream and the message may appear truncated.
374 375 376 |
# File 'lib/twilio-ruby/rest/supersim/v1/ip_command.rb', line 374 def payload @properties['payload'] end |
#payload_type ⇒ PayloadType
368 369 370 |
# File 'lib/twilio-ruby/rest/supersim/v1/ip_command.rb', line 368 def payload_type @properties['payload_type'] end |
#sid ⇒ String
Returns The unique string that we created to identify the IP Command resource.
320 321 322 |
# File 'lib/twilio-ruby/rest/supersim/v1/ip_command.rb', line 320 def sid @properties['sid'] end |
#sim_iccid ⇒ String
Returns The [ICCID](en.wikipedia.org/wiki/Subscriber_identity_module#ICCID) of the [Super SIM](www.twilio.com/docs/iot/supersim/api/sim-resource) that this IP Command was sent to or from.
338 339 340 |
# File 'lib/twilio-ruby/rest/supersim/v1/ip_command.rb', line 338 def sim_iccid @properties['sim_iccid'] end |
#sim_sid ⇒ String
Returns The SID of the [Super SIM](www.twilio.com/docs/iot/supersim/api/sim-resource) that this IP Command was sent to or from.
332 333 334 |
# File 'lib/twilio-ruby/rest/supersim/v1/ip_command.rb', line 332 def sim_sid @properties['sim_sid'] end |
#status ⇒ Status
344 345 346 |
# File 'lib/twilio-ruby/rest/supersim/v1/ip_command.rb', line 344 def status @properties['status'] end |
#to_s ⇒ Object
Provide a user friendly representation
406 407 408 409 |
# File 'lib/twilio-ruby/rest/supersim/v1/ip_command.rb', line 406 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.
392 393 394 |
# File 'lib/twilio-ruby/rest/supersim/v1/ip_command.rb', line 392 def url @properties['url'] end |