Skip to content

Commit

Permalink
Update generated code (#1328)
Browse files Browse the repository at this point in the history
* Update generated code for v1022

* Update generated code for v1023

* Update generated code for v1025

* Update generated code for v1027

* Update generated code for v1028

* Update generated code for v1029

* Update generated code for v1030

* Update generated code for v1032

* Update generated code for v1033

* Update generated code for v1034

* Update generated code for v1035

* Update generated code for v1036

* Update generated code for v1037

* Update generated code for v1038

* Update generated code for v1039

---------

Co-authored-by: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com>
Co-authored-by: prathmesh-stripe <165320323+prathmesh-stripe@users.noreply.github.com>
  • Loading branch information
stripe-openapi[bot] and prathmesh-stripe committed May 16, 2024
1 parent 46edbe3 commit e11f4fb
Show file tree
Hide file tree
Showing 27 changed files with 359 additions and 19 deletions.
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v1020
v1039
21 changes: 21 additions & 0 deletions stripe/_application_fee.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
from stripe._listable_api_resource import ListableAPIResource
from stripe._nested_resource_class_methods import nested_resource_class_methods
from stripe._request_options import RequestOptions
from stripe._stripe_object import StripeObject
from stripe._util import class_method_variant, sanitize_id
from typing import ClassVar, Dict, List, Optional, cast, overload
from typing_extensions import (
Expand All @@ -27,6 +28,20 @@
class ApplicationFee(ListableAPIResource["ApplicationFee"]):
OBJECT_NAME: ClassVar[Literal["application_fee"]] = "application_fee"

class FeeSource(StripeObject):
charge: Optional[str]
"""
Charge ID that created this application fee.
"""
payout: Optional[str]
"""
Payout ID that created this application fee.
"""
type: Literal["charge", "payout"]
"""
Type of object that created the application fee, either `charge` or `payout`.
"""

class CreateRefundParams(RequestOptions):
amount: NotRequired[int]
"""
Expand Down Expand Up @@ -171,6 +186,10 @@ class RetrieveRefundParams(RequestOptions):
"""
Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
"""
fee_source: Optional[FeeSource]
"""
Polymorphic source of the application fee. Includes the ID of the object the application fee was created from.
"""
id: str
"""
Unique identifier for the object.
Expand Down Expand Up @@ -595,3 +614,5 @@ async def list_refunds_async(
params=params,
),
)

_inner_class_types = {"fee_source": FeeSource}
35 changes: 34 additions & 1 deletion stripe/_balance.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,32 @@ class SourceTypes(StripeObject):
_inner_class_types = {"source_types": SourceTypes}

class InstantAvailable(StripeObject):
class NetAvailable(StripeObject):
class SourceTypes(StripeObject):
bank_account: Optional[int]
"""
Amount for bank account.
"""
card: Optional[int]
"""
Amount for card.
"""
fpx: Optional[int]
"""
Amount for FPX.
"""

amount: int
"""
Net balance amount, subtracting fees from platform-set pricing.
"""
destination: str
"""
ID of the external account for this net balance (not expandable).
"""
source_types: Optional[SourceTypes]
_inner_class_types = {"source_types": SourceTypes}

class SourceTypes(StripeObject):
bank_account: Optional[int]
"""
Expand All @@ -99,8 +125,15 @@ class SourceTypes(StripeObject):
"""
Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
"""
net_available: Optional[List[NetAvailable]]
"""
Breakdown of balance by destination.
"""
source_types: Optional[SourceTypes]
_inner_class_types = {"source_types": SourceTypes}
_inner_class_types = {
"net_available": NetAvailable,
"source_types": SourceTypes,
}

class Issuing(StripeObject):
class Available(StripeObject):
Expand Down
4 changes: 4 additions & 0 deletions stripe/_charge.py
Original file line number Diff line number Diff line change
Expand Up @@ -918,6 +918,10 @@ class Receipt(StripeObject):
"""
Defines whether the authorized amount can be over-captured or not
"""
preferred_locales: Optional[List[str]]
"""
EMV tag 5F2D. Preferred languages specified by the integrated circuit chip.
"""
read_method: Optional[
Literal[
"contact_emv",
Expand Down
4 changes: 4 additions & 0 deletions stripe/_confirmation_token.py
Original file line number Diff line number Diff line change
Expand Up @@ -539,6 +539,10 @@ class Networks(StripeObject):
"""
Contains information about card networks that can be used to process the payment.
"""
preferred_locales: Optional[List[str]]
"""
EMV tag 5F2D. Preferred languages specified by the integrated circuit chip.
"""
read_method: Optional[
Literal[
"contact_emv",
Expand Down
11 changes: 9 additions & 2 deletions stripe/_dispute.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,12 @@ class Card(StripeObject):
The card network's specific dispute reason code, which maps to one of Stripe's primary dispute categories to simplify response guidance. The [Network code map](https://stripe.com/docs/disputes/categories#network-code-map) lists all available dispute reason codes by network.
"""

class Klarna(StripeObject):
reason_code: Optional[str]
"""
The reason for the dispute as defined by Klarna
"""

class Paypal(StripeObject):
case_id: Optional[str]
"""
Expand All @@ -186,12 +192,13 @@ class Paypal(StripeObject):
"""

card: Optional[Card]
klarna: Optional[Klarna]
paypal: Optional[Paypal]
type: Literal["card", "paypal"]
type: Literal["card", "klarna", "paypal"]
"""
Payment method type.
"""
_inner_class_types = {"card": Card, "paypal": Paypal}
_inner_class_types = {"card": Card, "klarna": Klarna, "paypal": Paypal}

class CloseParams(RequestOptions):
expand: NotRequired[List[str]]
Expand Down
2 changes: 1 addition & 1 deletion stripe/_invoice.py
Original file line number Diff line number Diff line change
Expand Up @@ -5612,7 +5612,7 @@ class VoidInvoiceParams(RequestOptions):
"""
attempt_count: int
"""
Number of payment attempts made for this invoice, from the perspective of the payment retry schedule. Any payment attempt counts as the first attempt, and subsequently only automatic retries increment the attempt count. In other words, manual payment attempts after the first attempt do not affect the retry schedule.
Number of payment attempts made for this invoice, from the perspective of the payment retry schedule. Any payment attempt counts as the first attempt, and subsequently only automatic retries increment the attempt count. In other words, manual payment attempts after the first attempt do not affect the retry schedule. If a failure is returned with a non-retryable return code, the invoice can no longer be retried unless a new payment method is obtained. Retries will continue to be scheduled, and attempt_count will continue to increment, but retries will only be executed if a new payment method is obtained.
"""
attempted: bool
"""
Expand Down
46 changes: 46 additions & 0 deletions stripe/_payment_intent.py
Original file line number Diff line number Diff line change
Expand Up @@ -1278,6 +1278,14 @@ class MandateOptions(StripeObject):
}

