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 ⇒ Object
readonly
Returns the value of attribute api_key.
Instance Method Summary collapse
-
#initialize(api_key: nil) ⇒ Base
constructor
A new instance of Base.
Constructor Details
#initialize(api_key: nil) ⇒ Base
Returns a new instance of Base.
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 ⇒ Object (readonly)
Returns the value of attribute api_key.
21 22 23 |
# File 'lib/lunchmoney/calls/base.rb', line 21 def api_key @api_key end |