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:



173
174
175
# File 'lib/increase/resources/real_time_payments_transfers.rb', line 173

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:



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

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:



161
162
163
164
165
166
167
168
# File 'lib/increase/resources/real_time_payments_transfers.rb', line 161

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

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



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

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.

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

Returns:

See Also:



115
116
117
118
119
120
121
122
123
124
125
126
# File 'lib/increase/resources/real_time_payments_transfers.rb', line 115

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:



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

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