Class: Increase::Resources::Simulations::InboundACHTransfers

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

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ InboundACHTransfers

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

Parameters:

API:

  • private



72
73
74
# File 'lib/increase/resources/simulations/inbound_ach_transfers.rb', line 72

def initialize(client:)
  @client = client
end

Instance Method Details

#create(account_number_id:, amount:, addenda: nil, company_descriptive_date: nil, company_discretionary_data: nil, company_entry_description: nil, company_id: nil, company_name: nil, receiver_id_number: nil, receiver_name: nil, resolve_at: nil, standard_entry_class_code: nil, request_options: {}) ⇒ Increase::Models::InboundACHTransfer

Simulates an inbound ACH transfer to your account. This imitates initiating a transfer to an Increase account from a different financial institution. The transfer may be either a credit or a debit depending on if the amount is positive or negative. The result of calling this API will contain the created transfer. You can pass a resolve_at parameter to allow for a window to action on the Inbound ACH Transfer. Alternatively, if you don't pass the resolve_at parameter the result will contain either a Transaction or a Declined Transaction depending on whether or not the transfer is allowed.

Parameters:

  • The identifier of the Account Number the inbound ACH Transfer is for.

  • The transfer amount in 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.

  • Additional information to include in the transfer.

  • The description of the date of the transfer.

  • Data associated with the transfer set by the sender.

  • The description of the transfer set by the sender.

  • The sender's company ID.

  • The name of the sender. This corresponds to the originator_company_name field on the resulting Inbound ACH Transfer.

  • The ID of the receiver of the transfer.

  • The name of the receiver of the transfer.

  • The time at which the transfer should be resolved. If not provided will resolve immediately.

  • The standard entry class code for the transfer.

Returns:

See Also:



58
59
60
61
62
63
64
65
66
67
# File 'lib/increase/resources/simulations/inbound_ach_transfers.rb', line 58

def create(params)
  parsed, options = Increase::Simulations::InboundACHTransferCreateParams.dump_request(params)
  @client.request(
    method: :post,
    path: "simulations/inbound_ach_transfers",
    body: parsed,
    model: Increase::InboundACHTransfer,
    options: options
  )
end