fixed warnings.

This commit is contained in:
2022-07-26 05:56:41 -07:00
parent f6f73a6110
commit 96c80853ef
133 changed files with 670 additions and 1640 deletions

View File

@@ -1,38 +1,30 @@
(ns auto-ap.intuit.core
(:require [auto-ap.datomic :refer [conn remove-nils]]
[amazonica.aws.s3 :as s3]
[auto-ap.utils :refer [by]]
[clj-http.client :as client]
[clj-time.coerce :as coerce]
[clj-time.core :as time]
[clj-time.format :as f]
[config.core :refer [env] :as cfg ]
[clojure.string :as str]
[clojure.data.json :as json]
[clojure.java.io :as io]
[clojure.tools.logging :as log]
[datomic.api :as d]
[mount.core :as mount]
[unilog.context :as lc]
[yang.scheduler :as scheduler]
[clojure.core.async :as async]
[clojure.core.memoize :as m])
(:import [org.apache.commons.codec.binary Base64]))
(:require
[amazonica.aws.s3 :as s3]
[clj-http.client :as client]
[clojure.core.memoize :as m]
[clojure.java.io :as io]
[clojure.string :as str]
[clojure.tools.logging :as log]
[config.core :as cfg :refer [env]])
(:import
(org.apache.commons.codec.binary Base64)))
;; (def authorization-code "AB11638463964I0tYPR3A1inog2HL407u2bZBXHg6LEqCbILRO")
;; (def realm-id "4620816365202617680")
(def authorization-code "AB11638463964I0tYPR3A1inog2HL407u2bZBXHg6LEqCbILRO")
(def realm-id "4620816365202617680")
;; (def company-id "4620816365202617680")
(def company-id "4620816365202617680")
(def base-url "https://sandbox-quickbooks.api.intuit.com/v3")
;; (def base-url "https://sandbox-quickbooks.api.intuit.com/v3")
(def prod-client-id "ABFRwAiOqQiLN66HKplXfyRE3ipD390DHsrUquflRCiOa81mxa")
(def prod-client-secret "xDUj04GeQXpLvrhxep1jjDYwjJWbzzOPrirUQTKF")
(def prod-redirect-uri "https://developer.intuit.com/v2/OAuth2Playground/RedirectUrl")
(def prod-authorization-code "AB11638464998wYuapsEGtIEnRqphrw0H97XUnvEG2dK4cGUyL")
(def prod-realm-id "123146163906404")
;; (def prod-redirect-uri "https://developer.intuit.com/v2/OAuth2Playground/RedirectUrl")
;; (def prod-authorization-code "AB11638464998wYuapsEGtIEnRqphrw0H97XUnvEG2dK4cGUyL")
;; (def prod-realm-id "123146163906404")
;; "refreshToken": "AB11647191065B0olWYQ61wfq8uszBusfe6Jpn7Au7qY5exkLL",
;; "accessToken":,
;;
@@ -122,10 +114,9 @@
(defn get-all-transactions [start end]
(let [token (get-fresh-access-token)]
(let [body (:body (client/get (str prod-base-url "/company/" prod-company-id "/reports/TransactionList" "?minorversion=63&start_date=" start "&end_date=" end)
{:headers (with-auth prod-base-headers token)
:as :json}))]
body)))
(:body (client/get (str prod-base-url "/company/" prod-company-id "/reports/TransactionList" "?minorversion=63&start_date=" start "&end_date=" end)
{:headers (with-auth prod-base-headers token)
:as :json}))))
(def memoize-get-all-transactions (m/ttl get-all-transactions :ttl/threshold 60000))