Skip to content

Commit 0a0721a

Browse files
Merge pull request #1649 from stripe/latest-codegen-private-preview
Update generated code for private-preview
2 parents 0ab9d34 + a5b7574 commit 0a0721a

File tree

53 files changed

+2135
-48
lines changed

Some content is hidden

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

53 files changed

+2135
-48
lines changed

API_VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
b3c36f1e05eaa7339c3d0d5e862e76cfff6c6bed
1+
577fcb57736b925392ea563c0284df9002c75ac9

OPENAPI_VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v2080
1+
v2100

stripe/_object_classes.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -460,6 +460,10 @@
460460
"stripe.v2.billing._pricing_plan_subscription",
461461
"PricingPlanSubscription",
462462
),
463+
"v2.billing.pricing_plan_subscription_components": (
464+
"stripe.v2.billing._pricing_plan_subscription_components",
465+
"PricingPlanSubscriptionComponents",
466+
),
463467
"v2.billing.pricing_plan_version": (
464468
"stripe.v2.billing._pricing_plan_version",
465469
"PricingPlanVersion",

stripe/billing/_meter.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
from stripe._stripe_object import StripeObject
88
from stripe._updateable_api_resource import UpdateableAPIResource
99
from stripe._util import class_method_variant, sanitize_id
10-
from typing import ClassVar, Optional, cast, overload
10+
from typing import ClassVar, List, Optional, cast, overload
1111
from typing_extensions import Literal, Unpack, TYPE_CHECKING
1212

1313
if TYPE_CHECKING:
@@ -77,6 +77,10 @@ class ValueSettings(StripeObject):
7777
"""
7878
customer_mapping: CustomerMapping
7979
default_aggregation: DefaultAggregation
80+
dimension_payload_keys: Optional[List[str]]
81+
"""
82+
Set of keys that will be used to group meter events by.
83+
"""
8084
display_name: str
8185
"""
8286
The meter's name.

stripe/billing/_meter_event_summary.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# -*- coding: utf-8 -*-
22
# File generated from our OpenAPI spec
33
from stripe._stripe_object import StripeObject
4-
from typing import ClassVar
4+
from typing import ClassVar, Dict, Optional
55
from typing_extensions import Literal
66

77

@@ -20,6 +20,10 @@ class MeterEventSummary(StripeObject):
2020
"""
2121
Aggregated value of all the events within `start_time` (inclusive) and `end_time` (inclusive). The aggregation strategy is defined on meter via `default_aggregation`.
2222
"""
23+
dimensions: Optional[Dict[str, str]]
24+
"""
25+
Key-value pairs of dimension values for event summaries with grouping on dimensions.
26+
"""
2327
end_time: int
2428
"""
2529
End timestamp for this event summary (exclusive). Must be aligned with minute boundaries.

stripe/delegated_checkout/_requested_session.py

Lines changed: 233 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
from stripe._stripe_object import StripeObject
55
from stripe._updateable_api_resource import UpdateableAPIResource
66
from stripe._util import class_method_variant, sanitize_id
7-
from typing import ClassVar, Optional, cast, overload
7+
from typing import ClassVar, Dict, List, Optional, cast, overload
88
from typing_extensions import Literal, Unpack, TYPE_CHECKING
99

1010
if TYPE_CHECKING:
@@ -38,8 +38,188 @@ class RequestedSession(
3838
)
3939

4040
class FulfillmentDetails(StripeObject):
41+
class Address(StripeObject):
42+
city: Optional[str]
43+
"""
44+
City, district, suburb, town, or village.
45+
"""
46+
country: Optional[str]
47+
"""
48+
Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
49+
"""
50+
line1: Optional[str]
51+
"""
52+
Address line 1, such as the street, PO Box, or company name.
53+
"""
54+
line2: Optional[str]
55+
"""
56+
Address line 2, such as the apartment, suite, unit, or building.
57+
"""
58+
postal_code: Optional[str]
59+
"""
60+
ZIP or postal code.
61+
"""
62+
state: Optional[str]
63+
"""
64+
State, county, province, or region.
65+
"""
66+
67+
class FulfillmentOption(StripeObject):
68+
class Shipping(StripeObject):
69+
class ShippingOption(StripeObject):
70+
description: Optional[str]
71+
"""
72+
The description of the shipping option.
73+
"""
74+
display_name: str
75+
"""
76+
The display name of the shipping option.
77+
"""
78+
earliest_delivery_time: Optional[int]
79+
"""
80+
The earliest delivery time of the shipping option.
81+
"""
82+
key: str
83+
"""
84+
The key of the shipping option.
85+
"""
86+
latest_delivery_time: Optional[int]
87+
"""
88+
The latest delivery time of the shipping option.
89+
"""
90+
shipping_amount: int
91+
"""
92+
The shipping amount of the shipping option.
93+
"""
94+
95+
shipping_options: Optional[List[ShippingOption]]
96+
"""
97+
The shipping options.
98+
"""
99+
_inner_class_types = {"shipping_options": ShippingOption}
100+
101+
shipping: Optional[Shipping]
102+
"""
103+
The shipping option.
104+
"""
105+
type: str
106+
"""
107+
The type of the fulfillment option.
108+
"""
109+
_inner_class_types = {"shipping": Shipping}
110+
111+
class SelectedFulfillmentOption(StripeObject):
112+
class Shipping(StripeObject):
113+
shipping_option: Optional[str]
114+
"""
115+
The shipping option.
116+
"""
117+
118+
shipping: Optional[Shipping]
119+
"""
120+
The shipping option.
121+
"""
122+
type: str
123+
"""
124+
The type of the selected fulfillment option.
125+
"""
126+
_inner_class_types = {"shipping": Shipping}
127+
128+
address: Optional[Address]
129+
"""
130+
The fulfillment address.
131+
"""
132+
email: Optional[str]
133+
"""
134+
The email address for the fulfillment details.
135+
"""
136+
fulfillment_options: Optional[List[FulfillmentOption]]
137+
"""
138+
The fulfillment options.
139+
"""
140+
name: Optional[str]
141+
"""
142+
The name for the fulfillment details.
143+
"""
144+
phone: Optional[str]
145+
"""
146+
The phone number for the fulfillment details.
147+
"""
148+
selected_fulfillment_option: Optional[SelectedFulfillmentOption]
149+
"""
150+
The fulfillment option.
151+
"""
152+
_inner_class_types = {
153+
"address": Address,
154+
"fulfillment_options": FulfillmentOption,
155+
"selected_fulfillment_option": SelectedFulfillmentOption,
156+
}
157+
158+
class LineItemDetail(StripeObject):
159+
description: Optional[str]
160+
"""
161+
The description of the line item.
162+
"""
163+
images: Optional[List[str]]
164+
"""
165+
The images of the line item.
166+
"""
167+
key: str
168+
"""
169+
The key of the line item.
170+
"""
171+
name: str
172+
"""
173+
The name of the line item.
174+
"""
175+
quantity: int
176+
"""
177+
The quantity of the line item.
178+
"""
179+
sku_id: str
180+
"""
181+
The SKU ID of the line item.
182+
"""
183+
unit_amount: int
184+
"""
185+
The unit amount of the line item.
186+
"""
187+
188+
class OrderDetails(StripeObject):
189+
order_status_url: Optional[str]
190+
"""
191+
The URL to the order status.
192+
"""
193+
194+
class SellerDetails(StripeObject):
41195
pass
42196

197+
class TotalDetails(StripeObject):
198+
amount_discount: Optional[int]
199+
"""
200+
The amount discount of the total details.
201+
"""
202+
amount_fulfillment: Optional[int]
203+
"""
204+
The amount fulfillment of the total details.
205+
"""
206+
amount_tax: Optional[int]
207+
"""
208+
The amount tax of the total details.
209+
"""
210+
211+
amount_subtotal: int
212+
"""
213+
The subtotal amount of the requested session.
214+
"""
215+
amount_total: int
216+
"""
217+
The total amount of the requested session.
218+
"""
219+
created_at: int
220+
"""
221+
Time at which the object was created. Measured in seconds since the Unix epoch.
222+
"""
43223
currency: str
44224
"""
45225
Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
@@ -48,19 +228,64 @@ class FulfillmentDetails(StripeObject):
48228
"""
49229
The customer for this requested session.
50230
"""
231+
expires_at: int
232+
"""
233+
Time at which the requested session expires. Measured in seconds since the Unix epoch.
234+
"""
51235
fulfillment_details: Optional[FulfillmentDetails]
236+
"""
237+
The details of the fulfillment.
238+
"""
52239
id: str
53240
"""
54241
Unique identifier for the object.
55242
"""
243+
line_item_details: List[LineItemDetail]
244+
"""
245+
The line items to be purchased.
246+
"""
56247
livemode: bool
57248
"""
58249
Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
59250
"""
251+
metadata: Optional[Dict[str, str]]
252+
"""
253+
Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
254+
"""
60255
object: Literal["delegated_checkout.requested_session"]
61256
"""
62257
String representing the object's type. Objects of the same type share the same value.
63258
"""
259+
order_details: Optional[OrderDetails]
260+
"""
261+
The details of the order.
262+
"""
263+
payment_method: Optional[str]
264+
"""
265+
The payment method used for the requested session.
266+
"""
267+
seller_details: SellerDetails
268+
setup_future_usage: Optional[Literal["on_session"]]
269+
"""
270+
Whether or not the payment method should be saved for future use.
271+
"""
272+
shared_metadata: Optional[Dict[str, str]]
273+
"""
274+
The metadata shared with the seller.
275+
"""
276+
shared_payment_issued_token: Optional[str]
277+
"""
278+
The SPT used for payment.
279+
"""
280+
status: Literal["completed", "expired", "open"]
281+
"""
282+
The status of the requested session.
283+
"""
284+
total_details: TotalDetails
285+
updated_at: int
286+
"""
287+
Time at which the object was last updated. Measured in seconds since the Unix epoch.
288+
"""
64289

65290
@classmethod
66291
def _cls_confirm(
@@ -382,4 +607,10 @@ async def retrieve_async(
382607
await instance.refresh_async()
383608
return instance
384609

385-
_inner_class_types = {"fulfillment_details": FulfillmentDetails}
610+
_inner_class_types = {
611+
"fulfillment_details": FulfillmentDetails,
612+
"line_item_details": LineItemDetail,
613+
"order_details": OrderDetails,
614+
"seller_details": SellerDetails,
615+
"total_details": TotalDetails,
616+
}

stripe/delegated_checkout/_requested_session_service.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ async def update_async(
116116

117117
def create(
118118
self,
119-
params: Optional["RequestedSessionCreateParams"] = None,
119+
params: "RequestedSessionCreateParams",
120120
options: Optional["RequestOptions"] = None,
121121
) -> "RequestedSession":
122122
"""
@@ -135,7 +135,7 @@ def create(
135135

136136
async def create_async(
137137
self,
138-
params: Optional["RequestedSessionCreateParams"] = None,
138+
params: "RequestedSessionCreateParams",
139139
options: Optional["RequestOptions"] = None,
140140
) -> "RequestedSession":
141141
"""

0 commit comments

Comments
 (0)