From e11f4fb02be8a1ad83785810a9d1ab5add7b4654 Mon Sep 17 00:00:00 2001 From: "stripe-openapi[bot]" <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Thu, 16 May 2024 22:05:00 +0000 Subject: [PATCH] Update generated code (#1328) * Update generated code for v1022 * Update generated code for v1023 * Update generated code for v1025 * Update generated code for v1027 * Update generated code for v1028 * Update generated code for v1029 * Update generated code for v1030 * Update generated code for v1032 * Update generated code for v1033 * Update generated code for v1034 * Update generated code for v1035 * Update generated code for v1036 * Update generated code for v1037 * Update generated code for v1038 * Update generated code for v1039 --------- Co-authored-by: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Co-authored-by: prathmesh-stripe <165320323+prathmesh-stripe@users.noreply.github.com> --- OPENAPI_VERSION | 2 +- stripe/_application_fee.py | 21 ++++++ stripe/_balance.py | 35 ++++++++- stripe/_charge.py | 4 + stripe/_confirmation_token.py | 4 + stripe/_dispute.py | 11 ++- stripe/_invoice.py | 2 +- stripe/_payment_intent.py | 46 ++++++++++++ stripe/_payment_intent_service.py | 36 +++++++++ stripe/_payment_method.py | 4 + stripe/_payout.py | 9 +++ stripe/_price.py | 2 +- stripe/_price_service.py | 2 +- stripe/_product.py | 6 +- stripe/_product_service.py | 4 +- stripe/_token.py | 2 +- stripe/_token_service.py | 2 +- stripe/checkout/_session.py | 4 +- stripe/checkout/_session_service.py | 2 +- stripe/entitlements/_feature.py | 8 ++ stripe/entitlements/_feature_service.py | 8 ++ stripe/financial_connections/_session.py | 2 +- .../financial_connections/_session_service.py | 2 +- stripe/issuing/_dispute.py | 74 +++++++++++++++++++ stripe/issuing/_dispute_service.py | 34 +++++++++ stripe/terminal/_configuration.py | 30 ++++++++ stripe/terminal/_configuration_service.py | 22 ++++++ 27 files changed, 359 insertions(+), 19 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 280e945f8..e0801e4ff 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1020 \ No newline at end of file +v1039 \ No newline at end of file diff --git a/stripe/_application_fee.py b/stripe/_application_fee.py index c6428ac9e..b7051d248 100644 --- a/stripe/_application_fee.py +++ b/stripe/_application_fee.py @@ -5,6 +5,7 @@ from stripe._listable_api_resource import ListableAPIResource from stripe._nested_resource_class_methods import nested_resource_class_methods from stripe._request_options import RequestOptions +from stripe._stripe_object import StripeObject from stripe._util import class_method_variant, sanitize_id from typing import ClassVar, Dict, List, Optional, cast, overload from typing_extensions import ( @@ -27,6 +28,20 @@ class ApplicationFee(ListableAPIResource["ApplicationFee"]): OBJECT_NAME: ClassVar[Literal["application_fee"]] = "application_fee" + class FeeSource(StripeObject): + charge: Optional[str] + """ + Charge ID that created this application fee. + """ + payout: Optional[str] + """ + Payout ID that created this application fee. + """ + type: Literal["charge", "payout"] + """ + Type of object that created the application fee, either `charge` or `payout`. + """ + class CreateRefundParams(RequestOptions): amount: NotRequired[int] """ @@ -171,6 +186,10 @@ class RetrieveRefundParams(RequestOptions): """ 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). """ + fee_source: Optional[FeeSource] + """ + Polymorphic source of the application fee. Includes the ID of the object the application fee was created from. + """ id: str """ Unique identifier for the object. @@ -595,3 +614,5 @@ async def list_refunds_async( params=params, ), ) + + _inner_class_types = {"fee_source": FeeSource} diff --git a/stripe/_balance.py b/stripe/_balance.py index 1cbc6312e..ed80ed6ab 100644 --- a/stripe/_balance.py +++ b/stripe/_balance.py @@ -77,6 +77,32 @@ class SourceTypes(StripeObject): _inner_class_types = {"source_types": SourceTypes} class InstantAvailable(StripeObject): + class NetAvailable(StripeObject): + class SourceTypes(StripeObject): + bank_account: Optional[int] + """ + Amount for bank account. + """ + card: Optional[int] + """ + Amount for card. + """ + fpx: Optional[int] + """ + Amount for FPX. + """ + + amount: int + """ + Net balance amount, subtracting fees from platform-set pricing. + """ + destination: str + """ + ID of the external account for this net balance (not expandable). + """ + source_types: Optional[SourceTypes] + _inner_class_types = {"source_types": SourceTypes} + class SourceTypes(StripeObject): bank_account: Optional[int] """ @@ -99,8 +125,15 @@ class SourceTypes(StripeObject): """ 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). """ + net_available: Optional[List[NetAvailable]] + """ + Breakdown of balance by destination. + """ source_types: Optional[SourceTypes] - _inner_class_types = {"source_types": SourceTypes} + _inner_class_types = { + "net_available": NetAvailable, + "source_types": SourceTypes, + } class Issuing(StripeObject): class Available(StripeObject): diff --git a/stripe/_charge.py b/stripe/_charge.py index 1b4f60f29..63d1385fc 100644 --- a/stripe/_charge.py +++ b/stripe/_charge.py @@ -918,6 +918,10 @@ class Receipt(StripeObject): """ Defines whether the authorized amount can be over-captured or not """ + preferred_locales: Optional[List[str]] + """ + EMV tag 5F2D. Preferred languages specified by the integrated circuit chip. + """ read_method: Optional[ Literal[ "contact_emv", diff --git a/stripe/_confirmation_token.py b/stripe/_confirmation_token.py index 7d2b24833..c8cbd375b 100644 --- a/stripe/_confirmation_token.py +++ b/stripe/_confirmation_token.py @@ -539,6 +539,10 @@ class Networks(StripeObject): """ Contains information about card networks that can be used to process the payment. """ + preferred_locales: Optional[List[str]] + """ + EMV tag 5F2D. Preferred languages specified by the integrated circuit chip. + """ read_method: Optional[ Literal[ "contact_emv", diff --git a/stripe/_dispute.py b/stripe/_dispute.py index 851becaec..092b2986b 100644 --- a/stripe/_dispute.py +++ b/stripe/_dispute.py @@ -175,6 +175,12 @@ class Card(StripeObject): The card network's specific dispute reason code, which maps to one of Stripe's primary dispute categories to simplify response guidance. The [Network code map](https://stripe.com/docs/disputes/categories#network-code-map) lists all available dispute reason codes by network. """ + class Klarna(StripeObject): + reason_code: Optional[str] + """ + The reason for the dispute as defined by Klarna + """ + class Paypal(StripeObject): case_id: Optional[str] """ @@ -186,12 +192,13 @@ class Paypal(StripeObject): """ card: Optional[Card] + klarna: Optional[Klarna] paypal: Optional[Paypal] - type: Literal["card", "paypal"] + type: Literal["card", "klarna", "paypal"] """ Payment method type. """ - _inner_class_types = {"card": Card, "paypal": Paypal} + _inner_class_types = {"card": Card, "klarna": Klarna, "paypal": Paypal} class CloseParams(RequestOptions): expand: NotRequired[List[str]] diff --git a/stripe/_invoice.py b/stripe/_invoice.py index a3b70fe4d..7f450660b 100644 --- a/stripe/_invoice.py +++ b/stripe/_invoice.py @@ -5612,7 +5612,7 @@ class VoidInvoiceParams(RequestOptions): """ attempt_count: int """ - Number of payment attempts made for this invoice, from the perspective of the payment retry schedule. Any payment attempt counts as the first attempt, and subsequently only automatic retries increment the attempt count. In other words, manual payment attempts after the first attempt do not affect the retry schedule. + Number of payment attempts made for this invoice, from the perspective of the payment retry schedule. Any payment attempt counts as the first attempt, and subsequently only automatic retries increment the attempt count. In other words, manual payment attempts after the first attempt do not affect the retry schedule. If a failure is returned with a non-retryable return code, the invoice can no longer be retried unless a new payment method is obtained. Retries will continue to be scheduled, and attempt_count will continue to increment, but retries will only be executed if a new payment method is obtained. """ attempted: bool """ diff --git a/stripe/_payment_intent.py b/stripe/_payment_intent.py index aff76766f..9fea82170 100644 --- a/stripe/_payment_intent.py +++ b/stripe/_payment_intent.py @@ -1278,6 +1278,14 @@ class MandateOptions(StripeObject): } class CardPresent(StripeObject): + class Routing(StripeObject): + requested_priority: Optional[ + Literal["domestic", "international"] + ] + """ + Requested routing priority + """ + request_extended_authorization: Optional[bool] """ Request ability to capture this payment beyond the standard [authorization validity window](https://stripe.com/docs/terminal/features/extended-authorizations#authorization-validity) @@ -1286,6 +1294,8 @@ class CardPresent(StripeObject): """ Request ability to [increment](https://stripe.com/docs/terminal/features/incremental-authorizations) this PaymentIntent if the combination of MCC and card brand is eligible. Check [incremental_authorization_supported](https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-card_present-incremental_authorization_supported) in the [Confirm](https://stripe.com/docs/api/payment_intents/confirm) response to verify support. """ + routing: Optional[Routing] + _inner_class_types = {"routing": Routing} class Cashapp(StripeObject): capture_method: Optional[Literal["manual"]] @@ -3311,6 +3321,18 @@ class ConfirmParamsPaymentMethodOptionsCardPresent(TypedDict): """ Request ability to [increment](https://stripe.com/docs/terminal/features/incremental-authorizations) this PaymentIntent if the combination of MCC and card brand is eligible. Check [incremental_authorization_supported](https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-card_present-incremental_authorization_supported) in the [Confirm](https://stripe.com/docs/api/payment_intents/confirm) response to verify support. """ + routing: NotRequired[ + "PaymentIntent.ConfirmParamsPaymentMethodOptionsCardPresentRouting" + ] + """ + Network routing priority on co-branded EMV cards supporting domestic debit and international card schemes. + """ + + class ConfirmParamsPaymentMethodOptionsCardPresentRouting(TypedDict): + requested_priority: NotRequired[Literal["domestic", "international"]] + """ + Routing requested priority + """ class ConfirmParamsPaymentMethodOptionsCardThreeDSecure(TypedDict): ares_trans_status: NotRequired[ @@ -5500,6 +5522,18 @@ class CreateParamsPaymentMethodOptionsCardPresent(TypedDict): """ Request ability to [increment](https://stripe.com/docs/terminal/features/incremental-authorizations) this PaymentIntent if the combination of MCC and card brand is eligible. Check [incremental_authorization_supported](https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-card_present-incremental_authorization_supported) in the [Confirm](https://stripe.com/docs/api/payment_intents/confirm) response to verify support. """ + routing: NotRequired[ + "PaymentIntent.CreateParamsPaymentMethodOptionsCardPresentRouting" + ] + """ + Network routing priority on co-branded EMV cards supporting domestic debit and international card schemes. + """ + + class CreateParamsPaymentMethodOptionsCardPresentRouting(TypedDict): + requested_priority: NotRequired[Literal["domestic", "international"]] + """ + Routing requested priority + """ class CreateParamsPaymentMethodOptionsCardThreeDSecure(TypedDict): ares_trans_status: NotRequired[ @@ -7683,6 +7717,18 @@ class ModifyParamsPaymentMethodOptionsCardPresent(TypedDict): """ Request ability to [increment](https://stripe.com/docs/terminal/features/incremental-authorizations) this PaymentIntent if the combination of MCC and card brand is eligible. Check [incremental_authorization_supported](https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-card_present-incremental_authorization_supported) in the [Confirm](https://stripe.com/docs/api/payment_intents/confirm) response to verify support. """ + routing: NotRequired[ + "PaymentIntent.ModifyParamsPaymentMethodOptionsCardPresentRouting" + ] + """ + Network routing priority on co-branded EMV cards supporting domestic debit and international card schemes. + """ + + class ModifyParamsPaymentMethodOptionsCardPresentRouting(TypedDict): + requested_priority: NotRequired[Literal["domestic", "international"]] + """ + Routing requested priority + """ class ModifyParamsPaymentMethodOptionsCardThreeDSecure(TypedDict): ares_trans_status: NotRequired[ diff --git a/stripe/_payment_intent_service.py b/stripe/_payment_intent_service.py index 1dee3a221..d2e1c83d4 100644 --- a/stripe/_payment_intent_service.py +++ b/stripe/_payment_intent_service.py @@ -1465,6 +1465,18 @@ class ConfirmParamsPaymentMethodOptionsCardPresent(TypedDict): """ Request ability to [increment](https://stripe.com/docs/terminal/features/incremental-authorizations) this PaymentIntent if the combination of MCC and card brand is eligible. Check [incremental_authorization_supported](https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-card_present-incremental_authorization_supported) in the [Confirm](https://stripe.com/docs/api/payment_intents/confirm) response to verify support. """ + routing: NotRequired[ + "PaymentIntentService.ConfirmParamsPaymentMethodOptionsCardPresentRouting" + ] + """ + Network routing priority on co-branded EMV cards supporting domestic debit and international card schemes. + """ + + class ConfirmParamsPaymentMethodOptionsCardPresentRouting(TypedDict): + requested_priority: NotRequired[Literal["domestic", "international"]] + """ + Routing requested priority + """ class ConfirmParamsPaymentMethodOptionsCardThreeDSecure(TypedDict): ares_trans_status: NotRequired[ @@ -3678,6 +3690,18 @@ class CreateParamsPaymentMethodOptionsCardPresent(TypedDict): """ Request ability to [increment](https://stripe.com/docs/terminal/features/incremental-authorizations) this PaymentIntent if the combination of MCC and card brand is eligible. Check [incremental_authorization_supported](https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-card_present-incremental_authorization_supported) in the [Confirm](https://stripe.com/docs/api/payment_intents/confirm) response to verify support. """ + routing: NotRequired[ + "PaymentIntentService.CreateParamsPaymentMethodOptionsCardPresentRouting" + ] + """ + Network routing priority on co-branded EMV cards supporting domestic debit and international card schemes. + """ + + class CreateParamsPaymentMethodOptionsCardPresentRouting(TypedDict): + requested_priority: NotRequired[Literal["domestic", "international"]] + """ + Routing requested priority + """ class CreateParamsPaymentMethodOptionsCardThreeDSecure(TypedDict): ares_trans_status: NotRequired[ @@ -5913,6 +5937,18 @@ class UpdateParamsPaymentMethodOptionsCardPresent(TypedDict): """ Request ability to [increment](https://stripe.com/docs/terminal/features/incremental-authorizations) this PaymentIntent if the combination of MCC and card brand is eligible. Check [incremental_authorization_supported](https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-card_present-incremental_authorization_supported) in the [Confirm](https://stripe.com/docs/api/payment_intents/confirm) response to verify support. """ + routing: NotRequired[ + "PaymentIntentService.UpdateParamsPaymentMethodOptionsCardPresentRouting" + ] + """ + Network routing priority on co-branded EMV cards supporting domestic debit and international card schemes. + """ + + class UpdateParamsPaymentMethodOptionsCardPresentRouting(TypedDict): + requested_priority: NotRequired[Literal["domestic", "international"]] + """ + Routing requested priority + """ class UpdateParamsPaymentMethodOptionsCardThreeDSecure(TypedDict): ares_trans_status: NotRequired[ diff --git a/stripe/_payment_method.py b/stripe/_payment_method.py index 8070922e7..aa5f8e897 100644 --- a/stripe/_payment_method.py +++ b/stripe/_payment_method.py @@ -515,6 +515,10 @@ class Networks(StripeObject): """ Contains information about card networks that can be used to process the payment. """ + preferred_locales: Optional[List[str]] + """ + EMV tag 5F2D. Preferred languages specified by the integrated circuit chip. + """ read_method: Optional[ Literal[ "contact_emv", diff --git a/stripe/_payout.py b/stripe/_payout.py index 7e1d627c2..62fbe67ee 100644 --- a/stripe/_payout.py +++ b/stripe/_payout.py @@ -17,6 +17,7 @@ ) if TYPE_CHECKING: + from stripe._application_fee import ApplicationFee from stripe._balance_transaction import BalanceTransaction from stripe._bank_account import BankAccount from stripe._card import Card @@ -184,6 +185,14 @@ class ReverseParams(RequestOptions): """ The amount (in cents (or local equivalent)) that transfers to your bank account or debit card. """ + application_fee: Optional[ExpandableField["ApplicationFee"]] + """ + The application fee (if any) for the payout. [See the Connect documentation](https://stripe.com/docs/connect/instant-payouts#monetization-and-fees) for details. + """ + application_fee_amount: Optional[int] + """ + The amount of the application fee (if any) requested for the payout. [See the Connect documentation](https://stripe.com/docs/connect/instant-payouts#monetization-and-fees) for details. + """ arrival_date: int """ Date that you can expect the payout to arrive in the bank. This factors in delays to account for weekends or bank holidays. diff --git a/stripe/_price.py b/stripe/_price.py index 9397e6c80..3b2811826 100644 --- a/stripe/_price.py +++ b/stripe/_price.py @@ -472,7 +472,7 @@ class ListParams(RequestOptions): """ lookup_keys: NotRequired[List[str]] """ - Only return the price with these lookup_keys, if any exist. + Only return the price with these lookup_keys, if any exist. You can specify up to 10 lookup_keys. """ product: NotRequired[str] """ diff --git a/stripe/_price_service.py b/stripe/_price_service.py index f43af4019..bf2388309 100644 --- a/stripe/_price_service.py +++ b/stripe/_price_service.py @@ -302,7 +302,7 @@ class ListParams(TypedDict): """ lookup_keys: NotRequired[List[str]] """ - Only return the price with these lookup_keys, if any exist. + Only return the price with these lookup_keys, if any exist. You can specify up to 10 lookup_keys. """ product: NotRequired[str] """ diff --git a/stripe/_product.py b/stripe/_product.py index b660d5146..ea3cda794 100644 --- a/stripe/_product.py +++ b/stripe/_product.py @@ -146,7 +146,7 @@ class CreateParams(RequestOptions): An arbitrary string to be displayed on your customer's credit card or bank statement. While most banks display this information consistently, some may display it incorrectly or not at all. This may be up to 22 characters. The statement description may not include `<`, `>`, `\\`, `"`, `'` characters, and will appear on your customer's statement in capital letters. Non-ASCII characters are automatically stripped. - It must contain at least one letter. + It must contain at least one letter. Only used for subscription payments. """ tax_code: NotRequired[str] """ @@ -433,7 +433,7 @@ class ModifyParams(RequestOptions): An arbitrary string to be displayed on your customer's credit card or bank statement. While most banks display this information consistently, some may display it incorrectly or not at all. This may be up to 22 characters. The statement description may not include `<`, `>`, `\\`, `"`, `'` characters, and will appear on your customer's statement in capital letters. Non-ASCII characters are automatically stripped. - It must contain at least one letter. May only be set if `type=service`. + It must contain at least one letter. May only be set if `type=service`. Only used for subscription payments. """ tax_code: NotRequired["Literal['']|str"] """ @@ -556,7 +556,7 @@ class SearchParams(RequestOptions): """ statement_descriptor: Optional[str] """ - Extra information about a product which will appear on your customer's credit card statement. In the case that multiple products are billed at once, the first statement descriptor will be used. + Extra information about a product which will appear on your customer's credit card statement. In the case that multiple products are billed at once, the first statement descriptor will be used. Only used for subscription payments. """ tax_code: Optional[ExpandableField["TaxCode"]] """ diff --git a/stripe/_product_service.py b/stripe/_product_service.py index 90b17ca4a..cde4ad8a0 100644 --- a/stripe/_product_service.py +++ b/stripe/_product_service.py @@ -72,7 +72,7 @@ class CreateParams(TypedDict): An arbitrary string to be displayed on your customer's credit card or bank statement. While most banks display this information consistently, some may display it incorrectly or not at all. This may be up to 22 characters. The statement description may not include `<`, `>`, `\\`, `"`, `'` characters, and will appear on your customer's statement in capital letters. Non-ASCII characters are automatically stripped. - It must contain at least one letter. + It must contain at least one letter. Only used for subscription payments. """ tax_code: NotRequired[str] """ @@ -369,7 +369,7 @@ class UpdateParams(TypedDict): An arbitrary string to be displayed on your customer's credit card or bank statement. While most banks display this information consistently, some may display it incorrectly or not at all. This may be up to 22 characters. The statement description may not include `<`, `>`, `\\`, `"`, `'` characters, and will appear on your customer's statement in capital letters. Non-ASCII characters are automatically stripped. - It must contain at least one letter. May only be set if `type=service`. + It must contain at least one letter. May only be set if `type=service`. Only used for subscription payments. """ tax_code: NotRequired["Literal['']|str"] """ diff --git a/stripe/_token.py b/stripe/_token.py index 3b1dd5358..36ae4308a 100644 --- a/stripe/_token.py +++ b/stripe/_token.py @@ -627,7 +627,7 @@ class CreateParamsBankAccount(TypedDict): """ routing_number: NotRequired[str] """ - The routing number, sort code, or other country-appropriateinstitution number for the bank account. For US bank accounts, this is required and should bethe ACH routing number, not the wire routing number. If you are providing an IBAN for`account_number`, this field is not required. + The routing number, sort code, or other country-appropriate institution number for the bank account. For US bank accounts, this is required and should be the ACH routing number, not the wire routing number. If you are providing an IBAN for `account_number`, this field is not required. """ class CreateParamsCard(TypedDict): diff --git a/stripe/_token_service.py b/stripe/_token_service.py index dae80cd3f..841017566 100644 --- a/stripe/_token_service.py +++ b/stripe/_token_service.py @@ -598,7 +598,7 @@ class CreateParamsBankAccount(TypedDict): """ routing_number: NotRequired[str] """ - The routing number, sort code, or other country-appropriateinstitution number for the bank account. For US bank accounts, this is required and should bethe ACH routing number, not the wire routing number. If you are providing an IBAN for`account_number`, this field is not required. + The routing number, sort code, or other country-appropriate institution number for the bank account. For US bank accounts, this is required and should be the ACH routing number, not the wire routing number. If you are providing an IBAN for `account_number`, this field is not required. """ class CreateParamsCard(TypedDict): diff --git a/stripe/checkout/_session.py b/stripe/checkout/_session.py index 983b1d8ba..8d504d963 100644 --- a/stripe/checkout/_session.py +++ b/stripe/checkout/_session.py @@ -1062,7 +1062,7 @@ class SavedPaymentMethodOptions(StripeObject): List[Literal["always", "limited", "unspecified"]] ] """ - Controls which payment methods are eligible to be redisplayed to returning customers. Corresponds to `allow_redisplay` on the payment method. + Uses the `allow_redisplay` value of each saved payment method to filter the set presented to a returning customer. By default, only saved payment methods with 'allow_redisplay: ‘always' are shown in Checkout. """ payment_method_save: Optional[Literal["disabled", "enabled"]] """ @@ -3097,7 +3097,7 @@ class CreateParamsSavedPaymentMethodOptions(TypedDict): List[Literal["always", "limited", "unspecified"]] ] """ - Controls which payment methods are eligible to be redisplayed to returning customers. Corresponds to `allow_redisplay` on the payment method. + Uses the `allow_redisplay` value of each saved payment method to filter the set presented to a returning customer. By default, only saved payment methods with 'allow_redisplay: ‘always' are shown in Checkout. """ payment_method_save: NotRequired[Literal["disabled", "enabled"]] """ diff --git a/stripe/checkout/_session_service.py b/stripe/checkout/_session_service.py index 05cff7d09..defe9f25a 100644 --- a/stripe/checkout/_session_service.py +++ b/stripe/checkout/_session_service.py @@ -1649,7 +1649,7 @@ class CreateParamsSavedPaymentMethodOptions(TypedDict): List[Literal["always", "limited", "unspecified"]] ] """ - Controls which payment methods are eligible to be redisplayed to returning customers. Corresponds to `allow_redisplay` on the payment method. + Uses the `allow_redisplay` value of each saved payment method to filter the set presented to a returning customer. By default, only saved payment methods with 'allow_redisplay: ‘always' are shown in Checkout. """ payment_method_save: NotRequired[Literal["disabled", "enabled"]] """ diff --git a/stripe/entitlements/_feature.py b/stripe/entitlements/_feature.py index 99162f70a..85bca6f8f 100644 --- a/stripe/entitlements/_feature.py +++ b/stripe/entitlements/_feature.py @@ -43,6 +43,10 @@ class CreateParams(RequestOptions): """ class ListParams(RequestOptions): + archived: NotRequired[bool] + """ + If set, filter results to only include features with the given archive status. + """ ending_before: NotRequired[str] """ A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. @@ -55,6 +59,10 @@ class ListParams(RequestOptions): """ A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. """ + lookup_key: NotRequired[str] + """ + If set, filter results to only include features with the given lookup_key. + """ starting_after: NotRequired[str] """ A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. diff --git a/stripe/entitlements/_feature_service.py b/stripe/entitlements/_feature_service.py index d9b480b8b..dea34b0f2 100644 --- a/stripe/entitlements/_feature_service.py +++ b/stripe/entitlements/_feature_service.py @@ -29,6 +29,10 @@ class CreateParams(TypedDict): """ class ListParams(TypedDict): + archived: NotRequired[bool] + """ + If set, filter results to only include features with the given archive status. + """ ending_before: NotRequired[str] """ A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. @@ -41,6 +45,10 @@ class ListParams(TypedDict): """ A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. """ + lookup_key: NotRequired[str] + """ + If set, filter results to only include features with the given lookup_key. + """ starting_after: NotRequired[str] """ A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. diff --git a/stripe/financial_connections/_session.py b/stripe/financial_connections/_session.py index 0b9cff990..8dc534188 100644 --- a/stripe/financial_connections/_session.py +++ b/stripe/financial_connections/_session.py @@ -98,7 +98,7 @@ class CreateParamsAccountHolder(TypedDict): """ class CreateParamsFilters(TypedDict): - countries: List[str] + countries: NotRequired[List[str]] """ List of countries from which to collect accounts. """ diff --git a/stripe/financial_connections/_session_service.py b/stripe/financial_connections/_session_service.py index d15529e5e..69a70c80d 100644 --- a/stripe/financial_connections/_session_service.py +++ b/stripe/financial_connections/_session_service.py @@ -56,7 +56,7 @@ class CreateParamsAccountHolder(TypedDict): """ class CreateParamsFilters(TypedDict): - countries: List[str] + countries: NotRequired[List[str]] """ List of countries from which to collect accounts. """ diff --git a/stripe/issuing/_dispute.py b/stripe/issuing/_dispute.py index 9102bcf07..c6bcb13d1 100644 --- a/stripe/issuing/_dispute.py +++ b/stripe/issuing/_dispute.py @@ -141,6 +141,16 @@ class MerchandiseNotAsDescribed(StripeObject): Date when the product was returned or attempted to be returned. """ + class NoValidAuthorization(StripeObject): + additional_documentation: Optional[ExpandableField["File"]] + """ + (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. + """ + explanation: Optional[str] + """ + Explanation of why the cardholder is disputing this transaction. + """ + class NotReceived(StripeObject): additional_documentation: Optional[ExpandableField["File"]] """ @@ -207,6 +217,7 @@ class ServiceNotAsDescribed(StripeObject): duplicate: Optional[Duplicate] fraudulent: Optional[Fraudulent] merchandise_not_as_described: Optional[MerchandiseNotAsDescribed] + no_valid_authorization: Optional[NoValidAuthorization] not_received: Optional[NotReceived] other: Optional[Other] reason: Literal[ @@ -214,6 +225,7 @@ class ServiceNotAsDescribed(StripeObject): "duplicate", "fraudulent", "merchandise_not_as_described", + "no_valid_authorization", "not_received", "other", "service_not_as_described", @@ -227,6 +239,7 @@ class ServiceNotAsDescribed(StripeObject): "duplicate": Duplicate, "fraudulent": Fraudulent, "merchandise_not_as_described": MerchandiseNotAsDescribed, + "no_valid_authorization": NoValidAuthorization, "not_received": NotReceived, "other": Other, "service_not_as_described": ServiceNotAsDescribed, @@ -293,6 +306,12 @@ class CreateParamsEvidence(TypedDict): """ Evidence provided when `reason` is 'merchandise_not_as_described'. """ + no_valid_authorization: NotRequired[ + "Literal['']|Dispute.CreateParamsEvidenceNoValidAuthorization" + ] + """ + Evidence provided when `reason` is 'no_valid_authorization'. + """ not_received: NotRequired[ "Literal['']|Dispute.CreateParamsEvidenceNotReceived" ] @@ -309,6 +328,7 @@ class CreateParamsEvidence(TypedDict): "duplicate", "fraudulent", "merchandise_not_as_described", + "no_valid_authorization", "not_received", "other", "service_not_as_described", @@ -434,6 +454,16 @@ class CreateParamsEvidenceMerchandiseNotAsDescribed(TypedDict): Date when the product was returned or attempted to be returned. """ + class CreateParamsEvidenceNoValidAuthorization(TypedDict): + additional_documentation: NotRequired["Literal['']|str"] + """ + (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. + """ + explanation: NotRequired["Literal['']|str"] + """ + Explanation of why the cardholder is disputing this transaction. + """ + class CreateParamsEvidenceNotReceived(TypedDict): additional_documentation: NotRequired["Literal['']|str"] """ @@ -599,6 +629,12 @@ class ModifyParamsEvidence(TypedDict): """ Evidence provided when `reason` is 'merchandise_not_as_described'. """ + no_valid_authorization: NotRequired[ + "Literal['']|Dispute.ModifyParamsEvidenceNoValidAuthorization" + ] + """ + Evidence provided when `reason` is 'no_valid_authorization'. + """ not_received: NotRequired[ "Literal['']|Dispute.ModifyParamsEvidenceNotReceived" ] @@ -615,6 +651,7 @@ class ModifyParamsEvidence(TypedDict): "duplicate", "fraudulent", "merchandise_not_as_described", + "no_valid_authorization", "not_received", "other", "service_not_as_described", @@ -740,6 +777,16 @@ class ModifyParamsEvidenceMerchandiseNotAsDescribed(TypedDict): Date when the product was returned or attempted to be returned. """ + class ModifyParamsEvidenceNoValidAuthorization(TypedDict): + additional_documentation: NotRequired["Literal['']|str"] + """ + (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. + """ + explanation: NotRequired["Literal['']|str"] + """ + Explanation of why the cardholder is disputing this transaction. + """ + class ModifyParamsEvidenceNotReceived(TypedDict): additional_documentation: NotRequired["Literal['']|str"] """ @@ -847,6 +894,33 @@ class SubmitParams(RequestOptions): """ Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. """ + loss_reason: Optional[ + Literal[ + "cardholder_authentication_issuer_liability", + "eci5_token_transaction_with_tavv", + "excess_disputes_in_timeframe", + "has_not_met_the_minimum_dispute_amount_requirements", + "invalid_duplicate_dispute", + "invalid_incorrect_amount_dispute", + "invalid_no_authorization", + "invalid_use_of_disputes", + "merchandise_delivered_or_shipped", + "merchandise_or_service_as_described", + "not_cancelled", + "other", + "refund_issued", + "submitted_beyond_allowable_time_limit", + "transaction_3ds_required", + "transaction_approved_after_prior_fraud_dispute", + "transaction_authorized", + "transaction_electronically_read", + "transaction_qualifies_for_visa_easy_payment_service", + "transaction_unattended", + ] + ] + """ + The enum that describes the dispute loss outcome. If the dispute is not lost, this field will be absent. New enum values may be added in the future, so be sure to handle unknown values. + """ metadata: Dict[str, str] """ 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. diff --git a/stripe/issuing/_dispute_service.py b/stripe/issuing/_dispute_service.py index 4b567e3ce..66492a871 100644 --- a/stripe/issuing/_dispute_service.py +++ b/stripe/issuing/_dispute_service.py @@ -61,6 +61,12 @@ class CreateParamsEvidence(TypedDict): """ Evidence provided when `reason` is 'merchandise_not_as_described'. """ + no_valid_authorization: NotRequired[ + "Literal['']|DisputeService.CreateParamsEvidenceNoValidAuthorization" + ] + """ + Evidence provided when `reason` is 'no_valid_authorization'. + """ not_received: NotRequired[ "Literal['']|DisputeService.CreateParamsEvidenceNotReceived" ] @@ -79,6 +85,7 @@ class CreateParamsEvidence(TypedDict): "duplicate", "fraudulent", "merchandise_not_as_described", + "no_valid_authorization", "not_received", "other", "service_not_as_described", @@ -204,6 +211,16 @@ class CreateParamsEvidenceMerchandiseNotAsDescribed(TypedDict): Date when the product was returned or attempted to be returned. """ + class CreateParamsEvidenceNoValidAuthorization(TypedDict): + additional_documentation: NotRequired["Literal['']|str"] + """ + (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. + """ + explanation: NotRequired["Literal['']|str"] + """ + Explanation of why the cardholder is disputing this transaction. + """ + class CreateParamsEvidenceNotReceived(TypedDict): additional_documentation: NotRequired["Literal['']|str"] """ @@ -385,6 +402,12 @@ class UpdateParamsEvidence(TypedDict): """ Evidence provided when `reason` is 'merchandise_not_as_described'. """ + no_valid_authorization: NotRequired[ + "Literal['']|DisputeService.UpdateParamsEvidenceNoValidAuthorization" + ] + """ + Evidence provided when `reason` is 'no_valid_authorization'. + """ not_received: NotRequired[ "Literal['']|DisputeService.UpdateParamsEvidenceNotReceived" ] @@ -403,6 +426,7 @@ class UpdateParamsEvidence(TypedDict): "duplicate", "fraudulent", "merchandise_not_as_described", + "no_valid_authorization", "not_received", "other", "service_not_as_described", @@ -528,6 +552,16 @@ class UpdateParamsEvidenceMerchandiseNotAsDescribed(TypedDict): Date when the product was returned or attempted to be returned. """ + class UpdateParamsEvidenceNoValidAuthorization(TypedDict): + additional_documentation: NotRequired["Literal['']|str"] + """ + (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. + """ + explanation: NotRequired["Literal['']|str"] + """ + Explanation of why the cardholder is disputing this transaction. + """ + class UpdateParamsEvidenceNotReceived(TypedDict): additional_documentation: NotRequired["Literal['']|str"] """ diff --git a/stripe/terminal/_configuration.py b/stripe/terminal/_configuration.py index 14a7e1e7f..a9f1351c9 100644 --- a/stripe/terminal/_configuration.py +++ b/stripe/terminal/_configuration.py @@ -48,6 +48,12 @@ class Offline(StripeObject): Determines whether to allow transactions to be collected while reader is offline. Defaults to false. """ + class StripeS700(StripeObject): + splashscreen: Optional[ExpandableField["File"]] + """ + A File ID representing an image you would like displayed on the reader. + """ + class Tipping(StripeObject): class Aud(StripeObject): fixed_amounts: Optional[List[int]] @@ -299,6 +305,10 @@ class CreateParams(RequestOptions): """ Configurations for collecting transactions offline. """ + stripe_s700: NotRequired["Configuration.CreateParamsStripeS700"] + """ + An object containing device type specific settings for Stripe S700 readers + """ tipping: NotRequired["Literal['']|Configuration.CreateParamsTipping"] """ Tipping configurations for readers supporting on-reader tips @@ -320,6 +330,12 @@ class CreateParamsOffline(TypedDict): Determines whether to allow transactions to be collected while reader is offline. Defaults to false. """ + class CreateParamsStripeS700(TypedDict): + splashscreen: NotRequired["Literal['']|str"] + """ + A File ID representing an image you would like displayed on the reader. + """ + class CreateParamsTipping(TypedDict): aud: NotRequired["Configuration.CreateParamsTippingAud"] """ @@ -624,6 +640,12 @@ class ModifyParams(RequestOptions): """ Configurations for collecting transactions offline. """ + stripe_s700: NotRequired[ + "Literal['']|Configuration.ModifyParamsStripeS700" + ] + """ + An object containing device type specific settings for Stripe S700 readers + """ tipping: NotRequired["Literal['']|Configuration.ModifyParamsTipping"] """ Tipping configurations for readers supporting on-reader tips @@ -647,6 +669,12 @@ class ModifyParamsOffline(TypedDict): Determines whether to allow transactions to be collected while reader is offline. Defaults to false. """ + class ModifyParamsStripeS700(TypedDict): + splashscreen: NotRequired["Literal['']|str"] + """ + A File ID representing an image you would like displayed on the reader. + """ + class ModifyParamsTipping(TypedDict): aud: NotRequired["Configuration.ModifyParamsTippingAud"] """ @@ -935,6 +963,7 @@ class RetrieveParams(RequestOptions): String representing the object's type. Objects of the same type share the same value. """ offline: Optional[Offline] + stripe_s700: Optional[StripeS700] tipping: Optional[Tipping] verifone_p400: Optional[VerifoneP400] deleted: Optional[Literal[True]] @@ -1171,6 +1200,7 @@ async def retrieve_async( _inner_class_types = { "bbpos_wisepos_e": BbposWiseposE, "offline": Offline, + "stripe_s700": StripeS700, "tipping": Tipping, "verifone_p400": VerifoneP400, } diff --git a/stripe/terminal/_configuration_service.py b/stripe/terminal/_configuration_service.py index 76740d703..7a87a5fc2 100644 --- a/stripe/terminal/_configuration_service.py +++ b/stripe/terminal/_configuration_service.py @@ -31,6 +31,10 @@ class CreateParams(TypedDict): """ Configurations for collecting transactions offline. """ + stripe_s700: NotRequired["ConfigurationService.CreateParamsStripeS700"] + """ + An object containing device type specific settings for Stripe S700 readers + """ tipping: NotRequired[ "Literal['']|ConfigurationService.CreateParamsTipping" ] @@ -56,6 +60,12 @@ class CreateParamsOffline(TypedDict): Determines whether to allow transactions to be collected while reader is offline. Defaults to false. """ + class CreateParamsStripeS700(TypedDict): + splashscreen: NotRequired["Literal['']|str"] + """ + A File ID representing an image you would like displayed on the reader. + """ + class CreateParamsTipping(TypedDict): aud: NotRequired["ConfigurationService.CreateParamsTippingAud"] """ @@ -368,6 +378,12 @@ class UpdateParams(TypedDict): """ Configurations for collecting transactions offline. """ + stripe_s700: NotRequired[ + "Literal['']|ConfigurationService.UpdateParamsStripeS700" + ] + """ + An object containing device type specific settings for Stripe S700 readers + """ tipping: NotRequired[ "Literal['']|ConfigurationService.UpdateParamsTipping" ] @@ -393,6 +409,12 @@ class UpdateParamsOffline(TypedDict): Determines whether to allow transactions to be collected while reader is offline. Defaults to false. """ + class UpdateParamsStripeS700(TypedDict): + splashscreen: NotRequired["Literal['']|str"] + """ + A File ID representing an image you would like displayed on the reader. + """ + class UpdateParamsTipping(TypedDict): aud: NotRequired["ConfigurationService.UpdateParamsTippingAud"] """