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



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

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



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

def 
    @properties['account_sid']
end

#activation_codeString



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

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



287
288
289
290
291
292
# File 'lib/twilio-ruby/rest/supersim/v1/esim_profile.rb', line 287

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

#date_createdTime



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

def date_created
    @properties['date_created']
end

#date_updatedTime



368
369
370
# File 'lib/twilio-ruby/rest/supersim/v1/esim_profile.rb', line 368

def date_updated
    @properties['date_updated']
end

#eidString



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

def eid
    @properties['eid']
end

#error_codeString



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

def error_code
    @properties['error_code']
end

#error_messageString



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

def error_message
    @properties['error_message']
end

#fetchEsimProfileInstance

Fetch the EsimProfileInstance



381
382
383
384
# File 'lib/twilio-ruby/rest/supersim/v1/esim_profile.rb', line 381

def fetch

    context.fetch
end

#iccidString



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

def iccid
    @properties['iccid']
end

#inspectObject

Provide a detailed, user friendly representation



395
396
397
398
# File 'lib/twilio-ruby/rest/supersim/v1/esim_profile.rb', line 395

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

#matching_idString



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

def matching_id
    @properties['matching_id']
end

#sidString



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

def sid
    @properties['sid']
end

#sim_sidString



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

def sim_sid
    @properties['sim_sid']
end

#smdp_plus_addressString



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

def smdp_plus_address
    @properties['smdp_plus_address']
end

#statusStatus



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

def status
    @properties['status']
end

#to_sObject

Provide a user friendly representation



388
389
390
391
# File 'lib/twilio-ruby/rest/supersim/v1/esim_profile.rb', line 388

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

#urlString



374
375
376
# File 'lib/twilio-ruby/rest/supersim/v1/esim_profile.rb', line 374

def url
    @properties['url']
end