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

Inherits:
Version
  • Object
show all
Defined in:
lib/twilio-ruby/rest/accounts/v1.rb,
lib/twilio-ruby/rest/accounts/v1/safelist.rb,
lib/twilio-ruby/rest/accounts/v1/credential.rb,
lib/twilio-ruby/rest/accounts/v1/bulk_consents.rb,
lib/twilio-ruby/rest/accounts/v1/bulk_contacts.rb,
lib/twilio-ruby/rest/accounts/v1/credential/aws.rb,
lib/twilio-ruby/rest/accounts/v1/auth_token_promotion.rb,
lib/twilio-ruby/rest/accounts/v1/secondary_auth_token.rb,
lib/twilio-ruby/rest/accounts/v1/credential/public_key.rb,
lib/twilio-ruby/rest/accounts/v1/messaging_geopermissions.rb

Defined Under Namespace

Classes: AuthTokenPromotionContext, AuthTokenPromotionInstance, AuthTokenPromotionInstanceMetadata, AuthTokenPromotionList, AuthTokenPromotionListResponse, AuthTokenPromotionPage, AuthTokenPromotionPageMetadata, BulkConsentsInstance, BulkConsentsList, BulkConsentsListResponse, BulkConsentsPage, BulkConsentsPageMetadata, BulkContactsInstance, BulkContactsList, BulkContactsListResponse, BulkContactsPage, BulkContactsPageMetadata, CredentialInstance, CredentialList, CredentialListResponse, CredentialPage, CredentialPageMetadata, MessagingGeopermissionsInstance, MessagingGeopermissionsList, MessagingGeopermissionsListResponse, MessagingGeopermissionsPage, MessagingGeopermissionsPageMetadata, SafelistInstance, SafelistList, SafelistListResponse, SafelistPage, SafelistPageMetadata, SecondaryAuthTokenContext, SecondaryAuthTokenInstance, SecondaryAuthTokenInstanceMetadata, SecondaryAuthTokenList, SecondaryAuthTokenListResponse, SecondaryAuthTokenPage, SecondaryAuthTokenPageMetadata

Instance Attribute Summary

Attributes inherited from Version

#domain, #version

Instance Method Summary collapse

Methods inherited from Version

#absolute_url, #create, #create_with_metadata, #delete, #delete_with_metadata, #exception, #fetch, #fetch_with_metadata, #page, #patch, #read_limits, #relative_uri, #request, #stream, #stream_with_metadata, #update, #update_with_metadata

Constructor Details

#initialize(domain) ⇒ V1

Initialize the V1 version of Accounts



21
22
23
24
25
26
27
28
29
30
31
# File 'lib/twilio-ruby/rest/accounts/v1.rb', line 21

def initialize(domain)
    super
    @version = 'v1'
    @auth_token_promotion = nil
    @bulk_consents = nil
    @bulk_contacts = nil
    @credentials = nil
    @messaging_geopermissions = nil
    @safelist = nil
    @secondary_auth_token = nil
end

Instance Method Details

#auth_token_promotionTwilio::REST::Accounts::V1::authTokenPromotionContext

Returns:

  • (Twilio::REST::Accounts::V1::authTokenPromotionContext)


35
36
37
# File 'lib/twilio-ruby/rest/accounts/v1.rb', line 35

def auth_token_promotion
    @auth_token_promotion ||= AuthTokenPromotionContext.new self
end

#bulk_consentsTwilio::REST::Accounts::V1::BulkConsentsList



40
41
42
# File 'lib/twilio-ruby/rest/accounts/v1.rb', line 40

def bulk_consents
    @bulk_consents ||= BulkConsentsList.new self
end

#bulk_contactsTwilio::REST::Accounts::V1::BulkContactsList



45
46
47
# File 'lib/twilio-ruby/rest/accounts/v1.rb', line 45

def bulk_contacts
    @bulk_contacts ||= BulkContactsList.new self
end

#credentials(sid = :unset) ⇒ Twilio::REST::Accounts::V1::CredentialList

Parameters:

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

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

Returns:



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

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

    if sid == :unset
        @credentials ||= CredentialList.new self
    else
        CredentialList.new(self, sid: sid)
    end
end

#messaging_geopermissionsTwilio::REST::Accounts::V1::MessagingGeopermissionsList



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

def messaging_geopermissions
    @messaging_geopermissions ||= MessagingGeopermissionsList.new self
end

#safelistTwilio::REST::Accounts::V1::SafelistList



69
70
71
# File 'lib/twilio-ruby/rest/accounts/v1.rb', line 69

def safelist
    @safelist ||= SafelistList.new self
end

#secondary_auth_tokenTwilio::REST::Accounts::V1::secondaryAuthTokenContext

Returns:

  • (Twilio::REST::Accounts::V1::secondaryAuthTokenContext)


74
75
76
# File 'lib/twilio-ruby/rest/accounts/v1.rb', line 74

def secondary_auth_token
    @secondary_auth_token ||= SecondaryAuthTokenContext.new self
end

#to_sObject

Provide a user friendly representation



79
80
81
# File 'lib/twilio-ruby/rest/accounts/v1.rb', line 79

def to_s
    '<Twilio::REST::Accounts::V1>';
end