Class: Increase::Resources::Simulations::ACHTransfers

Inherits:
Object
  • Object
show all
Defined in:
lib/increase/resources/simulations/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:



155
156
157
# File 'lib/increase/resources/simulations/ach_transfers.rb', line 155

def initialize(client:)
  @client = client
end

Instance Method Details

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

Simulates the acknowledgement of an [ACH Transfer](#ach-transfers) by the Federal Reserve. This transfer must first have a ‘status` of `submitted` . In production, the Federal Reserve generally acknowledges submitted ACH files within 30 minutes. Since sandbox ACH Transfers are not submitted to the Federal Reserve, this endpoint allows you to skip that delay and add the acknowledgment subresource to the ACH Transfer.

Parameters:

  • ach_transfer_id (String)

    The identifier of the ACH Transfer you wish to become acknowledged.

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

Returns:

See Also:



23
24
25
26
27
28
29
30
# File 'lib/increase/resources/simulations/ach_transfers.rb', line 23

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

#create_notification_of_change(ach_transfer_id, change_code: , corrected_data: , request_options: {}) ⇒ Increase::Models::ACHTransfer

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

Simulates receiving a Notification of Change for an [ACH Transfer](#ach-transfers).

Parameters:

Returns:

See Also:



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

def create_notification_of_change(ach_transfer_id, params)
  parsed, options = Increase::Simulations::ACHTransferCreateNotificationOfChangeParams.dump_request(params)
  @client.request(
    method: :post,
    path: ["simulations/ach_transfers/%1$s/create_notification_of_change", ach_transfer_id],
    body: parsed,
    model: Increase::ACHTransfer,
    options: options
  )
end

#return_(ach_transfer_id, reason: nil, request_options: {}) ⇒ Increase::Models::ACHTransfer

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

Simulates the return of an [ACH Transfer](#ach-transfers) by the Federal Reserve due to an error condition. This will also create a Transaction to account for the returned funds. This transfer must first have a ‘status` of `submitted`.

Parameters:

Returns:

See Also:



81
82
83
84
85
86
87
88
89
90
# File 'lib/increase/resources/simulations/ach_transfers.rb', line 81

def return_(ach_transfer_id, params = {})
  parsed, options = Increase::Simulations::ACHTransferReturnParams.dump_request(params)
  @client.request(
    method: :post,
    path: ["simulations/ach_transfers/%1$s/return", ach_transfer_id],
    body: parsed,
    model: Increase::ACHTransfer,
    options: options
  )
end

#settle(ach_transfer_id, inbound_funds_hold_behavior: nil, request_options: {}) ⇒ Increase::Models::ACHTransfer

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

Simulates the settlement of an [ACH Transfer](#ach-transfers) by the Federal Reserve. This transfer must first have a ‘status` of `pending_submission` or `submitted`. For convenience, if the transfer is in `status`: `pending_submission`, the simulation will also submit the transfer. Without this simulation the transfer will eventually settle on its own following the same Federal Reserve timeline as in production. Additionally, you can specify the behavior of the inbound funds hold that is created when the ACH Transfer is settled. If no behavior is specified, the inbound funds hold will be released immediately in order for the funds to be available for use.

Parameters:

Returns:

See Also:



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

def settle(ach_transfer_id, params = {})
  parsed, options = Increase::Simulations::ACHTransferSettleParams.dump_request(params)
  @client.request(
    method: :post,
    path: ["simulations/ach_transfers/%1$s/settle", ach_transfer_id],
    body: parsed,
    model: Increase::ACHTransfer,
    options: options
  )
end

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

Simulates the submission of an [ACH Transfer](#ach-transfers) to the Federal Reserve. This transfer must first have a ‘status` of `pending_approval` or `pending_submission`. In production, Increase submits ACH Transfers to the Federal Reserve three times per day on weekdays. Since sandbox ACH Transfers are not submitted to the Federal Reserve, this endpoint allows you to skip that delay and transition the ACH Transfer to a status of `submitted`.

Parameters:

  • ach_transfer_id (String)

    The identifier of the ACH Transfer you wish to submit.

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

Returns:

See Also:



143
144
145
146
147
148
149
150
# File 'lib/increase/resources/simulations/ach_transfers.rb', line 143

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