Class: Twilio::REST::Supersim::V1::EsimProfileInstance
- Inherits:
-
InstanceResource
- Object
- InstanceResource
- Twilio::REST::Supersim::V1::EsimProfileInstance
- Defined in:
- lib/twilio-ruby/rest/supersim/v1/esim_profile.rb
Instance Method Summary collapse
-
#account_sid ⇒ String
The SID of the [Account](www.twilio.com/docs/iam/api/account) to which the eSIM Profile resource belongs.
-
#activation_code ⇒ String
Combined machine-readable activation code for acquiring an eSIM Profile with the Activation Code download method.
-
#context ⇒ EsimProfileContext
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.
-
#eid ⇒ String
Identifier of the eUICC that can claim the eSIM Profile.
-
#error_code ⇒ String
Code indicating the failure if the download of the SIM Profile failed and the eSIM Profile is in ‘failed` state.
-
#error_message ⇒ String
Error message describing the failure if the download of the SIM Profile failed and the eSIM Profile is in ‘failed` state.
-
#fetch ⇒ EsimProfileInstance
Fetch the EsimProfileInstance.
-
#iccid ⇒ String
The [ICCID](en.wikipedia.org/wiki/Subscriber_identity_module#ICCID) associated with the Sim resource.
-
#initialize(version, payload, sid: nil) ⇒ EsimProfileInstance
constructor
Initialize the EsimProfileInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#matching_id ⇒ String
Unique identifier of the eSIM profile that can be used to identify and download the eSIM profile from the SM-DP+ server.
-
#sid ⇒ String
The unique string that we created to identify the eSIM Profile resource.
-
#sim_sid ⇒ String
The SID of the [Sim](www.twilio.com/docs/iot/supersim/api/sim-resource) resource that this eSIM Profile controls.
-
#smdp_plus_address ⇒ String
Address of the SM-DP+ server from which the Profile will be downloaded.
- #status ⇒ Status
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#url ⇒ String
The absolute URL of the eSIM Profile resource.
Constructor Details
#initialize(version, payload, sid: nil) ⇒ EsimProfileInstance
Initialize the EsimProfileInstance
259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 |
# File 'lib/twilio-ruby/rest/supersim/v1/esim_profile.rb', line 259 def initialize(version, payload , sid: nil) super(version) # Marshaled Properties @properties = { 'sid' => payload['sid'], 'account_sid' => payload['account_sid'], 'iccid' => payload['iccid'], 'sim_sid' => payload['sim_sid'], 'status' => payload['status'], 'eid' => payload['eid'], 'smdp_plus_address' => payload['smdp_plus_address'], 'matching_id' => payload['matching_id'], 'activation_code' => payload['activation_code'], 'error_code' => payload['error_code'], 'error_message' => payload['error_message'], '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](www.twilio.com/docs/iam/api/account) to which the eSIM Profile resource belongs.
304 305 306 |
# File 'lib/twilio-ruby/rest/supersim/v1/esim_profile.rb', line 304 def account_sid @properties['account_sid'] end |
#activation_code ⇒ String
Returns Combined machine-readable activation code for acquiring an eSIM Profile with the Activation Code download method. Can be used in a QR code to download an eSIM profile.
346 347 348 |
# File 'lib/twilio-ruby/rest/supersim/v1/esim_profile.rb', line 346 def activation_code @properties['activation_code'] end |
#context ⇒ EsimProfileContext
Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context
289 290 291 292 293 294 |
# File 'lib/twilio-ruby/rest/supersim/v1/esim_profile.rb', line 289 def context unless @instance_context @instance_context = EsimProfileContext.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.
364 365 366 |
# File 'lib/twilio-ruby/rest/supersim/v1/esim_profile.rb', line 364 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.
370 371 372 |
# File 'lib/twilio-ruby/rest/supersim/v1/esim_profile.rb', line 370 def date_updated @properties['date_updated'] end |
#eid ⇒ String
Returns Identifier of the eUICC that can claim the eSIM Profile.
328 329 330 |
# File 'lib/twilio-ruby/rest/supersim/v1/esim_profile.rb', line 328 def eid @properties['eid'] end |
#error_code ⇒ String
Returns Code indicating the failure if the download of the SIM Profile failed and the eSIM Profile is in ‘failed` state.
352 353 354 |
# File 'lib/twilio-ruby/rest/supersim/v1/esim_profile.rb', line 352 def error_code @properties['error_code'] end |
#error_message ⇒ String
Returns Error message describing the failure if the download of the SIM Profile failed and the eSIM Profile is in ‘failed` state.
358 359 360 |
# File 'lib/twilio-ruby/rest/supersim/v1/esim_profile.rb', line 358 def @properties['error_message'] end |
#fetch ⇒ EsimProfileInstance
Fetch the EsimProfileInstance
383 384 385 386 |
# File 'lib/twilio-ruby/rest/supersim/v1/esim_profile.rb', line 383 def fetch context.fetch end |
#iccid ⇒ String
Returns The [ICCID](en.wikipedia.org/wiki/Subscriber_identity_module#ICCID) associated with the Sim resource.
310 311 312 |
# File 'lib/twilio-ruby/rest/supersim/v1/esim_profile.rb', line 310 def iccid @properties['iccid'] end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
397 398 399 400 |
# File 'lib/twilio-ruby/rest/supersim/v1/esim_profile.rb', line 397 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Supersim.V1.EsimProfileInstance #{values}>" end |
#matching_id ⇒ String
Returns Unique identifier of the eSIM profile that can be used to identify and download the eSIM profile from the SM-DP+ server. Populated if ‘generate_matching_id` is set to `true` when creating the eSIM profile reservation.
340 341 342 |
# File 'lib/twilio-ruby/rest/supersim/v1/esim_profile.rb', line 340 def matching_id @properties['matching_id'] end |
#sid ⇒ String
Returns The unique string that we created to identify the eSIM Profile resource.
298 299 300 |
# File 'lib/twilio-ruby/rest/supersim/v1/esim_profile.rb', line 298 def sid @properties['sid'] end |
#sim_sid ⇒ String
Returns The SID of the [Sim](www.twilio.com/docs/iot/supersim/api/sim-resource) resource that this eSIM Profile controls.
316 317 318 |
# File 'lib/twilio-ruby/rest/supersim/v1/esim_profile.rb', line 316 def sim_sid @properties['sim_sid'] end |
#smdp_plus_address ⇒ String
Returns Address of the SM-DP+ server from which the Profile will be downloaded. The URL will appear once the eSIM Profile reaches the status ‘available`.
334 335 336 |
# File 'lib/twilio-ruby/rest/supersim/v1/esim_profile.rb', line 334 def smdp_plus_address @properties['smdp_plus_address'] end |
#status ⇒ Status
322 323 324 |
# File 'lib/twilio-ruby/rest/supersim/v1/esim_profile.rb', line 322 def status @properties['status'] end |
#to_s ⇒ Object
Provide a user friendly representation
390 391 392 393 |
# File 'lib/twilio-ruby/rest/supersim/v1/esim_profile.rb', line 390 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Supersim.V1.EsimProfileInstance #{values}>" end |
#url ⇒ String
Returns The absolute URL of the eSIM Profile resource.
376 377 378 |
# File 'lib/twilio-ruby/rest/supersim/v1/esim_profile.rb', line 376 def url @properties['url'] end |