8000 Merge upstream and update generated code for v1745 · stripe/stripe-python@6db1772 · GitHub
[go: up one dir, main page]

Skip to content

Commit 6db1772

Browse files
Merge upstream and update generated code for v1745
2 parents e7d6f10 + 7db7345 commit 6db1772

File tree

6 files changed

+473
-10
lines changed

6 files changed

+473
-10
lines changed

OPENAPI_VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v1743
1+
v1745

README.md

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -246,22 +246,21 @@ sends by default. If you are overriding `stripe.api_version` / `stripe_version`
246246
[webhook endpoint](https://stripe.com/docs/webhooks#api-versions) tied to an older version,
247247
be aware that the data you see at runtime may not match the types.
248248

249-
## Beta SDKs
249+
### Public Preview SDKs
250250

251-
Stripe has features in the beta phase that can be accessed via the beta version of this package.
252-
We would love for you to try these and share feedback with us before these features reach the stable phase.
253-
To install a beta version use `pip install` with the exact version you'd like to use:
251+
Stripe has features in the [public preview phase](https://docs.stripe.com/release-phases) that can be accessed via versions of this package that have the `-beta.X` suffix like `12.2.0-beta.2`.
252+
We would love for you to try these as we incrementally release new features and improve them based on your feedback.
253+
254+
The public preview SDKs are different versions of the same package as the stable SDKs. They are appended with `b.X` such as `10.1.0b1`. To install, choose the version that includes support for the preview feature you are interested in by reviewing the [releases page](https://github.com/stripe/stripe-dotnet/releases/) and then use it in the `pip install` command:
254255

255256
```
256-
pip install --pre stripe
257+
pip install stripe==<replace-with-the-version-of-your-choice>
257258
```
258259

259260
> **Note**
260-
> There can be breaking changes between beta versions. Therefore we recommend pinning the package version to a specific beta version in your [requirements file](https://pip.pypa.io/en/stable/user_guide/#requirements-files) or `setup.py`. This way you can install the same version each time without breaking changes unless you are intentionally looking for the latest beta version.
261-
262-
We highly recommend keeping an eye on when the beta feature you are interested in goes from beta to stable so that you can move from using a beta version of the SDK to the stable version.
261+
> There can be breaking changes between two versions of the public preview SDKs without a bump in the major version. Therefore we recommend pinning the package version to a specific version in your [requirements file](https://pip.pypa.io/en/stable/user_guide/#requirements-files) or `setup.py`. This way you can install the same version each time without breaking changes unless you are intentionally looking for the latest public preview SDK.
263262

264-
If your beta feature requires a `Stripe-Version` header to be sent, set the `stripe.api_version` field using the `stripe.add_beta_version` function:
263+
Some preview features require a name and version to be set in the `Stripe-Version` header like `feature_beta=v3`. If your preview feature has this requirement, use the `stripe.add_beta_version` function (available only in the public preview SDKs):
265264

266265
```python
267266
stripe.add_beta_version("feature_beta", "v3")

stripe/_charge.py

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2339,6 +2339,12 @@ class CaptureParamsPaymentDetailsCarRental(TypedDict):
23392339
"""
23402340
Delivery details for this purchase.
23412341
"""
2342+
distance: NotRequired[
2343+
"Charge.CaptureParamsPaymentDetailsCarRentalDistance"
2344+
]
2345+
"""
2346+
The details of the distance traveled during the rental period.
2347+
"""
23422348
drivers: NotRequired[
23432349
List["Charge.CaptureParamsPaymentDetailsCarRentalDriver"]
23442350
]
@@ -2373,6 +2379,10 @@ class CaptureParamsPaymentDetailsCarRental(TypedDict):
23732379
"""
23742380
Car pick-up time. Measured in seconds since the Unix epoch.
23752381
"""
2382+
pickup_location_name: NotRequired[str]
2383+
"""
2384+
Name of the pickup location.
2385+
"""
23762386
rate_amount: NotRequired[int]
23772387
"""
23782388
Rental rate.
@@ -2395,10 +2405,18 @@ class CaptureParamsPaymentDetailsCarRental(TypedDict):
23952405
"""
23962406
Car return time. Measured in seconds since the Unix epoch.
23972407
"""
2408+
return_location_name: NotRequired[str]
2409+
"""
2410+
Name of the return location.
2411+
"""
23982412
tax_exempt: NotRequired[bool]
23992413
"""
24002414
Indicates whether the goods or services are tax-exempt or tax is not collected.
24012415
"""
2416+
vehicle_identification_number: NotRequired[str]
2417+
"""
2418+
The vehicle identification number.
2419+
"""
24022420

24032421
class CaptureParamsPaymentDetailsCarRentalAffiliate(TypedDict):
24042422
name: str
@@ -2432,7 +2450,25 @@ class CaptureParamsPaymentDetailsCarRentalDeliveryRecipient(TypedDict):
24322450
The phone number of the recipient the ticket is delivered to.
24332451
"""
24342452

2453+
class CaptureParamsPaymentDetailsCarRentalDistance(TypedDict):
2454+
amount: NotRequired[int]
2455+
"""
2456+
Distance traveled.
2457+
"""
2458+
unit: NotRequired[Literal["kilometers", "miles"]]
2459+
"""
2460+
Unit of measurement for the distance traveled. One of `miles` or `kilometers`.
2461+
"""
2462+
24352463
class CaptureParamsPaymentDetailsCarRentalDriver(TypedDict):
2464+
driver_identification_number: NotRequired[str]
2465+
"""
2466+
Driver's identification number.
2467+
"""
2468+
driver_tax_number: NotRequired[str]
2469+
"""
2470+
Driver's tax number.
2471+
"""
24362472
name: str
24372473
"""
24382474
Full name of the person or entity on the car reservation.
@@ -3264,6 +3300,12 @@ class ModifyParamsPaymentDetailsCarRental(TypedDict):
32643300
"""
32653301
Delivery details for this purchase.
32663302
"""
3303+
distance: NotRequired[
3304+
"Charge.ModifyParamsPaymentDetailsCarRentalDistance"
3305+
]
3306+
"""
3307+
The details of the distance traveled during the rental period.
3308+
"""
32673309
drivers: NotRequired[
32683310
List["Charge.ModifyParamsPaymentDetailsCarRentalDriver"]
32693311
]
@@ -3298,6 +3340,10 @@ class ModifyParamsPaymentDetailsCarRental(TypedDict):
32983340
"""
32993341
Car pick-up time. Measured in seconds since the Unix epoch.
33003342
"""
3343+
pickup_location_name: NotRequired[str]
3344+
"""
3345+
Name of the pickup location.
3346+
"""
33013347
rate_amount: NotRequired[int]
33023348
"""
33033349
Rental rate.
@@ -3320,10 +3366,18 @@ class ModifyParamsPaymentDetailsCarRental(TypedDict):
33203366
"""
33213367
Car return time. Measured in seconds since the Unix epoch.
33223368
"""
3369+
return_location_name: NotRequired[str]
3370+
"""
3371+
Name of the return location.
3372+
"""
33233373
tax_exempt: NotRequired[bool]
33243374
"""
33253375
Indicates whether the goods or services are tax-exempt or tax is not collected.
33263376
"""
3377+
vehicle_identification_number: NotRequired[str]
3378+
"""
3379+
The vehicle identification number.
3380+
"""
33273381

33283382
class ModifyParamsPaymentDetailsCarRentalAffiliate(TypedDict):
33293383
name: str
@@ -3357,7 +3411,25 @@ class ModifyParamsPaymentDetailsCarRentalDeliveryRecipient(TypedDict):
33573411
The phone number of the recipient the ticket is delivered to.
33583412
"""
33593413

3414+
class ModifyParamsPaymentDetailsCarRentalDistance(TypedDict):
3415+
amount: NotRequired[int]
3416+
"""
3417+
Distance traveled.
3418+
"""
3419+
unit: NotRequired[Literal["kilometers", "miles"]]
3420+
"""
3421+
Unit of measurement for the distance traveled. One of `miles` or `kilometers`.
3422+
"""
3423+
33603424
class ModifyParamsPaymentDetailsCarRentalDriver(TypedDict):
3425+
driver_identification_number: NotRequired[str]
3426+
"""
3427+
Driver's identification number.
3428+
"""
3429+
driver_tax_number: NotRequired[str]
3430+
"""
3431+
Driver's tax number.
3432+
"""
33613433
name: str
33623434
"""
33633435
Full name of the person or entity on the car reservation.

stripe/_charge_service.py

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,12 @@ class CaptureParamsPaymentDetailsCarRental(TypedDict):
136136
"""
137137
Delivery details for this purchase.
138138
"""
139+
distance: NotRequired[
140+
"ChargeService.CaptureParamsPaymentDetailsCarRentalDistance"
141+
]
142+
"""
143+
The details of the distance traveled during the rental period.
144+
"""
139145
drivers: NotRequired[
140146
List["ChargeService.CaptureParamsPaymentDetailsCarRentalDriver"]
141147
]
@@ -170,6 +176,10 @@ class CaptureParamsPaymentDetailsCarRental(TypedDict):
170176
"""
171177
Car pick-up time. Measured in seconds since the Unix epoch.
172178
"""
179+
pickup_location_name: NotRequired[str]
180+
"""
181+
Name of the pickup location.
182+
"""
173183
rate_amount: NotRequired[int]
174184
"""
175185
Rental rate.
@@ -192,10 +202,18 @@ class CaptureParamsPaymentDetailsCarRental(TypedDict):
192202
"""
193203
Car return time. Measured in seconds since the Unix epoch.
194204
"""
205+
return_location_name: NotRequired[str]
206+
"""
207+
Name of the return location.
208+
"""
195209
tax_exempt: NotRequired[bool]
196210
"""
197211
Indicates whether the goods or services are tax-exempt or tax is not collected.
198212
"""
213+
vehicle_identification_number: NotRequired[str]
214+
"""
215+
The vehicle identification number.
216+
"""
199217

200218
class CaptureParamsPaymentDetailsCarRentalAffiliate(TypedDict):
201219
name: str
@@ -229,7 +247,25 @@ class CaptureParamsPaymentDetailsCarRentalDeliveryRecipient(TypedDict):
229247
The phone number of the recipient the ticket is delivered to.
230248
"""
231249

250+
class CaptureParamsPaymentDetailsCarRentalDistance(TypedDict):
251+
amount: NotRequired[int]
252+
"""
253+
Distance traveled.
254+
"""
255+
unit: NotRequired[Literal["kilometers", "miles"]]
256+
"""
257+
Unit of measurement for the distance traveled. One of `miles` or `kilometers`.
258+
"""
259+
232260
class CaptureParamsPaymentDetailsCarRentalDriver(TypedDict):
261+
driver_identification_number: NotRequired[str]
262+
"""
263+
Driver's identification number.
264+
"""
265+
driver_tax_number: NotRequired[str]
266+
"""
267+
Driver's tax number.
268+
"""
233269
name: str
234270
"""
235271
Full name of the person or entity on the car reservation.
@@ -1073,6 +1109,12 @@ class UpdateParamsPaymentDetailsCarRental(TypedDict):
10731109
"""
10741110
Delivery details for this purchase.
10751111
"""
1112+
distance: NotRequired[
1113+
"ChargeService.UpdateParamsPaymentDetailsCarRentalDistance"
1114+
]
1115+
"""
1116+
The details of the distance traveled during the rental period.
1117+
"""
10761118
drivers: NotRequired[
10771119
List["ChargeService.UpdateParamsPaymentDetailsCarRentalDriver"]
10781120
]
@@ -1107,6 +1149,10 @@ class UpdateParamsPaymentDetailsCarRental(TypedDict):
11071149
"""
11081150
Car pick-up time. Measured in seconds since the Unix epoch.
11091151
"""
1152+
pickup_location_name: NotRequired[str]
1153+
"""
1154+
Name of the pickup location.
1155+
"""
11101156
rate_amount: NotRequired[int]
11111157
"""
11121158
Rental rate.
@@ -1129,10 +1175,18 @@ class UpdateParamsPaymentDetailsCarRental(TypedDict):
11291175
"""
11301176
Car return time. Measured in seconds since the Unix epoch.
11311177
"""
1178+
return_location_name: NotRequired[str]
1179+
"""
1180+
Name of the return location.
1181+
"""
11321182
tax_exempt: NotRequired[bool]
11331183
"""
11341184
Indicates whether the goods or services are tax-exempt or tax is not collected.
11351185
"""
1186+
vehicle_identification_number: NotRequired[str]
1187+
"""
1188+
The vehicle identification number.
1189+
"""
11361190

11371191
class UpdateParamsPaymentDetailsCarRentalAffiliate(TypedDict):
11381192
name: str
@@ -1166,7 +1220,25 @@ class UpdateParamsPaymentDetailsCarRentalDeliveryRecipient(TypedDict):
11661220
The phone number of the recipient the ticket is delivered to.
11671221
"""
11681222

1223+
class UpdateParamsPaymentDetailsCarRentalDistance(TypedDict):
1224+
amount: NotRequired[int]
1225+
"""
1226+
Distance traveled.
1227+
"""
1228+
unit: NotRequired[Literal["kilometers", "miles"]]
1229+
"""
1230+
Unit of measurement for the distance traveled. One of `miles` or `kilometers`.
1231+
"""
1232+
11691233
class UpdateParamsPaymentDetailsCarRentalDriver(TypedDict):
1234+
driver_identification_number: NotRequired[str]
1235+
"""
1236+
Driver's identification number.
1237+
"""
1238+
driver_tax_number: NotRequired[str]
1239+
"""
1240+
Driver's tax number.
1241+
"""
11701242
name: str
11711243
"""
11721244
Full name of the person or entity on the car reservation.

0 commit comments

Comments
 (0)
0