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

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.

Parameters:



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`.

Parameters:

  • wire_transfer_id (String)

    The identifier of the Wire Transfer you wish to reverse.

  • request_options (Increase::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

See Also:



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`.

Parameters:

  • wire_transfer_id (String)

    The identifier of the Wire Transfer you wish to submit.

  • request_options (Increase::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

See Also:



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