Class: Increase::Resources::Simulations::CheckDeposits

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

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ CheckDeposits

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

Parameters:



115
116
117
# File 'lib/increase/resources/simulations/check_deposits.rb', line 115

def initialize(client:)
  @client = client
end

Instance Method Details

#adjustment(check_deposit_id, amount: nil, reason: nil, request_options: {}) ⇒ Increase::Models::CheckDeposit

Simulates the creation of a Check Deposit Adjustment on a Check Deposit. This Check Deposit must first have a status of submitted.

Parameters:

  • check_deposit_id (String)

    The identifier of the Check Deposit you wish to adjust.

  • amount (Integer)

    The adjustment amount in the minor unit of the Check Deposit's currency (e.g., cents). A negative amount means that the funds are being clawed back by the other bank and is a debit to your account. Defaults to the negative of the Check Deposit amount.

  • reason (Symbol, Increase::Models::Simulations::CheckDepositAdjustmentParams::Reason)

    The reason for the adjustment. Defaults to non_conforming_item, which is often used for a low quality image that the recipient wasn't able to handle.

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

Returns:

See Also:



31
32
33
34
35
36
37
38
39
40
# File 'lib/increase/resources/simulations/check_deposits.rb', line 31

def adjustment(check_deposit_id, params = {})
  parsed, options = Increase::Simulations::CheckDepositAdjustmentParams.dump_request(params)
  @client.request(
    method: :post,
    path: ["simulations/check_deposits/%1$s/adjustment", check_deposit_id],
    body: parsed,
    model: Increase::CheckDeposit,
    options: options
  )
end

#reject(check_deposit_id, request_options: {}) ⇒ Increase::Models::CheckDeposit

Simulates the rejection of a Check Deposit by Increase due to factors like poor image quality. This Check Deposit must first have a status of pending.

Parameters:

  • check_deposit_id (String)

    The identifier of the Check Deposit you wish to reject.

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

Returns:

See Also:



55
56
57
58
59
60
61
62
# File 'lib/increase/resources/simulations/check_deposits.rb', line 55

def reject(check_deposit_id, params = {})
  @client.request(
    method: :post,
    path: ["simulations/check_deposits/%1$s/reject", check_deposit_id],
    model: Increase::CheckDeposit,
    options: params[:request_options]
  )
end

#return_(check_deposit_id, request_options: {}) ⇒ Increase::Models::CheckDeposit

Simulates the return of a Check Deposit. This Check Deposit must first have a status of submitted.

Parameters:

  • check_deposit_id (String)

    The identifier of the Check Deposit you wish to return.

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

Returns:

See Also:



76
77
78
79
80
81
82
83
# File 'lib/increase/resources/simulations/check_deposits.rb', line 76

def return_(check_deposit_id, params = {})
  @client.request(
    method: :post,
    path: ["simulations/check_deposits/%1$s/return", check_deposit_id],
    model: Increase::CheckDeposit,
    options: params[:request_options]
  )
end

#submit(check_deposit_id, scan: nil, request_options: {}) ⇒ Increase::Models::CheckDeposit

Simulates the submission of a Check Deposit to the Federal Reserve. This Check Deposit must first have a status of pending.

Parameters:

Returns:

See Also:



101
102
103
104
105
106
107
108
109
110
# File 'lib/increase/resources/simulations/check_deposits.rb', line 101

def submit(check_deposit_id, params = {})
  parsed, options = Increase::Simulations::CheckDepositSubmitParams.dump_request(params)
  @client.request(
    method: :post,
    path: ["simulations/check_deposits/%1$s/submit", check_deposit_id],
    body: parsed,
    model: Increase::CheckDeposit,
    options: options
  )
end