mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-08-07 22:45:20 +02:00
Account Issue Model and Resolution Flow + Troubleshooting guides (#1090)
* Rough draft of issue system * Simplify design * Remove stale files from merge conflicts * STI for issues * Cleanup * Improve Synth api key flow * Stub api key for test
This commit is contained in:
parent
c70a08aca2
commit
707c5ca0ca
52 changed files with 507 additions and 211 deletions
|
@ -1,9 +1,6 @@
|
|||
class Account::Holding::Syncer
|
||||
attr_reader :warnings
|
||||
|
||||
def initialize(account, start_date: nil)
|
||||
@account = account
|
||||
@warnings = []
|
||||
@sync_date_range = calculate_sync_start_date(start_date)..Date.current
|
||||
@portfolio = {}
|
||||
|
||||
|
@ -69,6 +66,8 @@ class Account::Holding::Syncer
|
|||
|
||||
price = get_cached_price(ticker, date) || trade_price
|
||||
|
||||
account.observe_missing_price(ticker:, date:) unless price
|
||||
|
||||
account.holdings.build \
|
||||
date: date,
|
||||
security_id: holding[:security_id],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue