Class: Twilio::REST::Accounts::V1::SecondaryAuthTokenInstance
- Inherits:
-
InstanceResource
- Object
- InstanceResource
- Twilio::REST::Accounts::V1::SecondaryAuthTokenInstance
- Defined in:
- lib/twilio-ruby/rest/accounts/v1/secondary_auth_token.rb
Instance Method Summary collapse
-
#account_sid ⇒ String
The SID of the Account that the secondary Auth Token was created for.
-
#context ⇒ SecondaryAuthTokenContext
Generate an instance context for the instance, the context is capable of performing various actions.
-
#create(suppress_email_notification: :unset) ⇒ SecondaryAuthTokenInstance
Create the SecondaryAuthTokenInstance.
-
#date_created ⇒ Time
The date and time in UTC when the resource was created specified in ISO 8601 format.
-
#date_updated ⇒ Time
The date and time in UTC when the resource was last updated specified in ISO 8601 format.
-
#delete(suppress_email_notification: :unset) ⇒ Boolean
Delete the SecondaryAuthTokenInstance.
-
#initialize(version, payload) ⇒ SecondaryAuthTokenInstance
constructor
Initialize the SecondaryAuthTokenInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#secondary_auth_token ⇒ String
The generated secondary Auth Token that can be used to authenticate future API requests.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#url ⇒ String
The URI for this resource, relative to
https://accounts.twilio.com.
Constructor Details
#initialize(version, payload) ⇒ SecondaryAuthTokenInstance
Initialize the SecondaryAuthTokenInstance
321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 |
# File 'lib/twilio-ruby/rest/accounts/v1/secondary_auth_token.rb', line 321 def initialize(version, payload ) super(version) # Marshaled Properties @properties = { 'account_sid' => payload['account_sid'], 'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']), 'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']), 'secondary_auth_token' => payload['secondary_auth_token'], 'url' => payload['url'], } # Context @instance_context = nil @params = { } end |
Instance Method Details
#account_sid ⇒ String
Returns The SID of the Account that the secondary Auth Token was created for.
352 353 354 |
# File 'lib/twilio-ruby/rest/accounts/v1/secondary_auth_token.rb', line 352 def account_sid @properties['account_sid'] end |
#context ⇒ SecondaryAuthTokenContext
Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context
343 344 345 346 347 348 |
# File 'lib/twilio-ruby/rest/accounts/v1/secondary_auth_token.rb', line 343 def context unless @instance_context @instance_context = SecondaryAuthTokenContext.new(@version ) end @instance_context end |
#create(suppress_email_notification: :unset) ⇒ SecondaryAuthTokenInstance
Create the SecondaryAuthTokenInstance
384 385 386 387 388 389 390 391 |
# File 'lib/twilio-ruby/rest/accounts/v1/secondary_auth_token.rb', line 384 def create( suppress_email_notification: :unset ) context.create( suppress_email_notification: suppress_email_notification, ) end |
#date_created ⇒ Time
Returns The date and time in UTC when the resource was created specified in ISO 8601 format.
358 359 360 |
# File 'lib/twilio-ruby/rest/accounts/v1/secondary_auth_token.rb', line 358 def date_created @properties['date_created'] end |
#date_updated ⇒ Time
Returns The date and time in UTC when the resource was last updated specified in ISO 8601 format.
364 365 366 |
# File 'lib/twilio-ruby/rest/accounts/v1/secondary_auth_token.rb', line 364 def date_updated @properties['date_updated'] end |
#delete(suppress_email_notification: :unset) ⇒ Boolean
Delete the SecondaryAuthTokenInstance
397 398 399 400 401 402 403 404 |
# File 'lib/twilio-ruby/rest/accounts/v1/secondary_auth_token.rb', line 397 def delete( suppress_email_notification: :unset ) context.delete( suppress_email_notification: suppress_email_notification, ) end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
415 416 417 418 |
# File 'lib/twilio-ruby/rest/accounts/v1/secondary_auth_token.rb', line 415 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Accounts.V1.SecondaryAuthTokenInstance #{values}>" end |
#secondary_auth_token ⇒ String
Returns The generated secondary Auth Token that can be used to authenticate future API requests.
370 371 372 |
# File 'lib/twilio-ruby/rest/accounts/v1/secondary_auth_token.rb', line 370 def secondary_auth_token @properties['secondary_auth_token'] end |
#to_s ⇒ Object
Provide a user friendly representation
408 409 410 411 |
# File 'lib/twilio-ruby/rest/accounts/v1/secondary_auth_token.rb', line 408 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Accounts.V1.SecondaryAuthTokenInstance #{values}>" end |
#url ⇒ String
Returns The URI for this resource, relative to https://accounts.twilio.com.
376 377 378 |
# File 'lib/twilio-ruby/rest/accounts/v1/secondary_auth_token.rb', line 376 def url @properties['url'] end |