Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion API_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
91ef4c6abe8dcdab3a855d81aa624693a6a4da9f
7f436e73385732b1c5502f408a6fe37f7b6b0612
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v2125
v2128
9 changes: 9 additions & 0 deletions stripe/_object_classes.py
Original file line number Diff line number Diff line change
Expand Up @@ -499,6 +499,11 @@
"stripe.v2.core._account_person",
"AccountPerson",
),
"v2.core.account_person_token": (
"stripe.v2.core._account_person_token",
"AccountPersonToken",
),
"v2.core.account_token": ("stripe.v2.core._account_token", "AccountToken"),
"v2.core.claimable_sandbox": (
"stripe.v2.core._claimable_sandbox",
"ClaimableSandbox",
Expand Down Expand Up @@ -528,6 +533,10 @@
"stripe.v2.money_management._adjustment",
"Adjustment",
),
"v2.money_management.currency_conversion": (
"stripe.v2.money_management._currency_conversion",
"CurrencyConversion",
),
"v2.money_management.financial_account": (
"stripe.v2.money_management._financial_account",
"FinancialAccount",
Expand Down
16 changes: 8 additions & 8 deletions stripe/_payment_method.py
Original file line number Diff line number Diff line change
Expand Up @@ -1855,7 +1855,7 @@ def _cls_check_balance(
**params: Unpack["PaymentMethodCheckBalanceParams"],
) -> "PaymentMethodBalance":
"""
Retrieves a payment method's balance.
Retrieves a PaymentMethod's Balance.
"""
return cast(
"PaymentMethodBalance",
Expand All @@ -1875,7 +1875,7 @@ def check_balance(
**params: Unpack["PaymentMethodCheckBalanceParams"],
) -> "PaymentMethodBalance":
"""
Retrieves a payment method's balance.
Retrieves a PaymentMethod's Balance.
"""
...

Expand All @@ -1884,7 +1884,7 @@ def check_balance(
self, **params: Unpack["PaymentMethodCheckBalanceParams"]
) -> "PaymentMethodBalance":
"""
Retrieves a payment method's balance.
Retrieves a PaymentMethod's Balance.
"""
...

Expand All @@ -1893,7 +1893,7 @@ def check_balance( # pyright: ignore[reportGeneralTypeIssues]
self, **params: Unpack["PaymentMethodCheckBalanceParams"]
) -> "PaymentMethodBalance":
"""
Retrieves a payment method's balance.
Retrieves a PaymentMethod's Balance.
"""
return cast(
"PaymentMethodBalance",
Expand All @@ -1913,7 +1913,7 @@ async def _cls_check_balance_async(
**params: Unpack["PaymentMethodCheckBalanceParams"],
) -> "PaymentMethodBalance":
"""
Retrieves a payment method's balance.
Retrieves a PaymentMethod's Balance.
"""
return cast(
"PaymentMethodBalance",
Expand All @@ -1933,7 +1933,7 @@ async def check_balance_async(
**params: Unpack["PaymentMethodCheckBalanceParams"],
) -> "PaymentMethodBalance":
"""
Retrieves a payment method's balance.
Retrieves a PaymentMethod's Balance.
"""
...

Expand All @@ -1942,7 +1942,7 @@ async def check_balance_async(
self, **params: Unpack["PaymentMethodCheckBalanceParams"]
) -> "PaymentMethodBalance":
"""
Retrieves a payment method's balance.
Retrieves a PaymentMethod's Balance.
"""
...

Expand All @@ -1951,7 +1951,7 @@ async def check_balance_async( # pyright: ignore[reportGeneralTypeIssues]
self, **params: Unpack["PaymentMethodCheckBalanceParams"]
) -> "PaymentMethodBalance":
"""
Retrieves a payment method's balance.
Retrieves a PaymentMethod's Balance.
"""
return cast(
"PaymentMethodBalance",
Expand Down
4 changes: 2 additions & 2 deletions stripe/_payment_method_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ def check_balance(
options: Optional["RequestOptions"] = None,
) -> "PaymentMethodBalance":
"""
Retrieves a payment method's balance.
Retrieves a PaymentMethod's Balance.
"""
return cast(
"PaymentMethodBalance",
Expand All @@ -299,7 +299,7 @@ async def check_balance_async(
options: Optional["RequestOptions"] = None,
) -> "PaymentMethodBalance":
"""
Retrieves a payment method's balance.
Retrieves a PaymentMethod's Balance.
"""
return cast(
"PaymentMethodBalance",
Expand Down
108 changes: 8 additions & 100 deletions stripe/_quote.py
Original file line number Diff line number Diff line change
Expand Up @@ -629,32 +629,12 @@ class AppliesTo(StripeObject):
"""

class BillFrom(StripeObject):
class AmendmentStart(StripeObject):
index: int
"""
Use an index to specify the position of an amendment to start prebilling with.
"""

class LineStartsAt(StripeObject):
id: str
"""
Unique identifier for the object.
"""

class Relative(StripeObject):
interval: Literal["day", "month", "week", "year"]
"""
Specifies billing duration. Possible values are `day`, `week`, `month`, or `year`.
"""
interval_count: Optional[int]
"""
The multiplier applied to the interval.
"""

amendment_start: Optional[AmendmentStart]
"""
Use an index to specify the position of an amendment to start prebilling with.
"""
computed_timestamp: Optional[int]
"""
The time the billing schedule applies from.
Expand All @@ -663,39 +643,22 @@ class Relative(StripeObject):
"""
Lets you bill the period starting from a particular Quote line.
"""
relative: Optional[Relative]
"""
Timestamp is calculated from the request time.
"""
timestamp: Optional[int]
"""
Use a precise Unix timestamp for prebilling to start. Must be earlier than `bill_until`.
"""
type: Literal[
"amendment_start",
"line_starts_at",
"now",
"pause_collection_start",
"quote_acceptance_date",
"relative",
"timestamp",
]
"""
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`.
"""
_inner_class_types = {
"amendment_start": AmendmentStart,
"line_starts_at": LineStartsAt,
"relative": Relative,
}
_inner_class_types = {"line_starts_at": LineStartsAt}

class BillUntil(StripeObject):
class AmendmentEnd(StripeObject):
index: int
"""
Use an index to specify the position of an amendment to end prebilling with.
"""

class Duration(StripeObject):
interval: Literal["day", "month", "week", "year"]
"""
Expand All @@ -712,11 +675,7 @@ class LineEndsAt(StripeObject):
Unique identifier for the object.
"""

amendment_end: Optional[AmendmentEnd]
"""
Use an index to specify the position of an amendment to end prebilling with.
"""
computed_timestamp: int
computed_timestamp: Optional[int]
"""
The timestamp the billing schedule will apply until.
"""
Expand All @@ -733,7 +692,6 @@ class LineEndsAt(StripeObject):
If specified, the billing schedule will apply until the specified timestamp.
"""
type: Literal[
"amendment_end",
"duration",
"line_ends_at",
"schedule_end",
Expand All @@ -744,7 +702,6 @@ class LineEndsAt(StripeObject):
Describes how the billing schedule will determine the end date. Either `duration` or `timestamp`.
"""
_inner_class_types = {
"amendment_end": AmendmentEnd,
"duration": Duration,
"line_ends_at": LineEndsAt,
}
Expand All @@ -758,9 +715,6 @@ class LineEndsAt(StripeObject):
Specifies the start of the billing period.
"""
bill_until: BillUntil
"""
Specifies the end of billing period.
"""
key: str
"""
Unique identifier for the billing schedule.
Expand Down Expand Up @@ -817,10 +771,10 @@ class Prebilling(StripeObject):
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.
"""
phase_effective_at: Optional[
Literal["billing_period_start", "phase_start"]
Literal["billing_period_start", "line_start"]
]
"""
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.
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.
"""
prebilling: Optional[Prebilling]
"""
Expand Down Expand Up @@ -963,32 +917,12 @@ class AppliesTo(StripeObject):
"""

class BillFrom(StripeObject):
class AmendmentStart(StripeObject):
index: int
"""
Use an index to specify the position of an amendment to start prebilling with.
"""

class LineStartsAt(StripeObject):
id: str
"""
Unique identifier for the object.
"""

class Relative(StripeObject):
interval: Literal["day", "month", "week", "year"]
"""
Specifies billing duration. Possible values are `day`, `week`, `month`, or `year`.
"""
interval_count: Optional[int]
"""
The multiplier applied to the interval.
"""

amendment_start: Optional[AmendmentStart]
"""
Use an index to specify the position of an amendment to start prebilling with.
"""
computed_timestamp: Optional[int]
"""
The time the billing schedule applies from.
Expand All @@ -997,39 +931,22 @@ class Relative(StripeObject):
"""
Lets you bill the period starting from a particular Quote line.
"""
relative: Optional[Relative]
"""
Timestamp is calculated from the request time.
"""
timestamp: Optional[int]
"""
Use a precise Unix timestamp for prebilling to start. Must be earlier than `bill_until`.
"""
type: Literal[
"amendment_start",
"line_starts_at",
"now",
"pause_collection_start",
"quote_acceptance_date",
"relative",
"timestamp",
]
"""
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`.
"""
_inner_class_types = {
"amendment_start": AmendmentStart,
"line_starts_at": LineStartsAt,
"relative": Relative,
}
_inner_class_types = {"line_starts_at": LineStartsAt}

class BillUntil(StripeObject):
class AmendmentEnd(StripeObject):
index: int
"""
Use an index to specify the position of an amendment to end prebilling with.
"""

class Duration(StripeObject):
interval: Literal["day", "month", "week", "year"]
"""
Expand All @@ -1046,11 +963,7 @@ class LineEndsAt(StripeObject):
Unique identifier for the object.
"""

amendment_end: Optional[AmendmentEnd]
"""
Use an index to specify the position of an amendment to end prebilling with.
"""
computed_timestamp: int
computed_timestamp: Optional[int]
"""
The timestamp the billing schedule will apply until.
"""
Expand All @@ -1067,7 +980,6 @@ class LineEndsAt(StripeObject):
If specified, the billing schedule will apply until the specified timestamp.
"""
type: Literal[
"amendment_end",
"duration",
"line_ends_at",
"schedule_end",
Expand All @@ -1078,7 +990,6 @@ class LineEndsAt(StripeObject):
Describes how the billing schedule will determine the end date. Either `duration` or `timestamp`.
"""
_inner_class_types = {
"amendment_end": AmendmentEnd,
"duration": Duration,
"line_ends_at": LineEndsAt,
}
Expand All @@ -1092,9 +1003,6 @@ class LineEndsAt(StripeObject):
Specifies the start of the billing period.
"""
bill_until: BillUntil
"""
Specifies the end of billing period.
"""
key: str
"""
Unique identifier for the billing schedule.
Expand Down Expand Up @@ -1133,10 +1041,10 @@ class LineEndsAt(StripeObject):
Behavior of the subscription schedule and underlying subscription when it ends.
"""
phase_effective_at: Optional[
Literal["billing_period_start", "phase_start"]
Literal["billing_period_start", "line_start"]
]
"""
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.
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.
"""
proration_behavior: Optional[
Literal["always_invoice", "create_prorations", "none"]
Expand Down
Loading
Loading