Class: Increase::Resources::FednowTransfers

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

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ FednowTransfers

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

Parameters:



153
154
155
# File 'lib/increase/resources/fednow_transfers.rb', line 153

def initialize(client:)
  @client = client
end

Instance Method Details

#approve(fednow_transfer_id, request_options: {}) ⇒ Increase::Models::FednowTransfer

Approve a FedNow Transfer

Parameters:

  • fednow_transfer_id (String)

    The identifier of the FedNow Transfer to approve.

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

Returns:

See Also:



121
122
123
124
125
126
127
128
# File 'lib/increase/resources/fednow_transfers.rb', line 121

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

#cancel(fednow_transfer_id, request_options: {}) ⇒ Increase::Models::FednowTransfer

Cancel a pending FedNow Transfer

Parameters:

  • fednow_transfer_id (String)

    The identifier of the pending FedNow Transfer to cancel.

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

Returns:

See Also:



141
142
143
144
145
146
147
148
# File 'lib/increase/resources/fednow_transfers.rb', line 141

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

#create(amount:, creditor_name:, debtor_name:, source_account_number_id:, unstructured_remittance_information:, account_number: nil, creditor_address: nil, debtor_address: nil, external_account_id: nil, require_approval: nil, routing_number: nil, request_options: {}) ⇒ Increase::Models::FednowTransfer

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

Create a FedNow Transfer

Parameters:

  • amount (Integer)

    The amount, in minor units, to send to the creditor.

  • creditor_name (String)

    The creditor’s name.

  • debtor_name (String)

    The debtor’s name.

  • source_account_number_id (String)

    The Account Number to include in the transfer as the debtor’s account number.

  • unstructured_remittance_information (String)

    Unstructured remittance information to include in the transfer.

  • account_number (String)

    The creditor’s account number.

  • creditor_address (Increase::Models::FednowTransferCreateParams::CreditorAddress)

    The creditor’s address.

  • debtor_address (Increase::Models::FednowTransferCreateParams::DebtorAddress)

    The debtor’s address.

  • external_account_id (String)

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

  • require_approval (Boolean)

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

  • routing_number (String)

    The creditor’s bank account routing number.

  • 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/fednow_transfers.rb', line 40

def create(params)
  parsed, options = Increase::FednowTransferCreateParams.dump_request(params)
  @client.request(
    method: :post,
    path: "fednow_transfers",
    body: parsed,
    model: Increase::FednowTransfer,
    options: options
  )
end

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

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

List FedNow Transfers

Parameters:

  • account_id (String)

    Filter FedNow Transfers to those that originated from the specified Account.

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

    Return the page of entries after this one.

  • external_account_id (String)

    Filter FedNow 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

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

Returns:

See Also:



97
98
99
100
101
102
103
104
105
106
107
108
# File 'lib/increase/resources/fednow_transfers.rb', line 97

def list(params = {})
  parsed, options = Increase::FednowTransferListParams.dump_request(params)
  query = Increase::Internal::Util.encode_query_params(parsed)
  @client.request(
    method: :get,
    path: "fednow_transfers",
    query: query,
    page: Increase::Internal::Page,
    model: Increase::FednowTransfer,
    options: options
  )
end

#retrieve(fednow_transfer_id, request_options: {}) ⇒ Increase::Models::FednowTransfer

Retrieve a FedNow Transfer

Parameters:

  • fednow_transfer_id (String)

    The identifier of the FedNow Transfer.

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

Returns:

See Also:



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

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