Class: Increase::Resources::Simulations::AccountStatements

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

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ AccountStatements

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

Parameters:

API:

  • private



34
35
36
# File 'lib/increase/resources/simulations/account_statements.rb', line 34

def initialize(client:)
  @client = client
end

Instance Method Details

#create(account_id:, request_options: {}) ⇒ Increase::Models::AccountStatement

Simulates an Account Statement being created for an account. In production, Account Statements are generated once per month. As in production, the simulated statement covers the previous calendar month.

Parameters:

  • The identifier of the Account the statement is for.

Returns:

See Also:



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

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