From aa5287f720a76ecf43450f15f61d0580f6b58b16 Mon Sep 17 00:00:00 2001 From: "stripe-openapi[bot]" <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Thu, 25 Jul 2024 13:34:35 -0700 Subject: [PATCH] Update generated code (#1364) * Update generated code for v1137 * Update generated code for v1138 * Update generated code for v1140 * Update generated code for v1141 * Update generated code for v1142 * Update generated code for v1144 * Update generated code for v1145 * Update generated code for v1146 * Update generated code for v1147 * Update generated code for v1149 * Update generated code for v1153 * Update generated code for v1154 --------- Co-authored-by: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> --- OPENAPI_VERSION | 2 +- stripe/_account.py | 32 +++++----- stripe/_account_service.py | 52 ++++++++-------- stripe/_charge.py | 32 +++++++++- stripe/_confirmation_token.py | 15 +++++ stripe/_dispute.py | 4 ++ stripe/_event.py | 2 + stripe/_payment_intent.py | 2 +- stripe/_payment_method.py | 15 +++++ stripe/_payment_method_configuration.py | 60 +++++++++++++++++++ .../_payment_method_configuration_service.py | 40 +++++++++++++ stripe/_refund.py | 4 +- stripe/_refund_service.py | 4 +- stripe/_token.py | 14 ++--- stripe/_token_service.py | 14 ++--- stripe/_webhook_endpoint.py | 4 ++ stripe/_webhook_endpoint_service.py | 4 ++ stripe/checkout/_session.py | 49 ++++++++++++++- stripe/checkout/_session_service.py | 56 +++++++++++++++++ stripe/tax/_calculation.py | 6 +- stripe/tax/_calculation_service.py | 4 +- 21 files changed, 343 insertions(+), 72 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 6e73fe685..793cc6975 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1135 \ No newline at end of file +v1154 \ No newline at end of file diff --git a/stripe/_account.py b/stripe/_account.py index 69b146b5f..0936cf435 100644 --- a/stripe/_account.py +++ b/stripe/_account.py @@ -61,7 +61,7 @@ class BusinessProfile(StripeObject): class AnnualRevenue(StripeObject): amount: Optional[int] """ - A non-negative integer representing the amount in the [smallest currency unit](https://docs.stripe.com/currencies#zero-decimal). + A non-negative integer representing the amount in the [smallest currency unit](https://stripe.com/currencies#zero-decimal). """ currency: Optional[str] """ @@ -75,7 +75,7 @@ class AnnualRevenue(StripeObject): class MonthlyEstimatedRevenue(StripeObject): amount: int """ - A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#zero-decimal). + A non-negative integer representing how much to charge in the [smallest currency unit](https://stripe.com/currencies#zero-decimal). """ currency: str """ @@ -118,7 +118,7 @@ class SupportAddress(StripeObject): """ mcc: Optional[str] """ - [The merchant category code for the account](https://stripe.com/docs/connect/setting-mcc). MCCs are used to classify businesses based on the goods or services they provide. + [The merchant category code for the account](https://stripe.com/connect/setting-mcc). MCCs are used to classify businesses based on the goods or services they provide. """ monthly_estimated_revenue: Optional[MonthlyEstimatedRevenue] name: Optional[str] @@ -1351,7 +1351,7 @@ class CreateParamsBusinessProfile(TypedDict): """ mcc: NotRequired[str] """ - [The merchant category code for the account](https://docs.stripe.com/connect/setting-mcc). MCCs are used to classify businesses based on the goods or services they provide. + [The merchant category code for the account](https://stripe.com/connect/setting-mcc). MCCs are used to classify businesses based on the goods or services they provide. """ monthly_estimated_revenue: NotRequired[ "Account.CreateParamsBusinessProfileMonthlyEstimatedRevenue" @@ -1393,7 +1393,7 @@ class CreateParamsBusinessProfile(TypedDict): class CreateParamsBusinessProfileAnnualRevenue(TypedDict): amount: int """ - A non-negative integer representing the amount in the [smallest currency unit](https://docs.stripe.com/currencies#zero-decimal). + A non-negative integer representing the amount in the [smallest currency unit](https://stripe.com/currencies#zero-decimal). """ currency: str """ @@ -1407,7 +1407,7 @@ class CreateParamsBusinessProfileAnnualRevenue(TypedDict): class CreateParamsBusinessProfileMonthlyEstimatedRevenue(TypedDict): amount: int """ - A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#zero-decimal). + A non-negative integer representing how much to charge in the [smallest currency unit](https://stripe.com/currencies#zero-decimal). """ currency: str """ @@ -2042,11 +2042,11 @@ class CreateParamsCompany(TypedDict): """ directors_provided: NotRequired[bool] """ - Whether the company's directors have been provided. Set this Boolean to `true` after creating all the company's directors with [the Persons API](https://docs.stripe.com/api/persons) for accounts with a `relationship.director` requirement. This value is not automatically set to `true` after creating directors, so it needs to be updated to indicate all directors have been provided. + Whether the company's directors have been provided. Set this Boolean to `true` after creating all the company's directors with [the Persons API](https://stripe.com/api/persons) for accounts with a `relationship.director` requirement. This value is not automatically set to `true` after creating directors, so it needs to be updated to indicate all directors have been provided. """ executives_provided: NotRequired[bool] """ - Whether the company's executives have been provided. Set this Boolean to `true` after creating all the company's executives with [the Persons API](https://docs.stripe.com/api/persons) for accounts with a `relationship.executive` requirement. + Whether the company's executives have been provided. Set this Boolean to `true` after creating all the company's executives with [the Persons API](https://stripe.com/api/persons) for accounts with a `relationship.executive` requirement. """ export_license_id: NotRequired[str] """ @@ -2070,7 +2070,7 @@ class CreateParamsCompany(TypedDict): """ owners_provided: NotRequired[bool] """ - Whether the company's owners have been provided. Set this Boolean to `true` after creating all the company's owners with [the Persons API](https://docs.stripe.com/api/persons) for accounts with a `relationship.owner` requirement. + Whether the company's owners have been provided. Set this Boolean to `true` after creating all the company's owners with [the Persons API](https://stripe.com/api/persons) for accounts with a `relationship.owner` requirement. """ ownership_declaration: NotRequired[ "Account.CreateParamsCompanyOwnershipDeclaration" @@ -2090,7 +2090,7 @@ class CreateParamsCompany(TypedDict): "Literal['']|Literal['free_zone_establishment', 'free_zone_llc', 'government_instrumentality', 'governmental_unit', 'incorporated_non_profit', 'incorporated_partnership', 'limited_liability_partnership', 'llc', 'multi_member_llc', 'private_company', 'private_corporation', 'private_partnership', 'public_company', 'public_corporation', 'public_partnership', 'registered_charity', 'single_member_llc', 'sole_establishment', 'sole_proprietorship', 'tax_exempt_government_instrumentality', 'unincorporated_association', 'unincorporated_non_profit', 'unincorporated_partnership']" ] """ - The category identifying the legal structure of the company or legal entity. See [Business structure](https://docs.stripe.com/connect/identity-verification#business-structure) for more details. Pass an empty string to unset this value. + The category identifying the legal structure of the company or legal entity. See [Business structure](https://stripe.com/connect/identity-verification#business-structure) for more details. Pass an empty string to unset this value. """ tax_id: NotRequired[str] """ @@ -2396,11 +2396,11 @@ class CreateParamsIndividual(TypedDict): """ id_number: NotRequired[str] """ - The government-issued ID number of the individual, as appropriate for the representative's country. (Examples are a Social Security Number in the U.S., or a Social Insurance Number in Canada). Instead of the number itself, you can also provide a [PII token created with Stripe.js](https://docs.stripe.com/js/tokens/create_token?type=pii). + The government-issued ID number of the individual, as appropriate for the representative's country. (Examples are a Social Security Number in the U.S., or a Social Insurance Number in Canada). Instead of the number itself, you can also provide a [PII token created with Stripe.js](https://stripe.com/js/tokens/create_token?type=pii). """ id_number_secondary: NotRequired[str] """ - The government-issued secondary ID number of the individual, as appropriate for the representative's country, will be used for enhanced verification checks. In Thailand, this would be the laser code found on the back of an ID card. Instead of the number itself, you can also provide a [PII token created with Stripe.js](https://docs.stripe.com/js/tokens/create_token?type=pii). + The government-issued secondary ID number of the individual, as appropriate for the representative's country, will be used for enhanced verification checks. In Thailand, this would be the laser code found on the back of an ID card. Instead of the number itself, you can also provide a [PII token created with Stripe.js](https://stripe.com/js/tokens/create_token?type=pii). """ last_name: NotRequired[str] """ @@ -2692,7 +2692,7 @@ class CreateParamsSettingsCardIssuing(TypedDict): "Account.CreateParamsSettingsCardIssuingTosAcceptance" ] """ - Details on the account's acceptance of the [Stripe Issuing Terms and Disclosures](https://docs.stripe.com/issuing/connect/tos_acceptance). + Details on the account's acceptance of the [Stripe Issuing Terms and Disclosures](https://stripe.com/issuing/connect/tos_acceptance). """ class CreateParamsSettingsCardIssuingTosAcceptance(TypedDict): @@ -2756,11 +2756,11 @@ class CreateParamsSettingsPayments(TypedDict): class CreateParamsSettingsPayouts(TypedDict): debit_negative_balances: NotRequired[bool] """ - A Boolean indicating whether Stripe should try to reclaim negative balances from an attached bank account. For details, see [Understanding Connect Account Balances](https://docs.stripe.com/connect/account-balances). + A Boolean indicating whether Stripe should try to reclaim negative balances from an attached bank account. For details, see [Understanding Connect Account Balances](https://stripe.com/connect/account-balances). """ schedule: NotRequired["Account.CreateParamsSettingsPayoutsSchedule"] """ - Details on when funds from charges are available, and when they are paid out to an external account. For details, see our [Setting Bank and Debit Card Payouts](https://docs.stripe.com/connect/bank-transfers#payout-information) documentation. + Details on when funds from charges are available, and when they are paid out to an external account. For details, see our [Setting Bank and Debit Card Payouts](https://stripe.com/connect/bank-transfers#payout-information) documentation. """ statement_descriptor: NotRequired[str] """ @@ -2770,7 +2770,7 @@ class CreateParamsSettingsPayouts(TypedDict): class CreateParamsSettingsPayoutsSchedule(TypedDict): delay_days: NotRequired["Literal['minimum']|int"] """ - The number of days charge funds are held before being paid out. May also be set to `minimum`, representing the lowest available value for the account country. Default is `minimum`. The `delay_days` parameter remains at the last configured value if `interval` is `manual`. [Learn more about controlling payout delay days](https://docs.stripe.com/connect/manage-payout-schedule). + The number of days charge funds are held before being paid out. May also be set to `minimum`, representing the lowest available value for the account country. Default is `minimum`. The `delay_days` parameter remains at the last configured value if `interval` is `manual`. [Learn more about controlling payout delay days](https://stripe.com/connect/manage-payout-schedule). """ interval: NotRequired[Literal["daily", "manual", "monthly", "weekly"]] """ diff --git a/stripe/_account_service.py b/stripe/_account_service.py index 9a1924794..bc4171d37 100644 --- a/stripe/_account_service.py +++ b/stripe/_account_service.py @@ -148,7 +148,7 @@ class CreateParamsBusinessProfile(TypedDict): """ mcc: NotRequired[str] """ - [The merchant category code for the account](https://docs.stripe.com/connect/setting-mcc). MCCs are used to classify businesses based on the goods or services they provide. + [The merchant category code for the account](https://stripe.com/connect/setting-mcc). MCCs are used to classify businesses based on the goods or services they provide. """ monthly_estimated_revenue: NotRequired[ "AccountService.CreateParamsBusinessProfileMonthlyEstimatedRevenue" @@ -190,7 +190,7 @@ class CreateParamsBusinessProfile(TypedDict): class CreateParamsBusinessProfileAnnualRevenue(TypedDict): amount: int """ - A non-negative integer representing the amount in the [smallest currency unit](https://docs.stripe.com/currencies#zero-decimal). + A non-negative integer representing the amount in the [smallest currency unit](https://stripe.com/currencies#zero-decimal). """ currency: str """ @@ -204,7 +204,7 @@ class CreateParamsBusinessProfileAnnualRevenue(TypedDict): class CreateParamsBusinessProfileMonthlyEstimatedRevenue(TypedDict): amount: int """ - A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#zero-decimal). + A non-negative integer representing how much to charge in the [smallest currency unit](https://stripe.com/currencies#zero-decimal). """ currency: str """ @@ -847,11 +847,11 @@ class CreateParamsCompany(TypedDict): """ directors_provided: NotRequired[bool] """ - Whether the company's directors have been provided. Set this Boolean to `true` after creating all the company's directors with [the Persons API](https://docs.stripe.com/api/persons) for accounts with a `relationship.director` requirement. This value is not automatically set to `true` after creating directors, so it needs to be updated to indicate all directors have been provided. + Whether the company's directors have been provided. Set this Boolean to `true` after creating all the company's directors with [the Persons API](https://stripe.com/api/persons) for accounts with a `relationship.director` requirement. This value is not automatically set to `true` after creating directors, so it needs to be updated to indicate all directors have been provided. """ executives_provided: NotRequired[bool] """ - Whether the company's executives have been provided. Set this Boolean to `true` after creating all the company's executives with [the Persons API](https://docs.stripe.com/api/persons) for accounts with a `relationship.executive` requirement. + Whether the company's executives have been provided. Set this Boolean to `true` after creating all the company's executives with [the Persons API](https://stripe.com/api/persons) for accounts with a `relationship.executive` requirement. """ export_license_id: NotRequired[str] """ @@ -875,7 +875,7 @@ class CreateParamsCompany(TypedDict): """ owners_provided: NotRequired[bool] """ - Whether the company's owners have been provided. Set this Boolean to `true` after creating all the company's owners with [the Persons API](https://docs.stripe.com/api/persons) for accounts with a `relationship.owner` requirement. + Whether the company's owners have been provided. Set this Boolean to `true` after creating all the company's owners with [the Persons API](https://stripe.com/api/persons) for accounts with a `relationship.owner` requirement. """ ownership_declaration: NotRequired[ "AccountService.CreateParamsCompanyOwnershipDeclaration" @@ -895,7 +895,7 @@ class CreateParamsCompany(TypedDict): "Literal['']|Literal['free_zone_establishment', 'free_zone_llc', 'government_instrumentality', 'governmental_unit', 'incorporated_non_profit', 'incorporated_partnership', 'limited_liability_partnership', 'llc', 'multi_member_llc', 'private_company', 'private_corporation', 'private_partnership', 'public_company', 'public_corporation', 'public_partnership', 'registered_charity', 'single_member_llc', 'sole_establishment', 'sole_proprietorship', 'tax_exempt_government_instrumentality', 'unincorporated_association', 'unincorporated_non_profit', 'unincorporated_partnership']" ] """ - The category identifying the legal structure of the company or legal entity. See [Business structure](https://docs.stripe.com/connect/identity-verification#business-structure) for more details. Pass an empty string to unset this value. + The category identifying the legal structure of the company or legal entity. See [Business structure](https://stripe.com/connect/identity-verification#business-structure) for more details. Pass an empty string to unset this value. """ tax_id: NotRequired[str] """ @@ -1207,11 +1207,11 @@ class CreateParamsIndividual(TypedDict): """ id_number: NotRequired[str] """ - The government-issued ID number of the individual, as appropriate for the representative's country. (Examples are a Social Security Number in the U.S., or a Social Insurance Number in Canada). Instead of the number itself, you can also provide a [PII token created with Stripe.js](https://docs.stripe.com/js/tokens/create_token?type=pii). + The government-issued ID number of the individual, as appropriate for the representative's country. (Examples are a Social Security Number in the U.S., or a Social Insurance Number in Canada). Instead of the number itself, you can also provide a [PII token created with Stripe.js](https://stripe.com/js/tokens/create_token?type=pii). """ id_number_secondary: NotRequired[str] """ - The government-issued secondary ID number of the individual, as appropriate for the representative's country, will be used for enhanced verification checks. In Thailand, this would be the laser code found on the back of an ID card. Instead of the number itself, you can also provide a [PII token created with Stripe.js](https://docs.stripe.com/js/tokens/create_token?type=pii). + The government-issued secondary ID number of the individual, as appropriate for the representative's country, will be used for enhanced verification checks. In Thailand, this would be the laser code found on the back of an ID card. Instead of the number itself, you can also provide a [PII token created with Stripe.js](https://stripe.com/js/tokens/create_token?type=pii). """ last_name: NotRequired[str] """ @@ -1511,7 +1511,7 @@ class CreateParamsSettingsCardIssuing(TypedDict): "AccountService.CreateParamsSettingsCardIssuingTosAcceptance" ] """ - Details on the account's acceptance of the [Stripe Issuing Terms and Disclosures](https://docs.stripe.com/issuing/connect/tos_acceptance). + Details on the account's acceptance of the [Stripe Issuing Terms and Disclosures](https://stripe.com/issuing/connect/tos_acceptance). """ class CreateParamsSettingsCardIssuingTosAcceptance(TypedDict): @@ -1575,13 +1575,13 @@ class CreateParamsSettingsPayments(TypedDict): class CreateParamsSettingsPayouts(TypedDict): debit_negative_balances: NotRequired[bool] """ - A Boolean indicating whether Stripe should try to reclaim negative balances from an attached bank account. For details, see [Understanding Connect Account Balances](https://docs.stripe.com/connect/account-balances). + A Boolean indicating whether Stripe should try to reclaim negative balances from an attached bank account. For details, see [Understanding Connect Account Balances](https://stripe.com/connect/account-balances). """ schedule: NotRequired[ "AccountService.CreateParamsSettingsPayoutsSchedule" ] """ - Details on when funds from charges are available, and when they are paid out to an external account. For details, see our [Setting Bank and Debit Card Payouts](https://docs.stripe.com/connect/bank-transfers#payout-information) documentation. + Details on when funds from charges are available, and when they are paid out to an external account. For details, see our [Setting Bank and Debit Card Payouts](https://stripe.com/connect/bank-transfers#payout-information) documentation. """ statement_descriptor: NotRequired[str] """ @@ -1591,7 +1591,7 @@ class CreateParamsSettingsPayouts(TypedDict): class CreateParamsSettingsPayoutsSchedule(TypedDict): delay_days: NotRequired["Literal['minimum']|int"] """ - The number of days charge funds are held before being paid out. May also be set to `minimum`, representing the lowest available value for the account country. Default is `minimum`. The `delay_days` parameter remains at the last configured value if `interval` is `manual`. [Learn more about controlling payout delay days](https://docs.stripe.com/connect/manage-payout-schedule). + The number of days charge funds are held before being paid out. May also be set to `minimum`, representing the lowest available value for the account country. Default is `minimum`. The `delay_days` parameter remains at the last configured value if `interval` is `manual`. [Learn more about controlling payout delay days](https://stripe.com/connect/manage-payout-schedule). """ interval: NotRequired[Literal["daily", "manual", "monthly", "weekly"]] """ @@ -1834,7 +1834,7 @@ class UpdateParamsBusinessProfile(TypedDict): """ mcc: NotRequired[str] """ - [The merchant category code for the account](https://docs.stripe.com/connect/setting-mcc). MCCs are used to classify businesses based on the goods or services they provide. + [The merchant category code for the account](https://stripe.com/connect/setting-mcc). MCCs are used to classify businesses based on the goods or services they provide. """ monthly_estimated_revenue: NotRequired[ "AccountService.UpdateParamsBusinessProfileMonthlyEstimatedRevenue" @@ -1876,7 +1876,7 @@ class UpdateParamsBusinessProfile(TypedDict): class UpdateParamsBusinessProfileAnnualRevenue(TypedDict): amount: int """ - A non-negative integer representing the amount in the [smallest currency unit](https://docs.stripe.com/currencies#zero-decimal). + A non-negative integer representing the amount in the [smallest currency unit](https://stripe.com/currencies#zero-decimal). """ currency: str """ @@ -1890,7 +1890,7 @@ class UpdateParamsBusinessProfileAnnualRevenue(TypedDict): class UpdateParamsBusinessProfileMonthlyEstimatedRevenue(TypedDict): amount: int """ - A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#zero-decimal). + A non-negative integer representing how much to charge in the [smallest currency unit](https://stripe.com/currencies#zero-decimal). """ currency: str """ @@ -2533,11 +2533,11 @@ class UpdateParamsCompany(TypedDict): """ directors_provided: NotRequired[bool] """ - Whether the company's directors have been provided. Set this Boolean to `true` after creating all the company's directors with [the Persons API](https://docs.stripe.com/api/persons) for accounts with a `relationship.director` requirement. This value is not automatically set to `true` after creating directors, so it needs to be updated to indicate all directors have been provided. + Whether the company's directors have been provided. Set this Boolean to `true` after creating all the company's directors with [the Persons API](https://stripe.com/api/persons) for accounts with a `relationship.director` requirement. This value is not automatically set to `true` after creating directors, so it needs to be updated to indicate all directors have been provided. """ executives_provided: NotRequired[bool] """ - Whether the company's executives have been provided. Set this Boolean to `true` after creating all the company's executives with [the Persons API](https://docs.stripe.com/api/persons) for accounts with a `relationship.executive` requirement. + Whether the company's executives have been provided. Set this Boolean to `true` after creating all the company's executives with [the Persons API](https://stripe.com/api/persons) for accounts with a `relationship.executive` requirement. """ export_license_id: NotRequired[str] """ @@ -2561,7 +2561,7 @@ class UpdateParamsCompany(TypedDict): """ owners_provided: NotRequired[bool] """ - Whether the company's owners have been provided. Set this Boolean to `true` after creating all the company's owners with [the Persons API](https://docs.stripe.com/api/persons) for accounts with a `relationship.owner` requirement. + Whether the company's owners have been provided. Set this Boolean to `true` after creating all the company's owners with [the Persons API](https://stripe.com/api/persons) for accounts with a `relationship.owner` requirement. """ ownership_declaration: NotRequired[ "AccountService.UpdateParamsCompanyOwnershipDeclaration" @@ -2581,7 +2581,7 @@ class UpdateParamsCompany(TypedDict): "Literal['']|Literal['free_zone_establishment', 'free_zone_llc', 'government_instrumentality', 'governmental_unit', 'incorporated_non_profit', 'incorporated_partnership', 'limited_liability_partnership', 'llc', 'multi_member_llc', 'private_company', 'private_corporation', 'private_partnership', 'public_company', 'public_corporation', 'public_partnership', 'registered_charity', 'single_member_llc', 'sole_establishment', 'sole_proprietorship', 'tax_exempt_government_instrumentality', 'unincorporated_association', 'unincorporated_non_profit', 'unincorporated_partnership']" ] """ - The category identifying the legal structure of the company or legal entity. See [Business structure](https://docs.stripe.com/connect/identity-verification#business-structure) for more details. Pass an empty string to unset this value. + The category identifying the legal structure of the company or legal entity. See [Business structure](https://stripe.com/connect/identity-verification#business-structure) for more details. Pass an empty string to unset this value. """ tax_id: NotRequired[str] """ @@ -2855,11 +2855,11 @@ class UpdateParamsIndividual(TypedDict): """ id_number: NotRequired[str] """ - The government-issued ID number of the individual, as appropriate for the representative's country. (Examples are a Social Security Number in the U.S., or a Social Insurance Number in Canada). Instead of the number itself, you can also provide a [PII token created with Stripe.js](https://docs.stripe.com/js/tokens/create_token?type=pii). + The government-issued ID number of the individual, as appropriate for the representative's country. (Examples are a Social Security Number in the U.S., or a Social Insurance Number in Canada). Instead of the number itself, you can also provide a [PII token created with Stripe.js](https://stripe.com/js/tokens/create_token?type=pii). """ id_number_secondary: NotRequired[str] """ - The government-issued secondary ID number of the individual, as appropriate for the representative's country, will be used for enhanced verification checks. In Thailand, this would be the laser code found on the back of an ID card. Instead of the number itself, you can also provide a [PII token created with Stripe.js](https://docs.stripe.com/js/tokens/create_token?type=pii). + The government-issued secondary ID number of the individual, as appropriate for the representative's country, will be used for enhanced verification checks. In Thailand, this would be the laser code found on the back of an ID card. Instead of the number itself, you can also provide a [PII token created with Stripe.js](https://stripe.com/js/tokens/create_token?type=pii). """ last_name: NotRequired[str] """ @@ -3163,7 +3163,7 @@ class UpdateParamsSettingsCardIssuing(TypedDict): "AccountService.UpdateParamsSettingsCardIssuingTosAcceptance" ] """ - Details on the account's acceptance of the [Stripe Issuing Terms and Disclosures](https://docs.stripe.com/issuing/connect/tos_acceptance). + Details on the account's acceptance of the [Stripe Issuing Terms and Disclosures](https://stripe.com/issuing/connect/tos_acceptance). """ class UpdateParamsSettingsCardIssuingTosAcceptance(TypedDict): @@ -3233,13 +3233,13 @@ class UpdateParamsSettingsPayments(TypedDict): class UpdateParamsSettingsPayouts(TypedDict): debit_negative_balances: NotRequired[bool] """ - A Boolean indicating whether Stripe should try to reclaim negative balances from an attached bank account. For details, see [Understanding Connect Account Balances](https://docs.stripe.com/connect/account-balances). + A Boolean indicating whether Stripe should try to reclaim negative balances from an attached bank account. For details, see [Understanding Connect Account Balances](https://stripe.com/connect/account-balances). """ schedule: NotRequired[ "AccountService.UpdateParamsSettingsPayoutsSchedule" ] """ - Details on when funds from charges are available, and when they are paid out to an external account. For details, see our [Setting Bank and Debit Card Payouts](https://docs.stripe.com/connect/bank-transfers#payout-information) documentation. + Details on when funds from charges are available, and when they are paid out to an external account. For details, see our [Setting Bank and Debit Card Payouts](https://stripe.com/connect/bank-transfers#payout-information) documentation. """ statement_descriptor: NotRequired[str] """ @@ -3249,7 +3249,7 @@ class UpdateParamsSettingsPayouts(TypedDict): class UpdateParamsSettingsPayoutsSchedule(TypedDict): delay_days: NotRequired["Literal['minimum']|int"] """ - The number of days charge funds are held before being paid out. May also be set to `minimum`, representing the lowest available value for the account country. Default is `minimum`. The `delay_days` parameter remains at the last configured value if `interval` is `manual`. [Learn more about controlling payout delay days](https://docs.stripe.com/connect/manage-payout-schedule). + The number of days charge funds are held before being paid out. May also be set to `minimum`, representing the lowest available value for the account country. Default is `minimum`. The `delay_days` parameter remains at the last configured value if `interval` is `manual`. [Learn more about controlling payout delay days](https://stripe.com/connect/manage-payout-schedule). """ interval: NotRequired[Literal["daily", "manual", "monthly", "weekly"]] """ diff --git a/stripe/_charge.py b/stripe/_charge.py index d7cdc0084..f85fe819a 100644 --- a/stripe/_charge.py +++ b/stripe/_charge.py @@ -253,7 +253,10 @@ class AcssDebit(StripeObject): """ class Affirm(StripeObject): - pass + transaction_id: Optional[str] + """ + The Affirm transaction ID associated with this payment. + """ class AfterpayClearpay(StripeObject): order_id: Optional[str] @@ -355,7 +358,10 @@ class Bancontact(StripeObject): """ class Blik(StripeObject): - pass + buyer_id: Optional[str] + """ + A unique and immutable identifier assigned by BLIK to every buyer. + """ class Boleto(StripeObject): tax_id: str @@ -697,6 +703,10 @@ class ShippingAddress(StripeObject): """ The authorized amount. """ + authorization_code: Optional[str] + """ + Authorization code on the charge. + """ brand: Optional[str] """ Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. @@ -848,6 +858,10 @@ class Receipt(StripeObject): """ Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. """ + brand_product: Optional[str] + """ + The [product code](https://stripe.com/docs/card-product-codes) that identifies the specific program or product associated with a card. + """ capture_before: Optional[int] """ When using manual capture, a future timestamp after which the charge will be automatically refunded if uncaptured. @@ -910,6 +924,13 @@ class Receipt(StripeObject): """ Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `interac`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. """ + network_transaction_id: Optional[str] + """ + This is used by the financial networks to identify a transaction. + Visa calls this the Transaction ID, Mastercard calls this the Trace ID, and American Express calls this the Acquirer Reference Data. + The first three digits of the Trace ID is the Financial Network Code, the next 6 digits is the Banknet Reference Number, and the last 4 digits represent the date (MM/DD). + This field will be available for successful Visa, Mastercard, or American Express transactions and always null for other card brands. + """ offline: Optional[Offline] """ Details about payments collected offline. @@ -1224,6 +1245,13 @@ class Receipt(StripeObject): """ Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `interac`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. """ + network_transaction_id: Optional[str] + """ + This is used by the financial networks to identify a transaction. + Visa calls this the Transaction ID, Mastercard calls this the Trace ID, and American Express calls this the Acquirer Reference Data. + The first three digits of the Trace ID is the Financial Network Code, the next 6 digits is the Banknet Reference Number, and the last 4 digits represent the date (MM/DD). + This field will be available for successful Visa, Mastercard, or American Express transactions and always null for other card brands. + """ preferred_locales: Optional[List[str]] """ EMV tag 5F2D. Preferred languages specified by the integrated circuit chip. diff --git a/stripe/_confirmation_token.py b/stripe/_confirmation_token.py index f8cca02c5..0011236f3 100644 --- a/stripe/_confirmation_token.py +++ b/stripe/_confirmation_token.py @@ -269,6 +269,10 @@ class Receipt(StripeObject): """ Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. """ + brand_product: Optional[str] + """ + The [product code](https://stripe.com/docs/card-product-codes) that identifies the specific program or product associated with a card. + """ capture_before: Optional[int] """ When using manual capture, a future timestamp after which the charge will be automatically refunded if uncaptured. @@ -331,6 +335,13 @@ class Receipt(StripeObject): """ Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `interac`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. """ + network_transaction_id: Optional[str] + """ + This is used by the financial networks to identify a transaction. + Visa calls this the Transaction ID, Mastercard calls this the Trace ID, and American Express calls this the Acquirer Reference Data. + The first three digits of the Trace ID is the Financial Network Code, the next 6 digits is the Banknet Reference Number, and the last 4 digits represent the date (MM/DD). + This field will be available for successful Visa, Mastercard, or American Express transactions and always null for other card brands. + """ offline: Optional[Offline] """ Details about payments collected offline. @@ -689,6 +700,10 @@ class Networks(StripeObject): """ Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. """ + brand_product: Optional[str] + """ + The [product code](https://stripe.com/docs/card-product-codes) that identifies the specific program or product associated with a card. + """ cardholder_name: Optional[str] """ The cardholder name as read from the card, in [ISO 7813](https://en.wikipedia.org/wiki/ISO/IEC_7813) format. May include alphanumeric characters, special characters and first/last name separator (`/`). In some cases, the cardholder name may not be available depending on how the issuer has configured the card. Cardholder name is typically not available on swipe or contactless payments, such as those made with Apple Pay and Google Pay. diff --git a/stripe/_dispute.py b/stripe/_dispute.py index 7ee593ed2..a7110e941 100644 --- a/stripe/_dispute.py +++ b/stripe/_dispute.py @@ -170,6 +170,10 @@ class Card(StripeObject): """ Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. """ + case_type: Literal["chargeback", "inquiry"] + """ + The type of dispute opened. Different case types may have varying fees and financial impact. + """ network_reason_code: Optional[str] """ 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. diff --git a/stripe/_event.py b/stripe/_event.py index 3720b47c5..289246991 100644 --- a/stripe/_event.py +++ b/stripe/_event.py @@ -243,6 +243,7 @@ class RetrieveParams(RequestOptions): "invoice.finalization_failed", "invoice.finalized", "invoice.marked_uncollectible", + "invoice.overdue", "invoice.paid", "invoice.payment_action_required", "invoice.payment_failed", @@ -251,6 +252,7 @@ class RetrieveParams(RequestOptions): "invoice.upcoming", "invoice.updated", "invoice.voided", + "invoice.will_be_due", "invoiceitem.created", "invoiceitem.deleted", "issuing_authorization.created", diff --git a/stripe/_payment_intent.py b/stripe/_payment_intent.py index c49856642..351db4d60 100644 --- a/stripe/_payment_intent.py +++ b/stripe/_payment_intent.py @@ -8889,7 +8889,7 @@ class VerifyMicrodepositsParams(RequestOptions): """ latest_charge: Optional[ExpandableField["Charge"]] """ - The latest charge created by this PaymentIntent. + ID of the latest [Charge object](https://stripe.com/docs/api/charges) created by this PaymentIntent. This property is `null` until PaymentIntent confirmation is attempted. """ livemode: bool """ diff --git a/stripe/_payment_method.py b/stripe/_payment_method.py index aadc504f9..bdb34ba0f 100644 --- a/stripe/_payment_method.py +++ b/stripe/_payment_method.py @@ -229,6 +229,10 @@ class Receipt(StripeObject): """ Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. """ + brand_product: Optional[str] + """ + The [product code](https://stripe.com/docs/card-product-codes) that identifies the specific program or product associated with a card. + """ capture_before: Optional[int] """ When using manual capture, a future timestamp after which the charge will be automatically refunded if uncaptured. @@ -291,6 +295,13 @@ class Receipt(StripeObject): """ Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `interac`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. """ + network_transaction_id: Optional[str] + """ + This is used by the financial networks to identify a transaction. + Visa calls this the Transaction ID, Mastercard calls this the Trace ID, and American Express calls this the Acquirer Reference Data. + The first three digits of the Trace ID is the Financial Network Code, the next 6 digits is the Banknet Reference Number, and the last 4 digits represent the date (MM/DD). + This field will be available for successful Visa, Mastercard, or American Express transactions and always null for other card brands. + """ offline: Optional[Offline] """ Details about payments collected offline. @@ -649,6 +660,10 @@ class Networks(StripeObject): """ Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. """ + brand_product: Optional[str] + """ + The [product code](https://stripe.com/docs/card-product-codes) that identifies the specific program or product associated with a card. + """ cardholder_name: Optional[str] """ The cardholder name as read from the card, in [ISO 7813](https://en.wikipedia.org/wiki/ISO/IEC_7813) format. May include alphanumeric characters, special characters and first/last name separator (`/`). In some cases, the cardholder name may not be available depending on how the issuer has configured the card. Cardholder name is typically not available on swipe or contactless payments, such as those made with Apple Pay and Google Pay. diff --git a/stripe/_payment_method_configuration.py b/stripe/_payment_method_configuration.py index 39b67ac54..033ac855a 100644 --- a/stripe/_payment_method_configuration.py +++ b/stripe/_payment_method_configuration.py @@ -829,6 +829,28 @@ class DisplayPreference(StripeObject): display_preference: DisplayPreference _inner_class_types = {"display_preference": DisplayPreference} + class Twint(StripeObject): + class DisplayPreference(StripeObject): + overridable: Optional[bool] + """ + For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. + """ + preference: Literal["none", "off", "on"] + """ + The account's display preference. + """ + value: Literal["off", "on"] + """ + The effective display preference value. + """ + + available: bool + """ + Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. + """ + display_preference: DisplayPreference + _inner_class_types = {"display_preference": DisplayPreference} + class UsBankAccount(StripeObject): class DisplayPreference(StripeObject): overridable: Optional[bool] @@ -1088,6 +1110,10 @@ class CreateParams(RequestOptions): """ Swish is a [real-time](https://stripe.com/docs/payments/real-time) payment method popular in Sweden. It allows customers to [authenticate and approve](https://stripe.com/docs/payments/payment-methods#customer-actions) payments using the Swish mobile app and the Swedish BankID mobile app. Check this [page](https://stripe.com/docs/payments/swish) for more details. """ + twint: NotRequired["PaymentMethodConfiguration.CreateParamsTwint"] + """ + Twint is a payment method popular in Switzerland. It allows customers to pay using their mobile phone. Check this [page](https://docs.stripe.com/payments/twint) for more details. + """ us_bank_account: NotRequired[ "PaymentMethodConfiguration.CreateParamsUsBankAccount" ] @@ -1623,6 +1649,20 @@ class CreateParamsSwishDisplayPreference(TypedDict): The account's preference for whether or not to display this payment method. """ + class CreateParamsTwint(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfiguration.CreateParamsTwintDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + class CreateParamsTwintDisplayPreference(TypedDict): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + class CreateParamsUsBankAccount(TypedDict): display_preference: NotRequired[ "PaymentMethodConfiguration.CreateParamsUsBankAccountDisplayPreference" @@ -1880,6 +1920,10 @@ class ModifyParams(RequestOptions): """ Swish is a [real-time](https://stripe.com/docs/payments/real-time) payment method popular in Sweden. It allows customers to [authenticate and approve](https://stripe.com/docs/payments/payment-methods#customer-actions) payments using the Swish mobile app and the Swedish BankID mobile app. Check this [page](https://stripe.com/docs/payments/swish) for more details. """ + twint: NotRequired["PaymentMethodConfiguration.ModifyParamsTwint"] + """ + Twint is a payment method popular in Switzerland. It allows customers to pay using their mobile phone. Check this [page](https://docs.stripe.com/payments/twint) for more details. + """ us_bank_account: NotRequired[ "PaymentMethodConfiguration.ModifyParamsUsBankAccount" ] @@ -2415,6 +2459,20 @@ class ModifyParamsSwishDisplayPreference(TypedDict): The account's preference for whether or not to display this payment method. """ + class ModifyParamsTwint(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfiguration.ModifyParamsTwintDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + class ModifyParamsTwintDisplayPreference(TypedDict): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + class ModifyParamsUsBankAccount(TypedDict): display_preference: NotRequired[ "PaymentMethodConfiguration.ModifyParamsUsBankAccountDisplayPreference" @@ -2531,6 +2589,7 @@ class RetrieveParams(RequestOptions): sepa_debit: Optional[SepaDebit] sofort: Optional[Sofort] swish: Optional[Swish] + twint: Optional[Twint] us_bank_account: Optional[UsBankAccount] wechat_pay: Optional[WechatPay] zip: Optional[Zip] @@ -2708,6 +2767,7 @@ async def retrieve_async( "sepa_debit": SepaDebit, "sofort": Sofort, "swish": Swish, + "twint": Twint, "us_bank_account": UsBankAccount, "wechat_pay": WechatPay, "zip": Zip, diff --git a/stripe/_payment_method_configuration_service.py b/stripe/_payment_method_configuration_service.py index 3b639f873..4b36c7c66 100644 --- a/stripe/_payment_method_configuration_service.py +++ b/stripe/_payment_method_configuration_service.py @@ -229,6 +229,12 @@ class CreateParams(TypedDict): """ Swish is a [real-time](https://stripe.com/docs/payments/real-time) payment method popular in Sweden. It allows customers to [authenticate and approve](https://stripe.com/docs/payments/payment-methods#customer-actions) payments using the Swish mobile app and the Swedish BankID mobile app. Check this [page](https://stripe.com/docs/payments/swish) for more details. """ + twint: NotRequired[ + "PaymentMethodConfigurationService.CreateParamsTwint" + ] + """ + Twint is a payment method popular in Switzerland. It allows customers to pay using their mobile phone. Check this [page](https://docs.stripe.com/payments/twint) for more details. + """ us_bank_account: NotRequired[ "PaymentMethodConfigurationService.CreateParamsUsBankAccount" ] @@ -764,6 +770,20 @@ class CreateParamsSwishDisplayPreference(TypedDict): The account's preference for whether or not to display this payment method. """ + class CreateParamsTwint(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationService.CreateParamsTwintDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + class CreateParamsTwintDisplayPreference(TypedDict): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + class CreateParamsUsBankAccount(TypedDict): display_preference: NotRequired[ "PaymentMethodConfigurationService.CreateParamsUsBankAccountDisplayPreference" @@ -1053,6 +1073,12 @@ class UpdateParams(TypedDict): """ Swish is a [real-time](https://stripe.com/docs/payments/real-time) payment method popular in Sweden. It allows customers to [authenticate and approve](https://stripe.com/docs/payments/payment-methods#customer-actions) payments using the Swish mobile app and the Swedish BankID mobile app. Check this [page](https://stripe.com/docs/payments/swish) for more details. """ + twint: NotRequired[ + "PaymentMethodConfigurationService.UpdateParamsTwint" + ] + """ + Twint is a payment method popular in Switzerland. It allows customers to pay using their mobile phone. Check this [page](https://docs.stripe.com/payments/twint) for more details. + """ us_bank_account: NotRequired[ "PaymentMethodConfigurationService.UpdateParamsUsBankAccount" ] @@ -1588,6 +1614,20 @@ class UpdateParamsSwishDisplayPreference(TypedDict): The account's preference for whether or not to display this payment method. """ + class UpdateParamsTwint(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationService.UpdateParamsTwintDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + class UpdateParamsTwintDisplayPreference(TypedDict): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + class UpdateParamsUsBankAccount(TypedDict): display_preference: NotRequired[ "PaymentMethodConfigurationService.UpdateParamsUsBankAccountDisplayPreference" diff --git a/stripe/_refund.py b/stripe/_refund.py index bb2449bf7..6dae4382a 100644 --- a/stripe/_refund.py +++ b/stripe/_refund.py @@ -710,7 +710,7 @@ def list( cls, **params: Unpack["Refund.ListParams"] ) -> ListObject["Refund"]: """ - Returns a list of all refunds you created. We return the refunds in sorted order, with the most recent refunds appearing first The 10 most recent refunds are always available by default on the Charge object. + Returns a list of all refunds you created. We return the refunds in sorted order, with the most recent refunds appearing first. The 10 most recent refunds are always available by default on the Charge object. """ result = cls._static_request( "get", @@ -730,7 +730,7 @@ async def list_async( cls, **params: Unpack["Refund.ListParams"] ) -> ListObject["Refund"]: """ - Returns a list of all refunds you created. We return the refunds in sorted order, with the most recent refunds appearing first The 10 most recent refunds are always available by default on the Charge object. + Returns a list of all refunds you created. We return the refunds in sorted order, with the most recent refunds appearing first. The 10 most recent refunds are always available by default on the Charge object. """ result = await cls._static_request_async( "get", diff --git a/stripe/_refund_service.py b/stripe/_refund_service.py index 42a240ea5..9608e8af7 100644 --- a/stripe/_refund_service.py +++ b/stripe/_refund_service.py @@ -137,7 +137,7 @@ def list( options: RequestOptions = {}, ) -> ListObject[Refund]: """ - Returns a list of all refunds you created. We return the refunds in sorted order, with the most recent refunds appearing first The 10 most recent refunds are always available by default on the Charge object. + Returns a list of all refunds you created. We return the refunds in sorted order, with the most recent refunds appearing first. The 10 most recent refunds are always available by default on the Charge object. """ return cast( ListObject[Refund], @@ -157,7 +157,7 @@ async def list_async( options: RequestOptions = {}, ) -> ListObject[Refund]: """ - Returns a list of all refunds you created. We return the refunds in sorted order, with the most recent refunds appearing first The 10 most recent refunds are always available by default on the Charge object. + Returns a list of all refunds you created. We return the refunds in sorted order, with the most recent refunds appearing first. The 10 most recent refunds are always available by default on the Charge object. """ return cast( ListObject[Refund], diff --git a/stripe/_token.py b/stripe/_token.py index 6292b4395..2d405fbdf 100644 --- a/stripe/_token.py +++ b/stripe/_token.py @@ -93,7 +93,7 @@ class CreateParamsAccount(TypedDict): """ tos_shown_and_accepted: NotRequired[bool] """ - Whether the user described by the data in the token has been shown [the Stripe Connected Account Agreement](https://docs.stripe.com/connect/account-tokens#stripe-connected-account-agreement). When creating an account token to create a new Connect account, this value must be `true`. + Whether the user described by the data in the token has been shown [the Stripe Connected Account Agreement](https://stripe.com/connect/account-tokens#stripe-connected-account-agreement). When creating an account token to create a new Connect account, this value must be `true`. """ class CreateParamsAccountCompany(TypedDict): @@ -115,11 +115,11 @@ class CreateParamsAccountCompany(TypedDict): """ directors_provided: NotRequired[bool] """ - Whether the company's directors have been provided. Set this Boolean to `true` after creating all the company's directors with [the Persons API](https://docs.stripe.com/api/persons) for accounts with a `relationship.director` requirement. This value is not automatically set to `true` after creating directors, so it needs to be updated to indicate all directors have been provided. + Whether the company's directors have been provided. Set this Boolean to `true` after creating all the company's directors with [the Persons API](https://stripe.com/api/persons) for accounts with a `relationship.director` requirement. This value is not automatically set to `true` after creating directors, so it needs to be updated to indicate all directors have been provided. """ executives_provided: NotRequired[bool] """ - Whether the company's executives have been provided. Set this Boolean to `true` after creating all the company's executives with [the Persons API](https://docs.stripe.com/api/persons) for accounts with a `relationship.executive` requirement. + Whether the company's executives have been provided. Set this Boolean to `true` after creating all the company's executives with [the Persons API](https://stripe.com/api/persons) for accounts with a `relationship.executive` requirement. """ export_license_id: NotRequired[str] """ @@ -143,7 +143,7 @@ class CreateParamsAccountCompany(TypedDict): """ owners_provided: NotRequired[bool] """ - Whether the company's owners have been provided. Set this Boolean to `true` after creating all the company's owners with [the Persons API](https://docs.stripe.com/api/persons) for accounts with a `relationship.owner` requirement. + Whether the company's owners have been provided. Set this Boolean to `true` after creating all the company's owners with [the Persons API](https://stripe.com/api/persons) for accounts with a `relationship.owner` requirement. """ ownership_declaration: NotRequired[ "Token.CreateParamsAccountCompanyOwnershipDeclaration" @@ -167,7 +167,7 @@ class CreateParamsAccountCompany(TypedDict): "Literal['']|Literal['free_zone_establishment', 'free_zone_llc', 'government_instrumentality', 'governmental_unit', 'incorporated_non_profit', 'incorporated_partnership', 'limited_liability_partnership', 'llc', 'multi_member_llc', 'private_company', 'private_corporation', 'private_partnership', 'public_company', 'public_corporation', 'public_partnership', 'registered_charity', 'single_member_llc', 'sole_establishment', 'sole_proprietorship', 'tax_exempt_government_instrumentality', 'unincorporated_association', 'unincorporated_non_profit', 'unincorporated_partnership']" ] """ - The category identifying the legal structure of the company or legal entity. See [Business structure](https://docs.stripe.com/connect/identity-verification#business-structure) for more details. Pass an empty string to unset this value. + The category identifying the legal structure of the company or legal entity. See [Business structure](https://stripe.com/connect/identity-verification#business-structure) for more details. Pass an empty string to unset this value. """ tax_id: NotRequired[str] """ @@ -353,11 +353,11 @@ class CreateParamsAccountIndividual(TypedDict): """ id_number: NotRequired[str] """ - The government-issued ID number of the individual, as appropriate for the representative's country. (Examples are a Social Security Number in the U.S., or a Social Insurance Number in Canada). Instead of the number itself, you can also provide a [PII token created with Stripe.js](https://docs.stripe.com/js/tokens/create_token?type=pii). + The government-issued ID number of the individual, as appropriate for the representative's country. (Examples are a Social Security Number in the U.S., or a Social Insurance Number in Canada). Instead of the number itself, you can also provide a [PII token created with Stripe.js](https://stripe.com/js/tokens/create_token?type=pii). """ id_number_secondary: NotRequired[str] """ - The government-issued secondary ID number of the individual, as appropriate for the representative's country, will be used for enhanced verification checks. In Thailand, this would be the laser code found on the back of an ID card. Instead of the number itself, you can also provide a [PII token created with Stripe.js](https://docs.stripe.com/js/tokens/create_token?type=pii). + The government-issued secondary ID number of the individual, as appropriate for the representative's country, will be used for enhanced verification checks. In Thailand, this would be the laser code found on the back of an ID card. Instead of the number itself, you can also provide a [PII token created with Stripe.js](https://stripe.com/js/tokens/create_token?type=pii). """ last_name: NotRequired[str] """ diff --git a/stripe/_token_service.py b/stripe/_token_service.py index 841017566..fd82b1ab1 100644 --- a/stripe/_token_service.py +++ b/stripe/_token_service.py @@ -60,7 +60,7 @@ class CreateParamsAccount(TypedDict): """ tos_shown_and_accepted: NotRequired[bool] """ - Whether the user described by the data in the token has been shown [the Stripe Connected Account Agreement](https://docs.stripe.com/connect/account-tokens#stripe-connected-account-agreement). When creating an account token to create a new Connect account, this value must be `true`. + Whether the user described by the data in the token has been shown [the Stripe Connected Account Agreement](https://stripe.com/connect/account-tokens#stripe-connected-account-agreement). When creating an account token to create a new Connect account, this value must be `true`. """ class CreateParamsAccountCompany(TypedDict): @@ -82,11 +82,11 @@ class CreateParamsAccountCompany(TypedDict): """ directors_provided: NotRequired[bool] """ - Whether the company's directors have been provided. Set this Boolean to `true` after creating all the company's directors with [the Persons API](https://docs.stripe.com/api/persons) for accounts with a `relationship.director` requirement. This value is not automatically set to `true` after creating directors, so it needs to be updated to indicate all directors have been provided. + Whether the company's directors have been provided. Set this Boolean to `true` after creating all the company's directors with [the Persons API](https://stripe.com/api/persons) for accounts with a `relationship.director` requirement. This value is not automatically set to `true` after creating directors, so it needs to be updated to indicate all directors have been provided. """ executives_provided: NotRequired[bool] """ - Whether the company's executives have been provided. Set this Boolean to `true` after creating all the company's executives with [the Persons API](https://docs.stripe.com/api/persons) for accounts with a `relationship.executive` requirement. + Whether the company's executives have been provided. Set this Boolean to `true` after creating all the company's executives with [the Persons API](https://stripe.com/api/persons) for accounts with a `relationship.executive` requirement. """ export_license_id: NotRequired[str] """ @@ -110,7 +110,7 @@ class CreateParamsAccountCompany(TypedDict): """ owners_provided: NotRequired[bool] """ - Whether the company's owners have been provided. Set this Boolean to `true` after creating all the company's owners with [the Persons API](https://docs.stripe.com/api/persons) for accounts with a `relationship.owner` requirement. + Whether the company's owners have been provided. Set this Boolean to `true` after creating all the company's owners with [the Persons API](https://stripe.com/api/persons) for accounts with a `relationship.owner` requirement. """ ownership_declaration: NotRequired[ "TokenService.CreateParamsAccountCompanyOwnershipDeclaration" @@ -134,7 +134,7 @@ class CreateParamsAccountCompany(TypedDict): "Literal['']|Literal['free_zone_establishment', 'free_zone_llc', 'government_instrumentality', 'governmental_unit', 'incorporated_non_profit', 'incorporated_partnership', 'limited_liability_partnership', 'llc', 'multi_member_llc', 'private_company', 'private_corporation', 'private_partnership', 'public_company', 'public_corporation', 'public_partnership', 'registered_charity', 'single_member_llc', 'sole_establishment', 'sole_proprietorship', 'tax_exempt_government_instrumentality', 'unincorporated_association', 'unincorporated_non_profit', 'unincorporated_partnership']" ] """ - The category identifying the legal structure of the company or legal entity. See [Business structure](https://docs.stripe.com/connect/identity-verification#business-structure) for more details. Pass an empty string to unset this value. + The category identifying the legal structure of the company or legal entity. See [Business structure](https://stripe.com/connect/identity-verification#business-structure) for more details. Pass an empty string to unset this value. """ tax_id: NotRequired[str] """ @@ -324,11 +324,11 @@ class CreateParamsAccountIndividual(TypedDict): """ id_number: NotRequired[str] """ - The government-issued ID number of the individual, as appropriate for the representative's country. (Examples are a Social Security Number in the U.S., or a Social Insurance Number in Canada). Instead of the number itself, you can also provide a [PII token created with Stripe.js](https://docs.stripe.com/js/tokens/create_token?type=pii). + The government-issued ID number of the individual, as appropriate for the representative's country. (Examples are a Social Security Number in the U.S., or a Social Insurance Number in Canada). Instead of the number itself, you can also provide a [PII token created with Stripe.js](https://stripe.com/js/tokens/create_token?type=pii). """ id_number_secondary: NotRequired[str] """ - The government-issued secondary ID number of the individual, as appropriate for the representative's country, will be used for enhanced verification checks. In Thailand, this would be the laser code found on the back of an ID card. Instead of the number itself, you can also provide a [PII token created with Stripe.js](https://docs.stripe.com/js/tokens/create_token?type=pii). + The government-issued secondary ID number of the individual, as appropriate for the representative's country, will be used for enhanced verification checks. In Thailand, this would be the laser code found on the back of an ID card. Instead of the number itself, you can also provide a [PII token created with Stripe.js](https://stripe.com/js/tokens/create_token?type=pii). """ last_name: NotRequired[str] """ diff --git a/stripe/_webhook_endpoint.py b/stripe/_webhook_endpoint.py index acc5dcca6..7a9666047 100644 --- a/stripe/_webhook_endpoint.py +++ b/stripe/_webhook_endpoint.py @@ -237,6 +237,7 @@ class CreateParams(RequestOptions): "invoice.finalization_failed", "invoice.finalized", "invoice.marked_uncollectible", + "invoice.overdue", "invoice.paid", "invoice.payment_action_required", "invoice.payment_failed", @@ -245,6 +246,7 @@ class CreateParams(RequestOptions): "invoice.upcoming", "invoice.updated", "invoice.voided", + "invoice.will_be_due", "invoiceitem.created", "invoiceitem.deleted", "issuing_authorization.created", @@ -523,6 +525,7 @@ class ModifyParams(RequestOptions): "invoice.finalization_failed", "invoice.finalized", "invoice.marked_uncollectible", + "invoice.overdue", "invoice.paid", "invoice.payment_action_required", "invoice.payment_failed", @@ -531,6 +534,7 @@ class ModifyParams(RequestOptions): "invoice.upcoming", "invoice.updated", "invoice.voided", + "invoice.will_be_due", "invoiceitem.created", "invoiceitem.deleted", "issuing_authorization.created", diff --git a/stripe/_webhook_endpoint_service.py b/stripe/_webhook_endpoint_service.py index 22525b41e..dbaaeff57 100644 --- a/stripe/_webhook_endpoint_service.py +++ b/stripe/_webhook_endpoint_service.py @@ -218,6 +218,7 @@ class CreateParams(TypedDict): "invoice.finalization_failed", "invoice.finalized", "invoice.marked_uncollectible", + "invoice.overdue", "invoice.paid", "invoice.payment_action_required", "invoice.payment_failed", @@ -226,6 +227,7 @@ class CreateParams(TypedDict): "invoice.upcoming", "invoice.updated", "invoice.voided", + "invoice.will_be_due", "invoiceitem.created", "invoiceitem.deleted", "issuing_authorization.created", @@ -510,6 +512,7 @@ class UpdateParams(TypedDict): "invoice.finalization_failed", "invoice.finalized", "invoice.marked_uncollectible", + "invoice.overdue", "invoice.paid", "invoice.payment_action_required", "invoice.payment_failed", @@ -518,6 +521,7 @@ class UpdateParams(TypedDict): "invoice.upcoming", "invoice.updated", "invoice.voided", + "invoice.will_be_due", "invoiceitem.created", "invoiceitem.deleted", "issuing_authorization.created", diff --git a/stripe/checkout/_session.py b/stripe/checkout/_session.py index 9fcb892bc..abe5cbb98 100644 --- a/stripe/checkout/_session.py +++ b/stripe/checkout/_session.py @@ -6,6 +6,7 @@ from stripe._listable_api_resource import ListableAPIResource from stripe._request_options import RequestOptions from stripe._stripe_object import StripeObject +from stripe._updateable_api_resource import UpdateableAPIResource from stripe._util import class_method_variant, sanitize_id from typing import ClassVar, Dict, List, Optional, cast, overload from typing_extensions import ( @@ -32,7 +33,9 @@ class Session( - CreateableAPIResource["Session"], ListableAPIResource["Session"] + CreateableAPIResource["Session"], + ListableAPIResource["Session"], + UpdateableAPIResource["Session"], ): """ A Checkout Session represents your customer's session as they pay for @@ -3761,6 +3764,16 @@ class ListParamsCustomerDetails(TypedDict): Customer's email address. """ + class ModifyParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + metadata: NotRequired["Literal['']|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. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + class RetrieveParams(RequestOptions): expand: NotRequired[List[str]] """ @@ -4342,6 +4355,40 @@ async def list_line_items_async( # pyright: ignore[reportGeneralTypeIssues] ), ) + @classmethod + def modify( + cls, id: str, **params: Unpack["Session.ModifyParams"] + ) -> "Session": + """ + Updates a Session object. + """ + url = "%s/%s" % (cls.class_url(), sanitize_id(id)) + return cast( + "Session", + cls._static_request( + "post", + url, + params=params, + ), + ) + + @classmethod + async def modify_async( + cls, id: str, **params: Unpack["Session.ModifyParams"] + ) -> "Session": + """ + Updates a Session object. + """ + url = "%s/%s" % (cls.class_url(), sanitize_id(id)) + return cast( + "Session", + await cls._static_request_async( + "post", + url, + params=params, + ), + ) + @classmethod def retrieve( cls, id: str, **params: Unpack["Session.RetrieveParams"] diff --git a/stripe/checkout/_session_service.py b/stripe/checkout/_session_service.py index a2b09b0eb..cff7f1756 100644 --- a/stripe/checkout/_session_service.py +++ b/stripe/checkout/_session_service.py @@ -2261,6 +2261,16 @@ class RetrieveParams(TypedDict): Specifies which fields in the response should be expanded. """ + class UpdateParams(TypedDict): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + metadata: NotRequired["Literal['']|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. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + def list( self, params: "SessionService.ListParams" = {}, @@ -2387,6 +2397,52 @@ async def retrieve_async( ), ) + def update( + self, + session: str, + params: "SessionService.UpdateParams" = {}, + options: RequestOptions = {}, + ) -> Session: + """ + Updates a Session object. + """ + return cast( + Session, + self._request( + "post", + "/v1/checkout/sessions/{session}".format( + session=sanitize_id(session), + ), + api_mode="V1", + base_address="api", + params=params, + options=options, + ), + ) + + async def update_async( + self, + session: str, + params: "SessionService.UpdateParams" = {}, + options: RequestOptions = {}, + ) -> Session: + """ + Updates a Session object. + """ + return cast( + Session, + await self._request_async( + "post", + "/v1/checkout/sessions/{session}".format( + session=sanitize_id(session), + ), + api_mode="V1", + base_address="api", + params=params, + options=options, + ), + ) + def expire( self, session: str, diff --git a/stripe/tax/_calculation.py b/stripe/tax/_calculation.py index 0acc9b5ca..ade6b71e5 100644 --- a/stripe/tax/_calculation.py +++ b/stripe/tax/_calculation.py @@ -556,9 +556,7 @@ class CreateParamsCustomerDetailsTaxId(TypedDict): class CreateParamsLineItem(TypedDict): amount: int """ - A positive integer representing the line item's total price in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). - The minimum amount is $0.0 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). - The amount value supports up to twelve digits (e.g., a value of 999999999999 for a USD charge of $9,999,999,999.99). + A positive integer representing the line item's total price in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). If `tax_behavior=inclusive`, then this amount includes taxes. Otherwise, taxes are calculated on top of this amount. """ product: NotRequired[str] @@ -652,7 +650,7 @@ class ListLineItemsParams(RequestOptions): amount_total: int """ - Total after taxes. + Total amount after taxes in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). """ currency: str """ diff --git a/stripe/tax/_calculation_service.py b/stripe/tax/_calculation_service.py index 0ae2bb045..aad073403 100644 --- a/stripe/tax/_calculation_service.py +++ b/stripe/tax/_calculation_service.py @@ -196,9 +196,7 @@ class CreateParamsCustomerDetailsTaxId(TypedDict): class CreateParamsLineItem(TypedDict): amount: int """ - A positive integer representing the line item's total price in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). - The minimum amount is $0.0 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). - The amount value supports up to twelve digits (e.g., a value of 999999999999 for a USD charge of $9,999,999,999.99). + A positive integer representing the line item's total price in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). If `tax_behavior=inclusive`, then this amount includes taxes. Otherwise, taxes are calculated on top of this amount. """ product: NotRequired[str]