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:



39
40
41
# File 'lib/increase/resources/simulations/programs.rb', line 39

def initialize(client:)
  @client = client
end

Instance Method Details

#create(name: , bank: 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:

Returns:

See Also:



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

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