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
Overview
PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
Instance Method Summary collapse
-
#account_sid ⇒ String
The SID of the 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 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.
-
#fetch ⇒ SimInstance
Fetch the SimInstance.
-
#fleet_sid ⇒ String
The unique ID of the Fleet configured for this SIM.
-
#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.
-
#links ⇒ String
The links.
-
#sid ⇒ String
The unique string that identifies the resource.
-
#status ⇒ sim.Status
The status of the Super 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, 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
288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 |
# File 'lib/twilio-ruby/rest/supersim/v1/sim.rb', line 288 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 that the Super SIM belongs to.
335 336 337 |
# File 'lib/twilio-ruby/rest/supersim/v1/sim.rb', line 335 def account_sid @properties['account_sid'] end |
#billing_periods ⇒ billing_periods
Access the billing_periods
422 423 424 |
# File 'lib/twilio-ruby/rest/supersim/v1/sim.rb', line 422 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
314 315 316 317 318 319 |
# File 'lib/twilio-ruby/rest/supersim/v1/sim.rb', line 314 def context unless @instance_context @instance_context = SimContext.new(@version, @params['sid'], ) end @instance_context end |
#date_created ⇒ Time
Returns The ISO 8601 date and time in GMT when the resource was created.
359 360 361 |
# File 'lib/twilio-ruby/rest/supersim/v1/sim.rb', line 359 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.
365 366 367 |
# File 'lib/twilio-ruby/rest/supersim/v1/sim.rb', line 365 def date_updated @properties['date_updated'] end |
#fetch ⇒ SimInstance
Fetch the SimInstance
384 385 386 |
# File 'lib/twilio-ruby/rest/supersim/v1/sim.rb', line 384 def fetch context.fetch end |
#fleet_sid ⇒ String
Returns The unique ID of the Fleet configured for this SIM.
353 354 355 |
# File 'lib/twilio-ruby/rest/supersim/v1/sim.rb', line 353 def fleet_sid @properties['fleet_sid'] end |
#iccid ⇒ String
Returns The ICCID associated with the SIM.
341 342 343 |
# File 'lib/twilio-ruby/rest/supersim/v1/sim.rb', line 341 def iccid @properties['iccid'] end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
435 436 437 438 |
# File 'lib/twilio-ruby/rest/supersim/v1/sim.rb', line 435 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Supersim.V1.SimInstance #{values}>" end |
#links ⇒ String
Returns The links.
377 378 379 |
# File 'lib/twilio-ruby/rest/supersim/v1/sim.rb', line 377 def links @properties['links'] end |
#sid ⇒ String
Returns The unique string that identifies the resource.
323 324 325 |
# File 'lib/twilio-ruby/rest/supersim/v1/sim.rb', line 323 def sid @properties['sid'] end |
#status ⇒ sim.Status
Returns The status of the Super SIM.
347 348 349 |
# File 'lib/twilio-ruby/rest/supersim/v1/sim.rb', line 347 def status @properties['status'] end |
#to_s ⇒ Object
Provide a user friendly representation
428 429 430 431 |
# File 'lib/twilio-ruby/rest/supersim/v1/sim.rb', line 428 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.
329 330 331 |
# File 'lib/twilio-ruby/rest/supersim/v1/sim.rb', line 329 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
408 409 410 411 412 413 414 415 416 417 |
# File 'lib/twilio-ruby/rest/supersim/v1/sim.rb', line 408 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.
371 372 373 |
# File 'lib/twilio-ruby/rest/supersim/v1/sim.rb', line 371 def url @properties['url'] end |