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 #1225

Merged
merged 6 commits into from
Feb 8, 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 @@
v807
v814
12 changes: 9 additions & 3 deletions stripe/_account.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
from stripe._card import Card
from stripe._file import File
from stripe._login_link import LoginLink
from stripe._tax_id import TaxId


@nested_resource_class_methods("capability")
Expand Down Expand Up @@ -934,6 +935,12 @@ class Dashboard(StripeObject):
The timezone used in the Stripe Dashboard for this account. A list of possible time zone values is maintained at the [IANA Time Zone Database](http://www.iana.org/time-zones).
"""

class Invoices(StripeObject):
default_account_tax_ids: Optional[List[ExpandableField["TaxId"]]]
"""
The list of default Account Tax IDs to automatically include on invoices. Account Tax IDs get added when an invoice is finalized.
"""

class Payments(StripeObject):
statement_descriptor: Optional[str]
"""
Expand Down Expand Up @@ -1015,6 +1022,7 @@ class TosAcceptance(StripeObject):
card_issuing: Optional[CardIssuing]
card_payments: CardPayments
dashboard: Dashboard
invoices: Optional[Invoices]
payments: Payments
payouts: Optional[Payouts]
sepa_debit_payments: Optional[SepaDebitPayments]
Expand All @@ -1025,6 +1033,7 @@ class TosAcceptance(StripeObject):
"card_issuing": CardIssuing,
"card_payments": CardPayments,
"dashboard": Dashboard,
"invoices": Invoices,
"payments": Payments,
"payouts": Payouts,
"sepa_debit_payments": SepaDebitPayments,
Expand Down Expand Up @@ -3886,9 +3895,6 @@ def reject( # pyright: ignore[reportGeneralTypeIssues]
),
)

# We are not adding a helper for capabilities here as the Account object already has a
# capabilities property which is a hash and not the sub-list of capabilities.

@classmethod
def retrieve(cls, id=None, **params) -> "Account":
instance = cls(id, **params)
Expand Down
10 changes: 10 additions & 0 deletions stripe/_account_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -2836,6 +2836,10 @@ class UpdateParamsSettings(TypedDict):
"""
Settings specific to card charging on the account.
"""
invoices: NotRequired["AccountService.UpdateParamsSettingsInvoices"]
"""
Settings specific to the account's use of Invoices.
"""
payments: NotRequired["AccountService.UpdateParamsSettingsPayments"]
"""
Settings that apply across payment methods for charging on the account.
Expand Down Expand Up @@ -2925,6 +2929,12 @@ class UpdateParamsSettingsCardPaymentsDeclineOn(TypedDict):
Whether Stripe automatically declines charges with an incorrect CVC. This setting only applies when a CVC is provided and it fails bank verification.
"""

class UpdateParamsSettingsInvoices(TypedDict):
default_account_tax_ids: NotRequired["Literal['']|List[str]"]
"""
The list of default Account Tax IDs to automatically include on invoices. Account Tax IDs get added when an invoice is finalized.
"""

class UpdateParamsSettingsPayments(TypedDict):
statement_descriptor: NotRequired["str"]
"""
Expand Down
3 changes: 2 additions & 1 deletion stripe/_charge.py
Original file line number Diff line number Diff line change
Expand Up @@ -1313,11 +1313,12 @@ class P24(StripeObject):
"santander_przelew24",
"tmobile_usbugi_bankowe",
"toyota_bank",
"velobank",
"volkswagen_bank",
]
]
"""
The customer's bank. Can be one of `ing`, `citi_handlowy`, `tmobile_usbugi_bankowe`, `plus_bank`, `etransfer_pocztowy24`, `banki_spbdzielcze`, `bank_nowy_bfg_sa`, `getin_bank`, `blik`, `noble_pay`, `ideabank`, `envelobank`, `santander_przelew24`, `nest_przelew`, `mbank_mtransfer`, `inteligo`, `pbac_z_ipko`, `bnp_paribas`, `credit_agricole`, `toyota_bank`, `bank_pekao_sa`, `volkswagen_bank`, `bank_millennium`, `alior_bank`, or `boz`.
The customer's bank. Can be one of `ing`, `citi_handlowy`, `tmobile_usbugi_bankowe`, `plus_bank`, `etransfer_pocztowy24`, `banki_spbdzielcze`, `bank_nowy_bfg_sa`, `getin_bank`, `velobank`, `blik`, `noble_pay`, `ideabank`, `envelobank`, `santander_przelew24`, `nest_przelew`, `mbank_mtransfer`, `inteligo`, `pbac_z_ipko`, `bnp_paribas`, `credit_agricole`, `toyota_bank`, `bank_pekao_sa`, `volkswagen_bank`, `bank_millennium`, `alior_bank`, or `boz`.
"""
reference: Optional[str]
"""
Expand Down
61 changes: 57 additions & 4 deletions stripe/_payment_intent.py
Original file line number Diff line number Diff line change
Expand Up @@ -1056,7 +1056,14 @@ class Bancontact(StripeObject):
"""

class Blik(StripeObject):
pass
setup_future_usage: Optional[Literal["none"]]
"""
Indicates that you intend to make future payments with this PaymentIntent's payment method.

Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.

