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.
-
#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.
-
#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
273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 |
# File 'lib/twilio-ruby/rest/supersim/v1/sim.rb', line 273 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'], } # 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.
319 320 321 |
# File 'lib/twilio-ruby/rest/supersim/v1/sim.rb', line 319 def account_sid @properties['account_sid'] 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
298 299 300 301 302 303 |
# File 'lib/twilio-ruby/rest/supersim/v1/sim.rb', line 298 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.
343 344 345 |
# File 'lib/twilio-ruby/rest/supersim/v1/sim.rb', line 343 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.
349 350 351 |
# File 'lib/twilio-ruby/rest/supersim/v1/sim.rb', line 349 def date_updated @properties['date_updated'] end |
#fetch ⇒ SimInstance
Fetch the SimInstance
362 363 364 |
# File 'lib/twilio-ruby/rest/supersim/v1/sim.rb', line 362 def fetch context.fetch end |
#fleet_sid ⇒ String
Returns The unique ID of the Fleet configured for this SIM.
337 338 339 |
# File 'lib/twilio-ruby/rest/supersim/v1/sim.rb', line 337 def fleet_sid @properties['fleet_sid'] end |
#iccid ⇒ String
Returns The ICCID associated with the SIM.
325 326 327 |
# File 'lib/twilio-ruby/rest/supersim/v1/sim.rb', line 325 def iccid @properties['iccid'] end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
406 407 408 409 |
# File 'lib/twilio-ruby/rest/supersim/v1/sim.rb', line 406 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Supersim.V1.SimInstance #{values}>" end |
#sid ⇒ String
Returns The unique string that identifies the resource.
307 308 309 |
# File 'lib/twilio-ruby/rest/supersim/v1/sim.rb', line 307 def sid @properties['sid'] end |
#status ⇒ sim.Status
Returns The status of the Super SIM.
331 332 333 |
# File 'lib/twilio-ruby/rest/supersim/v1/sim.rb', line 331 def status @properties['status'] end |
#to_s ⇒ Object
Provide a user friendly representation
399 400 401 402 |
# File 'lib/twilio-ruby/rest/supersim/v1/sim.rb', line 399 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.
313 314 315 |
# File 'lib/twilio-ruby/rest/supersim/v1/sim.rb', line 313 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
386 387 388 389 390 391 392 393 394 395 |
# File 'lib/twilio-ruby/rest/supersim/v1/sim.rb', line 386 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.
355 356 357 |
# File 'lib/twilio-ruby/rest/supersim/v1/sim.rb', line 355 def url @properties['url'] end |