Class: Increase::Resources::Simulations::AccountRevenuePayments

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

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ AccountRevenuePayments

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

Parameters:



45
46
47
# File 'lib/increase/resources/simulations/account_revenue_payments.rb', line 45

def initialize(client:)
  @client = client
end

Instance Method Details

#create(account_id:, amount:, accrued_on_account_id: nil, period_end: nil, period_start: nil, request_options: {}) ⇒ Increase::Models::Transaction

Some parameter documentations has been truncated, see Models::Simulations::AccountRevenuePaymentCreateParams for more details.

Simulates an account revenue payment to your account. In production, this happens automatically on the first of each month.

Parameters:

  • account_id (String)

    The identifier of the Account the Account Revenue Payment should be paid to.

  • amount (Integer)

    The account revenue amount in cents. Must be positive.

  • accrued_on_account_id (String)

    The identifier of the Account the account revenue accrued on. Defaults to ‘accou

  • period_end (Time)

    The end of the account revenue period. If not provided, defaults to the current

  • period_start (Time)

    The start of the account revenue period. If not provided, defaults to the curren

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

Returns:

See Also:



31
32
33
34
35
36
37
38
39
40
# File 'lib/increase/resources/simulations/account_revenue_payments.rb', line 31

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