Module: Unit::RecurringPayment
- Defined in:
- lib/unit/models/recurring_payment/recurring_payment.rb,
lib/unit/models/recurring_payment/list_recurring_payment_params.rb,
lib/unit/models/recurring_payment/create_recurring_debit_ach_payment_request.rb,
lib/unit/models/recurring_payment/create_recurring_credit_ach_payment_request.rb,
lib/unit/models/recurring_payment/create_recurring_credit_book_payment_request.rb
Defined Under Namespace
Classes: CreateRecurringCreditAchPaymentRequest, CreateRecurringCreditBookPaymentRequest, CreateRecurringDebitAchPaymentRequest, ListRecurringPaymentParams
Constant Summary collapse
- RECURRING_PAYMENT_LIMIT =
100
- RECURRING_PAYMENT_OFFSET =
0
Class Method Summary collapse
-
.create_recurring_credit_ach_payment(account_id:, counterparty_id:, amount:, description:, schedule:, addenda: nil, idempotency_key: nil, tags: nil) ⇒ Object
Create a recurring credit ACH payment.
-
.create_recurring_credit_book_payment(account_id:, counterparty_id:, amount:, description:, schedule:, transaction_summary_override: nil, idempotency_key: nil, tags: nil) ⇒ Object
Create a recurring credit book payment.
-
.create_recurring_debit_ach_payment(account_id:, counterparty_id:, amount:, description:, schedule:, addenda: nil, idempotency_key: nil, tags: nil, verify_counterparty_balance: nil, same_day: nil) ⇒ Object
Create a recurring debit ACH payment.
-
.disable_recurring_payment(recurring_payment_id:) ⇒ Object
Disable a recurring payment.
-
.enable_recurring_payment(recurring_payment_id:) ⇒ Object
Enable a recurring payment.
-
.get_recurring_payment(recurring_payment_id:) ⇒ Object
Get a recurring payment.
-
.list_recurring_payment(limit: RECURRING_PAYMENT_LIMIT, offset: RECURRING_PAYMENT_OFFSET, account_id: nil, customer_id: nil, status: nil, type: nil, from_start_time: nil, to_start_time: nil, from_end_time: nil, to_end_time: nil, sort: nil) ⇒ Object
List recurring payments.
Class Method Details
.create_recurring_credit_ach_payment(account_id:, counterparty_id:, amount:, description:, schedule:, addenda: nil, idempotency_key: nil, tags: nil) ⇒ Object
Create a recurring credit ACH payment
40 41 42 43 |
# File 'lib/unit/models/recurring_payment/recurring_payment.rb', line 40 def create_recurring_credit_ach_payment(account_id:, counterparty_id:, amount:, description:, schedule:, addenda: nil, idempotency_key: nil, tags: nil) request = Unit::RecurringPayment::CreateRecurringCreditAchPaymentRequest.new(account_id, counterparty_id, amount, description, schedule, addenda, idempotency_key, ) Unit::Resource::RecurringPaymentResource.create_recurring_payment(request) end |
.create_recurring_credit_book_payment(account_id:, counterparty_id:, amount:, description:, schedule:, transaction_summary_override: nil, idempotency_key: nil, tags: nil) ⇒ Object
Create a recurring credit book payment
23 24 25 26 27 28 |
# File 'lib/unit/models/recurring_payment/recurring_payment.rb', line 23 def create_recurring_credit_book_payment(account_id:, counterparty_id:, amount:, description:, schedule:, transaction_summary_override: nil, idempotency_key: nil, tags: nil) request = Unit::RecurringPayment::CreateRecurringCreditBookPaymentRequest.new(account_id, counterparty_id, amount, description, schedule, transaction_summary_override, idempotency_key, ) Unit::Resource::RecurringPaymentResource.create_recurring_payment(request) end |
.create_recurring_debit_ach_payment(account_id:, counterparty_id:, amount:, description:, schedule:, addenda: nil, idempotency_key: nil, tags: nil, verify_counterparty_balance: nil, same_day: nil) ⇒ Object
Create a recurring debit ACH payment
57 58 59 60 61 62 |
# File 'lib/unit/models/recurring_payment/recurring_payment.rb', line 57 def create_recurring_debit_ach_payment(account_id:, counterparty_id:, amount:, description:, schedule:, addenda: nil, idempotency_key: nil, tags: nil, verify_counterparty_balance: nil, same_day: nil) request = Unit::RecurringPayment::CreateRecurringDebitAchPaymentRequest.new(account_id, counterparty_id, amount, description, schedule, addenda, idempotency_key, , verify_counterparty_balance, same_day) Unit::Resource::RecurringPaymentResource.create_recurring_payment(request) end |
.disable_recurring_payment(recurring_payment_id:) ⇒ Object
Disable a recurring payment
74 75 76 |
# File 'lib/unit/models/recurring_payment/recurring_payment.rb', line 74 def disable_recurring_payment(recurring_payment_id:) Unit::Resource::RecurringPaymentResource.disable_recurring_payment(recurring_payment_id) end |
.enable_recurring_payment(recurring_payment_id:) ⇒ Object
Enable a recurring payment
67 68 69 |
# File 'lib/unit/models/recurring_payment/recurring_payment.rb', line 67 def enable_recurring_payment(recurring_payment_id:) Unit::Resource::RecurringPaymentResource.enable_recurring_payment(recurring_payment_id) end |
.get_recurring_payment(recurring_payment_id:) ⇒ Object
Get a recurring payment
101 102 103 |
# File 'lib/unit/models/recurring_payment/recurring_payment.rb', line 101 def get_recurring_payment(recurring_payment_id:) Unit::Resource::RecurringPaymentResource.get_recurring_payment(recurring_payment_id) end |
.list_recurring_payment(limit: RECURRING_PAYMENT_LIMIT, offset: RECURRING_PAYMENT_OFFSET, account_id: nil, customer_id: nil, status: nil, type: nil, from_start_time: nil, to_start_time: nil, from_end_time: nil, to_end_time: nil, sort: nil) ⇒ Object
List recurring payments
91 92 93 94 95 96 |
# File 'lib/unit/models/recurring_payment/recurring_payment.rb', line 91 def list_recurring_payment(limit: RECURRING_PAYMENT_LIMIT, offset: RECURRING_PAYMENT_OFFSET, account_id: nil, customer_id: nil, status: nil, type: nil, from_start_time: nil, to_start_time: nil, from_end_time: nil, to_end_time: nil, sort: nil) request = Unit::RecurringPayment::ListRecurringPaymentParams.new(limit, offset, account_id, customer_id, status, type, from_start_time, to_start_time, from_end_time, to_end_time, sort) Unit::Resource::RecurringPaymentResource.list_recurring_payment(request) end |