Skip to content

Commit

Permalink
Merge upstream and update generated code for v1321
Browse files Browse the repository at this point in the history
  • Loading branch information
stripe-openapi[bot] committed Oct 31, 2024
2 parents c1ace0d + 5c18581 commit b05b5ac
Show file tree
Hide file tree
Showing 11 changed files with 60 additions and 61 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
* Remove support for `payout_statement_descriptor_profanity` on enums `stripe.Invoice.LastFinalizationError.code`, `stripe.PaymentIntent.LastPaymentError.code`, `stripe.QuotePreviewInvoice.LastFinalizationError.code`, `stripe.SetupAttempt.SetupError.code`, and `stripe.SetupIntent.LastSetupError.code`

## 11.2.0 - 2024-10-29
* [#1411](https://github.com/stripe/stripe-python/pull/1411) Update generated code
* [#1411](https://github.com/stripe/stripe-python/pull/1411) This release changes the pinned API version to `2024-10-28.acacia`.
* Add support for resource `stripe.v2.EventDestinations`
* Add support for `create`, `retrieve`, `update`, `list`, `delete`, `disable`, `enable` and `ping` methods on resource `V2.EventDestinations`
* Add support for `alma_payments`, `kakao_pay_payments`, `kr_card_payments`, `naver_pay_payments`, `payco_payments`, `samsung_pay_payments` on resource class `stripe.Account.Capabilities` and parameter class `stripe.Account.CreateParamsCapabilities`
Expand Down
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v1320
v1321
10 changes: 5 additions & 5 deletions stripe/_account_session.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class AccountSession(CreateableAPIResource["AccountSession"]):
class Components(StripeObject):
class AccountManagement(StripeObject):
class Features(StripeObject):
disable_stripe_user_authentication: Optional[bool]
disable_stripe_user_authentication: bool
"""
Disables Stripe user authentication for this embedded component. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts. The default value for this feature is `false` when `external_account_collection` is enabled and `true` otherwise.
"""
Expand All @@ -41,7 +41,7 @@ class Features(StripeObject):

class AccountOnboarding(StripeObject):
class Features(StripeObject):
disable_stripe_user_authentication: Optional[bool]
disable_stripe_user_authentication: bool
"""
Disables Stripe user authentication for this embedded component. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts. The default value for this feature is `false` when `external_account_collection` is enabled and `true` otherwise.
"""
Expand All @@ -59,7 +59,7 @@ class Features(StripeObject):

class Balances(StripeObject):
class Features(StripeObject):
disable_stripe_user_authentication: Optional[bool]
disable_stripe_user_authentication: bool
"""
Disables Stripe user authentication for this embedded component. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts. The default value for this feature is `false` when `external_account_collection` is enabled and `true` otherwise.
"""
Expand Down Expand Up @@ -133,7 +133,7 @@ class Features(StripeObject):

class NotificationBanner(StripeObject):
class Features(StripeObject):
disable_stripe_user_authentication: Optional[bool]
disable_stripe_user_authentication: bool
"""
Disables Stripe user authentication for this embedded component. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts. The default value for this feature is `false` when `external_account_collection` is enabled and `true` otherwise.
"""
Expand Down Expand Up @@ -203,7 +203,7 @@ class Features(StripeObject):

class Payouts(StripeObject):
class Features(StripeObject):
disable_stripe_user_authentication: Optional[bool]
disable_stripe_user_authentication: bool
"""
Disables Stripe user authentication for this embedded component. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts. The default value for this feature is `false` when `external_account_collection` is enabled and `true` otherwise.
"""
Expand Down
2 changes: 1 addition & 1 deletion stripe/_payment_intent.py
Original file line number Diff line number Diff line change
Expand Up @@ -7156,7 +7156,7 @@ class CreateParams(RequestOptions):
"""
payment_method_types: NotRequired[List[str]]
"""
The list of payment method types (for example, a card) that this PaymentIntent can use. If you don't provide this, it defaults to ["card"]. Use `automatic_payment_methods` to manage payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods).
The list of payment method types (for example, a card) that this PaymentIntent can use. If you don't provide this, Stripe will dynamically show relevant payment methods from your [payment method settings](https://dashboard.stripe.com/settings/payment_methods).
"""
radar_options: NotRequired["PaymentIntent.CreateParamsRadarOptions"]
"""
Expand Down
2 changes: 1 addition & 1 deletion stripe/_payment_intent_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -4533,7 +4533,7 @@ class CreateParams(TypedDict):
"""
payment_method_types: NotRequired[List[str]]
"""
The list of payment method types (for example, a card) that this PaymentIntent can use. If you don't provide this, it defaults to ["card"]. Use `automatic_payment_methods` to manage payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods).
The list of payment method types (for example, a card) that this PaymentIntent can use. If you don't provide this, Stripe will dynamically show relevant payment methods from your [payment method settings](https://dashboard.stripe.com/settings/payment_methods).
"""
radar_options: NotRequired[
"PaymentIntentService.CreateParamsRadarOptions"
Expand Down
4 changes: 2 additions & 2 deletions stripe/_setup_intent.py
Original file line number Diff line number Diff line change
Expand Up @@ -2147,7 +2147,7 @@ class CreateParams(RequestOptions):
"""
payment_method_types: NotRequired[List[str]]
"""
The list of payment method types (for example, card) that this SetupIntent can use. If you don't provide this, it defaults to ["card"].
The list of payment method types (for example, card) that this SetupIntent can use. If you don't provide this, Stripe will dynamically show relevant payment methods from your [payment method settings](https://dashboard.stripe.com/settings/payment_methods).
"""
return_url: NotRequired[str]
"""
Expand Down Expand Up @@ -3568,7 +3568,7 @@ class ModifyParams(RequestOptions):
"""
payment_method_types: NotRequired[List[str]]
"""
The list of payment method types (for example, card) that this SetupIntent can set up. If you don't provide this array, it defaults to ["card"].
The list of payment method types (for example, card) that this SetupIntent can set up. If you don't provide this, Stripe will dynamically show relevant payment methods from your [payment method settings](https://dashboard.stripe.com/settings/payment_methods).
"""

class ModifyParamsPaymentMethodData(TypedDict):
Expand Down
4 changes: 2 additions & 2 deletions stripe/_setup_intent_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -1474,7 +1474,7 @@ class CreateParams(TypedDict):
"""
payment_method_types: NotRequired[List[str]]
"""
The list of payment method types (for example, card) that this SetupIntent can use. If you don't provide this, it defaults to ["card"].
The list of payment method types (for example, card) that this SetupIntent can use. If you don't provide this, Stripe will dynamically show relevant payment methods from your [payment method settings](https://dashboard.stripe.com/settings/payment_methods).
"""
return_url: NotRequired[str]
"""
Expand Down Expand Up @@ -2953,7 +2953,7 @@ class UpdateParams(TypedDict):
"""
payment_method_types: NotRequired[List[str]]
"""
The list of payment method types (for example, card) that this SetupIntent can set up. If you don't provide this array, it defaults to ["card"].
The list of payment method types (for example, card) that this SetupIntent can set up. If you don't provide this, Stripe will dynamically show relevant payment methods from your [payment method settings](https://dashboard.stripe.com/settings/payment_methods).
"""

class UpdateParamsPaymentMethodData(TypedDict):
Expand Down
2 changes: 1 addition & 1 deletion stripe/billing/_credit_balance_summary.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ class RetrieveParamsFilter(TypedDict):
class RetrieveParamsFilterApplicabilityScope(TypedDict):
price_type: Literal["metered"]
"""
The price type to which credit grants can apply to. We currently only support `metered` price type.
The price type for which credit grants can apply. We currently only support the `metered` price type.
"""

balances: List[Balance]
Expand Down
2 changes: 1 addition & 1 deletion stripe/billing/_credit_balance_summary_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class RetrieveParamsFilter(TypedDict):
class RetrieveParamsFilterApplicabilityScope(TypedDict):
price_type: Literal["metered"]
"""
The price type to which credit grants can apply to. We currently only support `metered` price type.
The price type for which credit grants can apply. We currently only support the `metered` price type.
"""

def retrieve(
Expand Down
63 changes: 31 additions & 32 deletions stripe/billing/_credit_grant.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ class CreditGrant(
A credit grant is an API resource that documents the allocation of some billing credits to a customer.
Related guide: [Billing credits](https://docs.stripe.com/billing/subscriptions/usage-based/billing-credits)
end
"""

OBJECT_NAME: ClassVar[Literal["billing.credit_grant"]] = (
Expand Down Expand Up @@ -63,7 +62,7 @@ class ApplicabilityConfig(StripeObject):
class Scope(StripeObject):
price_type: Literal["metered"]
"""
The price type to which credit grants can apply to. We currently only support `metered` price type. This refers to prices that have a [Billing Meter](https://docs.stripe.com/api/billing/meter) attached to them.
The price type for which credit grants can apply. We currently only support the `metered` price type. This refers to prices that have a [Billing Meter](https://docs.stripe.com/api/billing/meter) attached to them.
"""

scope: Scope
Expand All @@ -84,27 +83,27 @@ class CreateParams(RequestOptions):
"""
customer: str
"""
ID of the customer to whom the billing credits should be granted.
ID of the customer to receive the billing credits.
"""
effective_at: NotRequired[int]
"""
The time when the billing credits become effective i.e when they are eligible to be used. Defaults to the current timestamp if not specified.
The time when the billing credits become effectivewhen they're eligible for use. Defaults to the current timestamp if not specified.
"""
expand: NotRequired[List[str]]
"""
Specifies which fields in the response should be expanded.
"""
expires_at: NotRequired[int]
"""
The time when the billing credits will expire. If not specified, the billing credits will never expire.
The time when the billing credits will expire. If not specified, the billing credits don't expire.
"""
metadata: NotRequired[Dict[str, str]]
"""
Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object (ex: cost basis) in a structured format.
Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object (for example, cost basis) in a structured format.
"""
name: NotRequired[str]
"""
A descriptive name shown in dashboard.
A descriptive name shown in the Dashboard.
"""

class CreateParamsAmount(TypedDict):
Expand Down Expand Up @@ -136,7 +135,7 @@ class CreateParamsApplicabilityConfig(TypedDict):
class CreateParamsApplicabilityConfigScope(TypedDict):
price_type: Literal["metered"]
"""
The price type to which credit grants can apply to. We currently only support `metered` price type.
The price type for which credit grants can apply. We currently only support the `metered` price type.
"""

class ExpireParams(RequestOptions):
Expand Down Expand Up @@ -174,11 +173,11 @@ class ModifyParams(RequestOptions):
"""
expires_at: NotRequired["Literal['']|int"]
"""
The time when the billing credits created by this credit grant will expire. If set to empty, the billing credits will never expire.
The time when the billing credits created by this credit grant expire. If set to empty, the billing credits never expire.
"""
metadata: NotRequired[Dict[str, str]]
"""
Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object (ex: cost basis) in a structured format.
Set of key-value pairs you can attach to an object. This can be useful for storing additional information about the object (for example, cost basis) in a structured format.
"""

class RetrieveParams(RequestOptions):
Expand All @@ -197,23 +196,23 @@ class VoidGrantParams(RequestOptions):
applicability_config: ApplicabilityConfig
category: Literal["paid", "promotional"]
"""
The category of this credit grant. This is for tracking purposes and will not be displayed to the customer.
The category of this credit grant. This is for tracking purposes and isn't displayed to the customer.
"""
created: int
"""
Time at which the object was created. Measured in seconds since the Unix epoch.
"""
customer: ExpandableField["Customer"]
"""
ID of the customer to whom the billing credits are granted.
ID of the customer receiving the billing credits.
"""
effective_at: Optional[int]
"""
The time when the billing credits become effective i.e when they are eligible to be used.
The time when the billing credits become effectivewhen they're eligible for use.
"""
expires_at: Optional[int]
"""
The time when the billing credits will expire. If not present, the billing credits will never expire.
The time when the billing credits expire. If not present, the billing credits don't expire.
"""
id: str
"""
Expand Down Expand Up @@ -285,7 +284,7 @@ def _cls_expire(
cls, id: str, **params: Unpack["CreditGrant.ExpireParams"]
) -> "CreditGrant":
"""
Expires a credit grant
Expires a credit grant.
"""
return cast(
"CreditGrant",
Expand All @@ -304,7 +303,7 @@ def expire(
id: str, **params: Unpack["CreditGrant.ExpireParams"]
) -> "CreditGrant":
"""
Expires a credit grant
Expires a credit grant.
"""
...

Expand All @@ -313,7 +312,7 @@ def expire(
self, **params: Unpack["CreditGrant.ExpireParams"]
) -> "CreditGrant":
"""
Expires a credit grant
Expires a credit grant.
"""
...

Expand All @@ -322,7 +321,7 @@ def expire( # pyright: ignore[reportGeneralTypeIssues]
self, **params: Unpack["CreditGrant.ExpireParams"]
) -> "CreditGrant":
"""
Expires a credit grant
Expires a credit grant.
"""
return cast(
"CreditGrant",
Expand All @@ -340,7 +339,7 @@ async def _cls_expire_async(
cls, id: str, **params: Unpack["CreditGrant.ExpireParams"]
) -> "CreditGrant":
"""
Expires a credit grant
Expires a credit grant.
"""
return cast(
"CreditGrant",
Expand All @@ -359,7 +358,7 @@ async def expire_async(
id: str, **params: Unpack["CreditGrant.ExpireParams"]
) -> "CreditGrant":
"""
Expires a credit grant
Expires a credit grant.
"""
...

Expand All @@ -368,7 +367,7 @@ async def expire_async(
self, **params: Unpack["CreditGrant.ExpireParams"]
) -> "CreditGrant":
"""
Expires a credit grant
Expires a credit grant.
"""
...

Expand All @@ -377,7 +376,7 @@ async def expire_async( # pyright: ignore[reportGeneralTypeIssues]
self, **params: Unpack["CreditGrant.ExpireParams"]
) -> "CreditGrant":
"""
Expires a credit grant
Expires a credit grant.
"""
return cast(
"CreditGrant",
Expand All @@ -395,7 +394,7 @@ def list(
cls, **params: Unpack["CreditGrant.ListParams"]
) -> ListObject["CreditGrant"]:
"""
Retrieve a list of credit grants
Retrieve a list of credit grants.
"""
result = cls._static_request(
"get",
Expand All @@ -415,7 +414,7 @@ async def list_async(
cls, **params: Unpack["CreditGrant.ListParams"]
) -> ListObject["CreditGrant"]:
"""
Retrieve a list of credit grants
Retrieve a list of credit grants.
"""
result = await cls._static_request_async(
"get",
Expand Down Expand Up @@ -491,7 +490,7 @@ def _cls_void_grant(
cls, id: str, **params: Unpack["CreditGrant.VoidGrantParams"]
) -> "CreditGrant":
"""
Voids a credit grant
Voids a credit grant.
"""
return cast(
"CreditGrant",
Expand All @@ -510,7 +509,7 @@ def void_grant(
id: str, **params: Unpack["CreditGrant.VoidGrantParams"]
) -> "CreditGrant":
"""
Voids a credit grant
Voids a credit grant.
"""
...

Expand All @@ -519,7 +518,7 @@ def void_grant(
self, **params: Unpack["CreditGrant.VoidGrantParams"]
) -> "CreditGrant":
"""
Voids a credit grant
Voids a credit grant.
"""
...

Expand All @@ -528,7 +527,7 @@ def void_grant( # pyright: ignore[reportGeneralTypeIssues]
self, **params: Unpack["CreditGrant.VoidGrantParams"]
) -> "CreditGrant":
"""
Voids a credit grant
Voids a credit grant.
"""
return cast(
"CreditGrant",
Expand All @@ -546,7 +545,7 @@ async def _cls_void_grant_async(
cls, id: str, **params: Unpack["CreditGrant.VoidGrantParams"]
) -> "CreditGrant":
"""
Voids a credit grant
Voids a credit grant.
"""
return cast(
"CreditGrant",
Expand All @@ -565,7 +564,7 @@ async def void_grant_async(
id: str, **params: Unpack["CreditGrant.VoidGrantParams"]
) -> "CreditGrant":
"""
Voids a credit grant
Voids a credit grant.
"""
...

Expand All @@ -574,7 +573,7 @@ async def void_grant_async(
self, **params: Unpack["CreditGrant.VoidGrantParams"]
) -> "CreditGrant":
"""
Voids a credit grant
Voids a credit grant.
"""
...

Expand All @@ -583,7 +582,7 @@ async def void_grant_async( # pyright: ignore[reportGeneralTypeIssues]
self, **params: Unpack["CreditGrant.VoidGrantParams"]
) -> "CreditGrant":
"""
Voids a credit grant
Voids a credit grant.
"""
return cast(
"CreditGrant",
Expand Down
Loading

0 comments on commit b05b5ac

Please sign in to comment.