Class: Increase::Resources::ACHTransfers
- Inherits:
-
Object
- Object
- Increase::Resources::ACHTransfers
- Defined in:
- lib/increase/resources/ach_transfers.rb
Instance Method Summary collapse
-
#approve(ach_transfer_id, request_options: {}) ⇒ Increase::Models::ACHTransfer
Approves an ACH Transfer in a pending_approval state.
-
#cancel(ach_transfer_id, request_options: {}) ⇒ Increase::Models::ACHTransfer
Cancels an ACH Transfer in a pending_approval state.
-
#create(account_id: , amount: , statement_descriptor: , account_number: nil, addenda: nil, company_descriptive_date: nil, company_discretionary_data: nil, company_entry_description: nil, company_name: nil, destination_account_holder: nil, external_account_id: nil, funding: nil, individual_id: nil, individual_name: nil, preferred_effective_date: nil, require_approval: nil, routing_number: nil, standard_entry_class_code: nil, transaction_timing: nil, request_options: {}) ⇒ Increase::Models::ACHTransfer
Some parameter documentations has been truncated, see Models::ACHTransferCreateParams for more details.
-
#initialize(client:) ⇒ ACHTransfers
constructor
private
A new instance of ACHTransfers.
-
#list(account_id: nil, created_at: nil, cursor: nil, external_account_id: nil, idempotency_key: nil, limit: nil, status: nil, request_options: {}) ⇒ Increase::Internal::Page<Increase::Models::ACHTransfer>
Some parameter documentations has been truncated, see Models::ACHTransferListParams for more details.
-
#retrieve(ach_transfer_id, request_options: {}) ⇒ Increase::Models::ACHTransfer
Retrieve an ACH Transfer.
Constructor Details
#initialize(client:) ⇒ ACHTransfers
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 ACHTransfers.
168 169 170 |
# File 'lib/increase/resources/ach_transfers.rb', line 168 def initialize(client:) @client = client end |
Instance Method Details
#approve(ach_transfer_id, request_options: {}) ⇒ Increase::Models::ACHTransfer
Approves an ACH Transfer in a pending_approval state.
136 137 138 139 140 141 142 143 |
# File 'lib/increase/resources/ach_transfers.rb', line 136 def approve(ach_transfer_id, params = {}) @client.request( method: :post, path: ["ach_transfers/%1$s/approve", ach_transfer_id], model: Increase::ACHTransfer, options: params[:request_options] ) end |
#cancel(ach_transfer_id, request_options: {}) ⇒ Increase::Models::ACHTransfer
Cancels an ACH Transfer in a pending_approval state.
156 157 158 159 160 161 162 163 |
# File 'lib/increase/resources/ach_transfers.rb', line 156 def cancel(ach_transfer_id, params = {}) @client.request( method: :post, path: ["ach_transfers/%1$s/cancel", ach_transfer_id], model: Increase::ACHTransfer, options: params[:request_options] ) end |
#create(account_id: , amount: , statement_descriptor: , account_number: nil, addenda: nil, company_descriptive_date: nil, company_discretionary_data: nil, company_entry_description: nil, company_name: nil, destination_account_holder: nil, external_account_id: nil, funding: nil, individual_id: nil, individual_name: nil, preferred_effective_date: nil, require_approval: nil, routing_number: nil, standard_entry_class_code: nil, transaction_timing: nil, request_options: {}) ⇒ Increase::Models::ACHTransfer
Some parameter documentations has been truncated, see Models::ACHTransferCreateParams for more details.
Create an ACH Transfer
56 57 58 59 60 61 62 63 64 65 |
# File 'lib/increase/resources/ach_transfers.rb', line 56 def create(params) parsed, = Increase::ACHTransferCreateParams.dump_request(params) @client.request( method: :post, path: "ach_transfers", body: parsed, model: Increase::ACHTransfer, options: ) end |
#list(account_id: nil, created_at: nil, cursor: nil, external_account_id: nil, idempotency_key: nil, limit: nil, status: nil, request_options: {}) ⇒ Increase::Internal::Page<Increase::Models::ACHTransfer>
Some parameter documentations has been truncated, see Models::ACHTransferListParams for more details.
List ACH Transfers
113 114 115 116 117 118 119 120 121 122 123 |
# File 'lib/increase/resources/ach_transfers.rb', line 113 def list(params = {}) parsed, = Increase::ACHTransferListParams.dump_request(params) @client.request( method: :get, path: "ach_transfers", query: parsed, page: Increase::Internal::Page, model: Increase::ACHTransfer, options: ) end |
#retrieve(ach_transfer_id, request_options: {}) ⇒ Increase::Models::ACHTransfer
Retrieve an ACH Transfer
78 79 80 81 82 83 84 85 |
# File 'lib/increase/resources/ach_transfers.rb', line 78 def retrieve(ach_transfer_id, params = {}) @client.request( method: :get, path: ["ach_transfers/%1$s", ach_transfer_id], model: Increase::ACHTransfer, options: params[:request_options] ) end |