When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
"""

class Boleto(StripeObject):
expires_after_days: int
Expand Down Expand Up @@ -1219,6 +1226,10 @@ class MandateOptions(StripeObject):
"""
We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. If not provided, this value defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine.
"""
require_cvc_recollection: Optional[bool]
"""
When enabled, using a card that is attached to a customer will require the CVC to be provided again (i.e. using the cvc_token parameter).
"""
setup_future_usage: Optional[
Literal["none", "off_session", "on_session"]
]
Expand Down Expand Up @@ -2443,7 +2454,7 @@ class ConfirmParamsPaymentMethodDataOxxo(TypedDict):

class ConfirmParamsPaymentMethodDataP24(TypedDict):
bank: NotRequired[
"Literal['alior_bank', 'bank_millennium', 'bank_nowy_bfg_sa', 'bank_pekao_sa', 'banki_spbdzielcze', 'blik', 'bnp_paribas', 'boz', 'citi_handlowy', 'credit_agricole', 'envelobank', 'etransfer_pocztowy24', 'getin_bank', 'ideabank', 'ing', 'inteligo', 'mbank_mtransfer', 'nest_przelew', 'noble_pay', 'pbac_z_ipko', 'plus_bank', 'santander_przelew24', 'tmobile_usbugi_bankowe', 'toyota_bank', 'volkswagen_bank']"
"Literal['alior_bank', 'bank_millennium', 'bank_nowy_bfg_sa', 'bank_pekao_sa', 'banki_spbdzielcze', 'blik', 'bnp_paribas', 'boz', 'citi_handlowy', 'credit_agricole', 'envelobank', 'etransfer_pocztowy24', 'getin_bank', 'ideabank', 'ing', 'inteligo', 'mbank_mtransfer', 'nest_przelew', 'noble_pay', 'pbac_z_ipko', 'plus_bank', 'santander_przelew24', 'tmobile_usbugi_bankowe', 'toyota_bank', 'velobank', 'volkswagen_bank']"
]
"""
The customer's bank.
Expand Down Expand Up @@ -2887,6 +2898,16 @@ class ConfirmParamsPaymentMethodOptionsBlik(TypedDict):
"""
The 6-digit BLIK code that a customer has generated using their banking application. Can only be set on confirmation.
"""
setup_future_usage: NotRequired["Literal['']|Literal['none']"]
"""
Indicates that you intend to make future payments with this PaymentIntent's payment method.

Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.

When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).

If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`.
"""

class ConfirmParamsPaymentMethodOptionsBoleto(TypedDict):
expires_after_days: NotRequired["int"]
Expand Down Expand Up @@ -2971,6 +2992,10 @@ class ConfirmParamsPaymentMethodOptionsCard(TypedDict):
"""
We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. If not provided, this value defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine.
"""
require_cvc_recollection: NotRequired["bool"]
"""
When enabled, using a card that is attached to a customer will require the CVC to be provided again (i.e. using the cvc_token parameter).
"""
setup_future_usage: NotRequired[
"Literal['']|Literal['none', 'off_session', 'on_session']"
]
Expand Down Expand Up @@ -4362,7 +4387,7 @@ class CreateParamsPaymentMethodDataOxxo(TypedDict):

