Class: Increase::Resources::Simulations::InterestPayments
- Inherits:
-
Object
- Object
- Increase::Resources::Simulations::InterestPayments
- Defined in:
- lib/increase/resources/simulations/interest_payments.rb
Instance Method Summary collapse
-
#create(params = {}, opts = {}) ⇒ Increase::Models::Transaction
Simulates an interest payment to your account.
-
#initialize(client:) ⇒ InterestPayments
constructor
A new instance of InterestPayments.
Constructor Details
#initialize(client:) ⇒ InterestPayments
Returns a new instance of InterestPayments.
7 8 9 |
# File 'lib/increase/resources/simulations/interest_payments.rb', line 7 def initialize(client:) @client = client end |
Instance Method Details
#create(params = {}, opts = {}) ⇒ Increase::Models::Transaction
Simulates an interest payment to your account. In production, this happens automatically on the first of each month.
23 24 25 26 27 28 29 30 |
# File 'lib/increase/resources/simulations/interest_payments.rb', line 23 def create(params = {}, opts = {}) req = {} req[:method] = :post req[:path] = "/simulations/interest_payments" req[:body] = params req[:model] = Increase::Models::Transaction @client.request(req, opts) end |