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 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 format.
-
#date_updated ⇒ Time
The date and time in GMT when the resource was last updated specified in 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
-
#sim_sid ⇒ String
The SID of the Super SIM 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
501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 |
# File 'lib/twilio-ruby/rest/supersim/v1/ip_command.rb', line 501 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
546 547 548 |
# File 'lib/twilio-ruby/rest/supersim/v1/ip_command.rb', line 546 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
531 532 533 534 535 536 |
# File 'lib/twilio-ruby/rest/supersim/v1/ip_command.rb', line 531 def context unless @instance_context @instance_context = IpCommandContext.new(@version , @params['sid']) end @instance_context end |
#date_created ⇒ Time
600 601 602 |
# File 'lib/twilio-ruby/rest/supersim/v1/ip_command.rb', line 600 def date_created @properties['date_created'] end |
#date_updated ⇒ Time
606 607 608 |
# File 'lib/twilio-ruby/rest/supersim/v1/ip_command.rb', line 606 def date_updated @properties['date_updated'] end |
#device_ip ⇒ String
576 577 578 |
# File 'lib/twilio-ruby/rest/supersim/v1/ip_command.rb', line 576 def device_ip @properties['device_ip'] end |
#device_port ⇒ String
582 583 584 |
# File 'lib/twilio-ruby/rest/supersim/v1/ip_command.rb', line 582 def device_port @properties['device_port'] end |
#direction ⇒ Direction
570 571 572 |
# File 'lib/twilio-ruby/rest/supersim/v1/ip_command.rb', line 570 def direction @properties['direction'] end |
#fetch ⇒ IpCommandInstance
Fetch the IpCommandInstance
619 620 621 622 |
# File 'lib/twilio-ruby/rest/supersim/v1/ip_command.rb', line 619 def fetch context.fetch end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
633 634 635 636 |
# File 'lib/twilio-ruby/rest/supersim/v1/ip_command.rb', line 633 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Supersim.V1.IpCommandInstance #{values}>" end |
#payload ⇒ String
594 595 596 |
# File 'lib/twilio-ruby/rest/supersim/v1/ip_command.rb', line 594 def payload @properties['payload'] end |
#payload_type ⇒ PayloadType
588 589 590 |
# File 'lib/twilio-ruby/rest/supersim/v1/ip_command.rb', line 588 def payload_type @properties['payload_type'] end |
#sid ⇒ String
540 541 542 |
# File 'lib/twilio-ruby/rest/supersim/v1/ip_command.rb', line 540 def sid @properties['sid'] end |
#sim_iccid ⇒ String
558 559 560 |
# File 'lib/twilio-ruby/rest/supersim/v1/ip_command.rb', line 558 def sim_iccid @properties['sim_iccid'] end |
#sim_sid ⇒ String
552 553 554 |
# File 'lib/twilio-ruby/rest/supersim/v1/ip_command.rb', line 552 def sim_sid @properties['sim_sid'] end |
#status ⇒ Status
564 565 566 |
# File 'lib/twilio-ruby/rest/supersim/v1/ip_command.rb', line 564 def status @properties['status'] end |
#to_s ⇒ Object
Provide a user friendly representation
626 627 628 629 |
# File 'lib/twilio-ruby/rest/supersim/v1/ip_command.rb', line 626 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Supersim.V1.IpCommandInstance #{values}>" end |
#url ⇒ String
612 613 614 |
# File 'lib/twilio-ruby/rest/supersim/v1/ip_command.rb', line 612 def url @properties['url'] end |