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:



162
163
164
# File 'lib/increase/resources/wire_transfers.rb', line 162

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:



130
131
132
133
134
135
136
137
# File 'lib/increase/resources/wire_transfers.rb', line 130

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:



150
151
152
153
154
155
156
157
# File 'lib/increase/resources/wire_transfers.rb', line 150

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: , beneficiary_name: , account_number: nil, beneficiary_address_line1: nil, beneficiary_address_line2: nil, beneficiary_address_line3: nil, external_account_id: nil, inbound_wire_drawdown_request_id: nil, originator_address_line1: nil, originator_address_line2: nil, originator_address_line3: nil, originator_name: nil, remittance: 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.

  • beneficiary_name (String)

    The beneficiary’s name.

  • account_number (String)

    The account number for the destination account.

  • beneficiary_address_line1 (String)

    The beneficiary’s address line 1.

  • beneficiary_address_line2 (String)

    The beneficiary’s address line 2.

  • beneficiary_address_line3 (String)

    The beneficiary’s address line 3.

  • 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

  • originator_address_line1 (String)

    The originator’s address line 1. This is only necessary if you’re transferring f

  • originator_address_line2 (String)

    The originator’s address line 2. This is only necessary if you’re transferring f

  • originator_address_line3 (String)

    The originator’s address line 3. This is only necessary if you’re transferring f

  • originator_name (String)

    The originator’s name. This is only necessary if you’re transferring from a comm

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

    Additional remittance information related to the wire transfer.

  • 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:



52
53
54
55
56
57
58
59
60
61
# File 'lib/increase/resources/wire_transfers.rb', line 52

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:



107
108
109
110
111
112
113
114
115
116
117
# File 'lib/increase/resources/wire_transfers.rb', line 107

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:



74
75
76
77
78
79
80
81
# File 'lib/increase/resources/wire_transfers.rb', line 74

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