Supports adding and updating bank accounts

This commit is contained in:
BC
2019-02-12 11:57:59 -08:00
parent b85ba810b3
commit ef7b505337
4 changed files with 24 additions and 16 deletions

View File

@@ -20,7 +20,11 @@
(s/def ::number string?)
(s/def ::yodlee-account-id string?)
(s/def ::bank-account (s/keys :req-un [::code ::name ::bank-name ::bank-code ::routing ::number]))
(s/def ::checking-bank-account (s/and (s/keys :req-un [::code ::name ::bank-name ::bank-code ::routing ::number ::type])
#(= (:type %) :check)))
(s/def ::cash-account (s/and (s/keys :req-un [::type])
#(= (:type %) :cash)))
(s/def ::bank-account (s/or :cash ::cash-account :checking ::checking-bank-account))
(s/def ::bank-accounts (s/coll-of ::bank-account))
(s/def ::location string?)