Class: Increase::Resources::RealTimePaymentsTransfers

Inherits:
Object
  • Object
show all
Defined in:
lib/increase/resources/real_time_payments_transfers.rb,
sig/increase/resources/real_time_payments_transfers.rbs

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ RealTimePaymentsTransfers

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

Parameters:



179
180
181
# File 'lib/increase/resources/real_time_payments_transfers.rb', line 179

def initialize(client:)
  @client = client
end

Instance Method Details

#approve(real_time_payments_transfer_id, request_options: {}) ⇒ Increase::Models::RealTimePaymentsTransfer

Approves a Real-Time Payments Transfer in a pending_approval state.

Parameters:

  • real_time_payments_transfer_id (String)

    The identifier of the Real-Time Payments Transfer to approve.

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

Returns:

See Also:



146
147
148
149
150
151
152
153
# File 'lib/increase/resources/real_time_payments_transfers.rb', line 146

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

#cancel(real_time_payments_transfer_id, request_options: {}) ⇒ Increase::Models::RealTimePaymentsTransfer

Cancels a Real-Time Payments Transfer in a pending_approval state.

Parameters:

  • real_time_payments_transfer_id (String)

    The identifier of the pending Real-Time Payments Transfer to cancel.

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

Returns:

See Also:



167
168
169
170
171
172
173
174
# File 'lib/increase/resources/real_time_payments_transfers.rb', line 167

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

#create(amount:, creditor_name:, source_account_number_id:, unstructured_remittance_information:, account_number: nil, debtor_name: nil, external_account_id: nil, inbound_real_time_payments_request_for_payment_id: nil, require_approval: nil, routing_number: nil, ultimate_creditor_name: nil, ultimate_debtor_name: nil, request_options: {}) ⇒ Increase::Models::RealTimePaymentsTransfer

Create a Real-Time Payments Transfer

Parameters:

  • amount (Integer)

    The transfer amount in USD cents. For Real-Time Payments transfers, must be positive.

  • creditor_name (String)

    The name of the transfer's recipient.

  • source_account_number_id (String)

    The identifier of the Account Number from which to send the transfer.

  • unstructured_remittance_information (String)

    Unstructured information that will show on the recipient's bank statement.

  • account_number (String)

    The destination account number.

  • debtor_name (String)

    The name of the transfer's sender. If not provided, defaults to the name of the account's entity.

  • external_account_id (String)

    The ID of an External Account to initiate a transfer to. If this parameter is provided, account_number and routing_number must be absent.

  • inbound_real_time_payments_request_for_payment_id (String)

    The ID of an Inbound Real-Time Payments Request for Payment in response to which this transfer is being sent.

  • require_approval (Boolean)

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

  • routing_number (String)

    The destination American Bankers' Association (ABA) Routing Transit Number (RTN).

  • ultimate_creditor_name (String)

    The name of the ultimate recipient of the transfer. Set this if the creditor is an intermediary receiving the payment for someone else.

  • ultimate_debtor_name (String)

    The name of the ultimate sender of the transfer. Set this if the funds are being sent on behalf of someone who is not the account holder at Increase.

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

Returns:

See Also:



56
57
58
59
60
61
62
63
64
65
# File 'lib/increase/resources/real_time_payments_transfers.rb', line 56

def create(params)
  parsed, options = Increase::RealTimePaymentsTransferCreateParams.dump_request(params)
  @client.request(
    method: :post,
    path: "real_time_payments_transfers",
    body: parsed,
    model: Increase::RealTimePaymentsTransfer,
    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::RealTimePaymentsTransfer>

List Real-Time Payments Transfers

Parameters:

  • account_id (String)

    Filter Real-Time Payments Transfers to those belonging to the specified Account.

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

    Return the page of entries after this one.

  • external_account_id (String)

    Filter Real-Time Payments 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 that object. This value is unique across Increase and is used to ensure that a request is only processed once. Learn more about idempotency.

  • limit (Integer)

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

    Defaults to 100.

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

Returns:

See Also:



121
122
123
124
125
126
127
128
129
130
131
132
# File 'lib/increase/resources/real_time_payments_transfers.rb', line 121

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

#retrieve(real_time_payments_transfer_id, request_options: {}) ⇒ Increase::Models::RealTimePaymentsTransfer

Retrieve a Real-Time Payments Transfer

Parameters:

  • real_time_payments_transfer_id (String)

    The identifier of the Real-Time Payments Transfer.

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

Returns:

See Also:



78
79
80
81
82
83
84
85
# File 'lib/increase/resources/real_time_payments_transfers.rb', line 78

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