Class: Increase::Resources::Simulations::WireTransfers

Inherits:
Object
  • Object
show all
Defined in:
lib/increase/resources/simulations/wire_transfers.rb

Instance Method Summary collapse

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.

Parameters:

  • wire_transfer_id (String)

    The identifier of the Wire Transfer you wish to reverse.

  • opts (Hash|RequestOptions) (defaults to: {})

    Options to specify HTTP behaviour for this request.

Returns:



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.

Parameters:

  • wire_transfer_id (String)

    The identifier of the Wire Transfer you wish to submit.

  • opts (Hash|RequestOptions) (defaults to: {})

    Options to specify HTTP behaviour for this request.

Returns:



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