Class: Increase::Resources::WireTransfers

Inherits:
Object
  • Object
show all
Defined in:
lib/increase/resources/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:



150
151
152
# File 'lib/increase/resources/wire_transfers.rb', line 150

def initialize(client:)
  @client = client
end

Instance Method Details

#approve(wire_transfer_id, request_options: {}) ⇒ Increase::Models::WireTransfer

Approve a Wire Transfer

Parameters:

  • wire_transfer_id (String)

    The identifier of the Wire Transfer to approve.

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

Returns:

See Also:



118
119
120
121
122
123
124
125
# File 'lib/increase/resources/wire_transfers.rb', line 118

def approve(wire_transfer_id, params = {})
  @client.request(
    method: :post,
    path: ["wire_transfers/%1$s/approve", wire_transfer_id],
    model: Increase::WireTransfer,
    options: params[:request_options]
  )
end

#cancel(wire_transfer_id, request_options: {}) ⇒ Increase::Models::WireTransfer

Cancel a pending Wire Transfer

Parameters:

  • wire_transfer_id (String)

    The identifier of the pending Wire Transfer to cancel.

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

Returns:

See Also:



138
139
140
141
142
143
144
145
# File 'lib/increase/resources/wire_transfers.rb', line 138

def cancel(wire_transfer_id, params = {})
  @client.request(
    method: :post,
    path: ["wire_transfers/%1$s/cancel", wire_transfer_id],
    model: Increase::WireTransfer,
    options: params[:request_options]
  )
end

#create(account_id: , amount: , creditor: , remittance: , account_number: nil, debtor: nil, external_account_id: nil, inbound_wire_drawdown_request_id: nil, require_approval: nil, routing_number: nil, source_account_number_id: nil, request_options: {}) ⇒ Increase::Models::WireTransfer

Some parameter documentations has been truncated, see Models::WireTransferCreateParams for more details.

Create a Wire Transfer

Parameters:

  • account_id (String)

    The identifier for the account that will send the transfer.

  • amount (Integer)

    The transfer amount in USD cents.

  • creditor (Increase::Models::WireTransferCreateParams::Creditor)

    The person or business that is receiving the funds from the transfer.

  • remittance (Increase::Models::WireTransferCreateParams::Remittance)

    Additional remittance information related to the wire transfer.

  • account_number (String)

    The account number for the destination account.

  • debtor (Increase::Models::WireTransferCreateParams::Debtor)

    The person or business whose funds are being transferred. This is only necessary

  • external_account_id (String)

    The ID of an External Account to initiate a transfer to. If this parameter is pr

  • inbound_wire_drawdown_request_id (String)

    The ID of an Inbound Wire Drawdown Request in response to which this transfer is

  • require_approval (Boolean)

    Whether the transfer requires explicit approval via the dashboard or API.

  • routing_number (String)

    The American Bankers’ Association (ABA) Routing Transit Number (RTN) for the des

  • source_account_number_id (String)

    The ID of an Account Number that will be passed to the wire’s recipient

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

Returns:

See Also:



40
41
42
43
44
45
46
47
48
49
# File 'lib/increase/resources/wire_transfers.rb', line 40

def create(params)
  parsed, options = Increase::WireTransferCreateParams.dump_request(params)
  @client.request(
    method: :post,
    path: "wire_transfers",
    body: parsed,
    model: Increase::WireTransfer,
    options: options
  )
end

#list(account_id: nil, created_at: nil, cursor: nil, external_account_id: nil, idempotency_key: nil, limit: nil, request_options: {}) ⇒ Increase::Internal::Page<Increase::Models::WireTransfer>

Some parameter documentations has been truncated, see Models::WireTransferListParams for more details.

List Wire Transfers

Parameters:

  • account_id (String)

    Filter Wire Transfers to those belonging to the specified Account.

  • created_at (Increase::Models::WireTransferListParams::CreatedAt)
  • cursor (String)

    Return the page of entries after this one.

  • external_account_id (String)

    Filter Wire Transfers to those made to the specified External Account.

  • idempotency_key (String)

    Filter records to the one with the specified ‘idempotency_key` you chose for tha

  • limit (Integer)

    Limit the size of the list that is returned. The default (and maximum) is 100 ob

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

Returns:

See Also:



95
96
97
98
99
100
101
102
103
104
105
# File 'lib/increase/resources/wire_transfers.rb', line 95

def list(params = {})
  parsed, options = Increase::WireTransferListParams.dump_request(params)
  @client.request(
    method: :get,
    path: "wire_transfers",
    query: parsed,
    page: Increase::Internal::Page,
    model: Increase::WireTransfer,
    options: options
  )
end

#retrieve(wire_transfer_id, request_options: {}) ⇒ Increase::Models::WireTransfer

Retrieve a Wire Transfer

Parameters:

  • wire_transfer_id (String)

    The identifier of the Wire Transfer.

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

Returns:

See Also:



62
63
64
65
66
67
68
69
# File 'lib/increase/resources/wire_transfers.rb', line 62

def retrieve(wire_transfer_id, params = {})
  @client.request(
    method: :get,
    path: ["wire_transfers/%1$s", wire_transfer_id],
    model: Increase::WireTransfer,
    options: params[:request_options]
  )
end