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