Class: Twilio::REST::Supersim::V1::EsimProfileInstance

Inherits:
InstanceResource show all
Defined in:
lib/twilio-ruby/rest/supersim/v1/esim_profile.rb

Instance Method Summary collapse

Constructor Details

#initialize(version, payload, sid: nil) ⇒ EsimProfileInstance

Initialize the EsimProfileInstance

Parameters:

  • version (Version)

    Version that contains the resource

  • payload (Hash)

    payload that contains response from Twilio

  • account_sid (String)

    The SID of the Account that created this EsimProfile resource.

  • sid (String) (defaults to: nil)

    The SID of the Call resource to fetch.



260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
# File 'lib/twilio-ruby/rest/supersim/v1/esim_profile.rb', line 260

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_sidString

Returns The SID of the [Account](www.twilio.com/docs/iam/api/account) to which the eSIM Profile resource belongs.

Returns:



305
306
307
# File 'lib/twilio-ruby/rest/supersim/v1/esim_profile.rb', line 305

def 
    @properties['account_sid']
end

#activation_codeString

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.

Returns:

  • (String)

    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.



347
348
349
# File 'lib/twilio-ruby/rest/supersim/v1/esim_profile.rb', line 347

def activation_code
    @properties['activation_code']
end

#contextEsimProfileContext

Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context

Returns:



290
291
292
293
294
295
# File 'lib/twilio-ruby/rest/supersim/v1/esim_profile.rb', line 290

def context
    unless @instance_context
        @instance_context = EsimProfileContext.new(@version , @params['sid'])
    end
    @instance_context
end

#date_createdTime

Returns The date and time in GMT when the resource was created specified in [ISO 8601](en.wikipedia.org/wiki/ISO_8601) format.

Returns:



365
366
367
# File 'lib/twilio-ruby/rest/supersim/v1/esim_profile.rb', line 365

def date_created
    @properties['date_created']
end

#date_updatedTime

Returns The date and time in GMT when the resource was last updated specified in [ISO 8601](en.wikipedia.org/wiki/ISO_8601) format.

Returns:



371
372
373
# File 'lib/twilio-ruby/rest/supersim/v1/esim_profile.rb', line 371

def date_updated
    @properties['date_updated']
end

#eidString

Returns Identifier of the eUICC that can claim the eSIM Profile.

Returns:

  • (String)

    Identifier of the eUICC that can claim the eSIM Profile.



329
330
331
# File 'lib/twilio-ruby/rest/supersim/v1/esim_profile.rb', line 329

def eid
    @properties['eid']
end

#error_codeString

Returns Code indicating the failure if the download of the SIM Profile failed and the eSIM Profile is in ‘failed` state.

Returns:

  • (String)

    Code indicating the failure if the download of the SIM Profile failed and the eSIM Profile is in ‘failed` state.



353
354
355
# File 'lib/twilio-ruby/rest/supersim/v1/esim_profile.rb', line 353

def error_code
    @properties['error_code']
end

#error_messageString

Returns Error message describing the failure if the download of the SIM Profile failed and the eSIM Profile is in ‘failed` state.

Returns:

  • (String)

    Error message describing the failure if the download of the SIM Profile failed and the eSIM Profile is in ‘failed` state.



359
360
361
# File 'lib/twilio-ruby/rest/supersim/v1/esim_profile.rb', line 359

def error_message
    @properties['error_message']
end

#fetchEsimProfileInstance

Fetch the EsimProfileInstance

Returns:



384
385
386
387
# File 'lib/twilio-ruby/rest/supersim/v1/esim_profile.rb', line 384

def fetch

    context.fetch
end

#iccidString

Returns The [ICCID](en.wikipedia.org/wiki/Subscriber_identity_module#ICCID) associated with the Sim resource.

Returns:



311
312
313
# File 'lib/twilio-ruby/rest/supersim/v1/esim_profile.rb', line 311

def iccid
    @properties['iccid']
end

#inspectObject

Provide a detailed, user friendly representation



398
399
400
401
# File 'lib/twilio-ruby/rest/supersim/v1/esim_profile.rb', line 398

def inspect
    values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
    "<Twilio.Supersim.V1.EsimProfileInstance #{values}>"
end

#matching_idString

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.

Returns:

  • (String)

    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.



341
342
343
# File 'lib/twilio-ruby/rest/supersim/v1/esim_profile.rb', line 341

def matching_id
    @properties['matching_id']
end

#sidString

Returns The unique string that we created to identify the eSIM Profile resource.

Returns:

  • (String)

    The unique string that we created to identify the eSIM Profile resource.



299
300
301
# File 'lib/twilio-ruby/rest/supersim/v1/esim_profile.rb', line 299

def sid
    @properties['sid']
end

#sim_sidString

Returns The SID of the [Sim](www.twilio.com/docs/wireless/api/sim-resource) resource that this eSIM Profile controls.

Returns:



317
318
319
# File 'lib/twilio-ruby/rest/supersim/v1/esim_profile.rb', line 317

def sim_sid
    @properties['sim_sid']
end

#smdp_plus_addressString

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`.

Returns:

  • (String)

    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`.



335
336
337
# File 'lib/twilio-ruby/rest/supersim/v1/esim_profile.rb', line 335

def smdp_plus_address
    @properties['smdp_plus_address']
end

#statusStatus

Returns:

  • (Status)


323
324
325
# File 'lib/twilio-ruby/rest/supersim/v1/esim_profile.rb', line 323

def status
    @properties['status']
end

#to_sObject

Provide a user friendly representation



391
392
393
394
# File 'lib/twilio-ruby/rest/supersim/v1/esim_profile.rb', line 391

def to_s
    values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
    "<Twilio.Supersim.V1.EsimProfileInstance #{values}>"
end

#urlString

Returns The absolute URL of the eSIM Profile resource.

Returns:

  • (String)

    The absolute URL of the eSIM Profile resource.



377
378
379
# File 'lib/twilio-ruby/rest/supersim/v1/esim_profile.rb', line 377

def url
    @properties['url']
end