mirror of
https://github.com/we-promise/sure.git
synced 2026-04-18 19:44:09 +00:00
Breaks our Plaid sync process out into more manageable classes. Notably, this moves the sync process to a distinct, 2-step flow: 1. Import stage - we first make API calls and import Plaid data to "mirror" tables 2. Processing stage - read the raw data, apply business rules, build internal domain models and sync balances This provides several benefits: - Plaid syncs can now be "replayed" without fetching API data again - Mirror tables provide better audit and debugging capabilities - Eliminates the "all or nothing" sync behavior that is currently in place, which is brittle
83 lines
1.5 KiB
YAML
83 lines
1.5 KiB
YAML
other_asset:
|
|
family: dylan_family
|
|
name: Collectable Account
|
|
balance: 550
|
|
currency: USD
|
|
accountable_type: OtherAsset
|
|
accountable: one
|
|
|
|
other_liability:
|
|
family: dylan_family
|
|
name: IOU (personal debt to friend)
|
|
balance: 200
|
|
currency: USD
|
|
accountable_type: OtherLiability
|
|
accountable: one
|
|
|
|
depository:
|
|
family: dylan_family
|
|
name: Checking Account
|
|
balance: 5000
|
|
currency: USD
|
|
accountable_type: Depository
|
|
accountable: one
|
|
|
|
connected:
|
|
family: dylan_family
|
|
name: Plaid Depository Account
|
|
balance: 5000
|
|
currency: USD
|
|
subtype: checking
|
|
accountable_type: Depository
|
|
accountable: two
|
|
plaid_account: one
|
|
|
|
credit_card:
|
|
family: dylan_family
|
|
name: Credit Card
|
|
balance: 1000
|
|
currency: USD
|
|
accountable_type: CreditCard
|
|
accountable: one
|
|
|
|
investment:
|
|
family: dylan_family
|
|
name: Robinhood Brokerage Account
|
|
balance: 10000
|
|
cash_balance: 5000
|
|
currency: USD
|
|
accountable_type: Investment
|
|
accountable: one
|
|
|
|
loan:
|
|
family: dylan_family
|
|
name: Mortgage Loan
|
|
balance: 500000
|
|
currency: USD
|
|
accountable_type: Loan
|
|
accountable: one
|
|
|
|
property:
|
|
family: dylan_family
|
|
name: 123 Maybe Court
|
|
balance: 550000
|
|
currency: USD
|
|
accountable_type: Property
|
|
accountable: one
|
|
|
|
vehicle:
|
|
family: dylan_family
|
|
name: Honda Accord
|
|
balance: 18000
|
|
currency: USD
|
|
accountable_type: Vehicle
|
|
accountable: one
|
|
|
|
crypto:
|
|
family: dylan_family
|
|
name: Bitcoin
|
|
balance: 10000
|
|
currency: USD
|
|
accountable_type: Crypto
|
|
accountable: one
|