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


18
19
20
21
22
23
24
25
26
27
# File 'lib/twilio-ruby/rest/accounts/v1/credential.rb', line 18

def initialize(version)
  super(version)

  # Path Solution
  @solution = {}

  # Components
  @public_key = nil
  @aws = nil
end

Instance Method Details

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

Access the aws

Parameters:

  • sid (String) (defaults to: :unset)

    The Twilio-provided string that uniquely identifies the AWS resource to fetch.

Returns:

Raises:

  • (ArgumentError)

51
52
53
54
55
56
57
58
59
# File 'lib/twilio-ruby/rest/accounts/v1/credential.rb', line 51

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

Parameters:

  • sid (String) (defaults to: :unset)

    The Twilio-provided string that uniquely identifies the PublicKey resource to fetch.

Returns:

Raises:

  • (ArgumentError)

35
36
37
38
39
40
41
42
43
# File 'lib/twilio-ruby/rest/accounts/v1/credential.rb', line 35

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


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

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