Class: Increase::Resources::Simulations::ACHTransfers
- Inherits:
-
Object
- Object
- Increase::Resources::Simulations::ACHTransfers
- Defined in:
- lib/increase/resources/simulations/ach_transfers.rb
Instance Method Summary collapse
-
#acknowledge(ach_transfer_id, request_options: {}) ⇒ Increase::Models::ACHTransfer
Simulates the acknowledgement of an [ACH Transfer](#ach-transfers) by the Federal Reserve.
-
#create_notification_of_change(ach_transfer_id, change_code: , corrected_data: , request_options: {}) ⇒ Increase::Models::ACHTransfer
Some parameter documentations has been truncated, see Models::Simulations::ACHTransferCreateNotificationOfChangeParams for more details.
-
#initialize(client:) ⇒ ACHTransfers
constructor
private
A new instance of ACHTransfers.
-
#return_(ach_transfer_id, reason: nil, request_options: {}) ⇒ Increase::Models::ACHTransfer
Some parameter documentations has been truncated, see Models::Simulations::ACHTransferReturnParams for more details.
-
#settle(ach_transfer_id, request_options: {}) ⇒ Increase::Models::ACHTransfer
Simulates the settlement of an [ACH Transfer](#ach-transfers) by the Federal Reserve.
-
#submit(ach_transfer_id, request_options: {}) ⇒ Increase::Models::ACHTransfer
Simulates the submission of an [ACH Transfer](#ach-transfers) 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.
145 146 147 |
# File 'lib/increase/resources/simulations/ach_transfers.rb', line 145 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](#ach-transfers) 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 acknowledgment 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, change_code: , corrected_data: , request_options: {}) ⇒ Increase::Models::ACHTransfer
Some parameter documentations has been truncated, see Models::Simulations::ACHTransferCreateNotificationOfChangeParams for more details.
Simulates receiving a Notification of Change for an [ACH Transfer](#ach-transfers).
52 53 54 55 56 57 58 59 60 61 |
# File 'lib/increase/resources/simulations/ach_transfers.rb', line 52 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, reason: nil, request_options: {}) ⇒ Increase::Models::ACHTransfer
Some parameter documentations has been truncated, see Models::Simulations::ACHTransferReturnParams for more details.
Simulates the return of an [ACH Transfer](#ach-transfers) 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`.
81 82 83 84 85 86 87 88 89 90 |
# File 'lib/increase/resources/simulations/ach_transfers.rb', line 81 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, request_options: {}) ⇒ Increase::Models::ACHTransfer
Simulates the settlement of an [ACH Transfer](#ach-transfers) 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.
108 109 110 111 112 113 114 115 |
# File 'lib/increase/resources/simulations/ach_transfers.rb', line 108 def settle(ach_transfer_id, params = {}) @client.request( method: :post, path: ["simulations/ach_transfers/%1$s/settle", ach_transfer_id], model: Increase::ACHTransfer, options: params[:request_options] ) end |
#submit(ach_transfer_id, request_options: {}) ⇒ Increase::Models::ACHTransfer
Simulates the submission of an [ACH Transfer](#ach-transfers) 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`.
133 134 135 136 137 138 139 140 |
# File 'lib/increase/resources/simulations/ach_transfers.rb', line 133 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 |