Module: Unit::ReceivedPayment
- Defined in:
- lib/unit/models/received_payment/received_payment.rb,
lib/unit/models/received_payment/list_payment_params.rb,
lib/unit/models/received_payment/patch_payment_request.rb
Defined Under Namespace
Classes: ListPaymentParams, PatchPaymentRequest
Constant Summary collapse
- RECEIVED_PAYMENT_LIMIT =
100
- RECEIVED_PAYMENT_OFFSET =
0
Class Method Summary collapse
-
.advance_payment(payment_id:) ⇒ Object
Advance a received payment by calling Unit’s API.
-
.get_payment(payment_id:) ⇒ Object
Get received ach payment by calling Unit’s API.
-
.list_payments(limit: RECEIVED_PAYMENT_LIMIT, offset: RECEIVED_PAYMENT_OFFSET, account_id: nil, customer_id: nil, status: nil, include_completed: nil, tags: nil, sort: nil, include: nil) ⇒ Object
List ach payments by calling Unit’s API.
-
.update_payment(payment_id:, tags: nil) ⇒ Object
Update a received ACH payment by calling Unit’s API.
Class Method Details
.advance_payment(payment_id:) ⇒ Object
Advance a received payment by calling Unit’s API
49 50 51 |
# File 'lib/unit/models/received_payment/received_payment.rb', line 49 def advance_payment(payment_id:) Unit::Resource::ReceivedPaymentResource.advance_payment(payment_id) end |
.get_payment(payment_id:) ⇒ Object
Get received ach payment by calling Unit’s API
15 16 17 |
# File 'lib/unit/models/received_payment/received_payment.rb', line 15 def get_payment(payment_id:) Unit::Resource::ReceivedPaymentResource.get_payment(payment_id) end |
.list_payments(limit: RECEIVED_PAYMENT_LIMIT, offset: RECEIVED_PAYMENT_OFFSET, account_id: nil, customer_id: nil, status: nil, include_completed: nil, tags: nil, sort: nil, include: nil) ⇒ Object
List ach payments by calling Unit’s API
39 40 41 42 43 44 |
# File 'lib/unit/models/received_payment/received_payment.rb', line 39 def list_payments(limit: RECEIVED_PAYMENT_LIMIT, offset: RECEIVED_PAYMENT_OFFSET, account_id: nil, customer_id: nil, status: nil, include_completed: nil, tags: nil, sort: nil, include: nil) request = Unit::ReceivedPayment::ListPaymentParams.new(limit, offset, account_id, customer_id, status, include_completed, , sort, include) Unit::Resource::ReceivedPaymentResource.list_payments(request) end |
.update_payment(payment_id:, tags: nil) ⇒ Object
Update a received ACH payment by calling Unit’s API
23 24 25 26 |
# File 'lib/unit/models/received_payment/received_payment.rb', line 23 def update_payment(payment_id:, tags: nil) request = Unit::ReceivedPayment::PatchPaymentRequest.new(payment_id, ) Unit::Resource::ReceivedPaymentResource.update_payment(request) end |