class Twilio::REST::Accounts::V1::AuthTokenPromotionInstance

Public Class Methods

new(version, payload) click to toggle source

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

Calls superclass method Twilio::REST::InstanceResource::new
    # File lib/twilio-ruby/rest/accounts/v1/auth_token_promotion.rb
104 def initialize(version, payload)
105   super(version)
106 
107   # Marshaled Properties
108   @properties = {
109       'account_sid' => payload['account_sid'],
110       'auth_token' => payload['auth_token'],
111       'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
112       'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
113       'url' => payload['url'],
114   }
115 
116   # Context
117   @instance_context = nil
118   @params = {}
119 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/auth_token_promotion.rb
134 def account_sid
135   @properties['account_sid']
136 end
auth_token() click to toggle source

@return [String] The promoted Auth Token

    # File lib/twilio-ruby/rest/accounts/v1/auth_token_promotion.rb
140 def auth_token
141   @properties['auth_token']
142 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 [AuthTokenPromotionContext] AuthTokenPromotionContext for this AuthTokenPromotionInstance

    # File lib/twilio-ruby/rest/accounts/v1/auth_token_promotion.rb
125 def context
126   unless @instance_context
127     @instance_context = AuthTokenPromotionContext.new(@version, )
128   end
129   @instance_context
130 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/auth_token_promotion.rb
146 def date_created
147   @properties['date_created']
148 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/auth_token_promotion.rb
152 def date_updated
153   @properties['date_updated']
154 end
inspect() click to toggle source

Provide a detailed, user friendly representation

    # File lib/twilio-ruby/rest/accounts/v1/auth_token_promotion.rb
178 def inspect
179   values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
180   "<Twilio.Accounts.V1.AuthTokenPromotionInstance #{values}>"
181 end
to_s() click to toggle source

Provide a user friendly representation

    # File lib/twilio-ruby/rest/accounts/v1/auth_token_promotion.rb
171 def to_s
172   values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
173   "<Twilio.Accounts.V1.AuthTokenPromotionInstance #{values}>"
174 end
update() click to toggle source

Update the AuthTokenPromotionInstance @return [AuthTokenPromotionInstance] Updated AuthTokenPromotionInstance

    # File lib/twilio-ruby/rest/accounts/v1/auth_token_promotion.rb
165 def update
166   context.update
167 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/auth_token_promotion.rb
158 def url
159   @properties['url']
160 end