Class: Increase::Resources::RealTimePaymentsTransfers

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

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:



152
153
154
# File 'lib/increase/resources/real_time_payments_transfers.rb', line 152

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:



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

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:



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

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: , remittance_information: , source_account_number_id: , debtor_name: nil, destination_account_number: nil, destination_routing_number: nil, external_account_id: nil, require_approval: nil, ultimate_creditor_name: nil, ultimate_debtor_name: nil, request_options: {}) ⇒ Increase::Models::RealTimePaymentsTransfer

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

Create a Real-Time Payments Transfer

Parameters:

  • amount (Integer)

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

  • creditor_name (String)

    The name of the transfer’s recipient.

  • remittance_information (String)

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

  • source_account_number_id (String)

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

  • debtor_name (String)

    The name of the transfer’s sender. If not provided, defaults to the name of the

  • destination_account_number (String)

    The destination account number.

  • destination_routing_number (String)

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

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

  • ultimate_creditor_name (String)

    The name of the ultimate recipient of the transfer. Set this if the creditor is

  • ultimate_debtor_name (String)

    The name of the ultimate sender of the transfer. Set this if the funds are being

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

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>

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

List Real-Time Payments Transfers

Parameters:

Returns:

See Also:



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

def list(params = {})
  parsed, options = Increase::RealTimePaymentsTransferListParams.dump_request(params)
  @client.request(
    method: :get,
    path: "real_time_payments_transfers",
    query: parsed,
    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:



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

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