Skip to content

Commit 49b1690

Browse files
Merge upstream and update generated code for v2038 and
2 parents 60c70fb + 0116885 commit 49b1690

13 files changed

+113
-23
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -125,30 +125,19 @@ jobs:
125125
with:
126126
python-version: "3.10"
127127

128-
- name: Configure GPG Key
129-
run: |
130-
set -ex
131-
echo $GPG_SIGNING_PRIVKEY | base64 --decode | gpg --import --batch --yes --pinentry-mode loopback --passphrase "$GPG_SIGNING_PASSPHRASE"
132-
env:
133-
GPG_SIGNING_PRIVKEY: ${{ secrets.GPG_SIGNING_PRIVKEY }}
134-
GPG_SIGNING_PASSPHRASE: ${{ secrets.GPG_SIGNING_PASSPHRASE }}
135128
- name: Install tools
136129
run: just install-build-deps
130+
137131
- name: Publish packages to PyPI
138132
# could probably move this into a just recipe too?
139133
run: |
140134
set -ex
141135
source .venv/bin/activate
142-
export VERSION=$(cat VERSION)
143-
gpg --detach-sign --local-user $GPG_SIGNING_KEYID --pinentry-mode loopback --passphrase $GPG_SIGNING_PASSPHRASE -a dist/stripe-$VERSION.tar.gz
144-
gpg --detach-sign --local-user $GPG_SIGNING_KEYID --pinentry-mode loopback --passphrase $GPG_SIGNING_PASSPHRASE -a dist/stripe-$VERSION-py3-none-any.whl
145136
146-
python -m twine upload --verbose dist/stripe-$VERSION.tar.gz dist/stripe-$VERSION-py3-none-any.whl dist/stripe-$VERSION.tar.gz.asc dist/stripe-$VERSION-py3-none-any.whl.asc
137+
python -m twine upload --verbose dist/*
147138
env:
148-
GPG_SIGNING_KEYID: ${{ secrets.GPG_SIGNING_KEYID }}
149139
TWINE_USERNAME: ${{ secrets.TWINE_USERNAME }}
150140
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }}
151-
GPG_SIGNING_PASSPHRASE: ${{ secrets.GPG_SIGNING_PASSPHRASE }}
152141
- uses: stripe/openapi/actions/notify-release@master
153142
if: always()
154143
with:

API_VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0de52cdca31a7c51c6d11187fc88ab23ea3a1c5b
1+
c45dda1670b3ca539db3fad4be5ec032a725d732

OPENAPI_VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v2031
1+
v2038

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -313,6 +313,8 @@ The default HTTP client uses `requests` for making synchronous requests but
313313
you to explicitly initialize your own http client and pass it to StripeClient
314314
or set it as the global default.
315315
316+
If you don't already have a dependency on an async-compatible HTTP library, `pip install stripe[async]` will install one for you (new in `v13.0.1`).
317+
316318
```python
317319
# By default, an explicitly initialized HTTPXClient will raise an exception if you
318320
# attempt to call a sync method. If you intend to only use async, this is useful to

pyproject.toml

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,6 @@ authors = [{ name = "Stripe", email = "[email protected]" }]
77
license-files = ["LICENSE"]
88
keywords = ["stripe", "api", "payments"]
99
requires-python = ">=3.7"
10-
dependencies = [
11-
"typing_extensions <= 4.2.0, > 3.7.2; python_version < '3.7'",
12-
# The best typing support comes from 4.5.0+ but we can support down to
13-
# 3.7.2 without throwing exceptions.
14-
"typing_extensions >= 4.5.0; python_version >= '3.7'",
15-
"requests >= 2.20; python_version >= '3.0'",
16-
]
1710
classifiers = [
1811
"Development Status :: 5 - Production/Stable",
1912
"Intended Audience :: Developers",
@@ -33,6 +26,18 @@ classifiers = [
3326
"Topic :: Software Development :: Libraries :: Python Modules",
3427
]
3528

29+
dependencies = [
30+
"typing_extensions <= 4.2.0, > 3.7.2; python_version < '3.7'",
31+
# The best typing support comes from 4.5.0+ but we can support down to
32+
# 3.7.2 without throwing exceptions.
33+
"typing_extensions >= 4.5.0; python_version >= '3.7'",
34+
"requests >= 2.20; python_version >= '3.0'",
35+
]
36+
37+
[project.optional-dependencies]
38+
# `pip install stripe[async]` gets you everything + `httpx`, so our async stuff works out of the box
39+
async = ["httpx"]
40+
3641
[project.urls]
3742
homepage = "https://stripe.com/"
3843
source = "https://github.com/stripe/stripe-python"
@@ -45,7 +50,8 @@ requires = ["flit_core >=3.11, <4"]
4550
build-backend = "flit_core.buildapi"
4651

4752
[tool.flit.sdist]
48-
include = ["tests/", "justfile", "examples/", "CHANGELOG.md", "deps/"]
53+
# see: https://github.com/stripe/stripe-python/issues/1616
54+
include = ["tests/"]
4955

5056
[tool.ruff]
5157
# same as our black config

stripe/_file.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ class File(CreateableAPIResource["File"], ListableAPIResource["File"]):
6363
"identity_document_downloadable",
6464
"issuing_regulatory_reporting",
6565
"pci_document",
66+
"platform_terms_of_service",
6667
"selfie",
6768
"sigma_scheduled_query",
6869
"tax_document_user_upload",

stripe/_payment_method_configuration.py

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -732,6 +732,28 @@ class DisplayPreference(StripeObject):
732732
display_preference: DisplayPreference
733733
_inner_class_types = {"display_preference": DisplayPreference}
734734

735+
class MbWay(StripeObject):
736+
class DisplayPreference(StripeObject):
737+
overridable: Optional[bool]
738+
"""
739+
For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used.
740+
"""
741+
preference: Literal["none", "off", "on"]
742+
"""
743+
The account's display preference.
744+
"""
745+
value: Literal["off", "on"]
746+
"""
747+
The effective display preference value.
748+
"""
749+
750+
available: bool
751+
"""
752+
Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active.
753+
"""
754+
display_preference: DisplayPreference
755+
_inner_class_types = {"display_preference": DisplayPreference}
756+
735757
class Mobilepay(StripeObject):
736758
class DisplayPreference(StripeObject):
737759
overridable: Optional[bool]
@@ -1355,6 +1377,7 @@ class DisplayPreference(StripeObject):
13551377
"""
13561378
Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
13571379
"""
1380+
mb_way: Optional[MbWay]
13581381
mobilepay: Optional[Mobilepay]
13591382
multibanco: Optional[Multibanco]
13601383
name: str
@@ -1562,6 +1585,7 @@ async def retrieve_async(
15621585
"konbini": Konbini,
15631586
"kr_card": KrCard,
15641587
"link": Link,
1588+
"mb_way": MbWay,
15651589
"mobilepay": Mobilepay,
15661590
"multibanco": Multibanco,
15671591
"naver_pay": NaverPay,

stripe/params/__init__.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2914,6 +2914,8 @@
29142914
PaymentMethodConfigurationCreateParamsKrCardDisplayPreference as PaymentMethodConfigurationCreateParamsKrCardDisplayPreference,
29152915
PaymentMethodConfigurationCreateParamsLink as PaymentMethodConfigurationCreateParamsLink,
29162916
PaymentMethodConfigurationCreateParamsLinkDisplayPreference as PaymentMethodConfigurationCreateParamsLinkDisplayPreference,
2917+
PaymentMethodConfigurationCreateParamsMbWay as PaymentMethodConfigurationCreateParamsMbWay,
2918+
PaymentMethodConfigurationCreateParamsMbWayDisplayPreference as PaymentMethodConfigurationCreateParamsMbWayDisplayPreference,
29172919
PaymentMethodConfigurationCreateParamsMobilepay as PaymentMethodConfigurationCreateParamsMobilepay,
29182920
PaymentMethodConfigurationCreateParamsMobilepayDisplayPreference as PaymentMethodConfigurationCreateParamsMobilepayDisplayPreference,
29192921
PaymentMethodConfigurationCreateParamsMultibanco as PaymentMethodConfigurationCreateParamsMultibanco,
@@ -3038,6 +3040,8 @@
30383040
PaymentMethodConfigurationModifyParamsKrCardDisplayPreference as PaymentMethodConfigurationModifyParamsKrCardDisplayPreference,
30393041
PaymentMethodConfigurationModifyParamsLink as PaymentMethodConfigurationModifyParamsLink,
30403042
PaymentMethodConfigurationModifyParamsLinkDisplayPreference as PaymentMethodConfigurationModifyParamsLinkDisplayPreference,
3043+
PaymentMethodConfigurationModifyParamsMbWay as PaymentMethodConfigurationModifyParamsMbWay,
3044+
PaymentMethodConfigurationModifyParamsMbWayDisplayPreference as PaymentMethodConfigurationModifyParamsMbWayDisplayPreference,
30413045
PaymentMethodConfigurationModifyParamsMobilepay as PaymentMethodConfigurationModifyParamsMobilepay,
30423046
PaymentMethodConfigurationModifyParamsMobilepayDisplayPreference as PaymentMethodConfigurationModifyParamsMobilepayDisplayPreference,
30433047
PaymentMethodConfigurationModifyParamsMultibanco as PaymentMethodConfigurationModifyParamsMultibanco,
@@ -3162,6 +3166,8 @@
31623166
PaymentMethodConfigurationUpdateParamsKrCardDisplayPreference as PaymentMethodConfigurationUpdateParamsKrCardDisplayPreference,
31633167
PaymentMethodConfigurationUpdateParamsLink as PaymentMethodConfigurationUpdateParamsLink,
31643168
PaymentMethodConfigurationUpdateParamsLinkDisplayPreference as PaymentMethodConfigurationUpdateParamsLinkDisplayPreference,
3169+
PaymentMethodConfigurationUpdateParamsMbWay as PaymentMethodConfigurationUpdateParamsMbWay,
3170+
PaymentMethodConfigurationUpdateParamsMbWayDisplayPreference as PaymentMethodConfigurationUpdateParamsMbWayDisplayPreference,
31653171
PaymentMethodConfigurationUpdateParamsMobilepay as PaymentMethodConfigurationUpdateParamsMobilepay,
31663172
PaymentMethodConfigurationUpdateParamsMobilepayDisplayPreference as PaymentMethodConfigurationUpdateParamsMobilepayDisplayPreference,
31673173
PaymentMethodConfigurationUpdateParamsMultibanco as PaymentMethodConfigurationUpdateParamsMultibanco,

stripe/params/_file_create_params.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ class FileCreateParams(RequestOptions):
2828
"identity_document",
2929
"issuing_regulatory_reporting",
3030
"pci_document",
31+
"platform_terms_of_service",
3132
"tax_document_user_upload",
3233
"terminal_android_apk",
3334
"terminal_reader_splashscreen",

stripe/params/_file_list_params.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ class FileListParams(RequestOptions):
3737
"identity_document_downloadable",
3838
"issuing_regulatory_reporting",
3939
"pci_document",
40+
"platform_terms_of_service",
4041
"selfie",
4142
"sigma_scheduled_query",
4243
"tax_document_user_upload",

0 commit comments

Comments
 (0)