Class: Increase::Resources::ACHTransfers

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

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:



168
169
170
# File 'lib/increase/resources/ach_transfers.rb', line 168

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:



136
137
138
139
140
141
142
143
# File 'lib/increase/resources/ach_transfers.rb', line 136

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:



156
157
158
159
160
161
162
163
# File 'lib/increase/resources/ach_transfers.rb', line 156

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

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

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

  • statement_descriptor (String)

    A description you choose to give the transfer. This will be saved with the trans

  • account_number (String)

    The account number for the destination account.

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

    Additional information that will be sent to the recipient. This is included in t

  • company_descriptive_date (String)

    The description of the date of the transfer, usually in the format ‘YYMMDD`. Thi

  • company_discretionary_data (String)

    The data you choose to associate with the transfer. This is included in the tran

  • company_entry_description (String)

    A description of the transfer. This is included in the transfer data sent to the

  • company_name (String)

    The name by which the recipient knows you. This is included in the transfer data

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

    The type of entity that owns the account to which the ACH Transfer is being sent

  • external_account_id (String)

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

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

    The type of the account to which the transfer will be sent.

  • individual_id (String)

    Your identifier for the transfer recipient.

  • individual_name (String)

    The name of the transfer recipient. This value is informational and not verified

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

    Configuration for how the effective date of the transfer will be set. This deter

  • 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) for the des

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

    The Standard Entry Class (SEC) code to use for the transfer.

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

    The timing of the transaction.

  • 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/ach_transfers.rb', line 56

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>

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

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 tha

  • limit (Integer)

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

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

Returns:

See Also:



113
114
115
116
117
118
119
120
121
122
123
# File 'lib/increase/resources/ach_transfers.rb', line 113

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



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

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