Module: Unit::Authorization
- Defined in:
- lib/unit/models/authorization/get_request.rb,
lib/unit/models/authorization/list_request.rb,
lib/unit/models/authorization/authorization.rb
Defined Under Namespace
Classes: GetRequest, ListRequest
Constant Summary collapse
- AUTHORIZATION_LIMIT =
100
- AUTHORIZATION_OFFSET =
0
Class Method Summary collapse
-
.get_authorization(authorization_id:, include_non_authorized: nil) ⇒ Object
Get authorization by id.
-
.list_authorizations(limit: AUTHORIZATION_LIMIT, offset: AUTHORIZATION_OFFSET, account_id: nil, customer_id: nil, card_id: nil, since: nil, until_: nil, include_non_authorized: nil, status: nil, merchant_category_code: nil, from_amount: nil, to_amount: nil, sort: nil) ⇒ Object
List authorizations.
Class Method Details
.get_authorization(authorization_id:, include_non_authorized: nil) ⇒ Object
Get authorization by id
15 16 17 18 |
# File 'lib/unit/models/authorization/authorization.rb', line 15 def (authorization_id:, include_non_authorized: nil) request = GetRequest.new(, ) Unit::Resource::AuthorizationResource.get(request) end |
.list_authorizations(limit: AUTHORIZATION_LIMIT, offset: AUTHORIZATION_OFFSET, account_id: nil, customer_id: nil, card_id: nil, since: nil, until_: nil, include_non_authorized: nil, status: nil, merchant_category_code: nil, from_amount: nil, to_amount: nil, sort: nil) ⇒ Object
List authorizations
35 36 37 38 39 |
# File 'lib/unit/models/authorization/authorization.rb', line 35 def (limit: AUTHORIZATION_LIMIT, offset: AUTHORIZATION_OFFSET, account_id: nil, customer_id: nil, card_id: nil, since: nil, until_: nil, include_non_authorized: nil, status: nil, merchant_category_code: nil, from_amount: nil, to_amount: nil, sort: nil) request = ListRequest.new(limit, offset, account_id, customer_id, card_id, since, until_, , status, merchant_category_code, from_amount, to_amount, sort) Unit::Resource::AuthorizationResource.list(request) end |