Class: Increase::Resources::Simulations::Programs

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

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ Programs

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

Parameters:

API:

  • private



47
48
49
# File 'lib/increase/resources/simulations/programs.rb', line 47

def initialize(client:)
  @client = client
end

Instance Method Details

#create(name:, bank: nil, lending_maximum_extendable_credit: nil, loan_accounts_require_loan_offers: nil, reserve_account_id: nil, request_options: {}) ⇒ Increase::Models::Program

Simulates a Program being created in your group. By default, your group has one program called Commercial Banking. Note that when your group operates more than one program, program_id is a required field when creating accounts.

Parameters:

  • The name of the program being added.

  • The bank for the program's accounts, defaults to First Internet Bank.

  • The maximum extendable credit of the program being added.

  • Whether opening a loan Account under this Program requires an accepted Loan Offer. Requires lending_maximum_extendable_credit. Defaults to false.

  • The identifier of the Account the Program should be added to.

Returns:

See Also:



33
34
35
36
37
38
39
40
41
42
# File 'lib/increase/resources/simulations/programs.rb', line 33

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