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
A new instance of WireTransfers.
-
#reverse(wire_transfer_id, opts = {}) ⇒ Increase::Models::WireTransfer
Simulates the reversal of a Wire Transfer by the Federal Reserve due to error conditions.
-
#submit(wire_transfer_id, opts = {}) ⇒ Increase::Models::WireTransfer
Simulates the submission of a Wire Transfer to the Federal Reserve.
Constructor Details
#initialize(client:) ⇒ WireTransfers
Returns a new instance of WireTransfers.
7 8 9 |
# File 'lib/increase/resources/simulations/wire_transfers.rb', line 7 def initialize(client:) @client = client end |
Instance Method Details
#reverse(wire_transfer_id, opts = {}) ⇒ Increase::Models::WireTransfer
Simulates the reversal of a Wire Transfer by the Federal
Reserve due to error conditions. This will also create a
Transaction to account for the returned funds. This Wire
Transfer must first have a status
of complete
.
20 21 22 23 24 25 26 |
# File 'lib/increase/resources/simulations/wire_transfers.rb', line 20 def reverse(wire_transfer_id, opts = {}) req = {} req[:method] = :post req[:path] = "/simulations/wire_transfers/#{wire_transfer_id}/reverse" req[:model] = Increase::Models::WireTransfer @client.request(req, opts) end |
#submit(wire_transfer_id, opts = {}) ⇒ Increase::Models::WireTransfer
Simulates the submission of a Wire Transfer to the Federal
Reserve. This transfer must first have a status
of pending_approval
or
pending_creating
.
36 37 38 39 40 41 42 |
# File 'lib/increase/resources/simulations/wire_transfers.rb', line 36 def submit(wire_transfer_id, opts = {}) req = {} req[:method] = :post req[:path] = "/simulations/wire_transfers/#{wire_transfer_id}/submit" req[:model] = Increase::Models::WireTransfer @client.request(req, opts) end |