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 that created the resource.
-
#date_created ⇒ Time
The RFC 2822 date and time in GMT that the resource was created.
-
#date_updated ⇒ Time
The RFC 2822 date and time in GMT that the resource was last updated.
-
#ice_servers ⇒ Array[String]
An array representing the ephemeral credentials.
-
#initialize(version, payload, account_sid: nil) ⇒ TokenInstance
constructor
Initialize the TokenInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#password ⇒ String
The temporary password used for authenticating.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#ttl ⇒ String
The duration in seconds the credentials are valid.
-
#username ⇒ String
The temporary username that uniquely identifies a Token.
Constructor Details
#initialize(version, payload, account_sid: nil) ⇒ TokenInstance
Initialize the TokenInstance
88 89 90 91 92 93 94 95 96 97 98 99 100 101 |
# File 'lib/twilio-ruby/rest/api/v2010/account/token.rb', line 88 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 that created the resource.
105 106 107 |
# File 'lib/twilio-ruby/rest/api/v2010/account/token.rb', line 105 def account_sid @properties['account_sid'] end |
#date_created ⇒ Time
Returns The RFC 2822 date and time in GMT that the resource was created.
111 112 113 |
# File 'lib/twilio-ruby/rest/api/v2010/account/token.rb', line 111 def date_created @properties['date_created'] end |
#date_updated ⇒ Time
Returns The RFC 2822 date and time in GMT that the resource was last updated.
117 118 119 |
# File 'lib/twilio-ruby/rest/api/v2010/account/token.rb', line 117 def date_updated @properties['date_updated'] end |
#ice_servers ⇒ Array[String]
Returns An array representing the ephemeral credentials.
123 124 125 |
# File 'lib/twilio-ruby/rest/api/v2010/account/token.rb', line 123 def ice_servers @properties['ice_servers'] end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
153 154 155 |
# File 'lib/twilio-ruby/rest/api/v2010/account/token.rb', line 153 def inspect "<Twilio.Api.V2010.TokenInstance>" end |
#password ⇒ String
Returns The temporary password used for authenticating.
129 130 131 |
# File 'lib/twilio-ruby/rest/api/v2010/account/token.rb', line 129 def password @properties['password'] end |
#to_s ⇒ Object
Provide a user friendly representation
147 148 149 |
# File 'lib/twilio-ruby/rest/api/v2010/account/token.rb', line 147 def to_s "<Twilio.Api.V2010.TokenInstance>" end |
#ttl ⇒ String
Returns The duration in seconds the credentials are valid.
135 136 137 |
# File 'lib/twilio-ruby/rest/api/v2010/account/token.rb', line 135 def ttl @properties['ttl'] end |
#username ⇒ String
Returns The temporary username that uniquely identifies a Token.
141 142 143 |
# File 'lib/twilio-ruby/rest/api/v2010/account/token.rb', line 141 def username @properties['username'] end |