Class: Unit::Resource::AuthorizationResource
- Inherits:
-
BaseResource
- Object
- BaseResource
- Unit::Resource::AuthorizationResource
- Defined in:
- lib/unit/api_resources/authorization_resource.rb
Class Method Summary collapse
-
.get(params) ⇒ UnitResponse, UnitError
Get authorization by calling Unit’s API.
-
.list(params = nil) ⇒ UnitResponse, UnitError
Get authorization by calling Unit’s API.
Methods inherited from BaseResource
file_response_handler, response_handler
Class Method Details
.get(params) ⇒ UnitResponse, UnitError
Get authorization by calling Unit’s API
15 16 17 18 19 |
# File 'lib/unit/api_resources/authorization_resource.rb', line 15 def get(params) payload = params.to_hash response = HttpHelper.get("#{api_url}/authorizations/#{params.}", params: payload, headers: headers) response_handler(response) end |
.list(params = nil) ⇒ UnitResponse, UnitError
Get authorization by calling Unit’s API
24 25 26 27 |
# File 'lib/unit/api_resources/authorization_resource.rb', line 24 def list(params = nil) response = HttpHelper.get("#{api_url}/authorizations", params: params&.to_hash, headers: headers) response_handler(response) end |