Skip to content

Commit 6768ddf

Browse files
committed
Update API functions to support body parameter in Stripe requests
- Add `:body` support to request functions across multiple namespaces. - Update all affected POST endpoints with `body` parameter handling.
1 parent 0853ce1 commit 6768ddf

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+612
-595
lines changed

src/main/stream/clojure/stripe/api/account_links.clj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@
1111
1212
Example Usage:
1313
(create-account-links {})"
14-
[{:keys []}]
15-
(stripe-request :post {:endpoint "/v1/account_links"}))
14+
[{:keys [body]}]
15+
(stripe-request :post {:endpoint "/v1/account_links" :body body}))

src/main/stream/clojure/stripe/api/account_sessions.clj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@
1111
1212
Example Usage:
1313
(create-account-sessions {})"
14-
[{:keys []}]
15-
(stripe-request :post {:endpoint "/v1/account_sessions"}))
14+
[{:keys [body]}]
15+
(stripe-request :post {:endpoint "/v1/account_sessions" :body body}))

src/main/stream/clojure/stripe/api/accounts.clj

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@
2929
3030
Example Usage:
3131
(post {})"
32-
[{:keys []}]
33-
(stripe-request :post {:endpoint "/v1/accounts"}))
32+
[{:keys [body]}]
33+
(stripe-request :post {:endpoint "/v1/accounts" :body body}))
3434

3535
(defn create-account-login-links
3636
"Create a login link
@@ -43,8 +43,8 @@
4343
4444
Example Usage:
4545
(create-account-login-links {:account-id example-account-id})"
46-
[{:keys [account-id]}]
47-
(stripe-request :post {:endpoint "/v1/accounts/{account-id}/login_links" :path-params {:account-id account-id}}))
46+
[{:keys [account-id body]}]
47+
(stripe-request :post {:endpoint "/v1/accounts/{account-id}/login_links" :path-params {:account-id account-id} :body body}))
4848

4949
(defn retrieve-account-persons-person
5050
"Retrieve a person
@@ -91,8 +91,8 @@
9191
9292
Example Usage:
9393
(update-account-persons-person {:account-id example-account-id :person-id example-person-id})"
94-
[{:keys [account-id person-id]}]
95-
(stripe-request :post {:endpoint "/v1/accounts/{account-id}/persons/{person-id}" :path-params {:account-id account-id :person-id person-id}}))
94+
[{:keys [account-id person-id body]}]
95+
(stripe-request :post {:endpoint "/v1/accounts/{account-id}/persons/{person-id}" :path-params {:account-id account-id :person-id person-id} :body body}))
9696

9797
(defn retrieve-account-bank-id
9898
"Retrieve an external account
@@ -139,8 +139,8 @@
139139
140140
Example Usage:
141141
(post-account-bank-id {:account-id example-account-id :bank-account-id example-bank-account-id})"
142-
[{:keys [account-id bank-account-id]}]
143-
(stripe-request :post {:endpoint "/v1/accounts/{account-id}/bank_accounts/{bank-account-id}" :path-params {:account-id account-id :bank-account-id bank-account-id}}))
142+
[{:keys [account-id bank-account-id body]}]
143+
(stripe-request :post {:endpoint "/v1/accounts/{account-id}/bank_accounts/{bank-account-id}" :path-params {:account-id account-id :bank-account-id bank-account-id} :body body}))
144144

145145
(defn retrieve-account-people-person
146146
"Retrieve a person
@@ -187,8 +187,8 @@
187187
188188
Example Usage:
189189
(update-account-people-person {:account-id example-account-id :people-id example-people-id})"
190-
[{:keys [account-id people-id]}]
191-
(stripe-request :post {:endpoint "/v1/accounts/{account-id}/people/{people-id}" :path-params {:account-id account-id :people-id people-id}}))
190+
[{:keys [account-id people-id body]}]
191+
(stripe-request :post {:endpoint "/v1/accounts/{account-id}/people/{people-id}" :path-params {:account-id account-id :people-id people-id} :body body}))
192192

