Class: Twilio::REST::Wireless::V1::SimInstance
- Inherits:
-
InstanceResource
- Object
- InstanceResource
- Twilio::REST::Wireless::V1::SimInstance
- Defined in:
- lib/twilio-ruby/rest/wireless/v1/sim.rb
Instance Method Summary collapse
-
#account_sid ⇒ String
The SID of the Account that created the resource.
-
#commands_callback_method ⇒ String
The HTTP method we use to call commands_callback_url.
-
#commands_callback_url ⇒ String
The URL we call when the SIM originates a machine-to-machine Command.
-
#context ⇒ SimContext
Generate an instance context for the instance, the context is capable of performing various actions.
-
#data_sessions ⇒ data_sessions
Access the data_sessions.
-
#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.
-
#delete ⇒ Boolean
Deletes the SimInstance.
-
#e_id ⇒ String
Deprecated.
-
#fetch ⇒ SimInstance
Fetch a SimInstance.
-
#friendly_name ⇒ String
The string that you assigned to describe the resource.
-
#iccid ⇒ String
The ICCID associated with the SIM.
-
#initialize(version, payload, sid: nil) ⇒ SimInstance
constructor
Initialize the SimInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#ip_address ⇒ String
Deprecated.
-
#links ⇒ String
The URLs of related subresources.
-
#rate_plan_sid ⇒ String
The SID of the RatePlan resource configured for this SIM.
-
#reset_status ⇒ sim.ResetStatus
The connectivity reset status of the SIM.
-
#sid ⇒ String
The unique string that identifies the resource.
-
#sms_fallback_method ⇒ String
The HTTP method we use to call sms_fallback_url.
-
#sms_fallback_url ⇒ String
The URL we call when an error occurs while retrieving or executing the TwiML requested from the sms_url.
-
#sms_method ⇒ String
The HTTP method we use to call sms_url.
-
#sms_url ⇒ String
The URL we call when the SIM-connected device sends an SMS message that is not a Command.
-
#status ⇒ sim.Status
The status of the SIM.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#unique_name ⇒ String
An application-defined string that uniquely identifies the resource.
-
#update(unique_name: :unset, callback_method: :unset, callback_url: :unset, friendly_name: :unset, rate_plan: :unset, status: :unset, commands_callback_method: :unset, commands_callback_url: :unset, sms_fallback_method: :unset, sms_fallback_url: :unset, sms_method: :unset, sms_url: :unset, voice_fallback_method: :unset, voice_fallback_url: :unset, voice_method: :unset, voice_url: :unset, reset_status: :unset) ⇒ SimInstance
Update the SimInstance.
-
#url ⇒ String
The absolute URL of the resource.
-
#usage_records ⇒ usage_records
Access the usage_records.
-
#voice_fallback_method ⇒ String
The HTTP method we use to call voice_fallback_url.
-
#voice_fallback_url ⇒ String
The URL we call when an error occurs while retrieving or executing the TwiML requested from voice_url.
-
#voice_method ⇒ String
The HTTP method we use to call voice_url.
-
#voice_url ⇒ String
The URL we call when the SIM-connected device makes a voice call.
Constructor Details
#initialize(version, payload, sid: nil) ⇒ SimInstance
Initialize the SimInstance
356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 |
# File 'lib/twilio-ruby/rest/wireless/v1/sim.rb', line 356 def initialize(version, payload, sid: nil) super(version) # Marshaled Properties @properties = { 'sid' => payload['sid'], 'unique_name' => payload['unique_name'], 'account_sid' => payload['account_sid'], 'rate_plan_sid' => payload['rate_plan_sid'], 'friendly_name' => payload['friendly_name'], 'iccid' => payload['iccid'], 'e_id' => payload['e_id'], 'status' => payload['status'], 'reset_status' => payload['reset_status'], 'commands_callback_url' => payload['commands_callback_url'], 'commands_callback_method' => payload['commands_callback_method'], 'sms_fallback_method' => payload['sms_fallback_method'], 'sms_fallback_url' => payload['sms_fallback_url'], 'sms_method' => payload['sms_method'], 'sms_url' => payload['sms_url'], 'voice_fallback_method' => payload['voice_fallback_method'], 'voice_fallback_url' => payload['voice_fallback_url'], 'voice_method' => payload['voice_method'], 'voice_url' => payload['voice_url'], 'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']), 'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']), 'url' => payload['url'], 'links' => payload['links'], 'ip_address' => payload['ip_address'], } # 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.
417 418 419 |
# File 'lib/twilio-ruby/rest/wireless/v1/sim.rb', line 417 def account_sid @properties['account_sid'] end |
#commands_callback_method ⇒ String
Returns The HTTP method we use to call commands_callback_url.
465 466 467 |
# File 'lib/twilio-ruby/rest/wireless/v1/sim.rb', line 465 def commands_callback_method @properties['commands_callback_method'] end |
#commands_callback_url ⇒ String
Returns The URL we call when the SIM originates a machine-to-machine Command.
459 460 461 |
# File 'lib/twilio-ruby/rest/wireless/v1/sim.rb', line 459 def commands_callback_url @properties['commands_callback_url'] end |
#context ⇒ SimContext
Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context
396 397 398 399 400 401 |
# File 'lib/twilio-ruby/rest/wireless/v1/sim.rb', line 396 def context unless @instance_context @instance_context = SimContext.new(@version, @params['sid'], ) end @instance_context end |
#data_sessions ⇒ data_sessions
Access the data_sessions
642 643 644 |
# File 'lib/twilio-ruby/rest/wireless/v1/sim.rb', line 642 def data_sessions context.data_sessions end |
#date_created ⇒ Time
Returns The ISO 8601 date and time in GMT when the resource was created.
519 520 521 |
# File 'lib/twilio-ruby/rest/wireless/v1/sim.rb', line 519 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.
525 526 527 |
# File 'lib/twilio-ruby/rest/wireless/v1/sim.rb', line 525 def date_updated @properties['date_updated'] end |
#delete ⇒ Boolean
Deletes the SimInstance
628 629 630 |
# File 'lib/twilio-ruby/rest/wireless/v1/sim.rb', line 628 def delete context.delete end |
#e_id ⇒ String
Returns Deprecated.
441 442 443 |
# File 'lib/twilio-ruby/rest/wireless/v1/sim.rb', line 441 def e_id @properties['e_id'] end |
#fetch ⇒ SimInstance
Fetch a SimInstance
550 551 552 |
# File 'lib/twilio-ruby/rest/wireless/v1/sim.rb', line 550 def fetch context.fetch end |
#friendly_name ⇒ String
Returns The string that you assigned to describe the resource.
429 430 431 |
# File 'lib/twilio-ruby/rest/wireless/v1/sim.rb', line 429 def friendly_name @properties['friendly_name'] end |
#iccid ⇒ String
Returns The ICCID associated with the SIM.
435 436 437 |
# File 'lib/twilio-ruby/rest/wireless/v1/sim.rb', line 435 def iccid @properties['iccid'] end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
655 656 657 658 |
# File 'lib/twilio-ruby/rest/wireless/v1/sim.rb', line 655 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Wireless.V1.SimInstance #{values}>" end |
#ip_address ⇒ String
Returns Deprecated.
543 544 545 |
# File 'lib/twilio-ruby/rest/wireless/v1/sim.rb', line 543 def ip_address @properties['ip_address'] end |
#links ⇒ String
Returns The URLs of related subresources.
537 538 539 |
# File 'lib/twilio-ruby/rest/wireless/v1/sim.rb', line 537 def links @properties['links'] end |
#rate_plan_sid ⇒ String
Returns The SID of the RatePlan resource configured for this SIM.
423 424 425 |
# File 'lib/twilio-ruby/rest/wireless/v1/sim.rb', line 423 def rate_plan_sid @properties['rate_plan_sid'] end |
#reset_status ⇒ sim.ResetStatus
Returns The connectivity reset status of the SIM.
453 454 455 |
# File 'lib/twilio-ruby/rest/wireless/v1/sim.rb', line 453 def reset_status @properties['reset_status'] end |
#sid ⇒ String
Returns The unique string that identifies the resource.
405 406 407 |
# File 'lib/twilio-ruby/rest/wireless/v1/sim.rb', line 405 def sid @properties['sid'] end |
#sms_fallback_method ⇒ String
Returns The HTTP method we use to call sms_fallback_url.
471 472 473 |
# File 'lib/twilio-ruby/rest/wireless/v1/sim.rb', line 471 def sms_fallback_method @properties['sms_fallback_method'] end |
#sms_fallback_url ⇒ String
Returns The URL we call when an error occurs while retrieving or executing the TwiML requested from the sms_url.
477 478 479 |
# File 'lib/twilio-ruby/rest/wireless/v1/sim.rb', line 477 def sms_fallback_url @properties['sms_fallback_url'] end |
#sms_method ⇒ String
Returns The HTTP method we use to call sms_url.
483 484 485 |
# File 'lib/twilio-ruby/rest/wireless/v1/sim.rb', line 483 def sms_method @properties['sms_method'] end |
#sms_url ⇒ String
Returns The URL we call when the SIM-connected device sends an SMS message that is not a Command.
489 490 491 |
# File 'lib/twilio-ruby/rest/wireless/v1/sim.rb', line 489 def sms_url @properties['sms_url'] end |
#status ⇒ sim.Status
Returns The status of the SIM.
447 448 449 |
# File 'lib/twilio-ruby/rest/wireless/v1/sim.rb', line 447 def status @properties['status'] end |
#to_s ⇒ Object
Provide a user friendly representation
648 649 650 651 |
# File 'lib/twilio-ruby/rest/wireless/v1/sim.rb', line 648 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Wireless.V1.SimInstance #{values}>" end |
#unique_name ⇒ String
Returns An application-defined string that uniquely identifies the resource.
411 412 413 |
# File 'lib/twilio-ruby/rest/wireless/v1/sim.rb', line 411 def unique_name @properties['unique_name'] end |
#update(unique_name: :unset, callback_method: :unset, callback_url: :unset, friendly_name: :unset, rate_plan: :unset, status: :unset, commands_callback_method: :unset, commands_callback_url: :unset, sms_fallback_method: :unset, sms_fallback_url: :unset, sms_method: :unset, sms_url: :unset, voice_fallback_method: :unset, voice_fallback_url: :unset, voice_method: :unset, voice_url: :unset, reset_status: :unset) ⇒ SimInstance
Update the SimInstance
603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 |
# File 'lib/twilio-ruby/rest/wireless/v1/sim.rb', line 603 def update(unique_name: :unset, callback_method: :unset, callback_url: :unset, friendly_name: :unset, rate_plan: :unset, status: :unset, commands_callback_method: :unset, commands_callback_url: :unset, sms_fallback_method: :unset, sms_fallback_url: :unset, sms_method: :unset, sms_url: :unset, voice_fallback_method: :unset, voice_fallback_url: :unset, voice_method: :unset, voice_url: :unset, reset_status: :unset) context.update( unique_name: unique_name, callback_method: callback_method, callback_url: callback_url, friendly_name: friendly_name, rate_plan: rate_plan, status: status, commands_callback_method: commands_callback_method, commands_callback_url: commands_callback_url, sms_fallback_method: sms_fallback_method, sms_fallback_url: sms_fallback_url, sms_method: sms_method, sms_url: sms_url, voice_fallback_method: voice_fallback_method, voice_fallback_url: voice_fallback_url, voice_method: voice_method, voice_url: voice_url, reset_status: reset_status, ) end |
#url ⇒ String
Returns The absolute URL of the resource.
531 532 533 |
# File 'lib/twilio-ruby/rest/wireless/v1/sim.rb', line 531 def url @properties['url'] end |
#usage_records ⇒ usage_records
Access the usage_records
635 636 637 |
# File 'lib/twilio-ruby/rest/wireless/v1/sim.rb', line 635 def usage_records context.usage_records end |
#voice_fallback_method ⇒ String
Returns The HTTP method we use to call voice_fallback_url.
495 496 497 |
# File 'lib/twilio-ruby/rest/wireless/v1/sim.rb', line 495 def voice_fallback_method @properties['voice_fallback_method'] end |
#voice_fallback_url ⇒ String
Returns The URL we call when an error occurs while retrieving or executing the TwiML requested from voice_url.
501 502 503 |
# File 'lib/twilio-ruby/rest/wireless/v1/sim.rb', line 501 def voice_fallback_url @properties['voice_fallback_url'] end |
#voice_method ⇒ String
Returns The HTTP method we use to call voice_url.
507 508 509 |
# File 'lib/twilio-ruby/rest/wireless/v1/sim.rb', line 507 def voice_method @properties['voice_method'] end |
#voice_url ⇒ String
Returns The URL we call when the SIM-connected device makes a voice call.
513 514 515 |
# File 'lib/twilio-ruby/rest/wireless/v1/sim.rb', line 513 def voice_url @properties['voice_url'] end |