class Twilio::REST::Api::V2010::AccountContext::TokenInstance
Public Class Methods
Initialize the TokenInstance
@param [Version] version Version
that contains the resource @param [Hash] payload payload that contains response from Twilio
@param [String] account_sid
The SID of the
{Account}[https://www.twilio.com/docs/iam/api/account] that created the Token resource.
@return [TokenInstance] TokenInstance
Twilio::REST::InstanceResource::new
# File lib/twilio-ruby/rest/api/v2010/account/token.rb 88 def initialize(version, payload, account_sid: nil) 89 super(version) 90 91 # Marshaled Properties 92 @properties = { 93 'account_sid' => payload['account_sid'], 94 'date_created' => Twilio.deserialize_rfc2822(payload['date_created']), 95 'date_updated' => Twilio.deserialize_rfc2822(payload['date_updated']), 96 'ice_servers' => payload['ice_servers'], 97 'password' => payload['password'], 98 'ttl' => payload['ttl'], 99 'username' => payload['username'], 100 } 101 end
Public Instance Methods
@return [String] The SID of the Account that created the resource
# File lib/twilio-ruby/rest/api/v2010/account/token.rb 105 def account_sid 106 @properties['account_sid'] 107 end
@return [Time] The RFC 2822 date and time in GMT that the resource was created
# File lib/twilio-ruby/rest/api/v2010/account/token.rb 111 def date_created 112 @properties['date_created'] 113 end
@return [Time] The RFC 2822 date and time in GMT that the resource was last updated
# File lib/twilio-ruby/rest/api/v2010/account/token.rb 117 def date_updated 118 @properties['date_updated'] 119 end
@return [Array] An array representing the ephemeral credentials
# File lib/twilio-ruby/rest/api/v2010/account/token.rb 123 def ice_servers 124 @properties['ice_servers'] 125 end
Provide a detailed, user friendly representation
# File lib/twilio-ruby/rest/api/v2010/account/token.rb 153 def inspect 154 "<Twilio.Api.V2010.TokenInstance>" 155 end
@return [String] The temporary password used for authenticating
# File lib/twilio-ruby/rest/api/v2010/account/token.rb 129 def password 130 @properties['password'] 131 end
Provide a user friendly representation
# File lib/twilio-ruby/rest/api/v2010/account/token.rb 147 def to_s 148 "<Twilio.Api.V2010.TokenInstance>" 149 end
@return [String] The duration in seconds the credentials are valid
# File lib/twilio-ruby/rest/api/v2010/account/token.rb 135 def ttl 136 @properties['ttl'] 137 end
@return [String] The temporary username that uniquely identifies a Token
# File lib/twilio-ruby/rest/api/v2010/account/token.rb 141 def username 142 @properties['username'] 143 end