193193
(defn list-all-account-people
194194
"List all persons
@@ -222,8 +222,8 @@
222222
223223
Example Usage:
224224
(create-account-people {:account-id example-account-id})"
225-
[{:keys [account-id]}]
226-
(stripe-request :post {:endpoint "/v1/accounts/{account-id}/people" :path-params {:account-id account-id}}))
225+
[{:keys [account-id body]}]
226+
(stripe-request :post {:endpoint "/v1/accounts/{account-id}/people" :path-params {:account-id account-id} :body body}))
227227

228228
(defn retrieve-account
229229
"Retrieve account
@@ -267,8 +267,8 @@
267267
268268
Example Usage:
269269
(update-account {:account-id example-account-id})"
270-
[{:keys [account-id]}]
271-
(stripe-request :post {:endpoint "/v1/accounts/{account-id}" :path-params {:account-id account-id}}))
270+
[{:keys [account-id body]}]
271+
(stripe-request :post {:endpoint "/v1/accounts/{account-id}" :path-params {:account-id account-id} :body body}))
272272

273273
(defn list-all-account-persons
274274
"List all persons
@@ -302,8 +302,8 @@
302302
303303
Example Usage:
304304
(create-account-persons {:account-id example-account-id})"
305-
[{:keys [account-id]}]
306-
(stripe-request :post {:endpoint "/v1/accounts/{account-id}/persons" :path-params {:account-id account-id}}))
305+
[{:keys [account-id body]}]
306+
(stripe-request :post {:endpoint "/v1/accounts/{account-id}/persons" :path-params {:account-id account-id} :body body}))
307307

308308
(defn retrieve-account-capabilities-capability
309309
"Retrieve an Account Capability
@@ -335,8 +335,8 @@
335335
336336
Example Usage:
337337
(update-account-capabilities-capability {:account-id example-account-id :capabilitie-id example-capabilitie-id})"
338-
[{:keys [account-id capabilitie-id]}]
339-
(stripe-request :post {:endpoint "/v1/accounts/{account-id}/capabilities/{capabilitie-id}" :path-params {:account-id account-id :capabilitie-id capabilitie-id}}))
338+
[{:keys [account-id capabilitie-id body]}]
339+
(stripe-request :post {:endpoint "/v1/accounts/{account-id}/capabilities/{capabilitie-id}" :path-params {:account-id account-id :capabilitie-id capabilitie-id} :body body}))
340340

341341
(defn list-all-account-capabilities
342342
"List all account capabilities
@@ -366,8 +366,8 @@
366366
367367
Example Usage:
368368
(create-account-bank {:account-id example-account-id})"
369-
[{:keys [account-id]}]
370-
(stripe-request :post {:endpoint "/v1/accounts/{account-id}/bank_accounts" :path-params {:account-id account-id}}))
369+
[{:keys [account-id body]}]
370+
(stripe-request :post {:endpoint "/v1/accounts/{account-id}/bank_accounts" :path-params {:account-id account-id} :body body}))
371371

372372
(defn list-all-account-external
373373
"List all external accounts
@@ -401,8 +401,8 @@
401401
402402
Example Usage:
403403
(create-account-external {:account-id example-account-id})"
404-
[{:keys [account-id]}]
405-
(stripe-request :post {:endpoint "/v1/accounts/{account-id}/external_accounts" :path-params {:account-id account-id}}))
404+
[{:keys [account-id body]}]
405+
(stripe-request :post {:endpoint "/v1/accounts/{account-id}/external_accounts" :path-params {:account-id account-id} :body body}))
406406

407407
(defn retrieve-account-external-id
408408
"Retrieve an external account
@@ -449,8 +449,8 @@
449449
450450
Example Usage:
451451
(post-account-external-id {:account-id example-account-id :external-account-id example-external-account-id})"
452-
[{:keys [account-id external-account-id]}]
453-
(stripe-request :post {:endpoint "/v1/accounts/{account-id}/external_accounts/{external-account-id}" :path-params {:account-id account-id :external-account-id external-account-id}}))
452+
[{:keys [account-id external-account-id body]}]
453+
(stripe-request :post {:endpoint "/v1/accounts/{account-id}/external_accounts/{external-account-id}" :path-params {:account-id account-id :external-account-id external-account-id} :body body}))
454454

