mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-08-02 20:15:22 +02:00
Basic Plaid Integration (#1433)
* Basic plaid data model and linking * Remove institutions, add plaid items * Improve schema and Plaid provider * Add webhook verification sketch * Webhook verification * Item accounts and balances sync setup * Provide test encryption keys * Fix test * Only provide encryption keys in prod * Try defining keys in test env * Consolidate account sync logic * Add back plaid account initialization * Plaid transaction sync * Sync UI overhaul for Plaid * Add liability and investment syncing * Handle investment webhooks and process current day holdings * Remove logs * Remove "all" period select for performance * fix amount calc * Remove todo comment * Coming soon for investment historical data * Document Plaid configuration * Listen for holding updates
This commit is contained in:
parent
3bc9da4105
commit
cbba2ba675
127 changed files with 1537 additions and 841 deletions
12
test/fixtures/account/syncs.yml
vendored
12
test/fixtures/account/syncs.yml
vendored
|
@ -1,12 +0,0 @@
|
|||
one:
|
||||
account: depository
|
||||
status: failed
|
||||
start_date: 2024-07-07
|
||||
last_ran_at: 2024-07-07 09:03:31
|
||||
error: test sync error
|
||||
|
||||
two:
|
||||
account: investment
|
||||
status: completed
|
||||
start_date: 2024-07-07
|
||||
last_ran_at: 2024-07-07 09:03:32
|
11
test/fixtures/accounts.yml
vendored
11
test/fixtures/accounts.yml
vendored
|
@ -21,7 +21,15 @@ depository:
|
|||
currency: USD
|
||||
accountable_type: Depository
|
||||
accountable: one
|
||||
institution: chase
|
||||
|
||||
connected:
|
||||
family: dylan_family
|
||||
name: Connected Account
|
||||
balance: 5000
|
||||
currency: USD
|
||||
accountable_type: Depository
|
||||
accountable: two
|
||||
plaid_account: one
|
||||
|
||||
credit_card:
|
||||
family: dylan_family
|
||||
|
@ -30,7 +38,6 @@ credit_card:
|
|||
currency: USD
|
||||
accountable_type: CreditCard
|
||||
accountable: one
|
||||
institution: chase
|
||||
|
||||
investment:
|
||||
family: dylan_family
|
||||
|
|
3
test/fixtures/depositories.yml
vendored
3
test/fixtures/depositories.yml
vendored
|
@ -1 +1,2 @@
|
|||
one: { }
|
||||
one: { }
|
||||
two: {}
|
2
test/fixtures/families.yml
vendored
2
test/fixtures/families.yml
vendored
|
@ -1,8 +1,10 @@
|
|||
empty:
|
||||
name: Family
|
||||
stripe_subscription_status: active
|
||||
last_synced_at: <%= Time.now %>
|
||||
|
||||
dylan_family:
|
||||
name: The Dylan Family
|
||||
stripe_subscription_status: active
|
||||
last_synced_at: <%= Time.now %>
|
||||
|
||||
|
|
8
test/fixtures/institutions.yml
vendored
8
test/fixtures/institutions.yml
vendored
|
@ -1,8 +0,0 @@
|
|||
chase:
|
||||
name: Chase
|
||||
family: dylan_family
|
||||
|
||||
revolut:
|
||||
name: Revolut
|
||||
family: dylan_family
|
||||
logo_url: <%= "file://" + Rails.root.join('test/fixtures/files/square-placeholder.png').to_s %>
|
3
test/fixtures/plaid_accounts.yml
vendored
Normal file
3
test/fixtures/plaid_accounts.yml
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
one:
|
||||
plaid_item: one
|
||||
plaid_id: "1234567890"
|
5
test/fixtures/plaid_items.yml
vendored
Normal file
5
test/fixtures/plaid_items.yml
vendored
Normal file
|
@ -0,0 +1,5 @@
|
|||
one:
|
||||
family: dylan_family
|
||||
plaid_id: "1234567890"
|
||||
access_token: encrypted_token_1
|
||||
name: "Test Bank"
|
17
test/fixtures/syncs.yml
vendored
Normal file
17
test/fixtures/syncs.yml
vendored
Normal file
|
@ -0,0 +1,17 @@
|
|||
account:
|
||||
syncable_type: Account
|
||||
syncable: depository
|
||||
last_ran_at: <%= Time.now %>
|
||||
status: completed
|
||||
|
||||
plaid_item:
|
||||
syncable_type: PlaidItem
|
||||
syncable: one
|
||||
last_ran_at: <%= Time.now %>
|
||||
status: completed
|
||||
|
||||
family:
|
||||
syncable_type: Family
|
||||
syncable: dylan_family
|
||||
last_ran_at: <%= Time.now %>
|
||||
status: completed
|
Loading…
Add table
Add a link
Reference in a new issue