Class: Increase::Resources::Simulations::WireTransfers
- Inherits:
-
Object
- Object
- Increase::Resources::Simulations::WireTransfers
- Defined in:
- lib/increase/resources/simulations/wire_transfers.rb
Instance Method Summary collapse
-
#initialize(client:) ⇒ WireTransfers
constructor
private
A new instance of WireTransfers.
-
#reverse(wire_transfer_id, request_options: {}) ⇒ Increase::Models::WireTransfer
Simulates the reversal of a [Wire Transfer](#wire-transfers) by the Federal Reserve due to error conditions.
-
#submit(wire_transfer_id, request_options: {}) ⇒ Increase::Models::WireTransfer
Simulates the submission of a [Wire Transfer](#wire-transfers) to the Federal Reserve.
Constructor Details
#initialize(client:) ⇒ WireTransfers
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 WireTransfers.
55 56 57 |
# File 'lib/increase/resources/simulations/wire_transfers.rb', line 55 def initialize(client:) @client = client end |
Instance Method Details
#reverse(wire_transfer_id, request_options: {}) ⇒ Increase::Models::WireTransfer
Simulates the reversal of a [Wire Transfer](#wire-transfers) by the Federal Reserve due to error conditions. This will also create a [Transaction](#transaction) to account for the returned funds. This Wire Transfer must first have a ‘status` of `complete`.
21 22 23 24 25 26 27 28 |
# File 'lib/increase/resources/simulations/wire_transfers.rb', line 21 def reverse(wire_transfer_id, params = {}) @client.request( method: :post, path: ["simulations/wire_transfers/%1$s/reverse", wire_transfer_id], model: Increase::WireTransfer, options: params[:request_options] ) end |
#submit(wire_transfer_id, request_options: {}) ⇒ Increase::Models::WireTransfer
Simulates the submission of a [Wire Transfer](#wire-transfers) to the Federal Reserve. This transfer must first have a ‘status` of `pending_approval` or `pending_creating`.
43 44 45 46 47 48 49 50 |
# File 'lib/increase/resources/simulations/wire_transfers.rb', line 43 def submit(wire_transfer_id, params = {}) @client.request( method: :post, path: ["simulations/wire_transfers/%1$s/submit", wire_transfer_id], model: Increase::WireTransfer, options: params[:request_options] ) end |