Class: Moneylovercli::Api::Transaction

Inherits:
MoneyLover show all
Defined in:
lib/moneylovercli/api/transaction.rb

Instance Attribute Summary

Attributes inherited from MoneyLover

#token

Attributes inherited from Base

#token

Instance Method Summary collapse

Methods inherited from MoneyLover

#initialize

Constructor Details

This class inherits a constructor from Moneylovercli::Api::MoneyLover

Instance Method Details

#add(account:, category_id:, amount:, display_date:) ⇒ Object



12
13
14
15
16
17
18
19
20
21
# File 'lib/moneylovercli/api/transaction.rb', line 12

def add(account:, category_id:, amount:, display_date:)
  self.class.post('/transaction/add',
                  body: {
                    account: ,
                    category: category_id,
                    amount: amount,
                    displayDate: display_date
                  },
                  headers: { authorization: "AuthJWT #{@token}" })
end