Class: LunchMoney::Calls::PlaidAccounts
- Inherits:
-
Base
- Object
- Base
- LunchMoney::Calls::PlaidAccounts
show all
- Defined in:
- lib/lunchmoney/calls/plaid_accounts.rb
Overview
Constant Summary
Constants inherited
from Base
Base::BASE_URL
Instance Attribute Summary
Attributes inherited from Base
#api_key
Instance Method Summary
collapse
Methods inherited from Base
#initialize
Instance Method Details
11
12
13
14
15
16
17
18
19
20
|
# File 'lib/lunchmoney/calls/plaid_accounts.rb', line 11
def plaid_accounts
response = get("plaid_accounts")
api_errors = errors(response)
return api_errors if api_errors.present?
response.body[:plaid_accounts].map do |plaid_account|
LunchMoney::Objects::PlaidAccount.new(**plaid_account)
end
end
|
#plaid_accounts_fetch(start_date: nil, end_date: nil, plaid_account_id: nil) ⇒ Boolean, LunchMoney::Errors
29
30
31
32
33
34
35
36
37
|
# File 'lib/lunchmoney/calls/plaid_accounts.rb', line 29
def plaid_accounts_fetch(start_date: nil, end_date: nil, plaid_account_id: nil)
params = clean_params({ start_date:, end_date:, plaid_account_id: })
response = post("plaid_accounts/fetch", params)
api_errors = errors(response)
return api_errors if api_errors.present?
response.body
end
|