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

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

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:



41
42
43
# File 'lib/increase/resources/simulations/programs.rb', line 41

def initialize(client:)
  @client = client
end

Instance Method Details

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

Simulates a [Program](#programs) 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:

  • name (String)

    The name of the program being added.

  • bank (Symbol, Increase::Models::Simulations::ProgramCreateParams::Bank)

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

  • lending_maximum_extendable_credit (Integer)

    The maximum extendable credit of the program being added.

  • reserve_account_id (String)

    The identifier of the Account the Program should be added to is for.

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

Returns:

See Also:



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

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