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 unique sid that identifies this account.
-
#date_created ⇒ Time
The date this resource was created.
-
#date_updated ⇒ Time
The date this resource was last updated.
-
#ice_servers ⇒ 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
91 92 93 94 95 96 97 98 99 100 101 102 103 104 |
# File 'lib/twilio-ruby/rest/api/v2010/account/token.rb', line 91 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 unique sid that identifies this account.
108 109 110 |
# File 'lib/twilio-ruby/rest/api/v2010/account/token.rb', line 108 def account_sid @properties['account_sid'] end |
#date_created ⇒ Time
Returns The date this resource was created.
114 115 116 |
# File 'lib/twilio-ruby/rest/api/v2010/account/token.rb', line 114 def date_created @properties['date_created'] end |
#date_updated ⇒ Time
Returns The date this resource was last updated.
120 121 122 |
# File 'lib/twilio-ruby/rest/api/v2010/account/token.rb', line 120 def date_updated @properties['date_updated'] end |
#ice_servers ⇒ String
Returns An array representing the ephemeral credentials.
126 127 128 |
# File 'lib/twilio-ruby/rest/api/v2010/account/token.rb', line 126 def ice_servers @properties['ice_servers'] end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
156 157 158 |
# File 'lib/twilio-ruby/rest/api/v2010/account/token.rb', line 156 def inspect "<Twilio.Api.V2010.TokenInstance>" end |
#password ⇒ String
Returns The temporary password used for authenticating.
132 133 134 |
# File 'lib/twilio-ruby/rest/api/v2010/account/token.rb', line 132 def password @properties['password'] end |
#to_s ⇒ Object
Provide a user friendly representation
150 151 152 |
# File 'lib/twilio-ruby/rest/api/v2010/account/token.rb', line 150 def to_s "<Twilio.Api.V2010.TokenInstance>" end |
#ttl ⇒ String
Returns The duration in seconds the credentials are valid.
138 139 140 |
# File 'lib/twilio-ruby/rest/api/v2010/account/token.rb', line 138 def ttl @properties['ttl'] end |
#username ⇒ String
Returns The temporary username that uniquely identifies a Token.
144 145 146 |
# File 'lib/twilio-ruby/rest/api/v2010/account/token.rb', line 144 def username @properties['username'] end |