trying to be better with square integration.
This commit is contained in:
@@ -318,11 +318,12 @@
|
||||
(->> lookup-dates
|
||||
(mapcat (fn [[start-date end-date]]
|
||||
(log/info "looking up settlements for " (:square-location/client-location location) " on dates " start-date " to " end-date)
|
||||
(let [settlements (->> (client/get (str "https://connect.squareup.com/v1/" (:square-location/square-id location) "/settlements")
|
||||
{:headers (client-base-headers client)
|
||||
:query-params {"begin_time" start-date
|
||||
"end_time" end-date}
|
||||
:as :json})
|
||||
(let [settlements (->> (retry #(client/get (str "https://connect.squareup.com/v1/" (:square-location/square-id location) "/settlements")
|
||||
{:headers (client-base-headers client)
|
||||
:query-params {"begin_time" start-date
|
||||
"end_time" end-date}
|
||||
:as :json
|
||||
:retry-handler retry-4}))
|
||||
:body
|
||||
(map :id))]
|
||||
settlements)))
|
||||
|
||||
Reference in New Issue
Block a user