Class: Twilio::REST::Accounts::V1::AuthTokenPromotionInstance
- Inherits:
-
InstanceResource
- Object
- InstanceResource
- Twilio::REST::Accounts::V1::AuthTokenPromotionInstance
- Defined in:
- lib/twilio-ruby/rest/accounts/v1/auth_token_promotion.rb
Instance Method Summary collapse
-
#account_sid ⇒ String
The SID of the Account that the secondary Auth Token was created for.
-
#auth_token ⇒ String
The promoted Auth Token that must be used to authenticate future API requests.
-
#context ⇒ AuthTokenPromotionContext
Generate an instance context for the instance, the context is capable of performing various actions.
-
#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 GMT when the resource was last updated specified in ISO 8601 format.
-
#initialize(version, payload) ⇒ AuthTokenPromotionInstance
constructor
Initialize the AuthTokenPromotionInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#update(suppress_email_notification: :unset) ⇒ AuthTokenPromotionInstance
Update the AuthTokenPromotionInstance.
-
#url ⇒ String
The URI for this resource, relative to
https://accounts.twilio.com.
Constructor Details
#initialize(version, payload) ⇒ AuthTokenPromotionInstance
Initialize the AuthTokenPromotionInstance
277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 |
# File 'lib/twilio-ruby/rest/accounts/v1/auth_token_promotion.rb', line 277 def initialize(version, payload ) super(version) # Marshaled Properties @properties = { 'account_sid' => payload['account_sid'], 'auth_token' => payload['auth_token'], 'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']), 'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']), '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.
308 309 310 |
# File 'lib/twilio-ruby/rest/accounts/v1/auth_token_promotion.rb', line 308 def account_sid @properties['account_sid'] end |
#auth_token ⇒ String
Returns The promoted Auth Token that must be used to authenticate future API requests.
314 315 316 |
# File 'lib/twilio-ruby/rest/accounts/v1/auth_token_promotion.rb', line 314 def auth_token @properties['auth_token'] end |
#context ⇒ AuthTokenPromotionContext
Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context
299 300 301 302 303 304 |
# File 'lib/twilio-ruby/rest/accounts/v1/auth_token_promotion.rb', line 299 def context unless @instance_context @instance_context = AuthTokenPromotionContext.new(@version ) end @instance_context end |
#date_created ⇒ Time
Returns The date and time in UTC when the resource was created specified in ISO 8601 format.
320 321 322 |
# File 'lib/twilio-ruby/rest/accounts/v1/auth_token_promotion.rb', line 320 def date_created @properties['date_created'] end |
#date_updated ⇒ Time
Returns The date and time in GMT when the resource was last updated specified in ISO 8601 format.
326 327 328 |
# File 'lib/twilio-ruby/rest/accounts/v1/auth_token_promotion.rb', line 326 def date_updated @properties['date_updated'] end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
358 359 360 361 |
# File 'lib/twilio-ruby/rest/accounts/v1/auth_token_promotion.rb', line 358 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Accounts.V1.AuthTokenPromotionInstance #{values}>" end |
#to_s ⇒ Object
Provide a user friendly representation
351 352 353 354 |
# File 'lib/twilio-ruby/rest/accounts/v1/auth_token_promotion.rb', line 351 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Accounts.V1.AuthTokenPromotionInstance #{values}>" end |
#update(suppress_email_notification: :unset) ⇒ AuthTokenPromotionInstance
Update the AuthTokenPromotionInstance
340 341 342 343 344 345 346 347 |
# File 'lib/twilio-ruby/rest/accounts/v1/auth_token_promotion.rb', line 340 def update( suppress_email_notification: :unset ) context.update( suppress_email_notification: suppress_email_notification, ) end |
#url ⇒ String
Returns The URI for this resource, relative to https://accounts.twilio.com.
332 333 334 |
# File 'lib/twilio-ruby/rest/accounts/v1/auth_token_promotion.rb', line 332 def url @properties['url'] end |