Module: Unit::StopPayment
- Defined in:
- lib/unit/models/stop_payment/stop_payment.rb,
lib/unit/models/stop_payment/list_stop_payment_params.rb,
lib/unit/models/stop_payment/create_stop_payment_request.rb
Defined Under Namespace
Classes: CreateStopPaymentRequest, ListStopPaymentParams
Constant Summary collapse
- STOP_PAYMENT_LIMIT =
100
- STOP_PAYMENT_OFFSET =
0
Class Method Summary collapse
-
.create_stop_payment(account_id:, amount:, check_number:, tags: nil, idempotency_key: nil) ⇒ Object
Create a stop payment.
-
.disable_stop_payment(payment_id:) ⇒ Object
Disable a stop payment.
-
.get_payment(payment_id:) ⇒ Object
Get a stop payment.
-
.list_stop_payment(limit: STOP_PAYMENT_LIMIT, offset: STOP_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 stop payments.
Class Method Details
.create_stop_payment(account_id:, amount:, check_number:, tags: nil, idempotency_key: nil) ⇒ Object
Create a stop payment
18 19 20 21 |
# File 'lib/unit/models/stop_payment/stop_payment.rb', line 18 def create_stop_payment(account_id:, amount:, check_number:, tags: nil, idempotency_key: nil) request = CreateStopPaymentRequest.new(account_id, amount, check_number, , idempotency_key) Unit::Resource::StopPaymentResource.create_payment(request) end |
.disable_stop_payment(payment_id:) ⇒ Object
Disable a stop payment
56 57 58 |
# File 'lib/unit/models/stop_payment/stop_payment.rb', line 56 def disable_stop_payment(payment_id:) Unit::Resource::StopPaymentResource.disable_payment(payment_id) end |
.get_payment(payment_id:) ⇒ Object
Get a stop payment
26 27 28 |
# File 'lib/unit/models/stop_payment/stop_payment.rb', line 26 def get_payment(payment_id:) Unit::Resource::StopPaymentResource.get(payment_id) end |
.list_stop_payment(limit: STOP_PAYMENT_LIMIT, offset: STOP_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 stop payments
45 46 47 48 49 50 51 |
# File 'lib/unit/models/stop_payment/stop_payment.rb', line 45 def list_stop_payment(limit: STOP_PAYMENT_LIMIT, offset: STOP_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 = ListStopPaymentParams.new(limit, offset, account_id, customer_id, , sort, since, _until, status, from_amount, to_amount, check_number, include) Unit::Resource::StopPaymentResource.list(request) end |