Class: Increase::Resources::CheckTransfers
- Inherits:
-
Object
- Object
- Increase::Resources::CheckTransfers
- Defined in:
- lib/increase/resources/check_transfers.rb,
sig/increase/resources/check_transfers.rbs
Instance Method Summary collapse
-
#approve(check_transfer_id, request_options: {}) ⇒ Increase::Models::CheckTransfer
Approve a Check Transfer.
-
#cancel(check_transfer_id, request_options: {}) ⇒ Increase::Models::CheckTransfer
Cancel a Check Transfer with the
pending_approvalstatus. -
#create(account_id:, amount:, fulfillment_method:, source_account_number_id:, balance_check: nil, check_number: nil, physical_check: nil, require_approval: nil, third_party: nil, valid_until_date: nil, request_options: {}) ⇒ Increase::Models::CheckTransfer
Create a Check Transfer.
-
#initialize(client:) ⇒ CheckTransfers
constructor
private
A new instance of CheckTransfers.
-
#list(account_id: nil, created_at: nil, cursor: nil, idempotency_key: nil, limit: nil, status: nil, request_options: {}) ⇒ Increase::Internal::Page<Increase::Models::CheckTransfer>
List Check Transfers.
-
#retrieve(check_transfer_id, request_options: {}) ⇒ Increase::Models::CheckTransfer
Retrieve a Check Transfer.
-
#stop_payment(check_transfer_id, reason: nil, request_options: {}) ⇒ Increase::Models::CheckTransfer
Request a stop payment on a Check Transfer.
Constructor Details
#initialize(client:) ⇒ CheckTransfers
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of CheckTransfers.
199 200 201 |
# File 'lib/increase/resources/check_transfers.rb', line 199 def initialize(client:) @client = client end |
Instance Method Details
#approve(check_transfer_id, request_options: {}) ⇒ Increase::Models::CheckTransfer
Approve a Check Transfer
138 139 140 141 142 143 144 145 |
# File 'lib/increase/resources/check_transfers.rb', line 138 def approve(check_transfer_id, params = {}) @client.request( method: :post, path: ["check_transfers/%1$s/approve", check_transfer_id], model: Increase::CheckTransfer, options: params[:request_options] ) end |
#cancel(check_transfer_id, request_options: {}) ⇒ Increase::Models::CheckTransfer
Cancel a Check Transfer with the pending_approval status. See
Transfer Approvals for more information.
159 160 161 162 163 164 165 166 |
# File 'lib/increase/resources/check_transfers.rb', line 159 def cancel(check_transfer_id, params = {}) @client.request( method: :post, path: ["check_transfers/%1$s/cancel", check_transfer_id], model: Increase::CheckTransfer, options: params[:request_options] ) end |
#create(account_id:, amount:, fulfillment_method:, source_account_number_id:, balance_check: nil, check_number: nil, physical_check: nil, require_approval: nil, third_party: nil, valid_until_date: nil, request_options: {}) ⇒ Increase::Models::CheckTransfer
Create a Check Transfer
54 55 56 57 58 59 60 61 62 63 |
# File 'lib/increase/resources/check_transfers.rb', line 54 def create(params) parsed, = Increase::CheckTransferCreateParams.dump_request(params) @client.request( method: :post, path: "check_transfers", body: parsed, model: Increase::CheckTransfer, options: ) end |
#list(account_id: nil, created_at: nil, cursor: nil, idempotency_key: nil, limit: nil, status: nil, request_options: {}) ⇒ Increase::Internal::Page<Increase::Models::CheckTransfer>
List Check Transfers
114 115 116 117 118 119 120 121 122 123 124 125 |
# File 'lib/increase/resources/check_transfers.rb', line 114 def list(params = {}) parsed, = Increase::CheckTransferListParams.dump_request(params) query = Increase::Internal::Util.encode_query_params(parsed) @client.request( method: :get, path: "check_transfers", query: query, page: Increase::Internal::Page, model: Increase::CheckTransfer, options: ) end |
#retrieve(check_transfer_id, request_options: {}) ⇒ Increase::Models::CheckTransfer
Retrieve a Check Transfer
76 77 78 79 80 81 82 83 |
# File 'lib/increase/resources/check_transfers.rb', line 76 def retrieve(check_transfer_id, params = {}) @client.request( method: :get, path: ["check_transfers/%1$s", check_transfer_id], model: Increase::CheckTransfer, options: params[:request_options] ) end |
#stop_payment(check_transfer_id, reason: nil, request_options: {}) ⇒ Increase::Models::CheckTransfer
Request a stop payment on a Check Transfer. This can be done any time before the check is deposited. A stopped check cannot be deposited and the funds held by the transfer's Pending Transaction are released back to the account's available balance.
185 186 187 188 189 190 191 192 193 194 |
# File 'lib/increase/resources/check_transfers.rb', line 185 def stop_payment(check_transfer_id, params = {}) parsed, = Increase::CheckTransferStopPaymentParams.dump_request(params) @client.request( method: :post, path: ["check_transfers/%1$s/stop_payment", check_transfer_id], body: parsed, model: Increase::CheckTransfer, options: ) end |