Skip to content

Commit 6c0a840

Browse files
Merge pull request #1698 from stripe/latest-codegen-private-preview
Update generated code for private-preview
2 parents 11ea8b2 + 673b8fb commit 6c0a840

File tree

70 files changed

+1145
-130
lines changed

Some content is hidden

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

70 files changed

+1145
-130
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ jobs:
8787
- "3.11"
8888
- "3.12"
8989
- "3.13"
90+
- "3.14"
9091
- "pypy-3.7"
9192
- "pypy-3.8"
9293
- "pypy-3.9"

API_VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3602014a6583f6c0fbfdde3c575839ac7d0b4e9c
1+
5abe0e44caedb3474ee672265284096ec89e0fa3

CHANGELOG.md

Lines changed: 63 additions & 21 deletions
Large diffs are not rendered by default.

OPENAPI_VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v2141
1+
v2150

stripe/_encode.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ def _api_encode(data) -> Generator[Tuple[str, Any], None, None]:
3131
for key, value in data.items():
3232
if value is None:
3333
continue
34-
elif hasattr(value, "stripe_id"):
35-
yield (key, value.stripe_id)
34+
elif hasattr(value, "id"):
35+
yield (key, getattr(value, "id"))
3636
elif isinstance(value, list) or isinstance(value, tuple):
3737
for i, sv in enumerate(value):
3838
# Always use indexed format for arrays

stripe/_invoice.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -746,6 +746,10 @@ class ScheduleDetails(StripeObject):
746746
"""
747747
The schedule that generated this invoice
748748
"""
749+
subscription: Optional[ExpandableField["Subscription"]]
750+
"""
751+
The subscription associated with this schedule
752+
"""
749753

750754
class SubscriptionDetails(StripeObject):
751755
class PauseCollection(StripeObject):

stripe/_object_classes.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -324,6 +324,7 @@
324324
"CalculationLineItem",
325325
),
326326
"tax.form": ("stripe.tax._form", "Form"),
327+
"tax.location": ("stripe.tax._location", "Location"),
327328
"tax.registration": ("stripe.tax._registration", "Registration"),
328329
"tax.settings": ("stripe.tax._settings", "Settings"),
329330
"tax.transaction": ("stripe.tax._transaction", "Transaction"),

stripe/_plan.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,10 @@ class TransformUsage(StripeObject):
9999
"""
100100
Always true for a deleted object
101101
"""
102+
external_reference: Optional[str]
103+
"""
104+
A custom identifier for this price, such as a SKU number or product code, that can be used to reference records from external systems.
105+
"""
102106
id: str
103107
"""
104108
Unique identifier for the object.

stripe/_price.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,10 @@ class TransformQuantity(StripeObject):
220220
"""
221221
Always true for a deleted object
222222
"""
223+
external_reference: Optional[str]
224+
"""
225+
A custom identifier for this price, such as a SKU number or product code, that can be used to reference records from external systems.
226+
"""
223227
id: str
224228
"""
225229
Unique identifier for the object.

stripe/_quote.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -771,10 +771,10 @@ class Prebilling(StripeObject):
771771
Set of [key-value pairs](https://docs.stripe.com/api/metadata) that will set metadata on the subscription or subscription schedule when the quote is accepted. If a recurring price is included in `line_items`, this field will be passed to the resulting subscription's `metadata` field. If `subscription_data.effective_date` is used, this field will be passed to the resulting subscription schedule's `phases.metadata` field. Unlike object-level metadata, this field is declarative. Updates will clear prior values.
772772
"""
773773
phase_effective_at: Optional[
774-
Literal["billing_period_start", "line_start"]
774+
Literal["billing_period_start", "phase_start"]
775775
]
776776
"""
777-
Configures how the quote handles billing for line transitions. Possible values are `line_start` (default) or `billing_period_start`. `line_start` bills based on the current state of the line, ignoring changes scheduled for future lines. `billing_period_start` bills predictively for upcoming line transitions within the current billing cycle, including pricing changes and service period adjustments that will occur before the next invoice.
777+
Configures how the subscription schedule handles billing for phase transitions when the quote is accepted.
778778
"""
779779
prebilling: Optional[Prebilling]
780780
"""
@@ -1041,10 +1041,10 @@ class LineEndsAt(StripeObject):
10411041
Behavior of the subscription schedule and underlying subscription when it ends.
10421042
"""
10431043
phase_effective_at: Optional[
1044-
Literal["billing_period_start", "line_start"]
1044+
Literal["billing_period_start", "phase_start"]
10451045
]
10461046
"""
1047-
Configures how the quote handles billing for line transitions. Possible values are `line_start` (default) or `billing_period_start`. `line_start` bills based on the current state of the line, ignoring changes scheduled for future lines. `billing_period_start` bills predictively for upcoming line transitions within the current billing cycle, including pricing changes and service period adjustments that will occur before the next invoice.
1047+
Configures how the subscription schedule handles billing for phase transitions when the quote is accepted.
10481048
"""
10491049
proration_behavior: Optional[
10501050
Literal["always_invoice", "create_prorations", "none"]

0 commit comments

Comments
 (0)