Class: Twilio::REST::Accounts::V1::CredentialList

Inherits:
ListResource
  • Object
show all
Defined in:
lib/twilio-ruby/rest/accounts/v1/credential.rb,
lib/twilio-ruby/rest/accounts/v1/credential/aws.rb,
lib/twilio-ruby/rest/accounts/v1/credential/public_key.rb

Defined Under Namespace

Classes: AwsContext, AwsInstance, AwsList, AwsPage, PublicKeyContext, PublicKeyInstance, PublicKeyList, PublicKeyPage

Instance Method Summary collapse

Constructor Details

#initialize(version) ⇒ CredentialList

Initialize the CredentialList

Parameters:

  • version (Version)

    Version that contains the resource



26
27
28
29
30
31
32
33
34
# File 'lib/twilio-ruby/rest/accounts/v1/credential.rb', line 26

def initialize(version)
    super(version)
    # Path Solution
    @solution = {  }
    @uri = "/Credentials"
    # Components
    @public_key = nil
    @aws = nil
end

Instance Method Details

#aws(sid = :unset) ⇒ AwsList, AwsContext

Access the aws

Returns:

Raises:

  • (ArgumentError)


54
55
56
57
58
59
60
61
62
# File 'lib/twilio-ruby/rest/accounts/v1/credential.rb', line 54

def aws(sid=:unset)
    raise ArgumentError, 'sid cannot be nil' if sid.nil?

    if sid != :unset
        return AwsContext.new(@version,sid )
    end

    @aws ||= AwsList.new(@version )
end

#public_key(sid = :unset) ⇒ PublicKeyList, PublicKeyContext

Access the public_key

Returns:

Raises:

  • (ArgumentError)


41
42
43
44
45
46
47
48
49
# File 'lib/twilio-ruby/rest/accounts/v1/credential.rb', line 41

def public_key(sid=:unset)
    raise ArgumentError, 'sid cannot be nil' if sid.nil?

    if sid != :unset
        return PublicKeyContext.new(@version,sid )
    end

    @public_key ||= PublicKeyList.new(@version )
end

#to_sObject

Provide a user friendly representation



65
66
67
# File 'lib/twilio-ruby/rest/accounts/v1/credential.rb', line 65

def to_s
    '#<Twilio.Accounts.V1.CredentialList>'
end