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

Inherits:
InstanceContext
  • Object
show all
Defined in:
lib/twilio-ruby/rest/accounts/v1/secondary_auth_token.rb

Instance Method Summary collapse

Constructor Details

#initialize(version) ⇒ SecondaryAuthTokenContext

Initialize the SecondaryAuthTokenContext

Parameters:

  • version (Version)

    Version that contains the resource



47
48
49
50
51
52
53
54
55
# File 'lib/twilio-ruby/rest/accounts/v1/secondary_auth_token.rb', line 47

def initialize(version)
    super(version)

    # Path Solution
    @solution = {  }
    @uri = "/AuthTokens/Secondary"

    
end

Instance Method Details

#createSecondaryAuthTokenInstance

Create the SecondaryAuthTokenInstance

Returns:



59
60
61
62
63
64
65
66
# File 'lib/twilio-ruby/rest/accounts/v1/secondary_auth_token.rb', line 59

def create

    payload = @version.create('POST', @uri)
    SecondaryAuthTokenInstance.new(
        @version,
        payload,
    )
end

#deleteBoolean

Delete the SecondaryAuthTokenInstance

Returns:

  • (Boolean)

    True if delete succeeds, false otherwise



71
72
73
74
# File 'lib/twilio-ruby/rest/accounts/v1/secondary_auth_token.rb', line 71

def delete

    @version.delete('DELETE', @uri)
end

#inspectObject

Provide a detailed, user friendly representation



86
87
88
89
# File 'lib/twilio-ruby/rest/accounts/v1/secondary_auth_token.rb', line 86

def inspect
    context = @solution.map{|k, v| "#{k}: #{v}"}.join(',')
    "#<Twilio.Accounts.V1.SecondaryAuthTokenContext #{context}>"
end

#to_sObject

Provide a user friendly representation



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

def to_s
    context = @solution.map{|k, v| "#{k}: #{v}"}.join(',')
    "#<Twilio.Accounts.V1.SecondaryAuthTokenContext #{context}>"
end