Class: Elmas::OauthResponse

Inherits:
Response show all
Defined in:
lib/elmas/oauth.rb

Constant Summary

Constants inherited from Response

Response::ERROR_CODES, Response::SUCCESS_CODES, Response::UNAUTHORIZED_CODES

Instance Attribute Summary

Attributes inherited from Response

#response, #status_code

Instance Method Summary collapse

Methods inherited from Response

#error_message, #fail?, #initialize, #log_error, #parsed, #result, #results, #status, #success?

Constructor Details

This class inherits a constructor from Elmas::Response

Instance Method Details

#access_tokenObject



156
157
158
# File 'lib/elmas/oauth.rb', line 156

def access_token
  body["access_token"]
end

#bodyObject



152
153
154
# File 'lib/elmas/oauth.rb', line 152

def body
  JSON.parse(@response.body)
end

#divisionObject



160
161
162
# File 'lib/elmas/oauth.rb', line 160

def division
  body["division"]
end

#refresh_tokenObject



164
165
166
# File 'lib/elmas/oauth.rb', line 164

def refresh_token
  body["refresh_token"]
end