class CardPresent(StripeObject):
class Routing(StripeObject):
requested_priority: Optional[
Literal["domestic", "international"]
]
"""
Requested routing priority
"""

request_extended_authorization: Optional[bool]
"""
Request ability to capture this payment beyond the standard [authorization validity window](https://stripe.com/docs/terminal/features/extended-authorizations#authorization-validity)
Expand All @@ -1286,6 +1294,8 @@ class CardPresent(StripeObject):
"""
Request ability to [increment](https://stripe.com/docs/terminal/features/incremental-authorizations) this PaymentIntent if the combination of MCC and card brand is eligible. Check [incremental_authorization_supported](https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-card_present-incremental_authorization_supported) in the [Confirm](https://stripe.com/docs/api/payment_intents/confirm) response to verify support.
"""
routing: Optional[Routing]
_inner_class_types = {"routing": Routing}

class Cashapp(StripeObject):
capture_method: Optional[Literal["manual"]]
Expand Down Expand Up @@ -3311,6 +3321,18 @@ class ConfirmParamsPaymentMethodOptionsCardPresent(TypedDict):
"""
Request ability to [increment](https://stripe.com/docs/terminal/features/incremental-authorizations) this PaymentIntent if the combination of MCC and card brand is eligible. Check [incremental_authorization_supported](https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-card_present-incremental_authorization_supported) in the [Confirm](https://stripe.com/docs/api/payment_intents/confirm) response to verify support.
"""
routing: NotRequired[
"PaymentIntent.ConfirmParamsPaymentMethodOptionsCardPresentRouting"
]
"""
Network routing priority on co-branded EMV cards supporting domestic debit and international card schemes.
"""

class ConfirmParamsPaymentMethodOptionsCardPresentRouting(TypedDict):
requested_priority: NotRequired[Literal["domestic", "international"]]
"""
Routing requested priority
"""

class ConfirmParamsPaymentMethodOptionsCardThreeDSecure(TypedDict):
ares_trans_status: NotRequired[
Expand Down Expand Up @@ -5500,6 +5522,18 @@ class CreateParamsPaymentMethodOptionsCardPresent(TypedDict):
"""
Request ability to [increment](https://stripe.com/docs/terminal/features/incremental-authorizations) this PaymentIntent if the combination of MCC and card brand is eligible. Check [incremental_authorization_supported](https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-card_present-incremental_authorization_supported) in the [Confirm](https://stripe.com/docs/api/payment_intents/confirm) response to verify support.
"""
routing: NotRequired[
"PaymentIntent.CreateParamsPaymentMethodOptionsCardPresentRouting"
]
"""
Network routing priority on co-branded EMV cards supporting domestic debit and international card schemes.
"""

class CreateParamsPaymentMethodOptionsCardPresentRouting(TypedDict):
requested_priority: NotRequired[Literal["domestic", "international"]]
"""
Routing requested priority
"""

class CreateParamsPaymentMethodOptionsCardThreeDSecure(TypedDict):
ares_trans_status: NotRequired[
Expand Down Expand Up @@ -7683,6 +7717,18 @@ class ModifyParamsPaymentMethodOptionsCardPresent(TypedDict):
"""
Request ability to [increment](https://stripe.com/docs/terminal/features/incremental-authorizations) this PaymentIntent if the combination of MCC and card brand is eligible. Check [incremental_authorization_supported](https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-card_present-incremental_authorization_supported) in the [Confirm](https://stripe.com/docs/api/payment_intents/confirm) response to verify support.
"""
routing: NotRequired[
"PaymentIntent.ModifyParamsPaymentMethodOptionsCardPresentRouting"
]
"""
Network routing priority on co-branded EMV cards supporting domestic debit and international card schemes.
"""

class ModifyParamsPaymentMethodOptionsCardPresentRouting(TypedDict):
requested_priority: NotRequired[Literal["domestic", "international"]]
"""
Routing requested priority
"""

class ModifyParamsPaymentMethodOptionsCardThreeDSecure(TypedDict):
ares_trans_status: NotRequired[
Expand Down
36 changes: 36 additions & 0 deletions stripe/_payment_intent_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -1465,6 +1465,18 @@ class ConfirmParamsPaymentMethodOptionsCardPresent(TypedDict):
"""
Request ability to [increment](https://stripe.com/docs/terminal/features/incremental-authorizations) this PaymentIntent if the combination of MCC and card brand is eligible. Check [incremental_authorization_supported](https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-card_present-incremental_authorization_supported) in the [Confirm](https://stripe.com/docs/api/payment_intents/confirm) response to verify support.
"""
routing: NotRequired[
"PaymentIntentService.ConfirmParamsPaymentMethodOptionsCardPresentRouting"
]
"""
Network routing priority on co-branded EMV cards supporting domestic debit and international card schemes.
"""

class ConfirmParamsPaymentMethodOptionsCardPresentRouting(TypedDict):
requested_priority: NotRequired[Literal["domestic", "international"]]
"""
Routing requested priority
"""

class ConfirmParamsPaymentMethodOptionsCardThreeDSecure(TypedDict):
ares_trans_status: NotRequired[
Expand Down Expand Up @@ -3678,6 +3690,18 @@ class CreateParamsPaymentMethodOptionsCardPresent(TypedDict):
"""
Request ability to [increment](https://stripe.com/docs/terminal/features/incremental-authorizations) this PaymentIntent if the combination of MCC and card brand is eligible. Check [incremental_authorization_supported](https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-card_present-incremental_authorization_supported) in the [Confirm](https://stripe.com/docs/api/payment_intents/confirm) response to verify support.
"""
routing: NotRequired[
"PaymentIntentService.CreateParamsPaymentMethodOptionsCardPresentRouting"
]
"""
Network routing priority on co-branded EMV cards supporting domestic debit and international card schemes.
"""

class CreateParamsPaymentMethodOptionsCardPresentRouting(TypedDict):
requested_priority: NotRequired[Literal["domestic", "international"]]
"""
Routing requested priority
"""

class CreateParamsPaymentMethodOptionsCardThreeDSecure(TypedDict):
ares_trans_status: NotRequired[
Expand Down Expand Up @@ -5913,6 +5937,18 @@ class UpdateParamsPaymentMethodOptionsCardPresent(TypedDict):
"""
Request ability to [increment](https://stripe.com/docs/terminal/features/incremental-authorizations) this PaymentIntent if the combination of MCC and card brand is eligible. Check [incremental_authorization_supported](https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-card_present-incremental_authorization_supported) in the [Confirm](https://stripe.com/docs/api/payment_intents/confirm) response to verify support.
"""
routing: NotRequired[
"PaymentIntentService.UpdateParamsPaymentMethodOptionsCardPresentRouting"
]
"""
Network routing priority on co-branded EMV cards supporting domestic debit and international card schemes.
"""

class UpdateParamsPaymentMethodOptionsCardPresentRouting(TypedDict):
requested_priority: NotRequired[Literal["domestic", "international"]]
"""
Routing requested priority
"""

class UpdateParamsPaymentMethodOptionsCardThreeDSecure(TypedDict):
ares_trans_status: NotRequired[
Expand Down
4 changes: 4 additions & 0 deletions stripe/_payment_method.py
Original file line number Diff line number Diff line change
Expand Up @@ -515,6 +515,10 @@ class Networks(StripeObject):
"""
Contains information about card networks that can be used to process the payment.
"""
preferred_locales: Optional[List[str]]
"""
EMV tag 5F2D. Preferred languages specified by the integrated circuit chip.
"""
read_method: Optional[
Literal[
"contact_emv",
Expand Down
9 changes: 9 additions & 0 deletions stripe/_payout.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
)

if TYPE_CHECKING:
from stripe._application_fee import ApplicationFee
from stripe._balance_transaction import BalanceTransaction
from stripe._bank_account import BankAccount
from stripe._card import Card
Expand Down Expand Up @@ -184,6 +185,14 @@ class ReverseParams(RequestOptions):
"""
The amount (in cents (or local equivalent)) that transfers to your bank account or debit card.
"""
application_fee: Optional[ExpandableField["ApplicationFee"]]
"""
The application fee (if any) for the payout. [See the Connect documentation](https://stripe.com/docs/connect/instant-payouts#monetization-and-fees) for details.
"""
application_fee_amount: Optional[int]
"""
The amount of the application fee (if any) requested for the payout. [See the Connect documentation](https://stripe.com/docs/connect/instant-payouts#monetization-and-fees) for details.
"""
arrival_date: int
"""
Date that you can expect the payout to arrive in the bank. This factors in delays to account for weekends or bank holidays.
Expand Down
2 changes: 1 addition & 1 deletion stripe/_price.py
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,7 @@ class ListParams(RequestOptions):
"""
lookup_keys: NotRequired[List[str]]
"""
Only return the price with these lookup_keys, if any exist.
Only return the price with these lookup_keys, if any exist. You can specify up to 10 lookup_keys.
"""
product: NotRequired[str]
"""
Expand Down
2 changes: 1 addition & 1 deletion stripe/_price_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ class ListParams(TypedDict):
"""
lookup_keys: NotRequired[List[str]]
"""
Only return the price with these lookup_keys, if any exist.
Only return the price with these lookup_keys, if any exist. You can specify up to 10 lookup_keys.
"""
product: NotRequired[str]
"""
Expand Down
6 changes: 3 additions & 3 deletions stripe/_product.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ class CreateParams(RequestOptions):
An arbitrary string to be displayed on your customer's credit card or bank statement. While most banks display this information consistently, some may display it incorrectly or not at all.
This may be up to 22 characters. The statement description may not include `<`, `>`, `\\`, `"`, `'` characters, and will appear on your customer's statement in capital letters. Non-ASCII characters are automatically stripped.
It must contain at least one letter.
It must contain at least one letter. Only used for subscription payments.
"""
tax_code: NotRequired[str]
"""
Expand Down Expand Up @@ -433,7 +433,7 @@ class ModifyParams(RequestOptions):
An arbitrary string to be displayed on your customer's credit card or bank statement. While most banks display this information consistently, some may display it incorrectly or not at all.
This may be up to 22 characters. The statement description may not include `<`, `>`, `\\`, `"`, `'` characters, and will appear on your customer's statement in capital letters. Non-ASCII characters are automatically stripped.
It must contain at least one letter. May only be set if `type=service`.
It must contain at least one letter. May only be set if `type=service`. Only used for subscription payments.
"""
tax_code: NotRequired["Literal['']|str"]
"""
Expand Down Expand Up @@ -556,7 +556,7 @@ class SearchParams(RequestOptions):
"""
statement_descriptor: Optional[str]
"""
Extra information about a product which will appear on your customer's credit card statement. In the case that multiple products are billed at once, the first statement descriptor will be used.
Extra information about a product which will appear on your customer's credit card statement. In the case that multiple products are billed at once, the first statement descriptor will be used. Only used for subscription payments.
"""
tax_code: Optional[ExpandableField["TaxCode"]]
"""
Expand Down

0 comments on commit e11f4fb

Please sign in to comment.