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

Returns a new instance of Programs.



7
8
9
# File 'lib/increase/resources/simulations/programs.rb', line 7

def initialize(client:)
  @client = client
end

Instance Method Details

#create(params = {}, opts = {}) ⇒ 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:

  • params (Hash) (defaults to: {})

    Attributes to send in this request.

  • opts (Hash|RequestOptions) (defaults to: {})

    Options to specify HTTP behaviour for this request.

Options Hash (params):

  • :name (String)

    The name of the program being added.

Returns:



21
22
23
24
25
26
27
28
# File 'lib/increase/resources/simulations/programs.rb', line 21

def create(params = {}, opts = {})
  req = {}
  req[:method] = :post
  req[:path] = "/simulations/programs"
  req[:body] = params
  req[:model] = Increase::Models::Program
  @client.request(req, opts)
end