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

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

Overview

PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.

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

  • sid (String) (defaults to: nil)

    The SID of the eSIM Profile resource to fetch.



247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
# File 'lib/twilio-ruby/rest/supersim/v1/esim_profile.rb', line 247

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 to which the eSIM Profile resource belongs.

Returns:

  • (String)

    The SID of the Account to which the eSIM Profile resource belongs



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

def 
  @properties['account_sid']
end

#activation_codeString

Returns Combined machine-readable activation code for acquiring an eSIM Profile with the Activation Code download method.

Returns:

  • (String)

    Combined machine-readable activation code for acquiring an eSIM Profile with the Activation Code download method



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

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:



277
278
279
280
281
282
# File 'lib/twilio-ruby/rest/supersim/v1/esim_profile.rb', line 277

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

#date_createdTime

Returns The ISO 8601 date and time in GMT when the resource was created.

Returns:

  • (Time)

    The ISO 8601 date and time in GMT when the resource was created



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

def date_created
  @properties['date_created']
end

#date_updatedTime

Returns The ISO 8601 date and time in GMT when the resource was last updated.

Returns:

  • (Time)

    The ISO 8601 date and time in GMT when the resource was last updated



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

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



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

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



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

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



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

def error_message
  @properties['error_message']
end

#fetchEsimProfileInstance

Fetch the EsimProfileInstance

Returns:



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

def fetch
  context.fetch
end

#iccidString

Returns The ICCID associated with the Sim resource.

Returns:

  • (String)

    The ICCID associated with the Sim resource



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

def iccid
  @properties['iccid']
end

#inspectObject

Provide a detailed, user friendly representation



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

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 be used to identify and download the eSIM profile.

Returns:

  • (String)

    Unique identifier of the eSIM profile that be used to identify and download the eSIM profile



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

def matching_id
  @properties['matching_id']
end

#sidString

Returns The unique string that identifies the resource.

Returns:

  • (String)

    The unique string that identifies the resource



286
287
288
# File 'lib/twilio-ruby/rest/supersim/v1/esim_profile.rb', line 286

def sid
  @properties['sid']
end

#sim_sidString

Returns The SID of the Sim resource that this eSIM Profile controls.

Returns:

  • (String)

    The SID of the Sim resource that this eSIM Profile controls



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

def sim_sid
  @properties['sim_sid']
end

#smdp_plus_addressString

Returns Address of the SM-DP+ server from which the Profile will be downloaded.

Returns:

  • (String)

    Address of the SM-DP+ server from which the Profile will be downloaded



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

def smdp_plus_address
  @properties['smdp_plus_address']
end

#statusesim_profile.Status

Returns The status of the eSIM Profile.

Returns:

  • (esim_profile.Status)

    The status of the eSIM Profile



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

def status
  @properties['status']
end

#to_sObject

Provide a user friendly representation



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

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



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

def url
  @properties['url']
end