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](www.twilio.com/docs/iam/api/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](en.wikipedia.org/wiki/ISO_8601) format.
-
#date_updated ⇒ Time
The date and time in GMT when the resource was last updated specified in [ISO 8601](en.wikipedia.org/wiki/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 ⇒ AuthTokenPromotionInstance
Update the AuthTokenPromotionInstance.
-
#url ⇒ String
The URI for this resource, relative to ‘accounts.twilio.com`.
Constructor Details
#initialize(version, payload) ⇒ AuthTokenPromotionInstance
Initialize the AuthTokenPromotionInstance
125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 |
# File 'lib/twilio-ruby/rest/accounts/v1/auth_token_promotion.rb', line 125 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](www.twilio.com/docs/iam/api/account) that the secondary Auth Token was created for.
155 156 157 |
# File 'lib/twilio-ruby/rest/accounts/v1/auth_token_promotion.rb', line 155 def account_sid @properties['account_sid'] end |
#auth_token ⇒ String
Returns The promoted Auth Token that must be used to authenticate future API requests.
161 162 163 |
# File 'lib/twilio-ruby/rest/accounts/v1/auth_token_promotion.rb', line 161 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
146 147 148 149 150 151 |
# File 'lib/twilio-ruby/rest/accounts/v1/auth_token_promotion.rb', line 146 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](en.wikipedia.org/wiki/ISO_8601) format.
167 168 169 |
# File 'lib/twilio-ruby/rest/accounts/v1/auth_token_promotion.rb', line 167 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](en.wikipedia.org/wiki/ISO_8601) format.
173 174 175 |
# File 'lib/twilio-ruby/rest/accounts/v1/auth_token_promotion.rb', line 173 def date_updated @properties['date_updated'] end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
200 201 202 203 |
# File 'lib/twilio-ruby/rest/accounts/v1/auth_token_promotion.rb', line 200 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Accounts.V1.AuthTokenPromotionInstance #{values}>" end |
#to_s ⇒ Object
Provide a user friendly representation
193 194 195 196 |
# File 'lib/twilio-ruby/rest/accounts/v1/auth_token_promotion.rb', line 193 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Accounts.V1.AuthTokenPromotionInstance #{values}>" end |
#update ⇒ AuthTokenPromotionInstance
Update the AuthTokenPromotionInstance
186 187 188 189 |
# File 'lib/twilio-ruby/rest/accounts/v1/auth_token_promotion.rb', line 186 def update context.update end |
#url ⇒ String
Returns The URI for this resource, relative to ‘accounts.twilio.com`.
179 180 181 |
# File 'lib/twilio-ruby/rest/accounts/v1/auth_token_promotion.rb', line 179 def url @properties['url'] end |