Allows users to self set up square
This commit is contained in:
@@ -23,6 +23,10 @@
|
||||
(defn get-all []
|
||||
(->> (d/q '[:find (pull ?e [*
|
||||
{:client/address [*]}
|
||||
{:client/square-locations [:square-location/square-id
|
||||
:square-location/name
|
||||
:square-location/client-location
|
||||
:db/id]}
|
||||
{:client/bank-accounts [* {:bank-account/type [*]
|
||||
:bank-account/yodlee-account [:yodlee-account/name :yodlee-account/id :yodlee-account/number]
|
||||
:bank-account/plaid-account [:plaid-account/name :db/id :plaid-account/number :plaid-account/balance]
|
||||
|
||||
@@ -250,5 +250,26 @@
|
||||
:db/doc "The type of refund"
|
||||
:db/valueType :db.type/string
|
||||
:db/cardinality :db.cardinality/one}]]
|
||||
:requires [:add-refunds]}})
|
||||
:requires [:add-refunds]}
|
||||
:add-square-locations-3 {:txes [[{:db/ident :client/square-auth-token
|
||||
:db/doc "A token that can be used to authenticate with square"
|
||||
:db/valueType :db.type/string
|
||||
:db/cardinality :db.cardinality/one}
|
||||
{:db/ident :client/square-locations
|
||||
:db/doc "Locations in square"
|
||||
:db/valueType :db.type/ref
|
||||
:db/isComponent true
|
||||
:db/cardinality :db.cardinality/many}
|
||||
{:db/ident :square-location/square-id
|
||||
:db/doc "An id for a location in square"
|
||||
:db/valueType :db.type/string
|
||||
:db/cardinality :db.cardinality/one}
|
||||
{:db/ident :square-location/name
|
||||
:db/doc "Name of the location in square e.g. Woodland Hills"
|
||||
:db/valueType :db.type/string
|
||||
:db/cardinality :db.cardinality/one}
|
||||
{:db/ident :square-location/client-location
|
||||
:db/doc "The client location that this location should match to. e.g. WH"
|
||||
:db/valueType :db.type/string
|
||||
:db/cardinality :db.cardinality/one}]]}})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user