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



481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
# File 'lib/twilio-ruby/rest/supersim/v1/esim_profile.rb', line 481

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



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

def 
    @properties['account_sid']
end

#activation_code ⇒ String



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

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



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

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

#date_created ⇒ Time



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

def date_created
    @properties['date_created']
end

#date_updated ⇒ Time



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

def date_updated
    @properties['date_updated']
end

#eid ⇒ String



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

def eid
    @properties['eid']
end

#error_code ⇒ String



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

def error_code
    @properties['error_code']
end

#error_message ⇒ String



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

def error_message
    @properties['error_message']
end

#fetch ⇒ EsimProfileInstance

Fetch the EsimProfileInstance



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

def fetch

    context.fetch
end

#iccid ⇒ String



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

def iccid
    @properties['iccid']
end

#inspect ⇒ Object

Provide a detailed, user friendly representation



620
621
622
623
# File 'lib/twilio-ruby/rest/supersim/v1/esim_profile.rb', line 620

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

#matching_id ⇒ String



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

def matching_id
    @properties['matching_id']
end

#sid ⇒ String



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

def sid
    @properties['sid']
end

#sim_sid ⇒ String



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

def sim_sid
    @properties['sim_sid']
end

#smdp_plus_address ⇒ String



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

def smdp_plus_address
    @properties['smdp_plus_address']
end

#status ⇒ Status



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

def status
    @properties['status']
end

#to_s ⇒ Object

Provide a user friendly representation



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

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

#url ⇒ String



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

def url
    @properties['url']
end