Class: Increase::Resources::Simulations::ACHTransfers
- Inherits:
-
Object
- Object
- Increase::Resources::Simulations::ACHTransfers
- Defined in:
- lib/increase/resources/simulations/ach_transfers.rb,
sig/increase/resources/simulations/ach_transfers.rbs
Instance Method Summary collapse
-
#acknowledge(ach_transfer_id, request_options: {}) ⇒ Increase::Models::ACHTransfer
Simulates the acknowledgement of an ACH Transfer by the Federal Reserve.
-
#create_notification_of_change(ach_transfer_id, corrected_account_funding: nil, corrected_account_number: nil, corrected_individual_id: nil, corrected_routing_number: nil, request_options: {}) ⇒ Increase::Models::ACHTransfer
Simulates receiving a Notification of Change for an ACH Transfer.
-
#initialize(client:) ⇒ ACHTransfers
constructor
private
A new instance of ACHTransfers.
-
#return_(ach_transfer_id, addenda_information: nil, reason: nil, request_options: {}) ⇒ Increase::Models::ACHTransfer
Simulates the return of an ACH Transfer by the Federal Reserve due to an error condition.
-
#settle(ach_transfer_id, inbound_funds_hold_behavior: nil, request_options: {}) ⇒ Increase::Models::ACHTransfer
Simulates the settlement of an ACH Transfer by the Federal Reserve.
-
#submit(ach_transfer_id, request_options: {}) ⇒ Increase::Models::ACHTransfer
Simulates the submission of an ACH Transfer to the Federal Reserve.
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.
162 163 164 |
# File 'lib/increase/resources/simulations/ach_transfers.rb', line 162 def initialize(client:) @client = client end |
Instance Method Details
#acknowledge(ach_transfer_id, request_options: {}) ⇒ Increase::Models::ACHTransfer
Simulates the acknowledgement of an ACH Transfer by the
Federal Reserve. This transfer must first have a status of submitted. In
production, the Federal Reserve generally acknowledges submitted ACH files
within 30 minutes. Since sandbox ACH Transfers are not submitted to the Federal
Reserve, this endpoint allows you to skip that delay and add the acknowledgement
subresource to the ACH Transfer.
23 24 25 26 27 28 29 30 |
# File 'lib/increase/resources/simulations/ach_transfers.rb', line 23 def acknowledge(ach_transfer_id, params = {}) @client.request( method: :post, path: ["simulations/ach_transfers/%1$s/acknowledge", ach_transfer_id], model: Increase::ACHTransfer, options: params[:request_options] ) end |
#create_notification_of_change(ach_transfer_id, corrected_account_funding: nil, corrected_account_number: nil, corrected_individual_id: nil, corrected_routing_number: nil, request_options: {}) ⇒ Increase::Models::ACHTransfer
Simulates receiving a Notification of Change for an ACH Transfer.
55 56 57 58 59 60 61 62 63 64 |
# File 'lib/increase/resources/simulations/ach_transfers.rb', line 55 def create_notification_of_change(ach_transfer_id, params = {}) parsed, = Increase::Simulations::ACHTransferCreateNotificationOfChangeParams.dump_request(params) @client.request( method: :post, path: ["simulations/ach_transfers/%1$s/create_notification_of_change", ach_transfer_id], body: parsed, model: Increase::ACHTransfer, options: ) end |
#return_(ach_transfer_id, addenda_information: nil, reason: nil, request_options: {}) ⇒ Increase::Models::ACHTransfer
Simulates the return of an ACH Transfer by the Federal Reserve
due to an error condition. This will also create a Transaction to account for
the returned funds. This transfer must first have a status of submitted.
88 89 90 91 92 93 94 95 96 97 |
# File 'lib/increase/resources/simulations/ach_transfers.rb', line 88 def return_(ach_transfer_id, params = {}) parsed, = Increase::Simulations::ACHTransferReturnParams.dump_request(params) @client.request( method: :post, path: ["simulations/ach_transfers/%1$s/return", ach_transfer_id], body: parsed, model: Increase::ACHTransfer, options: ) end |
#settle(ach_transfer_id, inbound_funds_hold_behavior: nil, request_options: {}) ⇒ Increase::Models::ACHTransfer
Simulates the settlement of an ACH Transfer by the Federal
Reserve. This transfer must first have a status of pending_submission or
submitted. For convenience, if the transfer is in status:
pending_submission, the simulation will also submit the transfer. Without this
simulation the transfer will eventually settle on its own following the same
Federal Reserve timeline as in production. Additionally, you can specify the
behavior of the inbound funds hold that is created when the ACH Transfer is
settled. If no behavior is specified, the inbound funds hold will be released
immediately in order for the funds to be available for use.
123 124 125 126 127 128 129 130 131 132 |
# File 'lib/increase/resources/simulations/ach_transfers.rb', line 123 def settle(ach_transfer_id, params = {}) parsed, = Increase::Simulations::ACHTransferSettleParams.dump_request(params) @client.request( method: :post, path: ["simulations/ach_transfers/%1$s/settle", ach_transfer_id], body: parsed, model: Increase::ACHTransfer, options: ) end |
#submit(ach_transfer_id, request_options: {}) ⇒ Increase::Models::ACHTransfer
Simulates the submission of an ACH Transfer to the Federal
Reserve. This transfer must first have a status of pending_approval or
pending_submission. In production, Increase submits ACH Transfers to the
Federal Reserve three times per day on weekdays. Since sandbox ACH Transfers are
not submitted to the Federal Reserve, this endpoint allows you to skip that
delay and transition the ACH Transfer to a status of submitted.
150 151 152 153 154 155 156 157 |
# File 'lib/increase/resources/simulations/ach_transfers.rb', line 150 def submit(ach_transfer_id, params = {}) @client.request( method: :post, path: ["simulations/ach_transfers/%1$s/submit", ach_transfer_id], model: Increase::ACHTransfer, options: params[:request_options] ) end |