Class: Twilio::REST::Supersim::V1::SimInstance
- Inherits:
- 
      InstanceResource
      
        - Object
- InstanceResource
- Twilio::REST::Supersim::V1::SimInstance
 
- Defined in:
- lib/twilio-ruby/rest/supersim/v1/sim.rb
Instance Method Summary collapse
- 
  
    
      #account_sid  ⇒ String 
    
    
  
  
  
  
  
  
  
  
  
    The SID of the [Account](www.twilio.com/docs/iam/api/account) that the Super SIM belongs to. 
- 
  
    
      #billing_periods  ⇒ billing_periods 
    
    
  
  
  
  
  
  
  
  
  
    Access the billing_periods. 
- 
  
    
      #context  ⇒ SimContext 
    
    
  
  
  
  
  
  
  
  
  
    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. 
- 
  
    
      #fetch  ⇒ SimInstance 
    
    
  
  
  
  
  
  
  
  
  
    Fetch the SimInstance. 
- 
  
    
      #fleet_sid  ⇒ String 
    
    
  
  
  
  
  
  
  
  
  
    The unique ID of the Fleet configured for this SIM. 
- 
  
    
      #iccid  ⇒ String 
    
    
  
  
  
  
  
  
  
  
  
    The [ICCID](en.wikipedia.org/wiki/Subscriber_identity_module#ICCID) associated with the SIM. 
- 
  
    
      #initialize(version, payload, sid: nil)  ⇒ SimInstance 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    Initialize the SimInstance. 
- 
  
    
      #inspect  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    Provide a detailed, user friendly representation. 
- #links ⇒ Hash
- 
  
    
      #sid  ⇒ String 
    
    
  
  
  
  
  
  
  
  
  
    The unique string that identifies the Sim resource. 
- 
  
    
      #sim_ip_addresses  ⇒ sim_ip_addresses 
    
    
  
  
  
  
  
  
  
  
  
    Access the sim_ip_addresses. 
- #status ⇒ Status
- 
  
    
      #to_s  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    Provide a user friendly representation. 
- 
  
    
      #unique_name  ⇒ String 
    
    
  
  
  
  
  
  
  
  
  
    An application-defined string that uniquely identifies the resource. 
- 
  
    
      #update(unique_name: :unset, status: :unset, fleet: :unset, callback_url: :unset, callback_method: :unset, account_sid: :unset)  ⇒ SimInstance 
    
    
  
  
  
  
  
  
  
  
  
    Update the SimInstance. 
- 
  
    
      #url  ⇒ String 
    
    
  
  
  
  
  
  
  
  
  
    The absolute URL of the Sim Resource. 
Constructor Details
#initialize(version, payload, sid: nil) ⇒ SimInstance
Initialize the SimInstance
| 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 | # File 'lib/twilio-ruby/rest/supersim/v1/sim.rb', line 329 def initialize(version, payload , sid: nil) super(version) # Marshaled Properties @properties = { 'sid' => payload['sid'], 'unique_name' => payload['unique_name'], 'account_sid' => payload['account_sid'], 'iccid' => payload['iccid'], 'status' => payload['status'], 'fleet_sid' => payload['fleet_sid'], '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
Returns The SID of the [Account](www.twilio.com/docs/iam/api/account) that the Super SIM belongs to.
| 376 377 378 | # File 'lib/twilio-ruby/rest/supersim/v1/sim.rb', line 376 def account_sid @properties['account_sid'] end | 
#billing_periods ⇒ billing_periods
Access the billing_periods
| 461 462 463 | # File 'lib/twilio-ruby/rest/supersim/v1/sim.rb', line 461 def billing_periods context.billing_periods 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
| 355 356 357 358 359 360 | # File 'lib/twilio-ruby/rest/supersim/v1/sim.rb', line 355 def context unless @instance_context @instance_context = SimContext.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.
| 400 401 402 | # File 'lib/twilio-ruby/rest/supersim/v1/sim.rb', line 400 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.
| 406 407 408 | # File 'lib/twilio-ruby/rest/supersim/v1/sim.rb', line 406 def date_updated @properties['date_updated'] end | 
#fetch ⇒ SimInstance
Fetch the SimInstance
| 425 426 427 428 | # File 'lib/twilio-ruby/rest/supersim/v1/sim.rb', line 425 def fetch context.fetch end | 
#fleet_sid ⇒ String
Returns The unique ID of the Fleet configured for this SIM.
| 394 395 396 | # File 'lib/twilio-ruby/rest/supersim/v1/sim.rb', line 394 def fleet_sid @properties['fleet_sid'] end | 
#iccid ⇒ String
Returns The [ICCID](en.wikipedia.org/wiki/Subscriber_identity_module#ICCID) associated with the SIM.
| 382 383 384 | # File 'lib/twilio-ruby/rest/supersim/v1/sim.rb', line 382 def iccid @properties['iccid'] end | 
#inspect ⇒ Object
Provide a detailed, user friendly representation
| 481 482 483 484 | # File 'lib/twilio-ruby/rest/supersim/v1/sim.rb', line 481 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Supersim.V1.SimInstance #{values}>" end | 
#links ⇒ Hash
| 418 419 420 | # File 'lib/twilio-ruby/rest/supersim/v1/sim.rb', line 418 def links @properties['links'] end | 
#sid ⇒ String
Returns The unique string that identifies the Sim resource.
| 364 365 366 | # File 'lib/twilio-ruby/rest/supersim/v1/sim.rb', line 364 def sid @properties['sid'] end | 
#sim_ip_addresses ⇒ sim_ip_addresses
Access the sim_ip_addresses
| 468 469 470 | # File 'lib/twilio-ruby/rest/supersim/v1/sim.rb', line 468 def sim_ip_addresses context.sim_ip_addresses end | 
#status ⇒ Status
| 388 389 390 | # File 'lib/twilio-ruby/rest/supersim/v1/sim.rb', line 388 def status @properties['status'] end | 
#to_s ⇒ Object
Provide a user friendly representation
| 474 475 476 477 | # File 'lib/twilio-ruby/rest/supersim/v1/sim.rb', line 474 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Supersim.V1.SimInstance #{values}>" end | 
#unique_name ⇒ String
Returns An application-defined string that uniquely identifies the resource. It can be used in place of the resource’s ‘sid` in the URL to address the resource.
| 370 371 372 | # File 'lib/twilio-ruby/rest/supersim/v1/sim.rb', line 370 def unique_name @properties['unique_name'] end | 
#update(unique_name: :unset, status: :unset, fleet: :unset, callback_url: :unset, callback_method: :unset, account_sid: :unset) ⇒ SimInstance
Update the SimInstance
| 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 | # File 'lib/twilio-ruby/rest/supersim/v1/sim.rb', line 439 def update( unique_name: :unset, status: :unset, fleet: :unset, callback_url: :unset, callback_method: :unset, account_sid: :unset ) context.update( unique_name: unique_name, status: status, fleet: fleet, callback_url: callback_url, callback_method: callback_method, account_sid: account_sid, ) end | 
#url ⇒ String
Returns The absolute URL of the Sim Resource.
| 412 413 414 | # File 'lib/twilio-ruby/rest/supersim/v1/sim.rb', line 412 def url @properties['url'] end |