Class: Increase::Resources::ACHTransfers

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

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ ACHTransfers

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

Parameters:



219
220
221
# File 'lib/increase/resources/ach_transfers.rb', line 219

def initialize(client:)
  @client = client
end

Instance Method Details

#approve(ach_transfer_id, request_options: {}) ⇒ Increase::Models::ACHTransfer

Approves an ACH Transfer in a pending_approval state.

Parameters:

  • ach_transfer_id (String)

    The identifier of the ACH Transfer to approve.

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

Returns:

See Also:



187
188
189
190
191
192
193
194
# File 'lib/increase/resources/ach_transfers.rb', line 187

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

#cancel(ach_transfer_id, request_options: {}) ⇒ Increase::Models::ACHTransfer

Cancels an ACH Transfer in a pending_approval state.

Parameters:

  • ach_transfer_id (String)

    The identifier of the pending ACH Transfer to cancel.

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

Returns:

See Also:



207
208
209
210
211
212
213
214
# File 'lib/increase/resources/ach_transfers.rb', line 207

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

#create(account_id:, amount:, statement_descriptor:, account_number: nil, addenda: nil, company_descriptive_date: nil, company_discretionary_data: nil, company_entry_description: nil, company_name: nil, destination_account_holder: nil, external_account_id: nil, funding: nil, individual_id: nil, individual_name: nil, preferred_effective_date: nil, require_approval: nil, routing_number: nil, standard_entry_class_code: nil, transaction_timing: nil, request_options: {}) ⇒ Increase::Models::ACHTransfer

Create an ACH Transfer

Parameters:

  • account_id (String)

    The Increase identifier for the account that will send the transfer.

  • amount (Integer)

    The transfer amount in USD cents. A positive amount originates a credit transfer pushing funds to the receiving account. A negative amount originates a debit transfer pulling funds from the receiving account.

  • statement_descriptor (String)

    A description you choose to give the transfer. This will be saved with the transfer details, displayed in the dashboard, and returned by the API. If individual_name and company_name are not explicitly set by this API, the statement_descriptor will be sent in those fields to the receiving bank to help the customer recognize the transfer. You are highly encouraged to pass individual_name and company_name instead of relying on this fallback.

  • account_number (String)

    The receiver's account number. For credit transfers (positive amount) this is the account that funds will be sent to. For debit transfers (negative amount) this is the account that funds will be pulled from.

  • addenda (Increase::Models::ACHTransferCreateParams::Addenda)

    Additional information passed through to the receiving bank with the transfer. Most ACH transfers do not need this. Only set this if your recipient has asked for addendum data, typically unstructured remittance information. Corporate Trade Exchange (CTX) flows can carry structured X12 remittance advice instead.

  • company_descriptive_date (String)

    A description of the transfer date (typically YYMMDD), sent in the company batch header. This value is informational and does not affect funds movement, settlement timing, or returns. Only set this if your recipient has asked for it.

  • company_discretionary_data (String)

    Custom data sent in the company batch header. This value is informational and does not affect funds movement, settlement timing, or returns. Most ACH transfers do not need this. Only set this if your recipient has asked for it.

  • company_entry_description (String)

    A short description sent in the company batch header. Most receivers do not surface this. Only set this if your recipient has asked for a specific value or if Nacha mandates one for your Standard Entry Class (SEC) code and use case. For example, Prearranged Payment and Deposit (PPD) payroll credits must use PAYROLL, and reversals must use REVERSAL.

  • company_name (String)

    The name by which the recipient knows you, sent in the company batch header. We recommend setting this on every transfer; if you do not, we fall back to the ACH company name configured on your account.

  • destination_account_holder (Symbol, Increase::Models::ACHTransferCreateParams::DestinationAccountHolder)

    The type of entity that owns the receiver's account.

  • external_account_id (String)

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

  • funding (Symbol, Increase::Models::ACHTransferCreateParams::Funding)

    The type of the receiver's bank account.

  • individual_id (String)

    Your internal identifier for the transfer recipient. This value is informational and not verified by the recipient's bank. Most callers can leave this unset.

  • individual_name (String)

    The name of the transfer recipient. This value is informational and not verified by the recipient's bank.

  • preferred_effective_date (Increase::Models::ACHTransferCreateParams::PreferredEffectiveDate)

    Configuration for how the effective date of the transfer will be set. This determines same-day vs future-dated settlement timing. If not set, defaults to a settlement_schedule of same_day. If set, exactly one of the child attributes must be set.

  • 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) of the receiver's bank.

  • standard_entry_class_code (Symbol, Increase::Models::ACHTransferCreateParams::StandardEntryClassCode)

    The Standard Entry Class (SEC) code to use for the transfer. If not provided, the default is corporate_credit_or_debit.

  • transaction_timing (Symbol, Increase::Models::ACHTransferCreateParams::TransactionTiming)

    The timing of the transaction.

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

Returns:

See Also:



103
104
105
106
107
108
109
110
111
112
# File 'lib/increase/resources/ach_transfers.rb', line 103

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

List ACH Transfers

Parameters:

  • account_id (String)

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

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

    Return the page of entries after this one.

  • external_account_id (String)

    Filter ACH 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::ACHTransferListParams::Status)
  • request_options (Increase::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

See Also:



163
164
165
166
167
168
169
170
171
172
173
174
# File 'lib/increase/resources/ach_transfers.rb', line 163

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

#retrieve(ach_transfer_id, request_options: {}) ⇒ Increase::Models::ACHTransfer

Retrieve an ACH Transfer

Parameters:

  • ach_transfer_id (String)

    The identifier of the ACH Transfer.

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

Returns:

See Also:



125
126
127
128
129
130
131
132
# File 'lib/increase/resources/ach_transfers.rb', line 125

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