Skip to content

Commit

Permalink
Merge pull request #1235 from stripe/latest-codegen-beta
Browse files Browse the repository at this point in the history
Update generated code for beta
  • Loading branch information
stripe-openapi[bot] authored Feb 16, 2024
2 parents 16f6ffc + 583a9de commit e7961b9
Show file tree
Hide file tree
Showing 46 changed files with 2,101 additions and 749 deletions.
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
# Changelog

## 8.3.0 - 2024-02-15
* [#1230](https://github.com/stripe/stripe-python/pull/1230) Update generated code
* Add support for `networks` on `Card`, `PaymentMethod.CreateParamsCard`, `PaymentMethod.ModifyParamsCard`, and `Token.CreateParamsCard`
* Add support for new value `no_voec` on enums `Checkout.Session.CustomerDetails.TaxId.type`, `Invoice.CustomerTaxId.type`, `Tax.Calculation.CustomerDetails.TaxId.type`, `Tax.Transaction.CustomerDetails.TaxId.type`, and `TaxId.type`
* Add support for new value `no_voec` on enums `Customer.CreateParams.tax_id_data[].type`, `Invoice.UpcomingLinesParams.customer_details.tax_ids[].type`, `Invoice.UpcomingParams.customer_details.tax_ids[].type`, and `Tax.Calculation.CreateParams.customer_details.tax_ids[].type`
* Add support for new value `financial_connections.account.refreshed_ownership` on enum `Event.type`
* Add support for `display_brand` on `PaymentMethod.card`
* Add support for new value `financial_connections.account.refreshed_ownership` on enums `WebhookEndpoint.CreateParams.enabled_events[]` and `WebhookEndpoint.UpdateParams.enabled_events[]`
* [#1237](https://github.com/stripe/stripe-python/pull/1237) Remove broken child methods
* Bugfix: remove support for `CreditNoteLineItem.list`, `CustomerCashBalanceTransaction.list`, and `CustomerCashBalanceTransaction.retrieve`. These methods were included in the library unintentionally and never functioned.
* [#1232](https://github.com/stripe/stripe-python/pull/1232) Improve types in _http_client.py

## 8.3.0b1 - 2024-02-08
* [#1226](https://github.com/stripe/stripe-python/pull/1226) Update generated code for beta
* Add support for `payment_method_options` on `ConfirmationToken`
Expand Down
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v814
v831
32 changes: 32 additions & 0 deletions stripe/_account.py
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,10 @@ class Capabilities(StripeObject):
"""
The status of the PayPal payments capability of the account, or whether the account can directly process PayPal charges.
"""
payto_payments: Optional[Literal["active", "inactive", "pending"]]
"""
The status of the PayTo capability of the account, or whether the account can directly process PayTo charges.
"""
promptpay_payments: Optional[Literal["active", "inactive", "pending"]]
"""
The status of the promptpay payments capability of the account, or whether the account can directly process promptpay charges.
Expand Down Expand Up @@ -315,6 +319,10 @@ class Capabilities(StripeObject):
"""
The status of the banking capability, or whether the account can have bank accounts.
"""
twint_payments: Optional[Literal["active", "inactive", "pending"]]
"""
The status of the Twint capability of the account, or whether the account can directly process Twint charges.
"""
us_bank_account_ach_payments: Optional[
Literal["active", "inactive", "pending"]
]
Expand Down Expand Up @@ -1550,6 +1558,12 @@ class CreateParamsCapabilities(TypedDict):
"""
The paypal_payments capability.
"""
payto_payments: NotRequired[
"Account.CreateParamsCapabilitiesPaytoPayments"
]
"""
The payto_payments capability.
"""
promptpay_payments: NotRequired[
"Account.CreateParamsCapabilitiesPromptpayPayments"
]
Expand Down Expand Up @@ -1600,6 +1614,12 @@ class CreateParamsCapabilities(TypedDict):
"""
The treasury capability.
"""
twint_payments: NotRequired[
"Account.CreateParamsCapabilitiesTwintPayments"
]
"""
The twint_payments capability.
"""
us_bank_account_ach_payments: NotRequired[
"Account.CreateParamsCapabilitiesUsBankAccountAchPayments"
]
Expand Down Expand Up @@ -1781,6 +1801,12 @@ class CreateParamsCapabilitiesPaypalPayments(TypedDict):
Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
"""

class CreateParamsCapabilitiesPaytoPayments(TypedDict):
requested: NotRequired["bool"]
"""
Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
"""

class CreateParamsCapabilitiesPromptpayPayments(TypedDict):
requested: NotRequired["bool"]
"""
Expand Down Expand Up @@ -1835,6 +1861,12 @@ class CreateParamsCapabilitiesTreasury(TypedDict):
Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
"""

class CreateParamsCapabilitiesTwintPayments(TypedDict):
requested: NotRequired["bool"]
"""
Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
"""

class CreateParamsCapabilitiesUsBankAccountAchPayments(TypedDict):
requested: NotRequired["bool"]
"""
Expand Down
48 changes: 48 additions & 0 deletions stripe/_account_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -399,6 +399,12 @@ class CreateParamsCapabilities(TypedDict):
"""
The paypal_payments capability.
"""
payto_payments: NotRequired[
"AccountService.CreateParamsCapabilitiesPaytoPayments"
]
"""
The payto_payments capability.
"""
promptpay_payments: NotRequired[
"AccountService.CreateParamsCapabilitiesPromptpayPayments"
]
Expand Down Expand Up @@ -453,6 +459,12 @@ class CreateParamsCapabilities(TypedDict):
"""
The treasury capability.
"""
twint_payments: NotRequired[
"AccountService.CreateParamsCapabilitiesTwintPayments"
]
"""
The twint_payments capability.
"""
us_bank_account_ach_payments: NotRequired[
"AccountService.CreateParamsCapabilitiesUsBankAccountAchPayments"
]
Expand Down Expand Up @@ -634,6 +646,12 @@ class CreateParamsCapabilitiesPaypalPayments(TypedDict):
Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
"""

class CreateParamsCapabilitiesPaytoPayments(TypedDict):
requested: NotRequired["bool"]
"""
Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
"""

class CreateParamsCapabilitiesPromptpayPayments(TypedDict):
requested: NotRequired["bool"]
"""
Expand Down Expand Up @@ -688,6 +706,12 @@ class CreateParamsCapabilitiesTreasury(TypedDict):
Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
"""

class CreateParamsCapabilitiesTwintPayments(TypedDict):
requested: NotRequired["bool"]
"""
Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
"""

class CreateParamsCapabilitiesUsBankAccountAchPayments(TypedDict):
requested: NotRequired["bool"]
"""
Expand Down Expand Up @@ -1979,6 +2003,12 @@ class UpdateParamsCapabilities(TypedDict):
"""
The paypal_payments capability.
"""
payto_payments: NotRequired[
"AccountService.UpdateParamsCapabilitiesPaytoPayments"
]
"""
The payto_payments capability.
"""
promptpay_payments: NotRequired[
"AccountService.UpdateParamsCapabilitiesPromptpayPayments"
]
Expand Down Expand Up @@ -2033,6 +2063,12 @@ class UpdateParamsCapabilities(TypedDict):
"""
The treasury capability.
"""
twint_payments: NotRequired[
"AccountService.UpdateParamsCapabilitiesTwintPayments"
]
"""
The twint_payments capability.
"""
us_bank_account_ach_payments: NotRequired[
"AccountService.UpdateParamsCapabilitiesUsBankAccountAchPayments"
]
Expand Down Expand Up @@ -2214,6 +2250,12 @@ class UpdateParamsCapabilitiesPaypalPayments(TypedDict):
Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
"""

class UpdateParamsCapabilitiesPaytoPayments(TypedDict):
requested: NotRequired["bool"]
"""
Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
"""

class UpdateParamsCapabilitiesPromptpayPayments(TypedDict):
requested: NotRequired["bool"]
"""
Expand Down Expand Up @@ -2268,6 +2310,12 @@ class UpdateParamsCapabilitiesTreasury(TypedDict):
Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
"""

class UpdateParamsCapabilitiesTwintPayments(TypedDict):
requested: NotRequired["bool"]
"""
Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
"""

class UpdateParamsCapabilitiesUsBankAccountAchPayments(TypedDict):
requested: NotRequired["bool"]
"""
Expand Down
10 changes: 10 additions & 0 deletions stripe/_card.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
from stripe._error import InvalidRequestError
from stripe._expandable_field import ExpandableField
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, Union, cast, overload
Expand All @@ -26,6 +27,12 @@ class Card(DeletableAPIResource["Card"], UpdateableAPIResource["Card"]):

OBJECT_NAME: ClassVar[Literal["card"]] = "card"

class Networks(StripeObject):
preferred: Optional[str]
"""
The preferred network for co-branded cards. Can be `cartes_bancaires`, `mastercard`, `visa` or `invalid_preference` if requested network is not valid for the card.
"""

class DeleteParams(RequestOptions):
pass

Expand Down Expand Up @@ -143,6 +150,7 @@ class DeleteParams(RequestOptions):
"""
Cardholder name.
"""
networks: Optional[Networks]
object: Literal["card"]
"""
String representing the object's type. Objects of the same type share the same value.
Expand Down Expand Up @@ -310,3 +318,5 @@ def retrieve(cls, id, **params):
"stripe.Account.retrieve_external_account('account_id', 'card_id') "
"(see https://stripe.com/docs/api/external_account_cards/retrieve)."
)

_inner_class_types = {"networks": Networks}
33 changes: 33 additions & 0 deletions stripe/_charge.py
Original file line number Diff line number Diff line change
Expand Up @@ -373,6 +373,12 @@ class Checks(StripeObject):
If a CVC was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.
"""

class DecrementalAuthorization(StripeObject):
status: Literal["available", "unavailable"]
"""
Indicates whether or not the decremental authorization feature is supported.
"""

class ExtendedAuthorization(StripeObject):
status: Literal["disabled", "enabled"]
"""
Expand Down Expand Up @@ -708,6 +714,7 @@ class ShippingAddress(StripeObject):
"""
Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected.
"""
decremental_authorization: Optional[DecrementalAuthorization]
description: Optional[str]
"""
A high-level description of the type of cards issued in this range. (For internal use only and not typically available in standard API requests.)
Expand Down Expand Up @@ -778,6 +785,7 @@ class ShippingAddress(StripeObject):
"""
_inner_class_types = {
"checks": Checks,
"decremental_authorization": DecrementalAuthorization,
"extended_authorization": ExtendedAuthorization,
"incremental_authorization": IncrementalAuthorization,
"installments": Installments,
Expand Down Expand Up @@ -1455,6 +1463,24 @@ class VerifiedAddress(StripeObject):
"verified_address": VerifiedAddress,
}

class Payto(StripeObject):
bsb_number: Optional[str]
"""
Bank-State-Branch number of the bank account.
"""
last4: Optional[str]
"""
Last four digits of the bank account number.
"""
mandate: Optional[str]
"""
ID of the mandate used to make this payment.
"""
pay_id: Optional[str]
"""
The PayID alias for the bank account.
"""

class Pix(StripeObject):
bank_transaction_id: Optional[str]
"""
Expand Down Expand Up @@ -1569,6 +1595,9 @@ class Swish(StripeObject):
The last four digits of the Swish account phone number
"""

class Twint(StripeObject):
pass

class UsBankAccount(StripeObject):
account_holder_type: Optional[Literal["company", "individual"]]
"""
Expand Down Expand Up @@ -1640,6 +1669,7 @@ class Zip(StripeObject):
p24: Optional[P24]
paynow: Optional[Paynow]
paypal: Optional[Paypal]
payto: Optional[Payto]
pix: Optional[Pix]
promptpay: Optional[Promptpay]
revolut_pay: Optional[RevolutPay]
Expand All @@ -1648,6 +1678,7 @@ class Zip(StripeObject):
sofort: Optional[Sofort]
stripe_account: Optional[StripeAccount]
swish: Optional[Swish]
twint: Optional[Twint]
type: str
"""
The type of transaction-specific details of the payment method used in the payment, one of `ach_credit_transfer`, `ach_debit`, `acss_debit`, `alipay`, `au_becs_debit`, `bancontact`, `card`, `card_present`, `eps`, `giropay`, `ideal`, `klarna`, `multibanco`, `p24`, `sepa_debit`, `sofort`, `stripe_account`, or `wechat`.
Expand Down Expand Up @@ -1688,6 +1719,7 @@ class Zip(StripeObject):
"p24": P24,
"paynow": Paynow,
"paypal": Paypal,
"payto": Payto,
"pix": Pix,
"promptpay": Promptpay,
"revolut_pay": RevolutPay,
Expand All @@ -1696,6 +1728,7 @@ class Zip(StripeObject):
"sofort": Sofort,
"stripe_account": StripeAccount,
"swish": Swish,
"twint": Twint,
"us_bank_account": UsBankAccount,
"wechat": Wechat,
"wechat_pay": WechatPay,
Expand Down
Loading

0 comments on commit e7961b9

Please sign in to comment.