Class: Twilio::REST::Api::V2010::AccountContext::SipList::CredentialListInstance

Inherits:
InstanceResource
  • Object
show all
Defined in:
lib/twilio-ruby/rest/api/v2010/account/sip/credential_list.rb

Instance Method Summary collapse

Constructor Details

#initialize(version, payload, account_sid: nil, sid: nil) ⇒ CredentialListInstance

Initialize the CredentialListInstance



559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/credential_list.rb', line 559

def initialize(version, payload , account_sid: nil, sid: nil)
    super(version)
    
    
    # Marshaled Properties
    @properties = { 
        'account_sid' => payload['account_sid'],
        'date_created' => Twilio.deserialize_rfc2822(payload['date_created']),
        'date_updated' => Twilio.deserialize_rfc2822(payload['date_updated']),
        'friendly_name' => payload['friendly_name'],
        'sid' => payload['sid'],
        'subresource_uris' => payload['subresource_uris'],
        'uri' => payload['uri'],
    }

    # Context
    @instance_context = nil
    @params = { 'account_sid' =>   ,'sid' => sid  || @properties['sid']  , }
end

Instance Method Details

#account_sidString



592
593
594
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/credential_list.rb', line 592

def 
    @properties['account_sid']
end

#contextCredentialListContext

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



583
584
585
586
587
588
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/credential_list.rb', line 583

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

#credentialscredentials

Access the credentials



664
665
666
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/credential_list.rb', line 664

def credentials
    context.credentials
end

#date_createdTime



598
599
600
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/credential_list.rb', line 598

def date_created
    @properties['date_created']
end

#date_updatedTime



604
605
606
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/credential_list.rb', line 604

def date_updated
    @properties['date_updated']
end

#deleteBoolean

Delete the CredentialListInstance



635
636
637
638
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/credential_list.rb', line 635

def delete

    context.delete
end

#fetchCredentialListInstance

Fetch the CredentialListInstance



643
644
645
646
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/credential_list.rb', line 643

def fetch

    context.fetch
end

#friendly_nameString



610
611
612
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/credential_list.rb', line 610

def friendly_name
    @properties['friendly_name']
end

#inspectObject

Provide a detailed, user friendly representation



677
678
679
680
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/credential_list.rb', line 677

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

#sidString



616
617
618
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/credential_list.rb', line 616

def sid
    @properties['sid']
end

#subresource_urisHash



622
623
624
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/credential_list.rb', line 622

def subresource_uris
    @properties['subresource_uris']
end

#to_sObject

Provide a user friendly representation



670
671
672
673
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/credential_list.rb', line 670

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

#update(friendly_name: nil) ⇒ CredentialListInstance

Update the CredentialListInstance



652
653
654
655
656
657
658
659
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/credential_list.rb', line 652

def update(
  friendly_name: nil
)

    context.update(
        friendly_name: friendly_name, 
    )
end

#uriString



628
629
630
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/credential_list.rb', line 628

def uri
    @properties['uri']
end