Module: Unit::CheckPayment
- Defined in:
- lib/unit/models/check_payment/get_request.rb,
lib/unit/models/check_payment/check_payment.rb,
lib/unit/models/check_payment/get_image_request.rb,
lib/unit/models/check_payment/list_check_payment_params.rb,
lib/unit/models/check_payment/return_check_payment_request.rb,
lib/unit/models/check_payment/originate_check_payment_request.rb
Defined Under Namespace
Classes: GetImageRequest, GetRequest, ListPaymentParams, OriginateCheckPaymentRequest, ReturnCheckPaymentRequest
Constant Summary collapse
- CHECK_PAYMENT_LIMIT =
100
- CHECK_PAYMENT_OFFSET =
0
Class Method Summary collapse
-
.approve_payment_verification(payment_id:) ⇒ Object
Approve Check Payment Additional Verification.
-
.cancel_check_payment(payment_id:) ⇒ Object
Cancel Check Payment.
-
.get_image(payment_id:, is_front_side: true) ⇒ Object
Get a check deposit image front or back side.
-
.get_payment(payment_id:, include: nil) ⇒ Object
Get a check payment by id.
-
.list_payment(limit: CHECK_PAYMENT_LIMIT, offset: CHECK_PAYMENT_OFFSET, account_id: nil, customer_id: nil, tags: nil, sort: nil, since: nil, _until: nil, status: nil, from_amount: nil, to_amount: nil, check_number: nil, include: nil) ⇒ Object
Request to list check payments.
-
.originate_check_payment(account_id:, customer_id:, customer_type:, amount:, counterparty:, description:, idempotency_key:, memo: nil, send_date: nil, tags: nil) ⇒ Object
Originate a check payment by id.
-
.return_payment(payment_id:, return_reason_code:) ⇒ Object
Return check payment by id.
Class Method Details
.approve_payment_verification(payment_id:) ⇒ Object
Approve Check Payment Additional Verification
87 88 89 |
# File 'lib/unit/models/check_payment/check_payment.rb', line 87 def approve_payment_verification(payment_id:) Unit::Resource::CheckPaymentResource.approve_payment_verification(payment_id) end |
.cancel_check_payment(payment_id:) ⇒ Object
Cancel Check Payment
94 95 96 |
# File 'lib/unit/models/check_payment/check_payment.rb', line 94 def cancel_check_payment(payment_id:) Unit::Resource::CheckPaymentResource.cancel_payment(payment_id) end |
.get_image(payment_id:, is_front_side: true) ⇒ Object
Get a check deposit image front or back side
70 71 72 73 |
# File 'lib/unit/models/check_payment/check_payment.rb', line 70 def get_image(payment_id:, is_front_side: true) request = GetImageRequest.new(payment_id, is_front_side: is_front_side) Unit::Resource::CheckPaymentResource.get_image(request) end |
.get_payment(payment_id:, include: nil) ⇒ Object
Get a check payment by id
36 37 38 39 |
# File 'lib/unit/models/check_payment/check_payment.rb', line 36 def get_payment(payment_id:, include: nil) request = GetRequest.new(payment_id, include) Unit::Resource::CheckPaymentResource.get(request) end |
.list_payment(limit: CHECK_PAYMENT_LIMIT, offset: CHECK_PAYMENT_OFFSET, account_id: nil, customer_id: nil, tags: nil, sort: nil, since: nil, _until: nil, status: nil, from_amount: nil, to_amount: nil, check_number: nil, include: nil) ⇒ Object
Request to list check payments
56 57 58 59 60 61 62 63 |
# File 'lib/unit/models/check_payment/check_payment.rb', line 56 def list_payment(limit: CHECK_PAYMENT_LIMIT, offset: CHECK_PAYMENT_OFFSET, account_id: nil, customer_id: nil, tags: nil, sort: nil, since: nil, _until: nil, status: nil, from_amount: nil, to_amount: nil, check_number: nil, include: nil) request = ListPaymentParams.new(limit, offset, account_id, customer_id, , sort, since, _until, status, from_amount, to_amount, check_number, include) Unit::Resource::CheckPaymentResource.list(request) end |
.originate_check_payment(account_id:, customer_id:, customer_type:, amount:, counterparty:, description:, idempotency_key:, memo: nil, send_date: nil, tags: nil) ⇒ Object
Originate a check payment by id
27 28 29 30 |
# File 'lib/unit/models/check_payment/check_payment.rb', line 27 def originate_check_payment(account_id:, customer_id:, customer_type:, amount:, counterparty:, description:, idempotency_key:, memo: nil, send_date: nil, tags: nil) request = OriginateCheckPaymentRequest.new(account_id, customer_id, customer_type, amount, counterparty, description, idempotency_key, memo, send_date, ) Unit::Resource::CheckPaymentResource.originate_payment(request) end |
.return_payment(payment_id:, return_reason_code:) ⇒ Object
Return check payment by id
79 80 81 82 |
# File 'lib/unit/models/check_payment/check_payment.rb', line 79 def return_payment(payment_id:, return_reason_code:) request = ReturnCheckPaymentRequest.new(payment_id, return_reason_code) Unit::Resource::CheckPaymentResource.return_payment(request) end |