Class: Twilio::REST::Oauth::V1::DeviceCodeInstance
- Inherits:
-
InstanceResource
- Object
- InstanceResource
- Twilio::REST::Oauth::V1::DeviceCodeInstance
- Defined in:
- lib/twilio-ruby/rest/oauth/v1/device_code.rb
Instance Method Summary collapse
-
#device_code ⇒ String
The device verification code.
-
#expires_in ⇒ String
The expiration time of the device_code and user_code in seconds.
-
#initialize(version, payload) ⇒ DeviceCodeInstance
constructor
Initialize the DeviceCodeInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#interval ⇒ String
The minimum amount of time in seconds that the client should wait between polling requests to the token endpoint.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#user_code ⇒ String
The verification code for the end user.
-
#verification_uri ⇒ String
The URI that the end user visits to verify request.
-
#verification_uri_complete ⇒ String
He URI with user_code that the end-user alternatively visits to verify request.
Constructor Details
#initialize(version, payload) ⇒ DeviceCodeInstance
Initialize the DeviceCodeInstance
88 89 90 91 92 93 94 95 96 97 98 99 100 |
# File 'lib/twilio-ruby/rest/oauth/v1/device_code.rb', line 88 def initialize(version, payload) super(version) # Marshaled Properties @properties = { 'device_code' => payload['device_code'], 'user_code' => payload['user_code'], 'verification_uri' => payload['verification_uri'], 'verification_uri_complete' => payload['verification_uri_complete'], 'expires_in' => payload['expires_in'] == nil ? payload['expires_in'] : payload['expires_in'].to_i, 'interval' => payload['interval'] == nil ? payload['interval'] : payload['interval'].to_i, } end |
Instance Method Details
#device_code ⇒ String
Returns The device verification code.
104 105 106 |
# File 'lib/twilio-ruby/rest/oauth/v1/device_code.rb', line 104 def device_code @properties['device_code'] end |
#expires_in ⇒ String
Returns The expiration time of the device_code and user_code in seconds.
128 129 130 |
# File 'lib/twilio-ruby/rest/oauth/v1/device_code.rb', line 128 def expires_in @properties['expires_in'] end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
146 147 148 |
# File 'lib/twilio-ruby/rest/oauth/v1/device_code.rb', line 146 def inspect "<Twilio.Oauth.V1.DeviceCodeInstance>" end |
#interval ⇒ String
Returns The minimum amount of time in seconds that the client should wait between polling requests to the token endpoint.
134 135 136 |
# File 'lib/twilio-ruby/rest/oauth/v1/device_code.rb', line 134 def interval @properties['interval'] end |
#to_s ⇒ Object
Provide a user friendly representation
140 141 142 |
# File 'lib/twilio-ruby/rest/oauth/v1/device_code.rb', line 140 def to_s "<Twilio.Oauth.V1.DeviceCodeInstance>" end |
#user_code ⇒ String
Returns The verification code for the end user.
110 111 112 |
# File 'lib/twilio-ruby/rest/oauth/v1/device_code.rb', line 110 def user_code @properties['user_code'] end |
#verification_uri ⇒ String
Returns The URI that the end user visits to verify request.
116 117 118 |
# File 'lib/twilio-ruby/rest/oauth/v1/device_code.rb', line 116 def verification_uri @properties['verification_uri'] end |
#verification_uri_complete ⇒ String
Returns he URI with user_code that the end-user alternatively visits to verify request.
122 123 124 |
# File 'lib/twilio-ruby/rest/oauth/v1/device_code.rb', line 122 def verification_uri_complete @properties['verification_uri_complete'] end |