Skip to content

Commit 9f577b4

Browse files
Merge pull request #1679 from stripe/latest-codegen-private-preview
Update generated code for private-preview
2 parents b3630d5 + 4d98f0d commit 9f577b4

File tree

289 files changed

+6102
-25480
lines changed

Some content is hidden

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

289 files changed

+6102
-25480
lines changed

API_VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
91ef4c6abe8dcdab3a855d81aa624693a6a4da9f
1+
7f436e73385732b1c5502f408a6fe37f7b6b0612

OPENAPI_VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v2125
1+
v2128

stripe/_object_classes.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -499,6 +499,11 @@
499499
"stripe.v2.core._account_person",
500500
"AccountPerson",
501501
),
502+
"v2.core.account_person_token": (
503+
"stripe.v2.core._account_person_token",
504+
"AccountPersonToken",
505+
),
506+
"v2.core.account_token": ("stripe.v2.core._account_token", "AccountToken"),
502507
"v2.core.claimable_sandbox": (
503508
"stripe.v2.core._claimable_sandbox",
504509
"ClaimableSandbox",
@@ -528,6 +533,10 @@
528533
"stripe.v2.money_management._adjustment",
529534
"Adjustment",
530535
),
536+
"v2.money_management.currency_conversion": (
537+
"stripe.v2.money_management._currency_conversion",
538+
"CurrencyConversion",
539+
),
531540
"v2.money_management.financial_account": (
532541
"stripe.v2.money_management._financial_account",
533542
"FinancialAccount",

stripe/_payment_method.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1855,7 +1855,7 @@ def _cls_check_balance(
18551855
**params: Unpack["PaymentMethodCheckBalanceParams"],
18561856
) -> "PaymentMethodBalance":
18571857
"""
1858-
Retrieves a payment method's balance.
1858+
Retrieves a PaymentMethod's Balance.
18591859
"""
18601860
return cast(
18611861
"PaymentMethodBalance",
@@ -1875,7 +1875,7 @@ def check_balance(
18751875
**params: Unpack["PaymentMethodCheckBalanceParams"],
18761876
) -> "PaymentMethodBalance":
18771877
"""
1878-
Retrieves a payment method's balance.
1878+
Retrieves a PaymentMethod's Balance.
18791879
"""
18801880
...
18811881

@@ -1884,7 +1884,7 @@ def check_balance(
18841884
self, **params: Unpack["PaymentMethodCheckBalanceParams"]
18851885
) -> "PaymentMethodBalance":
18861886
"""
1887-
Retrieves a payment method's balance.
1887+
Retrieves a PaymentMethod's Balance.
18881888
"""
18891889
...
18901890

@@ -1893,7 +1893,7 @@ def check_balance( # pyright: ignore[reportGeneralTypeIssues]
18931893
self, **params: Unpack["PaymentMethodCheckBalanceParams"]
18941894
) -> "PaymentMethodBalance":
18951895
"""
1896-
Retrieves a payment method's balance.
1896+
Retrieves a PaymentMethod's Balance.
18971897
"""
18981898
return cast(
18991899
"PaymentMethodBalance",
@@ -1913,7 +1913,7 @@ async def _cls_check_balance_async(
19131913
**params: Unpack["PaymentMethodCheckBalanceParams"],
19141914
) -> "PaymentMethodBalance":
19151915
"""
1916-
Retrieves a payment method's balance.
1916+
Retrieves a PaymentMethod's Balance.
19171917
"""
19181918
return cast(
19191919
"PaymentMethodBalance",
@@ -1933,7 +1933,7 @@ async def check_balance_async(
19331933
**params: Unpack["PaymentMethodCheckBalanceParams"],
19341934
) -> "PaymentMethodBalance":
19351935
"""
1936-
Retrieves a payment method's balance.
1936+
Retrieves a PaymentMethod's Balance.
19371937
"""
19381938
...
19391939

@@ -1942,7 +1942,7 @@ async def check_balance_async(
19421942
self, **params: Unpack["PaymentMethodCheckBalanceParams"]
19431943
) -> "PaymentMethodBalance":
19441944
"""
1945-
Retrieves a payment method's balance.
1945+
Retrieves a PaymentMethod's Balance.
19461946
"""
19471947
...
19481948

@@ -1951,7 +1951,7 @@ async def check_balance_async( # pyright: ignore[reportGeneralTypeIssues]
19511951
self, **params: Unpack["PaymentMethodCheckBalanceParams"]
19521952
) -> "PaymentMethodBalance":
19531953
"""
1954-
Retrieves a payment method's balance.
1954+
Retrieves a PaymentMethod's Balance.
19551955
"""
19561956
return cast(
19571957
"PaymentMethodBalance",

stripe/_payment_method_service.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ def check_balance(
277277
options: Optional["RequestOptions"] = None,
278278
) -> "PaymentMethodBalance":
279279
"""
280-
Retrieves a payment method's balance.
280+
Retrieves a PaymentMethod's Balance.
281281
"""
282282
return cast(
283283
"PaymentMethodBalance",
@@ -299,7 +299,7 @@ async def check_balance_async(
299299
options: Optional["RequestOptions"] = None,
300300
) -> "PaymentMethodBalance":
301301
"""
302-
Retrieves a payment method's balance.
302+
Retrieves a PaymentMethod's Balance.
303303
"""
304304
return cast(
305305
"PaymentMethodBalance",

stripe/_quote.py

Lines changed: 8 additions & 100 deletions
Original file line numberDiff line numberDiff line change
@@ -629,32 +629,12 @@ class AppliesTo(StripeObject):
629629
"""
630630

631631
class BillFrom(StripeObject):
632-
class AmendmentStart(StripeObject):
633-
index: int
634-
"""
635-
Use an index to specify the position of an amendment to start prebilling with.
636-
"""
637-
638632
class LineStartsAt(StripeObject):
639633
id: str
640634
"""
641635
Unique identifier for the object.
642636
"""
643637

644-
class Relative(StripeObject):
645-
interval: Literal["day", "month", "week", "year"]
646-
"""
647-
Specifies billing duration. Possible values are `day`, `week`, `month`, or `year`.
648-
"""
649-
interval_count: Optional[int]
650-
"""
651-
The multiplier applied to the interval.
652-
"""
653-
654-
amendment_start: Optional[AmendmentStart]
655-
"""
656-
Use an index to specify the position of an amendment to start prebilling with.
657-
"""
658638
computed_timestamp: Optional[int]
659639
"""
660640
The time the billing schedule applies from.
@@ -663,39 +643,22 @@ class Relative(StripeObject):
663643
"""
664644
Lets you bill the period starting from a particular Quote line.
665645
"""
666-
relative: Optional[Relative]
667-
"""
668-
Timestamp is calculated from the request time.
669-
"""
670646
timestamp: Optional[int]
671647
"""
672648
Use a precise Unix timestamp for prebilling to start. Must be earlier than `bill_until`.
673649
"""
674650
type: Literal[
675-
"amendment_start",
676651
"line_starts_at",
677-
"now",
678652
"pause_collection_start",
679653
"quote_acceptance_date",
680-
"relative",
681654
"timestamp",
682655
]
683656
"""
684657
Describes how the billing schedule determines the start date. Possible values are `timestamp`, `relative`, `amendment_start`, `now`, `quote_acceptance_date`, `line_starts_at`, or `pause_collection_start`.
685658
"""
686-
_inner_class_types = {
687-
"amendment_start": AmendmentStart,
688-
"line_starts_at": LineStartsAt,
689-
"relative": Relative,
690-
}
659+
_inner_class_types = {"line_starts_at": LineStartsAt}
691660

692661
class BillUntil(StripeObject):
693-
class AmendmentEnd(StripeObject):
694-
index: int
695-
"""
696-
Use an index to specify the position of an amendment to end prebilling with.
697-
"""
698-
699662
class Duration(StripeObject):
700663
interval: Literal["day", "month", "week", "year"]
701664
"""
@@ -712,11 +675,7 @@ class LineEndsAt(StripeObject):
712675
Unique identifier for the object.
713676
"""
714677

715-
amendment_end: Optional[AmendmentEnd]
716-
"""
717-
Use an index to specify the position of an amendment to end prebilling with.
718-
"""
719-
computed_timestamp: int
678+
computed_timestamp: Optional[int]
720679
"""
721680
The timestamp the billing schedule will apply until.
722681
"""
@@ -733,7 +692,6 @@ class LineEndsAt(StripeObject):
733692
If specified, the billing schedule will apply until the specified timestamp.
734693
"""
735694
type: Literal[
736-
"amendment_end",
737695
"duration",
738696
"line_ends_at",
739697
"schedule_end",
@@ -744,7 +702,6 @@ class LineEndsAt(StripeObject):
744702
Describes how the billing schedule will determine the end date. Either `duration` or `timestamp`.
745703
"""
746704
_inner_class_types = {
747-
"amendment_end": AmendmentEnd,
748705
"duration": Duration,
749706
"line_ends_at": LineEndsAt,
750707
}
@@ -758,9 +715,6 @@ class LineEndsAt(StripeObject):
758715
Specifies the start of the billing period.
759716
"""
760717
bill_until: BillUntil
761-
"""
762-
Specifies the end of billing period.
763-
"""
764718
key: str
765719
"""
766720
Unique identifier for the billing schedule.
@@ -817,10 +771,10 @@ class Prebilling(StripeObject):
817771
Set of [key-value pairs](https://stripe.com/docs/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.
818772
"""
819773
phase_effective_at: Optional[
820-
Literal["billing_period_start", "phase_start"]
774+
Literal["billing_period_start", "line_start"]
821775
]
822776
"""
823-
Configures how the subscription schedule handles billing for phase transitions. Possible values are `phase_start` (default) or `billing_period_start`. `phase_start` bills based on the current state of the subscription, ignoring changes scheduled in future phases. `billing_period_start` bills predictively for upcoming phase transitions within the current billing cycle, including pricing changes and service period adjustments that will occur before the next invoice.
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.
824778
"""
825779
prebilling: Optional[Prebilling]
826780
"""
@@ -963,32 +917,12 @@ class AppliesTo(StripeObject):
963917
"""
964918

965919
class BillFrom(StripeObject):
966-
class AmendmentStart(StripeObject):
967-
index: int
968-
"""
969-
Use an index to specify the position of an amendment to start prebilling with.
970-
"""
971-
972920
class LineStartsAt(StripeObject):
973921
id: str
974922
"""
975923
Unique identifier for the object.
976924
"""
977925

978-
class Relative(StripeObject):
979-
interval: Literal["day", "month", "week", "year"]
980-
"""
981-
Specifies billing duration. Possible values are `day`, `week`, `month`, or `year`.
982-
"""
983-
interval_count: Optional[int]
984-
"""
985-
The multiplier applied to the interval.
986-
"""
987-
988-
amendment_start: Optional[AmendmentStart]
989-
"""
990-
Use an index to specify the position of an amendment to start prebilling with.
991-
"""
992926
computed_timestamp: Optional[int]
993927
"""
994928
The time the billing schedule applies from.
@@ -997,39 +931,22 @@ class Relative(StripeObject):
997931
"""
998932
Lets you bill the period starting from a particular Quote line.
999933
"""
1000-
relative: Optional[Relative]
1001-
"""
1002-
Timestamp is calculated from the request time.
1003-
"""
1004934
timestamp: Optional[int]
1005935
"""
1006936
Use a precise Unix timestamp for prebilling to start. Must be earlier than `bill_until`.
1007937
"""
1008938
type: Literal[
1009-
"amendment_start",
1010939
"line_starts_at",
1011-
"now",
1012940
"pause_collection_start",
1013941
"quote_acceptance_date",
1014-
"relative",
1015942
"timestamp",
1016943
]
1017944
"""
1018945
Describes how the billing schedule determines the start date. Possible values are `timestamp`, `relative`, `amendment_start`, `now`, `quote_acceptance_date`, `line_starts_at`, or `pause_collection_start`.
1019946
"""
1020-
_inner_class_types = {
1021-
"amendment_start": AmendmentStart,
1022-
"line_starts_at": LineStartsAt,
1023-
"relative": Relative,
1024-
}
947+
_inner_class_types = {"line_starts_at": LineStartsAt}
1025948

1026949
class BillUntil(StripeObject):
1027-
class AmendmentEnd(StripeObject):
1028-
index: int
1029-
"""
1030-
Use an index to specify the position of an amendment to end prebilling with.
1031-
"""
1032-
1033950
class Duration(StripeObject):
1034951
interval: Literal["day", "month", "week", "year"]
1035952
"""
@@ -1046,11 +963,7 @@ class LineEndsAt(StripeObject):
1046963
Unique identifier for the object.
1047964
"""
1048965

1049-
amendment_end: Optional[AmendmentEnd]
1050-
"""
1051-
Use an index to specify the position of an amendment to end prebilling with.
1052-
"""
1053-
computed_timestamp: int
966+
computed_timestamp: Optional[int]
1054967
"""
1055968
The timestamp the billing schedule will apply until.
1056969
"""
@@ -1067,7 +980,6 @@ class LineEndsAt(StripeObject):
1067980
If specified, the billing schedule will apply until the specified timestamp.
1068981
"""
1069982
type: Literal[
1070-
"amendment_end",
1071983
"duration",
1072984
"line_ends_at",
1073985
"schedule_end",
@@ -1078,7 +990,6 @@ class LineEndsAt(StripeObject):
1078990
Describes how the billing schedule will determine the end date. Either `duration` or `timestamp`.
1079991
"""
1080992
_inner_class_types = {
1081-
"amendment_end": AmendmentEnd,
1082993
"duration": Duration,
1083994
"line_ends_at": LineEndsAt,
1084995
}
@@ -1092,9 +1003,6 @@ class LineEndsAt(StripeObject):
10921003
Specifies the start of the billing period.
10931004
"""
10941005
bill_until: BillUntil
1095-
"""
1096-
Specifies the end of billing period.
1097-
"""
10981006
key: str
10991007
"""
11001008
Unique identifier for the billing schedule.
@@ -1133,10 +1041,10 @@ class LineEndsAt(StripeObject):
11331041
Behavior of the subscription schedule and underlying subscription when it ends.
11341042
"""
11351043
phase_effective_at: Optional[
1136-
Literal["billing_period_start", "phase_start"]
1044+
Literal["billing_period_start", "line_start"]
11371045
]
11381046
"""
1139-
Configures how the subscription schedule handles billing for phase transitions. Possible values are `phase_start` (default) or `billing_period_start`. `phase_start` bills based on the current state of the subscription, ignoring changes scheduled in future phases. `billing_period_start` bills predictively for upcoming phase transitions within the current billing cycle, including pricing changes and service period adjustments that will occur before the next invoice.
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.
11401048
"""
11411049
proration_behavior: Optional[
11421050
Literal["always_invoice", "create_prorations", "none"]

0 commit comments

Comments
 (0)