class CreateParamsPaymentMethodDataP24(TypedDict):
bank: NotRequired[
"Literal['alior_bank', 'bank_millennium', 'bank_nowy_bfg_sa', 'bank_pekao_sa', 'banki_spbdzielcze', 'blik', 'bnp_paribas', 'boz', 'citi_handlowy', 'credit_agricole', 'envelobank', 'etransfer_pocztowy24', 'getin_bank', 'ideabank', 'ing', 'inteligo', 'mbank_mtransfer', 'nest_przelew', 'noble_pay', 'pbac_z_ipko', 'plus_bank', 'santander_przelew24', 'tmobile_usbugi_bankowe', 'toyota_bank', 'volkswagen_bank']"
"Literal['alior_bank', 'bank_millennium', 'bank_nowy_bfg_sa', 'bank_pekao_sa', 'banki_spbdzielcze', 'blik', 'bnp_paribas', 'boz', 'citi_handlowy', 'credit_agricole', 'envelobank', 'etransfer_pocztowy24', 'getin_bank', 'ideabank', 'ing', 'inteligo', 'mbank_mtransfer', 'nest_przelew', 'noble_pay', 'pbac_z_ipko', 'plus_bank', 'santander_przelew24', 'tmobile_usbugi_bankowe', 'toyota_bank', 'velobank', 'volkswagen_bank']"
]
"""
The customer's bank.
Expand Down Expand Up @@ -4806,6 +4831,16 @@ class CreateParamsPaymentMethodOptionsBlik(TypedDict):
"""
The 6-digit BLIK code that a customer has generated using their banking application. Can only be set on confirmation.
"""
setup_future_usage: NotRequired["Literal['']|Literal['none']"]
"""
Indicates that you intend to make future payments with this PaymentIntent's payment method.

Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.

When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).

If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`.
"""

class CreateParamsPaymentMethodOptionsBoleto(TypedDict):
expires_after_days: NotRequired["int"]
Expand Down Expand Up @@ -4890,6 +4925,10 @@ class CreateParamsPaymentMethodOptionsCard(TypedDict):
"""
We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. If not provided, this value defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine.
"""
require_cvc_recollection: NotRequired["bool"]
"""
When enabled, using a card that is attached to a customer will require the CVC to be provided again (i.e. using the cvc_token parameter).
"""
setup_future_usage: NotRequired[
"Literal['']|Literal['none', 'off_session', 'on_session']"
]
Expand Down Expand Up @@ -6283,7 +6322,7 @@ class ModifyParamsPaymentMethodDataOxxo(TypedDict):

class ModifyParamsPaymentMethodDataP24(TypedDict):
bank: NotRequired[
"Literal['alior_bank', 'bank_millennium', 'bank_nowy_bfg_sa', 'bank_pekao_sa', 'banki_spbdzielcze', 'blik', 'bnp_paribas', 'boz', 'citi_handlowy', 'credit_agricole', 'envelobank', 'etransfer_pocztowy24', 'getin_bank', 'ideabank', 'ing', 'inteligo', 'mbank_mtransfer', 'nest_przelew', 'noble_pay', 'pbac_z_ipko', 'plus_bank', 'santander_przelew24', 'tmobile_usbugi_bankowe', 'toyota_bank', 'volkswagen_bank']"
"Literal['alior_bank', 'bank_millennium', 'bank_nowy_bfg_sa', 'bank_pekao_sa', 'banki_spbdzielcze', 'blik', 'bnp_paribas', 'boz', 'citi_handlowy', 'credit_agricole', 'envelobank', 'etransfer_pocztowy24', 'getin_bank', 'ideabank', 'ing', 'inteligo', 'mbank_mtransfer', 'nest_przelew', 'noble_pay', 'pbac_z_ipko', 'plus_bank', 'santander_przelew24', 'tmobile_usbugi_bankowe', 'toyota_bank', 'velobank', 'volkswagen_bank']"
]
"""
The customer's bank.
Expand Down Expand Up @@ -6727,6 +6766,16 @@ class ModifyParamsPaymentMethodOptionsBlik(TypedDict):
"""
The 6-digit BLIK code that a customer has generated using their banking application. Can only be set on confirmation.
"""
setup_future_usage: NotRequired["Literal['']|Literal['none']"]
"""
Indicates that you intend to make future payments with this PaymentIntent's payment method.

Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.

When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).

If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`.
"""

class ModifyParamsPaymentMethodOptionsBoleto(TypedDict):
expires_after_days: NotRequired["int"]
Expand Down Expand Up @@ -6811,6 +6860,10 @@ class ModifyParamsPaymentMethodOptionsCard(TypedDict):
"""
We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. If not provided, this value defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine.
"""
require_cvc_recollection: NotRequired["bool"]
"""
When enabled, using a card that is attached to a customer will require the CVC to be provided again (i.e. using the cvc_token parameter).
"""
setup_future_usage: NotRequired[
"Literal['']|Literal['none', 'off_session', 'on_session']"
]
Expand Down
Loading
Loading