455455
(defn post-account-reject
456456
"Reject an account
@@ -463,5 +463,5 @@
463463
464464
Example Usage:
465465
(post-account-reject {:account-id example-account-id})"
466-
[{:keys [account-id]}]
467-
(stripe-request :post {:endpoint "/v1/accounts/{account-id}/reject" :path-params {:account-id account-id}}))
466+
[{:keys [account-id body]}]
467+
(stripe-request :post {:endpoint "/v1/accounts/{account-id}/reject" :path-params {:account-id account-id} :body body}))

src/main/stream/clojure/stripe/api/apple_pay.clj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,5 +60,5 @@
6060
6161
Example Usage:
6262
(post-apple-pay-domains {})"
63-
[{:keys []}]
64-
(stripe-request :post {:endpoint "/v1/apple_pay/domains"}))
63+
[{:keys [body]}]
64+
(stripe-request :post {:endpoint "/v1/apple_pay/domains" :body body}))

src/main/stream/clojure/stripe/api/application_fees.clj

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@
3434
3535
Example Usage:
3636
(create-application-fees-id-refunds {:application-fee-id example-application-fee-id})"
37-
[{:keys [application-fee-id]}]
38-
(stripe-request :post {:endpoint "/v1/application_fees/{application-fee-id}/refunds" :path-params {:application-fee-id application-fee-id}}))
37+
[{:keys [application-fee-id body]}]
38+
(stripe-request :post {:endpoint "/v1/application_fees/{application-fee-id}/refunds" :path-params {:application-fee-id application-fee-id} :body body}))
3939

4040
(defn list-all-application-fees
4141
"List all application fees
@@ -86,8 +86,8 @@
8686
8787
Example Usage:
8888
(update-application-fees-fee-refunds-id {:application-fee-id example-application-fee-id :refund-id example-refund-id})"
89-
[{:keys [application-fee-id refund-id]}]
90-
(stripe-request :post {:endpoint "/v1/application_fees/{application-fee-id}/refunds/{refund-id}" :path-params {:application-fee-id application-fee-id :refund-id refund-id}}))
89+
[{:keys [application-fee-id refund-id body]}]
90+
(stripe-request :post {:endpoint "/v1/application_fees/{application-fee-id}/refunds/{refund-id}" :path-params {:application-fee-id application-fee-id :refund-id refund-id} :body body}))
9191

9292
(defn retrieve-application-fees-id
9393
"Retrieve an application fee
@@ -117,5 +117,5 @@
117117
118118
Example Usage:
119119
(post-application-fees-id-refund {:application-fee-id example-application-fee-id})"
120-
[{:keys [application-fee-id]}]
121-
(stripe-request :post {:endpoint "/v1/application_fees/{application-fee-id}/refund" :path-params {:application-fee-id application-fee-id}}))
120+
[{:keys [application-fee-id body]}]
121+
(stripe-request :post {:endpoint "/v1/application_fees/{application-fee-id}/refund" :path-params {:application-fee-id application-fee-id} :body body}))

src/main/stream/clojure/stripe/api/apps.clj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@
2929
3030
Example Usage:
3131
(post-secrets {})"
32-
[{:keys []}]
33-
(stripe-request :post {:endpoint "/v1/apps/secrets"}))
32+
[{:keys [body]}]
33+
(stripe-request :post {:endpoint "/v1/apps/secrets" :body body}))
3434

3535
(defn post-secrets-delete
3636
"Delete a Secret
@@ -40,8 +40,8 @@
4040
4141
Example Usage:
4242
(post-secrets-delete {})"
43-
[{:keys []}]
44-
(stripe-request :post {:endpoint "/v1/apps/secrets/delete"}))
43+
[{:keys [body]}]
44+
(stripe-request :post {:endpoint "/v1/apps/secrets/delete" :body body}))
4545

