Class: Twilio::REST::Preview::Wireless::SimInstance
- Inherits:
-
InstanceResource
- Object
- InstanceResource
- Twilio::REST::Preview::Wireless::SimInstance
- Defined in:
- lib/twilio-ruby/rest/preview/wireless/sim.rb
Instance Method Summary collapse
- #account_sid ⇒ String
- #commands_callback_method ⇒ String
- #commands_callback_url ⇒ String
-
#context ⇒ SimContext
Generate an instance context for the instance, the context is capable of performing various actions.
- #date_created ⇒ Time
- #date_updated ⇒ Time
- #e_id ⇒ String
-
#fetch ⇒ SimInstance
Fetch the SimInstance.
- #friendly_name ⇒ String
- #iccid ⇒ String
-
#initialize(version, payload, sid: nil) ⇒ SimInstance
constructor
Initialize the SimInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
- #links ⇒ Hash
- #rate_plan_sid ⇒ String
- #sid ⇒ String
- #sms_fallback_method ⇒ String
- #sms_fallback_url ⇒ String
- #sms_method ⇒ String
- #sms_url ⇒ String
- #status ⇒ String
-
#to_s ⇒ Object
Provide a user friendly representation.
- #unique_name ⇒ String
-
#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) ⇒ SimInstance
Update the SimInstance.
- #url ⇒ String
-
#usage ⇒ usage
Access the usage.
- #voice_fallback_method ⇒ String
- #voice_fallback_url ⇒ String
- #voice_method ⇒ String
- #voice_url ⇒ String
Constructor Details
#initialize(version, payload, sid: nil) ⇒ SimInstance
Initialize the SimInstance
330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 |
# File 'lib/twilio-ruby/rest/preview/wireless/sim.rb', line 330 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'], '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'], } # Context @instance_context = nil @params = { 'sid' => sid || @properties['sid'] , } end |
Instance Method Details
#account_sid ⇒ String
389 390 391 |
# File 'lib/twilio-ruby/rest/preview/wireless/sim.rb', line 389 def account_sid @properties['account_sid'] end |
#commands_callback_method ⇒ String
431 432 433 |
# File 'lib/twilio-ruby/rest/preview/wireless/sim.rb', line 431 def commands_callback_method @properties['commands_callback_method'] end |
#commands_callback_url ⇒ String
425 426 427 |
# File 'lib/twilio-ruby/rest/preview/wireless/sim.rb', line 425 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
368 369 370 371 372 373 |
# File 'lib/twilio-ruby/rest/preview/wireless/sim.rb', line 368 def context unless @instance_context @instance_context = SimContext.new(@version , @params['sid']) end @instance_context end |
#date_created ⇒ Time
485 486 487 |
# File 'lib/twilio-ruby/rest/preview/wireless/sim.rb', line 485 def date_created @properties['date_created'] end |
#date_updated ⇒ Time
491 492 493 |
# File 'lib/twilio-ruby/rest/preview/wireless/sim.rb', line 491 def date_updated @properties['date_updated'] end |
#e_id ⇒ String
413 414 415 |
# File 'lib/twilio-ruby/rest/preview/wireless/sim.rb', line 413 def e_id @properties['e_id'] end |
#fetch ⇒ SimInstance
Fetch the SimInstance
510 511 512 513 |
# File 'lib/twilio-ruby/rest/preview/wireless/sim.rb', line 510 def fetch context.fetch end |
#friendly_name ⇒ String
401 402 403 |
# File 'lib/twilio-ruby/rest/preview/wireless/sim.rb', line 401 def friendly_name @properties['friendly_name'] end |
#iccid ⇒ String
407 408 409 |
# File 'lib/twilio-ruby/rest/preview/wireless/sim.rb', line 407 def iccid @properties['iccid'] end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
589 590 591 592 |
# File 'lib/twilio-ruby/rest/preview/wireless/sim.rb', line 589 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Preview.Wireless.SimInstance #{values}>" end |
#links ⇒ Hash
503 504 505 |
# File 'lib/twilio-ruby/rest/preview/wireless/sim.rb', line 503 def links @properties['links'] end |
#rate_plan_sid ⇒ String
395 396 397 |
# File 'lib/twilio-ruby/rest/preview/wireless/sim.rb', line 395 def rate_plan_sid @properties['rate_plan_sid'] end |
#sid ⇒ String
377 378 379 |
# File 'lib/twilio-ruby/rest/preview/wireless/sim.rb', line 377 def sid @properties['sid'] end |
#sms_fallback_method ⇒ String
437 438 439 |
# File 'lib/twilio-ruby/rest/preview/wireless/sim.rb', line 437 def sms_fallback_method @properties['sms_fallback_method'] end |
#sms_fallback_url ⇒ String
443 444 445 |
# File 'lib/twilio-ruby/rest/preview/wireless/sim.rb', line 443 def sms_fallback_url @properties['sms_fallback_url'] end |
#sms_method ⇒ String
449 450 451 |
# File 'lib/twilio-ruby/rest/preview/wireless/sim.rb', line 449 def sms_method @properties['sms_method'] end |
#sms_url ⇒ String
455 456 457 |
# File 'lib/twilio-ruby/rest/preview/wireless/sim.rb', line 455 def sms_url @properties['sms_url'] end |
#status ⇒ String
419 420 421 |
# File 'lib/twilio-ruby/rest/preview/wireless/sim.rb', line 419 def status @properties['status'] end |
#to_s ⇒ Object
Provide a user friendly representation
582 583 584 585 |
# File 'lib/twilio-ruby/rest/preview/wireless/sim.rb', line 582 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Preview.Wireless.SimInstance #{values}>" end |
#unique_name ⇒ String
383 384 385 |
# File 'lib/twilio-ruby/rest/preview/wireless/sim.rb', line 383 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) ⇒ SimInstance
Update the SimInstance
534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 |
# File 'lib/twilio-ruby/rest/preview/wireless/sim.rb', line 534 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 ) 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, ) end |
#url ⇒ String
497 498 499 |
# File 'lib/twilio-ruby/rest/preview/wireless/sim.rb', line 497 def url @properties['url'] end |
#usage ⇒ usage
Access the usage
576 577 578 |
# File 'lib/twilio-ruby/rest/preview/wireless/sim.rb', line 576 def usage context.usage end |
#voice_fallback_method ⇒ String
461 462 463 |
# File 'lib/twilio-ruby/rest/preview/wireless/sim.rb', line 461 def voice_fallback_method @properties['voice_fallback_method'] end |
#voice_fallback_url ⇒ String
467 468 469 |
# File 'lib/twilio-ruby/rest/preview/wireless/sim.rb', line 467 def voice_fallback_url @properties['voice_fallback_url'] end |
#voice_method ⇒ String
473 474 475 |
# File 'lib/twilio-ruby/rest/preview/wireless/sim.rb', line 473 def voice_method @properties['voice_method'] end |
#voice_url ⇒ String
479 480 481 |
# File 'lib/twilio-ruby/rest/preview/wireless/sim.rb', line 479 def voice_url @properties['voice_url'] end |