Class: LunchMoney::Calls::Base
- Inherits:
-
Object
- Object
- LunchMoney::Calls::Base
- Defined in:
- lib/lunchmoney/calls/base.rb
Overview
Base class for all API call types. Containing the base methods got HTTP call types like GET / POST / PUT / DELETE as well as the general error handler
Direct Known Subclasses
Assets, Budgets, Categories, Crypto, PlaidAccounts, RecurringExpenses, Tags, Transactions, Users
Constant Summary collapse
- BASE_URL =
Base URL used for API calls
"https://dev.lunchmoney.app/v1/"
Instance Attribute Summary collapse
- #api_key ⇒ String? readonly
Instance Method Summary collapse
- #initialize(api_key: nil) ⇒ void constructor
Constructor Details
#initialize(api_key: nil) ⇒ void
24 25 26 |
# File 'lib/lunchmoney/calls/base.rb', line 24 def initialize(api_key: nil) @api_key = T.let((api_key || LunchMoney.configuration.api_key), T.nilable(String)) end |
Instance Attribute Details
#api_key ⇒ String? (readonly)
21 22 23 |
# File 'lib/lunchmoney/calls/base.rb', line 21 def api_key @api_key end |