Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update generated code for beta #1272

Merged
merged 17 commits into from
Mar 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v879
v896
18 changes: 6 additions & 12 deletions stripe/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,7 @@ def __getattr__(name):
climate as climate,
entitlements as entitlements,
financial_connections as financial_connections,
forwarding as forwarding,
gift_cards as gift_cards,
identity as identity,
issuing as issuing,
Expand Down Expand Up @@ -352,18 +353,6 @@ def __getattr__(name):
from stripe._customer_cash_balance_transaction_service import (
CustomerCashBalanceTransactionService as CustomerCashBalanceTransactionService,
)
from stripe._customer_entitlement import (
CustomerEntitlement as CustomerEntitlement,
)
from stripe._customer_entitlement_service import (
CustomerEntitlementService as CustomerEntitlementService,
)
from stripe._customer_entitlement_summary import (
CustomerEntitlementSummary as CustomerEntitlementSummary,
)
from stripe._customer_entitlement_summary_service import (
CustomerEntitlementSummaryService as CustomerEntitlementSummaryService,
)
from stripe._customer_funding_instructions_service import (
CustomerFundingInstructionsService as CustomerFundingInstructionsService,
)
Expand Down Expand Up @@ -404,6 +393,7 @@ def __getattr__(name):
from stripe._financial_connections_service import (
FinancialConnectionsService as FinancialConnectionsService,
)
from stripe._forwarding_service import ForwardingService as ForwardingService
from stripe._funding_instructions import (
FundingInstructions as FundingInstructions,
)
Expand Down Expand Up @@ -474,6 +464,10 @@ def __getattr__(name):
from stripe._price import Price as Price
from stripe._price_service import PriceService as PriceService
from stripe._product import Product as Product
from stripe._product_feature import ProductFeature as ProductFeature
from stripe._product_feature_service import (
ProductFeatureService as ProductFeatureService,
)
from stripe._product_service import ProductService as ProductService
from stripe._promotion_code import PromotionCode as PromotionCode
from stripe._promotion_code_service import (
Expand Down
16 changes: 16 additions & 0 deletions stripe/_account.py
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,10 @@ class Capabilities(StripeObject):
"""
The status of the link_payments capability of the account, or whether the account can directly process Link charges.
"""
mobilepay_payments: Optional[Literal["active", "inactive", "pending"]]
"""
The status of the MobilepPay capability of the account, or whether the account can directly process MobilePay charges.
"""
oxxo_payments: Optional[Literal["active", "inactive", "pending"]]
"""
The status of the OXXO payments capability of the account, or whether the account can directly process OXXO charges.
Expand Down Expand Up @@ -1534,6 +1538,12 @@ class CreateParamsCapabilities(TypedDict):
"""
The link_payments capability.
"""
mobilepay_payments: NotRequired[
"Account.CreateParamsCapabilitiesMobilepayPayments"
]
"""
The mobilepay_payments capability.
"""
oxxo_payments: NotRequired[
"Account.CreateParamsCapabilitiesOxxoPayments"
]
Expand Down Expand Up @@ -1777,6 +1787,12 @@ class CreateParamsCapabilitiesLinkPayments(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 CreateParamsCapabilitiesMobilepayPayments(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 CreateParamsCapabilitiesOxxoPayments(TypedDict):
requested: NotRequired["bool"]
"""
Expand Down
24 changes: 24 additions & 0 deletions stripe/_account_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -375,6 +375,12 @@ class CreateParamsCapabilities(TypedDict):
"""
The link_payments capability.
"""
mobilepay_payments: NotRequired[
"AccountService.CreateParamsCapabilitiesMobilepayPayments"
]
"""
The mobilepay_payments capability.
"""
oxxo_payments: NotRequired[
"AccountService.CreateParamsCapabilitiesOxxoPayments"
]
Expand Down Expand Up @@ -622,6 +628,12 @@ class CreateParamsCapabilitiesLinkPayments(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 CreateParamsCapabilitiesMobilepayPayments(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 CreateParamsCapabilitiesOxxoPayments(TypedDict):
requested: NotRequired["bool"]
"""
Expand Down Expand Up @@ -1982,6 +1994,12 @@ class UpdateParamsCapabilities(TypedDict):
"""
The link_payments capability.
"""
mobilepay_payments: NotRequired[
"AccountService.UpdateParamsCapabilitiesMobilepayPayments"
]
"""
The mobilepay_payments capability.
"""
oxxo_payments: NotRequired[
"AccountService.UpdateParamsCapabilitiesOxxoPayments"
]
Expand Down Expand Up @@ -2229,6 +2247,12 @@ class UpdateParamsCapabilitiesLinkPayments(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 UpdateParamsCapabilitiesMobilepayPayments(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 UpdateParamsCapabilitiesOxxoPayments(TypedDict):
requested: NotRequired["bool"]
"""
Expand Down
2 changes: 1 addition & 1 deletion stripe/_api_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
# File generated from our OpenAPI spec
class _ApiVersion:
CURRENT = "2023-10-16"
PREVIEW = "2024-02-15.preview-v2"
PREVIEW = "2024-03-20.preview-v2"
32 changes: 32 additions & 0 deletions stripe/_charge.py
Original file line number Diff line number Diff line change
Expand Up @@ -1281,6 +1281,32 @@ class Link(StripeObject):
You could use this attribute to get a sense of international fees.
"""

class Mobilepay(StripeObject):
class Card(StripeObject):
brand: Optional[str]
"""
Brand of the card used in the transaction
"""
country: Optional[str]
"""
Two-letter ISO code representing the country of the card
"""
exp_month: Optional[int]
"""
Two digit number representing the card's expiration month
"""
exp_year: Optional[int]
"""
Two digit number representing the card's expiration year
"""
last4: Optional[str]
"""
The last 4 digits of the card
"""

card: Optional[Card]
_inner_class_types = {"card": Card}

class Multibanco(StripeObject):
entity: Optional[str]
"""
Expand Down Expand Up @@ -1621,6 +1647,10 @@ class UsBankAccount(StripeObject):
"""
Last four digits of the bank account number.
"""
payment_reference: Optional[str]
"""
Reference number to locate ACH payments with customer's bank.
"""
routing_number: Optional[str]
"""
Routing number of the bank account.
Expand Down Expand Up @@ -1666,6 +1696,7 @@ class Zip(StripeObject):
klarna: Optional[Klarna]
konbini: Optional[Konbini]
link: Optional[Link]
mobilepay: Optional[Mobilepay]
multibanco: Optional[Multibanco]
oxxo: Optional[Oxxo]
p24: Optional[P24]
Expand Down Expand Up @@ -1716,6 +1747,7 @@ class Zip(StripeObject):
"klarna": Klarna,
"konbini": Konbini,
"link": Link,
"mobilepay": Mobilepay,
"multibanco": Multibanco,
"oxxo": Oxxo,
"p24": P24,
Expand Down
25 changes: 20 additions & 5 deletions stripe/_confirmation_token.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@

if TYPE_CHECKING:
from stripe._charge import Charge
from stripe._payment_method import PaymentMethod
from stripe._setup_attempt import SetupAttempt


Expand Down Expand Up @@ -813,6 +812,9 @@ class Link(StripeObject):
[Deprecated] This is a legacy parameter that no longer has any function.
"""

class Mobilepay(StripeObject):
pass

class Multibanco(StripeObject):
pass

Expand Down Expand Up @@ -1072,6 +1074,7 @@ class Zip(StripeObject):
klarna: Optional[Klarna]
konbini: Optional[Konbini]
link: Optional[Link]
mobilepay: Optional[Mobilepay]
multibanco: Optional[Multibanco]
oxxo: Optional[Oxxo]
p24: Optional[P24]
Expand Down Expand Up @@ -1108,6 +1111,7 @@ class Zip(StripeObject):
"klarna",
"konbini",
"link",
"mobilepay",
"multibanco",
"oxxo",
"p24",
Expand Down Expand Up @@ -1155,6 +1159,7 @@ class Zip(StripeObject):
"klarna": Klarna,
"konbini": Konbini,
"link": Link,
"mobilepay": Mobilepay,
"multibanco": Multibanco,
"oxxo": Oxxo,
"p24": P24,
Expand Down Expand Up @@ -1368,6 +1373,12 @@ class CreateParamsPaymentMethodData(TypedDict):
"""
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`.
"""
mobilepay: NotRequired[
"ConfirmationToken.CreateParamsPaymentMethodDataMobilepay"
]
"""
If this is a `mobilepay` PaymentMethod, this hash contains details about the MobilePay payment method.
"""
multibanco: NotRequired[
"ConfirmationToken.CreateParamsPaymentMethodDataMultibanco"
]
Expand Down Expand Up @@ -1468,6 +1479,7 @@ class CreateParamsPaymentMethodData(TypedDict):
"klarna",
"konbini",
"link",
"mobilepay",
"multibanco",
"oxxo",
"p24",
Expand Down Expand Up @@ -1698,6 +1710,9 @@ class CreateParamsPaymentMethodDataKonbini(TypedDict):
class CreateParamsPaymentMethodDataLink(TypedDict):
pass

class CreateParamsPaymentMethodDataMobilepay(TypedDict):
pass

class CreateParamsPaymentMethodDataMultibanco(TypedDict):
pass

Expand Down Expand Up @@ -1867,10 +1882,6 @@ class RetrieveParams(RequestOptions):
"""
ID of the PaymentIntent that this ConfirmationToken was used to confirm, or null if this ConfirmationToken has not yet been used.
"""
payment_method: Optional[ExpandableField["PaymentMethod"]]
"""
ID of an existing PaymentMethod.
"""
payment_method_options: Optional[PaymentMethodOptions]
"""
Payment-method-specific configuration for this ConfirmationToken.
Expand All @@ -1897,6 +1908,10 @@ class RetrieveParams(RequestOptions):
"""
Shipping information collected on this ConfirmationToken.
"""
use_stripe_sdk: bool
"""
Indicates whether the Stripe SDK is used to handle confirmation flow. Defaults to `true` on ConfirmationToken.
"""

@classmethod
def retrieve(
Expand Down
Loading
Loading