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, opts = {}) ⇒ Increase::Models::ACHTransfer
Simulates the acknowledgement of an ACH Transfer by the Federal Reserve.
-
#create_notification_of_change(ach_transfer_id, params = {}, opts = {}) ⇒ Increase::Models::ACHTransfer
Simulates receiving a Notification of Change for an ACH Transfer.
-
#initialize(client:) ⇒ ACHTransfers
constructor
A new instance of ACHTransfers.
-
#return_(ach_transfer_id, params = {}, opts = {}) ⇒ Increase::Models::ACHTransfer
Simulates the return of an ACH Transfer by the Federal Reserve due to an error condition.
-
#submit(ach_transfer_id, opts = {}) ⇒ Increase::Models::ACHTransfer
Simulates the submission of an ACH Transfer to the Federal Reserve.
Constructor Details
#initialize(client:) ⇒ ACHTransfers
Returns a new instance of ACHTransfers.
7 8 9 |
# File 'lib/increase/resources/simulations/ach_transfers.rb', line 7 def initialize(client:) @client = client end |
Instance Method Details
#acknowledge(ach_transfer_id, opts = {}) ⇒ 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 acknowledgment
subresource to the ACH Transfer.
22 23 24 25 26 27 28 |
# File 'lib/increase/resources/simulations/ach_transfers.rb', line 22 def acknowledge(ach_transfer_id, opts = {}) req = {} req[:method] = :post req[:path] = "/simulations/ach_transfers/#{ach_transfer_id}/acknowledge" req[:model] = Increase::Models::ACHTransfer @client.request(req, opts) end |
#create_notification_of_change(ach_transfer_id, params = {}, opts = {}) ⇒ Increase::Models::ACHTransfer
Simulates receiving a Notification of Change for an ACH Transfer.
43 44 45 46 47 48 49 50 |
# File 'lib/increase/resources/simulations/ach_transfers.rb', line 43 def create_notification_of_change(ach_transfer_id, params = {}, opts = {}) req = {} req[:method] = :post req[:path] = "/simulations/ach_transfers/#{ach_transfer_id}/create_notification_of_change" req[:body] = params req[:model] = Increase::Models::ACHTransfer @client.request(req, opts) end |
#return_(ach_transfer_id, params = {}, opts = {}) ⇒ 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
.
65 66 67 68 69 70 71 72 |
# File 'lib/increase/resources/simulations/ach_transfers.rb', line 65 def return_(ach_transfer_id, params = {}, opts = {}) req = {} req[:method] = :post req[:path] = "/simulations/ach_transfers/#{ach_transfer_id}/return" req[:body] = params req[:model] = Increase::Models::ACHTransfer @client.request(req, opts) end |
#submit(ach_transfer_id, opts = {}) ⇒ 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
.
85 86 87 88 89 90 91 |
# File 'lib/increase/resources/simulations/ach_transfers.rb', line 85 def submit(ach_transfer_id, opts = {}) req = {} req[:method] = :post req[:path] = "/simulations/ach_transfers/#{ach_transfer_id}/submit" req[:model] = Increase::Models::ACHTransfer @client.request(req, opts) end |