4646
(defn list-all-secrets-find
4747
"Find a Secret

src/main/stream/clojure/stripe/api/balance_settings.clj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,5 @@
2525
2626
Example Usage:
2727
(update-balance-settings {})"
28-
[{:keys []}]
29-
(stripe-request :post {:endpoint "/v1/balance_settings"}))
28+
[{:keys [body]}]
29+
(stripe-request :post {:endpoint "/v1/balance_settings" :body body}))

src/main/stream/clojure/stripe/api/billing.clj

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
1515
Example Usage:
1616
(post-alerts-id-archive {:alert-id example-alert-id})"
17-
[{:keys [alert-id]}]
18-
(stripe-request :post {:endpoint "/v1/billing/alerts/{alert-id}/archive" :path-params {:alert-id alert-id}}))
17+
[{:keys [alert-id body]}]
18+
(stripe-request :post {:endpoint "/v1/billing/alerts/{alert-id}/archive" :path-params {:alert-id alert-id} :body body}))
1919

2020
(defn retrieve-alerts-id
2121
"Retrieve a billing alert
@@ -61,8 +61,8 @@
6161
6262
Example Usage:
6363
(create-credit-grants {})"
64-
[{:keys []}]
65-
(stripe-request :post {:endpoint "/v1/billing/credit_grants"}))
64+
[{:keys [body]}]
65+
(stripe-request :post {:endpoint "/v1/billing/credit_grants" :body body}))
6666

6767
(defn list-all-meters-id-event-summaries
6868
"List billing meter event summaries
@@ -96,8 +96,8 @@
9696
9797
Example Usage:
9898
(create-meter-event-adjustments {})"
99-
[{:keys []}]
100-
(stripe-request :post {:endpoint "/v1/billing/meter_event_adjustments"}))
99+
[{:keys [body]}]
100+
(stripe-request :post {:endpoint "/v1/billing/meter_event_adjustments" :body body}))
101101

102102
(defn post-alerts-id-deactivate
103103
"Deactivate a billing alert
@@ -110,8 +110,8 @@
110110
111111
Example Usage:
112112
(post-alerts-id-deactivate {:alert-id example-alert-id})"
113-
[{:keys [alert-id]}]
114-
(stripe-request :post {:endpoint "/v1/billing/alerts/{alert-id}/deactivate" :path-params {:alert-id alert-id}}))
113+
[{:keys [alert-id body]}]
114+
(stripe-request :post {:endpoint "/v1/billing/alerts/{alert-id}/deactivate" :path-params {:alert-id alert-id} :body body}))
115115

116116
(defn post-credit-grants-id-expire
117117
"Expire a credit grant
@@ -124,8 +124,8 @@
124124
125125
Example Usage:
126126
(post-credit-grants-id-expire {:credit-grant-id example-credit-grant-id})"
127-
[{:keys [credit-grant-id]}]
128-
(stripe-request :post {:endpoint "/v1/billing/credit_grants/{credit-grant-id}/expire" :path-params {:credit-grant-id credit-grant-id}}))
127+
[{:keys [credit-grant-id body]}]
128+
(stripe-request :post {:endpoint "/v1/billing/credit_grants/{credit-grant-id}/expire" :path-params {:credit-grant-id credit-grant-id} :body body}))
129129

130130
(defn post-meters-id-deactivate
131131
"Deactivate a billing meter
@@ -138,8 +138,8 @@
138138
139139
Example Usage:
140140
(post-meters-id-deactivate {:meter-id example-meter-id})"
141-
[{:keys [meter-id]}]
142-
(stripe-request :post {:endpoint "/v1/billing/meters/{meter-id}/deactivate" :path-params {:meter-id meter-id}}))
141+
[{:keys [meter-id body]}]
142+
(stripe-request :post {:endpoint "/v1/billing/meters/{meter-id}/deactivate" :path-params {:meter-id meter-id} :body body}))
143143

144144
(defn list-all-alerts
145145
"List billing alerts
@@ -168,8 +168,8 @@
168168
169169
Example Usage:
170170
(create-alerts {})"
171-
[{:keys []}]
172-
(stripe-request :post {:endpoint "/v1/billing/alerts"}))
171+
[{:keys [body]}]
172+
(stripe-request :post {:endpoint "/v1/billing/alerts" :body body}))
173173

