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 which end user uses to verify authorization request.
-
#verification_uri ⇒ String
The URI that the end user visits to verify authorization request.
-
#verification_uri_complete ⇒ String
The URI with user_code that the end-user alternatively visits to verify authorization request.
Constructor Details
#initialize(version, payload) ⇒ DeviceCodeInstance
Initialize the DeviceCodeInstance
104 105 106 107 108 109 110 111 112 113 114 115 116 |
# File 'lib/twilio-ruby/rest/oauth/v1/device_code.rb', line 104 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'], 'interval' => payload['interval'] == nil ? payload['interval'] : payload['interval'].to_i, } end |
Instance Method Details
#device_code ⇒ String
Returns The device verification code.
121 122 123 |
# File 'lib/twilio-ruby/rest/oauth/v1/device_code.rb', line 121 def device_code @properties['device_code'] end |
#expires_in ⇒ String
Returns The expiration time of the device_code and user_code in seconds.
145 146 147 |
# File 'lib/twilio-ruby/rest/oauth/v1/device_code.rb', line 145 def expires_in @properties['expires_in'] end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
163 164 165 |
# File 'lib/twilio-ruby/rest/oauth/v1/device_code.rb', line 163 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.
151 152 153 |
# File 'lib/twilio-ruby/rest/oauth/v1/device_code.rb', line 151 def interval @properties['interval'] end |
#to_s ⇒ Object
Provide a user friendly representation
157 158 159 |
# File 'lib/twilio-ruby/rest/oauth/v1/device_code.rb', line 157 def to_s "<Twilio.Oauth.V1.DeviceCodeInstance>" end |
#user_code ⇒ String
Returns The verification code which end user uses to verify authorization request.
127 128 129 |
# File 'lib/twilio-ruby/rest/oauth/v1/device_code.rb', line 127 def user_code @properties['user_code'] end |
#verification_uri ⇒ String
Returns The URI that the end user visits to verify authorization request.
133 134 135 |
# File 'lib/twilio-ruby/rest/oauth/v1/device_code.rb', line 133 def verification_uri @properties['verification_uri'] end |
#verification_uri_complete ⇒ String
Returns The URI with user_code that the end-user alternatively visits to verify authorization request.
139 140 141 |
# File 'lib/twilio-ruby/rest/oauth/v1/device_code.rb', line 139 def verification_uri_complete @properties['verification_uri_complete'] end |