8000 Merge changes from stripe/stripe-python master · stripe/stripe-python@bb58734 · GitHub
[go: up one dir, main page]

Skip to content

Commit bb58734

Browse files
Merge changes from stripe/stripe-python master
2 parents af2d476 + 6b0d81e commit bb58734

File tree

4 files changed

+246
-55
lines changed

4 files changed

+246
-55
lines changed

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,16 @@
55
* Add support for `payment_method_options` on `ConfirmationToken`
66
* [#1228](https://github.com/stripe/stripe-python/pull/1228) Beta: add `_async` methods for StripeClient
77

8+
## 8.2.0 - 2024-02-08
9+
* [#1225](https://github.com/stripe/stripe-python/pull/1225) Update generated code
10+
* Add support for `invoices` on `Account.Settings`
11+
* Add support for new value `velobank` on various enums `PaymentMethodDetails.P24.bank`
12+
* Add support for `setup_future_usage` on `PaymentMethodOptions.Blik`
13+
* Add support for `require_cvc_recollection` on `PaymentMethodOptions.Card`
14+
* Add support for `account_tax_ids` on various `InvoiceSettings` request parameters
15+
* [#1223](https://github.com/stripe/stripe-python/pull/1223) Move StripeClient usage collection onto StripeService
16+
* [#1220](https://github.com/stripe/stripe-python/pull/1220) Measure StripeClient usage
17+
818
## 8.2.0b1 - 2024-02-05
919
* [#1218](https://github.com/stripe/stripe-python/pull/1218) Update generated code for beta
1020
* Add support for new resources `Entitlements.Event` and `Entitlements.Feature`

flake8_stripe/flake8_stripe.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ class TypingImportsChecker:
5353
"Mapping",
5454
"Tuple",
5555
"Iterator",
56-
"Mapping",
56+
"MutableMapping",
5757
"Set",
5858
"Callable",
5959
"Generator",

stripe/_api_requestor.py

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -431,17 +431,19 @@ def request_headers(
431431
if stripe.app_info:
432432
ua["application"] = stripe.app_info
433433

434-
headers: Dict[str, Optional[str]] = {
434+
headers: Dict[str, str] = {
435435
"X-Stripe-Client-User-Agent": json.dumps(ua),
436436
"User-Agent": user_agent,
437437
"Authorization": "Bearer %s" % (options.get("api_key"),),
438438
}
439439

440-
if options.get("stripe_account"):
441-
headers["Stripe-Account"] = options.get("stripe_account")
440+
stripe_account = options.get("stripe_account")
441+
if stripe_account:
442+
headers["Stripe-Account"] = stripe_account
442443

443-
if options.get("idempotency_key"):
444-
headers["Idempotency-Key"] = options.get("idempotency_key")
444+
idempotency_key = options.get("idempotency_key")
445+
if idempotency_key:
446+
headers["Idempotency-Key"] = idempotency_key
445447

446448
if method == "post":
447449
headers.setdefault("Idempotency-Key", str(uuid.uuid4()))
@@ -450,8 +452,9 @@ def request_headers(
450452
else:
451453
headers["Content-Type"] = "application/x-www-form-urlencoded"
452454

453-
if options.get("stripe_version"):
454-
headers["Stripe-Version"] = options.get("stripe_version")
455+
stripe_version = options.get("stripe_version")
456+
if stripe_version:
457+
headers["Stripe-Version"] = stripe_version
455458

456459
return headers
457460

0 commit comments

Comments
 (0)
0