Class: Twilio::REST::Api::V2010::AccountContext::TokenInstance
- Inherits:
-
InstanceResource
- Object
- InstanceResource
- Twilio::REST::Api::V2010::AccountContext::TokenInstance
- Defined in:
- lib/twilio-ruby/rest/api/v2010/account/token.rb
Instance Method Summary collapse
-
#account_sid ⇒ String
The SID of the [Account](www.twilio.com/docs/iam/api/account) that created the Token resource.
-
#date_created ⇒ Time
The date and time in GMT that the resource was created specified in [RFC 2822](www.ietf.org/rfc/rfc2822.txt) format.
-
#date_updated ⇒ Time
The date and time in GMT that the resource was last updated specified in [RFC 2822](www.ietf.org/rfc/rfc2822.txt) format.
-
#ice_servers ⇒ Array<ApiV2010AccountTokenIceServers>
An array representing the ephemeral credentials and the STUN and TURN server URIs.
-
#initialize(version, payload, account_sid: nil) ⇒ TokenInstance
constructor
Initialize the TokenInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#password ⇒ String
The temporary password that the username will use when authenticating with Twilio.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#ttl ⇒ String
The duration in seconds for which the username and password are valid.
-
#username ⇒ String
The temporary username that uniquely identifies a Token.
Constructor Details
#initialize(version, payload, account_sid: nil) ⇒ TokenInstance
Initialize the TokenInstance
202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 |
# File 'lib/twilio-ruby/rest/api/v2010/account/token.rb', line 202 def initialize(version, payload , account_sid: nil) super(version) # Marshaled Properties @properties = { 'account_sid' => payload['account_sid'], 'date_created' => Twilio.deserialize_rfc2822(payload['date_created']), 'date_updated' => Twilio.deserialize_rfc2822(payload['date_updated']), 'ice_servers' => payload['ice_servers'], 'password' => payload['password'], 'ttl' => payload['ttl'], 'username' => payload['username'], } end |
Instance Method Details
#account_sid ⇒ String
Returns The SID of the [Account](www.twilio.com/docs/iam/api/account) that created the Token resource.
221 222 223 |
# File 'lib/twilio-ruby/rest/api/v2010/account/token.rb', line 221 def account_sid @properties['account_sid'] end |
#date_created ⇒ Time
Returns The date and time in GMT that the resource was created specified in [RFC 2822](www.ietf.org/rfc/rfc2822.txt) format.
227 228 229 |
# File 'lib/twilio-ruby/rest/api/v2010/account/token.rb', line 227 def date_created @properties['date_created'] end |
#date_updated ⇒ Time
Returns The date and time in GMT that the resource was last updated specified in [RFC 2822](www.ietf.org/rfc/rfc2822.txt) format.
233 234 235 |
# File 'lib/twilio-ruby/rest/api/v2010/account/token.rb', line 233 def date_updated @properties['date_updated'] end |
#ice_servers ⇒ Array<ApiV2010AccountTokenIceServers>
Returns An array representing the ephemeral credentials and the STUN and TURN server URIs.
239 240 241 |
# File 'lib/twilio-ruby/rest/api/v2010/account/token.rb', line 239 def ice_servers @properties['ice_servers'] end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
269 270 271 |
# File 'lib/twilio-ruby/rest/api/v2010/account/token.rb', line 269 def inspect "<Twilio.Api.V2010.TokenInstance>" end |
#password ⇒ String
Returns The temporary password that the username will use when authenticating with Twilio.
245 246 247 |
# File 'lib/twilio-ruby/rest/api/v2010/account/token.rb', line 245 def password @properties['password'] end |
#to_s ⇒ Object
Provide a user friendly representation
263 264 265 |
# File 'lib/twilio-ruby/rest/api/v2010/account/token.rb', line 263 def to_s "<Twilio.Api.V2010.TokenInstance>" end |
#ttl ⇒ String
Returns The duration in seconds for which the username and password are valid.
251 252 253 |
# File 'lib/twilio-ruby/rest/api/v2010/account/token.rb', line 251 def ttl @properties['ttl'] end |
#username ⇒ String
Returns The temporary username that uniquely identifies a Token.
257 258 259 |
# File 'lib/twilio-ruby/rest/api/v2010/account/token.rb', line 257 def username @properties['username'] end |