174174
(defn post-alerts-id-activate
175175
"Activate a billing alert
@@ -182,8 +182,8 @@
182182
183183
Example Usage:
184184
(post-alerts-id-activate {:alert-id example-alert-id})"
185-
[{:keys [alert-id]}]
186-
(stripe-request :post {:endpoint "/v1/billing/alerts/{alert-id}/activate" :path-params {:alert-id alert-id}}))
185+
[{:keys [alert-id body]}]
186+
(stripe-request :post {:endpoint "/v1/billing/alerts/{alert-id}/activate" :path-params {:alert-id alert-id} :body body}))
187187

188188
(defn retrieve-credit-balance-transactions-id
189189
"Retrieve a credit balance transaction
@@ -228,8 +228,8 @@
228228
229229
Example Usage:
230230
(create-meters {})"
231-
[{:keys []}]
232-
(stripe-request :post {:endpoint "/v1/billing/meters"}))
231+
[{:keys [body]}]
232+
(stripe-request :post {:endpoint "/v1/billing/meters" :body body}))
233233

234234
(defn list-all-credit-balance-summary
235235
"Retrieve the credit balance summary for a customer
@@ -259,8 +259,8 @@
259259
260260
Example Usage:
261261
(post-meters-id-reactivate {:meter-id example-meter-id})"
262-
[{:keys [meter-id]}]
263-
(stripe-request :post {:endpoint "/v1/billing/meters/{meter-id}/reactivate" :path-params {:meter-id meter-id}}))
262+
[{:keys [meter-id body]}]
263+
(stripe-request :post {:endpoint "/v1/billing/meters/{meter-id}/reactivate" :path-params {:meter-id meter-id} :body body}))
264264

265265
(defn post-credit-grants-id-void
266266
"Void a credit grant
@@ -273,8 +273,8 @@
273273
274274
Example Usage:
275275
(post-credit-grants-id-void {:credit-grant-id example-credit-grant-id})"
276-
[{:keys [credit-grant-id]}]
277-
(stripe-request :post {:endpoint "/v1/billing/credit_grants/{credit-grant-id}/void" :path-params {:credit-grant-id credit-grant-id}}))
276+
[{:keys [credit-grant-id body]}]
277+
(stripe-request :post {:endpoint "/v1/billing/credit_grants/{credit-grant-id}/void" :path-params {:credit-grant-id credit-grant-id} :body body}))
278278

279279
(defn retrieve-credit-grants-id
280280
"Retrieve a credit grant
@@ -304,8 +304,8 @@
304304
305305
Example Usage:
306306
(update-credit-grants-id {:credit-grant-id example-credit-grant-id})"
307-
[{:keys [credit-grant-id]}]
308-
(stripe-request :post {:endpoint "/v1/billing/credit_grants/{credit-grant-id}" :path-params {:credit-grant-id credit-grant-id}}))
307+
[{:keys [credit-grant-id body]}]
308+
(stripe-request :post {:endpoint "/v1/billing/credit_grants/{credit-grant-id}" :path-params {:credit-grant-id credit-grant-id} :body body}))
309309

310310
(defn list-all-credit-balance-transactions
311311
"List credit balance transactions
@@ -355,8 +355,8 @@
355355
356356
Example Usage:
357357
(update-meters-id {:meter-id example-meter-id})"
358-
[{:keys [meter-id]}]
359-
(stripe-request :post {:endpoint "/v1/billing/meters/{meter-id}" :path-params {:meter-id meter-id}}))
358+
[{:keys [meter-id body]}]
359+
(stripe-request :post {:endpoint "/v1/billing/meters/{meter-id}" :path-params {:meter-id meter-id} :body body}))
360360

361361
(defn create-meter-events
362362
"Create a billing meter event
@@ -366,5 +366,5 @@
366366
367367
Example Usage:
368368
(create-meter-events {})"
369-
[{:keys []}]
370-
(stripe-request :post {:endpoint "/v1/billing/meter_events"}))
369+
[{:keys [body]}]
370+
(stripe-request :post {:endpoint "/v1/billing/meter_events" :body body}))

0 commit comments

Comments
 (0)