class Twilio::REST::Accounts::V1::SecondaryAuthTokenInstance

Public Class Methods

new(version, payload) click to toggle source

Initialize the SecondaryAuthTokenInstance @param [Version] version Version that contains the resource @param [Hash] payload payload that contains response from Twilio @return [SecondaryAuthTokenInstance] SecondaryAuthTokenInstance

Calls superclass method Twilio::REST::InstanceResource::new
    # File lib/twilio-ruby/rest/accounts/v1/secondary_auth_token.rb
111 def initialize(version, payload)
112   super(version)
113 
114   # Marshaled Properties
115   @properties = {
116       'account_sid' => payload['account_sid'],
117       'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
118       'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
119       'secondary_auth_token' => payload['secondary_auth_token'],
120       'url' => payload['url'],
121   }
122 
123   # Context
124   @instance_context = nil
125   @params = {}
126 end

Public Instance Methods

account_sid() click to toggle source

@return [String] The SID of the Account that the secondary Auth Token was created for

    # File lib/twilio-ruby/rest/accounts/v1/secondary_auth_token.rb
141 def account_sid
142   @properties['account_sid']
143 end
context() click to toggle source

Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context @return [SecondaryAuthTokenContext] SecondaryAuthTokenContext for this SecondaryAuthTokenInstance

    # File lib/twilio-ruby/rest/accounts/v1/secondary_auth_token.rb
132 def context
133   unless @instance_context
134     @instance_context = SecondaryAuthTokenContext.new(@version, )
135   end
136   @instance_context
137 end
create() click to toggle source

Create the SecondaryAuthTokenInstance @return [SecondaryAuthTokenInstance] Created SecondaryAuthTokenInstance

    # File lib/twilio-ruby/rest/accounts/v1/secondary_auth_token.rb
172 def create
173   context.create
174 end
date_created() click to toggle source

@return [Time] The ISO 8601 formatted date and time in UTC when the resource was created

    # File lib/twilio-ruby/rest/accounts/v1/secondary_auth_token.rb
147 def date_created
148   @properties['date_created']
149 end
date_updated() click to toggle source

@return [Time] The ISO 8601 formatted date and time in UTC when the resource was last updated

    # File lib/twilio-ruby/rest/accounts/v1/secondary_auth_token.rb
153 def date_updated
154   @properties['date_updated']
155 end
delete() click to toggle source

Delete the SecondaryAuthTokenInstance @return [Boolean] true if delete succeeds, false otherwise

    # File lib/twilio-ruby/rest/accounts/v1/secondary_auth_token.rb
179 def delete
180   context.delete
181 end
inspect() click to toggle source

Provide a detailed, user friendly representation

    # File lib/twilio-ruby/rest/accounts/v1/secondary_auth_token.rb
192 def inspect
193   values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
194   "<Twilio.Accounts.V1.SecondaryAuthTokenInstance #{values}>"
195 end
secondary_auth_token() click to toggle source

@return [String] The generated secondary Auth Token

    # File lib/twilio-ruby/rest/accounts/v1/secondary_auth_token.rb
159 def secondary_auth_token
160   @properties['secondary_auth_token']
161 end
to_s() click to toggle source

Provide a user friendly representation

    # File lib/twilio-ruby/rest/accounts/v1/secondary_auth_token.rb
185 def to_s
186   values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
187   "<Twilio.Accounts.V1.SecondaryAuthTokenInstance #{values}>"
188 end
url() click to toggle source

@return [String] The URI for this resource, relative to `accounts.twilio.com`

    # File lib/twilio-ruby/rest/accounts/v1/secondary_auth_token.rb
165 def url
166   @properties['url']
167 end