supports testing with yodlee merchant.
This commit is contained in:
@@ -93,7 +93,7 @@
|
|||||||
(defn tr [z x]
|
(defn tr [z x]
|
||||||
(re-find (re-pattern z) x))
|
(re-find (re-pattern z) x))
|
||||||
|
|
||||||
(defn test-transaction-rule [{:keys [id]} {{:keys [description note client_id bank_account_id amount_lte amount_gte dom_lte dom_gte]} :transaction_rule :as z} value]
|
(defn test-transaction-rule [{:keys [id]} {{:keys [description note client_id bank_account_id amount_lte amount_gte dom_lte dom_gte yodlee_merchant_id]} :transaction_rule :as z} value]
|
||||||
(->>
|
(->>
|
||||||
(d/query
|
(d/query
|
||||||
(cond-> {:query {:find ['(pull ?e [* {:transaction/client [:client/name]
|
(cond-> {:query {:find ['(pull ?e [* {:transaction/client [:client/name]
|
||||||
@@ -119,6 +119,11 @@
|
|||||||
'[(re-find ?description-regex ?do)]]}
|
'[(re-find ?description-regex ?do)]]}
|
||||||
:args [(re-pattern description)]})
|
:args [(re-pattern description)]})
|
||||||
|
|
||||||
|
yodlee_merchant_id
|
||||||
|
(merge-query {:query {:in ['?yodlee-merchant-id]
|
||||||
|
:where ['[?e :transaction/yodlee-merchant ?yodlee-merchant-id]]}
|
||||||
|
:args [yodlee_merchant_id]})
|
||||||
|
|
||||||
amount_gte
|
amount_gte
|
||||||
(merge-query {:query {:in ['?amount-gte]
|
(merge-query {:query {:in ['?amount-gte]
|
||||||
:where ['[?e :transaction/amount ?ta]
|
:where ['[?e :transaction/amount ?ta]
|
||||||
|
|||||||
@@ -72,6 +72,7 @@
|
|||||||
:dom-lte
|
:dom-lte
|
||||||
:dom-gte
|
:dom-gte
|
||||||
:note])
|
:note])
|
||||||
|
(assoc :yodlee-merchant-id (:id (:yodlee-merchant data)))
|
||||||
(assoc :client-id (:id (:client data)))
|
(assoc :client-id (:id (:client data)))
|
||||||
(assoc :bank-account-id (:id (:bank-account data))))}
|
(assoc :bank-account-id (:id (:bank-account data))))}
|
||||||
[:id
|
[:id
|
||||||
|
|||||||
Reference in New Issue
Block a user