Class: Transfeera::Authorization
- Defined in:
- lib/transfeera/authorization.rb
Instance Method Summary collapse
Methods inherited from Request
#delete, #get, #initialize, instance, #post, #put
Constructor Details
This class inherits a constructor from Transfeera::Request
Instance Method Details
#execute ⇒ Object
3 4 5 6 7 8 9 10 11 12 13 14 |
# File 'lib/transfeera/authorization.rb', line 3 def execute response_raw = connection.post do |req| req.path = path req.headers = default_headers req.body = body.to_json end response = Transfeera::Response.new(response_raw) Transfeera.configuration.token = response.body[:access_token] if response.success? response end |