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



473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
# File 'lib/twilio-ruby/rest/supersim/v1/esim_profile.rb', line 473

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



519
520
521
# File 'lib/twilio-ruby/rest/supersim/v1/esim_profile.rb', line 519

def 
    @properties['account_sid']
end

#activation_codeString



561
562
563
# File 'lib/twilio-ruby/rest/supersim/v1/esim_profile.rb', line 561

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



504
505
506
507
508
509
# File 'lib/twilio-ruby/rest/supersim/v1/esim_profile.rb', line 504

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

#date_createdTime



579
580
581
# File 'lib/twilio-ruby/rest/supersim/v1/esim_profile.rb', line 579

def date_created
    @properties['date_created']
end

#date_updatedTime



585
586
587
# File 'lib/twilio-ruby/rest/supersim/v1/esim_profile.rb', line 585

def date_updated
    @properties['date_updated']
end

#eidString



543
544
545
# File 'lib/twilio-ruby/rest/supersim/v1/esim_profile.rb', line 543

def eid
    @properties['eid']
end

#error_codeString



567
568
569
# File 'lib/twilio-ruby/rest/supersim/v1/esim_profile.rb', line 567

def error_code
    @properties['error_code']
end

#error_messageString



573
574
575
# File 'lib/twilio-ruby/rest/supersim/v1/esim_profile.rb', line 573

def error_message
    @properties['error_message']
end

#fetchEsimProfileInstance

Fetch the EsimProfileInstance



598
599
600
601
# File 'lib/twilio-ruby/rest/supersim/v1/esim_profile.rb', line 598

def fetch

    context.fetch
end

#iccidString



525
526
527
# File 'lib/twilio-ruby/rest/supersim/v1/esim_profile.rb', line 525

def iccid
    @properties['iccid']
end

#inspectObject

Provide a detailed, user friendly representation



612
613
614
615
# File 'lib/twilio-ruby/rest/supersim/v1/esim_profile.rb', line 612

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

#matching_idString



555
556
557
# File 'lib/twilio-ruby/rest/supersim/v1/esim_profile.rb', line 555

def matching_id
    @properties['matching_id']
end

#sidString



513
514
515
# File 'lib/twilio-ruby/rest/supersim/v1/esim_profile.rb', line 513

def sid
    @properties['sid']
end

#sim_sidString



531
532
533
# File 'lib/twilio-ruby/rest/supersim/v1/esim_profile.rb', line 531

def sim_sid
    @properties['sim_sid']
end

#smdp_plus_addressString



549
550
551
# File 'lib/twilio-ruby/rest/supersim/v1/esim_profile.rb', line 549

def smdp_plus_address
    @properties['smdp_plus_address']
end

#statusStatus



537
538
539
# File 'lib/twilio-ruby/rest/supersim/v1/esim_profile.rb', line 537

def status
    @properties['status']
end

#to_sObject

Provide a user friendly representation



605
606
607
608
# File 'lib/twilio-ruby/rest/supersim/v1/esim_profile.rb', line 605

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

#urlString



591
592
593
# File 'lib/twilio-ruby/rest/supersim/v1/esim_profile.rb', line 591

def url
    @properties['url']
end