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

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

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:



110
111
112
# File 'lib/increase/resources/simulations/check_deposits.rb', line 110

def initialize(client:)
  @client = client
end

Instance Method Details

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

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

Simulates the creation of a [Check Deposit Adjustment](#check-deposit-adjustments) on a [Check Deposit](#check-deposits). This Check Deposit must first have a ‘status` of `submitted`.

Parameters:

Returns:

See Also:



28
29
30
31
32
33
34
35
36
37
# File 'lib/increase/resources/simulations/check_deposits.rb', line 28

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](#check-deposits) 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:



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

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](#check-deposits). 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:



73
74
75
76
77
78
79
80
# File 'lib/increase/resources/simulations/check_deposits.rb', line 73

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](#check-deposits) to the Federal Reserve. This Check Deposit must first have a ‘status` of `pending`.

Parameters:

Returns:

See Also:



96
97
98
99
100
101
102
103
104
105
# File 'lib/increase/resources/simulations/check_deposits.rb', line 96

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