-
-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
Currently, nested query params (type Object
in the docs) are output directly as clojure literals to the query string, meaning that the stripe API sees a query-params
argument of
{:active true
:currency "GBP"
:recurring {:interval "month"}}
... like this:
{
"active": "true",
"currency": "GBP",
"recurring": {
"interval": "{:interval \"month\"}"
}
}
... which understandably returns a 400 bad request.
The build-query-params
function should correctly handle nested maps, and produce values such as:
foo=1&bar[baz]=2
for an argument of:
{:foo 1
:bar {:baz 2}}
I'm not sure how many levels of nesting the Stripe API may require.
Here's an example where it currently breaks:
(->> (prices/list-all {:query-params {:type "recurring"
:currency "GBP"
:recurring {:interval "year"}
:active true
:limit 10}}))
Metadata
Metadata
Assignees
Labels
No labels