Module: Workarea::Yotpo::Authentication
- Included in:
- Gateway
- Defined in:
- lib/workarea/yotpo/authentication.rb
Defined Under Namespace
Classes: NoTokenError
Instance Method Summary collapse
Instance Method Details
#token ⇒ Object
6 7 8 9 10 11 12 |
# File 'lib/workarea/yotpo/authentication.rb', line 6 def token response = get_token raise NoTokenError unless response.present? && response.success? body = JSON.parse(response.body) body['access_token'] end |