diff --git a/CHANGELOG.md b/CHANGELOG.md index 0ef23ab30..5f0df16df 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,46 @@ # Changelog +## 10.1.0 - 2024-06-27 +* [#1353](https://github.com/stripe/stripe-python/pull/1353) Update generated code + * Add support for `email_type` on parameter classes `stripe.CreditNote.CreateParams`, `stripe.CreditNote.PreviewLinesParams`, and `stripe.CreditNote.PreviewParams` + * Add support for `filters` on parameter classes `stripe.Invoice.CreateParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnections`, `stripe.Invoice.ModifyParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnections`, `stripe.PaymentIntent.ConfirmParamsPaymentMethodOptionsUsBankAccountFinancialConnections`, `stripe.PaymentIntent.CreateParamsPaymentMethodOptionsUsBankAccountFinancialConnections`, `stripe.PaymentIntent.ModifyParamsPaymentMethodOptionsUsBankAccountFinancialConnections`, `stripe.SetupIntent.ConfirmParamsPaymentMethodOptionsUsBankAccountFinancialConnections`, `stripe.SetupIntent.CreateParamsPaymentMethodOptionsUsBankAccountFinancialConnections`, `stripe.SetupIntent.ModifyParamsPaymentMethodOptionsUsBankAccountFinancialConnections`, `stripe.Subscription.CreateParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnections`, and `stripe.Subscription.ModifyParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnections` and resource classes `stripe.Invoice.PaymentSettings.PaymentMethodOptions.UsBankAccount.FinancialConnections`, `stripe.PaymentIntent.PaymentMethodOptions.UsBankAccount.FinancialConnections`, `stripe.SetupIntent.PaymentMethodOptions.UsBankAccount.FinancialConnections`, `stripe.Subscription.PaymentSettings.PaymentMethodOptions.UsBankAccount.FinancialConnections`, and `stripe.checkout.Session.PaymentMethodOptions.UsBankAccount.FinancialConnections` + * Add support for `account_subcategories` on parameter class `stripe.financial_connections.Session.CreateParamsFilters` and resource class `stripe.financial_connections.Session.Filters` + * Add support for `reboot_window` on parameter classes `stripe.terminal.Configuration.CreateParams` and `stripe.terminal.Configuration.ModifyParams` and resource `stripe.terminal.Configuration` + * Add support for `day` on enum `stripe.billing.Meter.ListEventSummariesParams.value_grouping_window` + * Add support for `multibanco` on enums `stripe.PaymentLink.payment_method_types`, `stripe.PaymentLink.CreateParams.payment_method_types`, and `stripe.PaymentLink.ModifyParams.payment_method_types` + * Add support for `twint` on enums `stripe.PaymentLink.payment_method_types`, `stripe.PaymentLink.CreateParams.payment_method_types`, and `stripe.PaymentLink.ModifyParams.payment_method_types` + * Add support for `zip` on enums `stripe.PaymentLink.payment_method_types`, `stripe.PaymentLink.CreateParams.payment_method_types`, and `stripe.PaymentLink.ModifyParams.payment_method_types` + +## 10.0.0 - 2024-06-24 +* [#1350](https://github.com/stripe/stripe-python/pull/1350) Update generated code + + This release changes the pinned API version to 2024-06-20. Please read the [API Upgrade Guide](https://stripe.com/docs/upgrades#2024-06-20) and carefully review the API changes before upgrading. + + ### ⚠️ Breaking changes + + * Remove the unused resource `PlatformTaxFee` + * Rename `volume_decimal` to `quantity_decimal` on parameter classes `stripe.issuing.Authorization.CaptureParamsPurchaseDetailsFuel`, `stripe.issuing.Transaction.CreateForceCaptureParamsPurchaseDetailsFuel`, and `stripe.issuing.Transaction.CreateUnlinkedRefundParamsPurchaseDetailsFuel` and resource class `stripe.issuing.Transaction.PurchaseDetails.Fuel` + + ### Additions + + * Add support for `fleet` on parameter classes `stripe.issuing.Authorization.CaptureParamsPurchaseDetails`, `stripe.issuing.Authorization.CreateParams`, `stripe.issuing.Transaction.CreateForceCaptureParamsPurchaseDetails`, and `stripe.issuing.Transaction.CreateUnlinkedRefundParamsPurchaseDetails`, resource `stripe.issuing.Authorization`, and resource class `stripe.issuing.Transaction.PurchaseDetails` + * Add support for new values `platform_disabled`, `paused.inactivity` and `other` on enums `Capability.Requirements.disabled_reason` and `Capability.FutureRequirements.disabled_reason` + * Add support for `industry_product_code` on parameter classes `stripe.issuing.Authorization.CaptureParamsPurchaseDetailsFuel`, `stripe.issuing.Transaction.CreateForceCaptureParamsPurchaseDetailsFuel`, and `stripe.issuing.Transaction.CreateUnlinkedRefundParamsPurchaseDetailsFuel` and resource class `stripe.issuing.Transaction.PurchaseDetails.Fuel` + * Add support for `quantity_decimal` on parameter classes `stripe.issuing.Authorization.CaptureParamsPurchaseDetailsFuel`, `stripe.issuing.Transaction.CreateForceCaptureParamsPurchaseDetailsFuel`, and `stripe.issuing.Transaction.CreateUnlinkedRefundParamsPurchaseDetailsFuel` and resource class `stripe.issuing.Transaction.PurchaseDetails.Fuel` + * Add support for `fuel` on parameter class `stripe.issuing.Authorization.CreateParams` and resource `stripe.issuing.Authorization` + * Add support for `_cls_finalize_amount` on resource `stripe.issuing.Authorization` + * Add support for `finalize_amount` on resource `stripe.issuing.Authorization` + * Change type of `disabled_reason` on `stripe.Capability.FutureRequirements` and `stripe.Capability.Requirements` from `str` to `Literal['other', 'paused.inactivity', 'pending.onboarding', 'pending.review', 'platform_disabled', 'platform_paused', 'rejected.inactivity', 'rejected.other', 'rejected.unsupported_business', 'requirements.fields_needed']` + * Add support for `ch_uid` on enums `stripe.checkout.Session.CustomerDetails.TaxId.type`, `stripe.Customer.CreateParamsTaxIdDatum.type`, `stripe.Customer.CreateTaxIdParams.type`, `stripe.Invoice.CustomerTaxId.type`, `stripe.Invoice.CreatePreviewParamsCustomerDetailsTaxId.type`, `stripe.Invoice.UpcomingParamsCustomerDetailsTaxId.type`, `stripe.Invoice.UpcomingLinesParamsCustomerDetailsTaxId.type`, `stripe.tax.Calculation.CustomerDetails.TaxId.type`, `stripe.tax.Calculation.CreateParamsCustomerDetailsTaxId.type`, `stripe.tax.Transaction.CustomerDetails.TaxId.type`, `stripe.TaxId.type`, and `stripe.TaxId.CreateParams.type` + * Add support for `card_canceled`, `card_expired`, `cardholder_blocked`, `insecure_authorization_method` and `pin_blocked` on enum `stripe.issuing.Authorization.RequestHistory.reason` + * Add support for `charging_minute`, `imperial_gallon`, `kilogram`, `kilowatt_hour`, `pound`, on enums `stripe.issuing.Authorization.CaptureParamsPurchaseDetailsFuel.unit`, `stripe.issuing.Transaction.CreateForceCaptureParamsPurchaseDetailsFuel.unit`, and `stripe.issuing.Transaction.CreateUnlinkedRefundParamsPurchaseDetailsFuel.unit` + * Add support for `2024-06-20` on enum `stripe.WebhookEndpoint.CreateParams.api_version` + +## 9.12.0 - 2024-06-17 +* [#1348](https://github.com/stripe/stripe-python/pull/1348) Update generated code + * Add support for `tax_id_collection` on parameter class `stripe.PaymentLink.ModifyParams` + * Add support for `mobilepay` on enums `stripe.PaymentLink.payment_method_types`, `stripe.PaymentLink.CreateParams.payment_method_types`, and `stripe.PaymentLink.ModifyParams.payment_method_types` + ## 9.12.0b1 - 2024-06-13 * [#1343](https://github.com/stripe/stripe-python/pull/1343) Update generated code for beta * Add support for `de_stn` on enums `stripe.Order.TaxDetails.TaxId.type`, `stripe.Order.CreateParamsTaxDetailsTaxId.type`, `stripe.Order.ModifyParamsTaxDetailsTaxId.type`, and `stripe.QuotePreviewInvoice.CustomerTaxId.type` diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index ebd06a813..a96216659 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1077 \ No newline at end of file +v1104 \ No newline at end of file diff --git a/stripe/__init__.py b/stripe/__init__.py index 27a470b78..bd0559243 100644 --- a/stripe/__init__.py +++ b/stripe/__init__.py @@ -460,7 +460,6 @@ def __getattr__(name): from stripe._person import Person as Person from stripe._plan import Plan as Plan from stripe._plan_service import PlanService as PlanService -from stripe._platform_tax_fee import PlatformTaxFee as PlatformTaxFee from stripe._price import Price as Price from stripe._price_service import PriceService as PriceService from stripe._product import Product as Product diff --git a/stripe/_account.py b/stripe/_account.py index deede9f5d..d6882db83 100644 --- a/stripe/_account.py +++ b/stripe/_account.py @@ -3491,7 +3491,7 @@ class ModifyCapabilityParams(RequestOptions): """ To request a new capability for an account, pass true. There can be a delay before the requested capability becomes active. If the capability has any activation requirements, the response includes them in the `requirements` arrays. - If a capability isn't permanent, you can remove it from the account by passing false. Most capabilities are permanent after they've been requested. Attempting to remove a permanent capability returns an error. + If a capability isn't permanent, you can remove it from the account by passing false. Some capabilities are permanent after they've been requested. Attempting to remove a permanent capability returns an error. """ class ModifyExternalAccountParams(RequestOptions): diff --git a/stripe/_account_capability_service.py b/stripe/_account_capability_service.py index c2deeefe8..184b97c10 100644 --- a/stripe/_account_capability_service.py +++ b/stripe/_account_capability_service.py @@ -31,7 +31,7 @@ class UpdateParams(TypedDict): """ To request a new capability for an account, pass true. There can be a delay before the requested capability becomes active. If the capability has any activation requirements, the response includes them in the `requirements` arrays. - If a capability isn't permanent, you can remove it from the account by passing false. Most capabilities are permanent after they've been requested. Attempting to remove a permanent capability returns an error. + If a capability isn't permanent, you can remove it from the account by passing false. Some capabilities are permanent after they've been requested. Attempting to remove a permanent capability returns an error. """ def list( diff --git a/stripe/_api_version.py b/stripe/_api_version.py index 151c9cafc..e5f4c9627 100644 --- a/stripe/_api_version.py +++ b/stripe/_api_version.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec class _ApiVersion: - CURRENT = "2024-04-10" + CURRENT = "2024-06-20" PREVIEW = "2024-05-23.preview-v2" diff --git a/stripe/_balance_transaction.py b/stripe/_balance_transaction.py index 16ade6d2c..efc7ab96e 100644 --- a/stripe/_balance_transaction.py +++ b/stripe/_balance_transaction.py @@ -24,7 +24,6 @@ ) from stripe._dispute import Dispute as DisputeResource from stripe._payout import Payout - from stripe._platform_tax_fee import PlatformTaxFee from stripe._refund import Refund from stripe._reserve_transaction import ReserveTransaction from stripe._reversal import Reversal @@ -193,7 +192,6 @@ class RetrieveParams(RequestOptions): "IssuingDisputeResource", "Transaction", "Payout", - "PlatformTaxFee", "Refund", "ReserveTransaction", "TaxDeductedAtSource", diff --git a/stripe/_capability.py b/stripe/_capability.py index 53ca37edd..0974b8d52 100644 --- a/stripe/_capability.py +++ b/stripe/_capability.py @@ -145,9 +145,22 @@ class Error(StripeObject): """ Fields that need to be collected to keep the capability enabled. If not collected by `future_requirements[current_deadline]`, these fields will transition to the main `requirements` hash. """ - disabled_reason: Optional[str] + disabled_reason: Optional[ + Literal[ + "other", + "paused.inactivity", + "pending.onboarding", + "pending.review", + "platform_disabled", + "platform_paused", + "rejected.inactivity", + "rejected.other", + "rejected.unsupported_business", + "requirements.fields_needed", + ] + ] """ - This is typed as a string for consistency with `requirements.disabled_reason`, but it safe to assume `future_requirements.disabled_reason` is empty because fields in `future_requirements` will never disable the account. + This is typed as an enum for consistency with `requirements.disabled_reason`, but it safe to assume `future_requirements.disabled_reason` is null because fields in `future_requirements` will never disable the account. """ errors: List[Error] """ @@ -294,13 +307,22 @@ class Error(StripeObject): """ Fields that need to be collected to keep the capability enabled. If not collected by `current_deadline`, these fields appear in `past_due` as well, and the capability is disabled. """ - disabled_reason: Optional[str] + disabled_reason: Optional[ + Literal[ + "other", + "paused.inactivity", + "pending.onboarding", + "pending.review", + "platform_disabled", + "platform_paused", + "rejected.inactivity", + "rejected.other", + "rejected.unsupported_business", + "requirements.fields_needed", + ] + ] """ - If the capability is disabled, this string describes why. [Learn more about handling verification issues](https://stripe.com/docs/connect/handling-api-verification). Can be `requirements.fields_needed`, `pending.onboarding`, `pending.review`, `rejected.other`, `platform_paused`, `rejected.inactivty`, or `rejected.unsupported_business`. - - `rejected.unsupported_business` means that the account's business is not supported by the capability. For example, payment methods may restrict the businesses they support in their terms of service, such as in [Afterpay Clearpay's terms of service](https://stripe.com/afterpay-clearpay/legal#restricted-businesses). - - `rejected.inactivity` means that the capability has been paused for inactivity. This disabled reason currently only applies to the Issuing capability. See [Issuing: Managing Inactive Connects](https://support.stripe.com/questions/issuing-managing-inactive-connect-accounts) for more details. + Description of why the capability is disabled. [Learn more about handling verification issues](https://stripe.com/docs/connect/handling-api-verification). """ errors: List[Error] """ diff --git a/stripe/_credit_note.py b/stripe/_credit_note.py index dbe8d83c9..f3b6423d6 100644 --- a/stripe/_credit_note.py +++ b/stripe/_credit_note.py @@ -177,6 +177,10 @@ class CreateParams(RequestOptions): """ The date when this credit note is in effect. Same as `created` unless overwritten. When defined, this value replaces the system-generated 'Date of issue' printed on the credit note PDF. """ + email_type: NotRequired[Literal["credit_note", "none"]] + """ + Type of email to send to the customer, one of `credit_note` or `none` and the default is `credit_note`. + """ expand: NotRequired[List[str]] """ Specifies which fields in the response should be expanded. @@ -392,6 +396,10 @@ class PreviewLinesParams(RequestOptions): """ The date when this credit note is in effect. Same as `created` unless overwritten. When defined, this value replaces the system-generated 'Date of issue' printed on the credit note PDF. """ + email_type: NotRequired[Literal["credit_note", "none"]] + """ + Type of email to send to the customer, one of `credit_note` or `none` and the default is `credit_note`. + """ ending_before: NotRequired[str] """ A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. @@ -539,6 +547,10 @@ class PreviewParams(RequestOptions): """ The date when this credit note is in effect. Same as `created` unless overwritten. When defined, this value replaces the system-generated 'Date of issue' printed on the credit note PDF. """ + email_type: NotRequired[Literal["credit_note", "none"]] + """ + Type of email to send to the customer, one of `credit_note` or `none` and the default is `credit_note`. + """ expand: NotRequired[List[str]] """ Specifies which fields in the response should be expanded. diff --git a/stripe/_credit_note_preview_lines_service.py b/stripe/_credit_note_preview_lines_service.py index 14b7ebd47..84535ec49 100644 --- a/stripe/_credit_note_preview_lines_service.py +++ b/stripe/_credit_note_preview_lines_service.py @@ -22,6 +22,10 @@ class ListParams(TypedDict): """ The date when this credit note is in effect. Same as `created` unless overwritten. When defined, this value replaces the system-generated 'Date of issue' printed on the credit note PDF. """ + email_type: NotRequired[Literal["credit_note", "none"]] + """ + Type of email to send to the customer, one of `credit_note` or `none` and the default is `credit_note`. + """ ending_before: NotRequired[str] """ A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. diff --git a/stripe/_credit_note_service.py b/stripe/_credit_note_service.py index 48f963cec..af90ffcf3 100644 --- a/stripe/_credit_note_service.py +++ b/stripe/_credit_note_service.py @@ -32,6 +32,10 @@ class CreateParams(TypedDict): """ The date when this credit note is in effect. Same as `created` unless overwritten. When defined, this value replaces the system-generated 'Date of issue' printed on the credit note PDF. """ + email_type: NotRequired[Literal["credit_note", "none"]] + """ + Type of email to send to the customer, one of `credit_note` or `none` and the default is `credit_note`. + """ expand: NotRequired[List[str]] """ Specifies which fields in the response should be expanded. @@ -217,6 +221,10 @@ class PreviewParams(TypedDict): """ The date when this credit note is in effect. Same as `created` unless overwritten. When defined, this value replaces the system-generated 'Date of issue' printed on the credit note PDF. """ + email_type: NotRequired[Literal["credit_note", "none"]] + """ + Type of email to send to the customer, one of `credit_note` or `none` and the default is `credit_note`. + """ expand: NotRequired[List[str]] """ Specifies which fields in the response should be expanded. diff --git a/stripe/_customer.py b/stripe/_customer.py index b99d259a3..4b64f499f 100644 --- a/stripe/_customer.py +++ b/stripe/_customer.py @@ -521,6 +521,7 @@ class CreateParamsTaxIdDatum(TypedDict): "ca_pst_mb", "ca_pst_sk", "ca_qst", + "ch_uid", "ch_vat", "cl_tin", "cn_tin", @@ -579,7 +580,7 @@ class CreateParamsTaxIdDatum(TypedDict): "za_vat", ] """ - Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `ve_rif`, `vn_tin`, or `za_vat` + Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `ve_rif`, `vn_tin`, or `za_vat` """ value: str """ @@ -623,6 +624,7 @@ class CreateTaxIdParams(RequestOptions): "ca_pst_mb", "ca_pst_sk", "ca_qst", + "ch_uid", "ch_vat", "cl_tin", "cn_tin", @@ -681,7 +683,7 @@ class CreateTaxIdParams(RequestOptions): "za_vat", ] """ - Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `ve_rif`, `vn_tin`, or `za_vat` + Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `ve_rif`, `vn_tin`, or `za_vat` """ value: str """ diff --git a/stripe/_customer_service.py b/stripe/_customer_service.py index 1fbe88d8e..a3456afc3 100644 --- a/stripe/_customer_service.py +++ b/stripe/_customer_service.py @@ -286,6 +286,7 @@ class CreateParamsTaxIdDatum(TypedDict): "ca_pst_mb", "ca_pst_sk", "ca_qst", + "ch_uid", "ch_vat", "cl_tin", "cn_tin", @@ -344,7 +345,7 @@ class CreateParamsTaxIdDatum(TypedDict): "za_vat", ] """ - Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `ve_rif`, `vn_tin`, or `za_vat` + Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `ve_rif`, `vn_tin`, or `za_vat` """ value: str """ diff --git a/stripe/_customer_session.py b/stripe/_customer_session.py index 3e1632779..3f6312cdf 100644 --- a/stripe/_customer_session.py +++ b/stripe/_customer_session.py @@ -46,10 +46,6 @@ class Features(StripeObject): If a customer checks the box, the [`allow_redisplay`](https://docs.stripe.com/api/payment_methods/object#payment_method_object-allow_redisplay) value on the PaymentMethod is set to `'always'` at confirmation time. For PaymentIntents, the [`setup_future_usage`](https://docs.stripe.com/api/payment_intents/object#payment_intent_object-setup_future_usage) value is also set to the value defined in `payment_method_save_usage`. """ - payment_method_set_as_default: Literal["disabled", "enabled"] - """ - Controls whether the Payment Element displays a checkbox offering to set a saved payment method as the default. - """ payment_method_update: Literal["disabled", "enabled"] """ Controls whether the Payment Element displays the option to update a saved payment method. @@ -154,12 +150,6 @@ class CreateParamsComponentsPaymentElementFeatures(TypedDict): If a customer checks the box, the [`allow_redisplay`](https://docs.stripe.com/api/payment_methods/object#payment_method_object-allow_redisplay) value on the PaymentMethod is set to `'always'` at confirmation time. For PaymentIntents, the [`setup_future_usage`](https://docs.stripe.com/api/payment_intents/object#payment_intent_object-setup_future_usage) value is also set to the value defined in `payment_method_save_usage`. """ - payment_method_set_as_default: NotRequired[ - Literal["disabled", "enabled"] - ] - """ - Controls whether the Payment Element displays a checkbox offering to set a saved payment method as the default. - """ payment_method_update: NotRequired[Literal["disabled", "enabled"]] """ Controls whether the Payment Element displays the option to update a saved payment method. diff --git a/stripe/_customer_session_service.py b/stripe/_customer_session_service.py index 67ef85b11..50b595353 100644 --- a/stripe/_customer_session_service.py +++ b/stripe/_customer_session_service.py @@ -73,12 +73,6 @@ class CreateParamsComponentsPaymentElementFeatures(TypedDict): If a customer checks the box, the [`allow_redisplay`](https://docs.stripe.com/api/payment_methods/object#payment_method_object-allow_redisplay) value on the PaymentMethod is set to `'always'` at confirmation time. For PaymentIntents, the [`setup_future_usage`](https://docs.stripe.com/api/payment_intents/object#payment_intent_object-setup_future_usage) value is also set to the value defined in `payment_method_save_usage`. """ - payment_method_set_as_default: NotRequired[ - Literal["disabled", "enabled"] - ] - """ - Controls whether the Payment Element displays a checkbox offering to set a saved payment method as the default. - """ payment_method_update: NotRequired[Literal["disabled", "enabled"]] """ Controls whether the Payment Element displays the option to update a saved payment method. diff --git a/stripe/_customer_tax_id_service.py b/stripe/_customer_tax_id_service.py index 7fd502ea6..ed126cdbf 100644 --- a/stripe/_customer_tax_id_service.py +++ b/stripe/_customer_tax_id_service.py @@ -32,6 +32,7 @@ class CreateParams(TypedDict): "ca_pst_mb", "ca_pst_sk", "ca_qst", + "ch_uid", "ch_vat", "cl_tin", "cn_tin", @@ -90,7 +91,7 @@ class CreateParams(TypedDict): "za_vat", ] """ - Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `ve_rif`, `vn_tin`, or `za_vat` + Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `ve_rif`, `vn_tin`, or `za_vat` """ value: str """ diff --git a/stripe/_invoice.py b/stripe/_invoice.py index b87622c7b..c7932132b 100644 --- a/stripe/_invoice.py +++ b/stripe/_invoice.py @@ -261,6 +261,7 @@ class CustomerTaxId(StripeObject): "ca_pst_mb", "ca_pst_sk", "ca_qst", + "ch_uid", "ch_vat", "cl_tin", "cn_tin", @@ -320,7 +321,7 @@ class CustomerTaxId(StripeObject): "za_vat", ] """ - The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, or `unknown` + The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, or `unknown` """ value: Optional[str] """ @@ -689,6 +690,15 @@ class SepaDebit(StripeObject): class UsBankAccount(StripeObject): class FinancialConnections(StripeObject): + class Filters(StripeObject): + account_subcategories: Optional[ + List[Literal["checking", "savings"]] + ] + """ + The account subcategories to use to filter for possible accounts to link. Valid subcategories are `checking` and `savings`. + """ + + filters: Optional[Filters] permissions: Optional[ List[ Literal[ @@ -715,6 +725,7 @@ class FinancialConnections(StripeObject): """ Data features requested to be retrieved upon account creation. """ + _inner_class_types = {"filters": Filters} financial_connections: Optional[FinancialConnections] verification_method: Optional[ @@ -1782,6 +1793,12 @@ class CreateParamsPaymentSettingsPaymentMethodOptionsUsBankAccount( class CreateParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnections( TypedDict, ): + filters: NotRequired[ + "Invoice.CreateParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters" + ] + """ + Provide filters for the linked accounts that the customer can select for the payment method. + """ permissions: NotRequired[ List[ Literal[ @@ -1806,6 +1823,16 @@ class CreateParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConne List of data features that you would like to retrieve upon account creation. """ + class CreateParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters( + TypedDict, + ): + account_subcategories: NotRequired[ + List[Literal["checking", "savings"]] + ] + """ + The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`. + """ + class CreateParamsRendering(TypedDict): amount_tax_display: NotRequired[ "Literal['']|Literal['exclude_tax', 'include_inclusive_tax']" @@ -2209,6 +2236,7 @@ class CreatePreviewParamsCustomerDetailsTaxId(TypedDict): "ca_pst_mb", "ca_pst_sk", "ca_qst", + "ch_uid", "ch_vat", "cl_tin", "cn_tin", @@ -2267,7 +2295,7 @@ class CreatePreviewParamsCustomerDetailsTaxId(TypedDict): "za_vat", ] """ - Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `ve_rif`, `vn_tin`, or `za_vat` + Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `ve_rif`, `vn_tin`, or `za_vat` """ value: str """ @@ -4414,6 +4442,12 @@ class ModifyParamsPaymentSettingsPaymentMethodOptionsUsBankAccount( class ModifyParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnections( TypedDict, ): + filters: NotRequired[ + "Invoice.ModifyParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters" + ] + """ + Provide filters for the linked accounts that the customer can select for the payment method. + """ permissions: NotRequired[ List[ Literal[ @@ -4438,6 +4472,16 @@ class ModifyParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConne List of data features that you would like to retrieve upon account creation. """ + class ModifyParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters( + TypedDict, + ): + account_subcategories: NotRequired[ + List[Literal["checking", "savings"]] + ] + """ + The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`. + """ + class ModifyParamsRendering(TypedDict): amount_tax_display: NotRequired[ "Literal['']|Literal['exclude_tax', 'include_inclusive_tax']" @@ -5005,6 +5049,7 @@ class UpcomingLinesParamsCustomerDetailsTaxId(TypedDict): "ca_pst_mb", "ca_pst_sk", "ca_qst", + "ch_uid", "ch_vat", "cl_tin", "cn_tin", @@ -5063,7 +5108,7 @@ class UpcomingLinesParamsCustomerDetailsTaxId(TypedDict): "za_vat", ] """ - Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `ve_rif`, `vn_tin`, or `za_vat` + Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `ve_rif`, `vn_tin`, or `za_vat` """ value: str """ @@ -7065,6 +7110,7 @@ class UpcomingParamsCustomerDetailsTaxId(TypedDict): "ca_pst_mb", "ca_pst_sk", "ca_qst", + "ch_uid", "ch_vat", "cl_tin", "cn_tin", @@ -7123,7 +7169,7 @@ class UpcomingParamsCustomerDetailsTaxId(TypedDict): "za_vat", ] """ - Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `ve_rif`, `vn_tin`, or `za_vat` + Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `ve_rif`, `vn_tin`, or `za_vat` """ value: str """ diff --git a/stripe/_invoice_service.py b/stripe/_invoice_service.py index e82c2baf0..c732f2580 100644 --- a/stripe/_invoice_service.py +++ b/stripe/_invoice_service.py @@ -742,6 +742,12 @@ class CreateParamsPaymentSettingsPaymentMethodOptionsUsBankAccount( class CreateParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnections( TypedDict, ): + filters: NotRequired[ + "InvoiceService.CreateParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters" + ] + """ + Provide filters for the linked accounts that the customer can select for the payment method. + """ permissions: NotRequired[ List[ Literal[ @@ -766,6 +772,16 @@ class CreateParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConne List of data features that you would like to retrieve upon account creation. """ + class CreateParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters( + TypedDict, + ): + account_subcategories: NotRequired[ + List[Literal["checking", "savings"]] + ] + """ + The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`. + """ + class CreateParamsRendering(TypedDict): amount_tax_display: NotRequired[ "Literal['']|Literal['exclude_tax', 'include_inclusive_tax']" @@ -1175,6 +1191,7 @@ class CreatePreviewParamsCustomerDetailsTaxId(TypedDict): "ca_pst_mb", "ca_pst_sk", "ca_qst", + "ch_uid", "ch_vat", "cl_tin", "cn_tin", @@ -1233,7 +1250,7 @@ class CreatePreviewParamsCustomerDetailsTaxId(TypedDict): "za_vat", ] """ - Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `ve_rif`, `vn_tin`, or `za_vat` + Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `ve_rif`, `vn_tin`, or `za_vat` """ value: str """ @@ -3277,6 +3294,7 @@ class UpcomingParamsCustomerDetailsTaxId(TypedDict): "ca_pst_mb", "ca_pst_sk", "ca_qst", + "ch_uid", "ch_vat", "cl_tin", "cn_tin", @@ -3335,7 +3353,7 @@ class UpcomingParamsCustomerDetailsTaxId(TypedDict): "za_vat", ] """ - Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `ve_rif`, `vn_tin`, or `za_vat` + Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `ve_rif`, `vn_tin`, or `za_vat` """ value: str """ @@ -5715,6 +5733,12 @@ class UpdateParamsPaymentSettingsPaymentMethodOptionsUsBankAccount( class UpdateParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnections( TypedDict, ): + filters: NotRequired[ + "InvoiceService.UpdateParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters" + ] + """ + Provide filters for the linked accounts that the customer can select for the payment method. + """ permissions: NotRequired[ List[ Literal[ @@ -5739,6 +5763,16 @@ class UpdateParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConne List of data features that you would like to retrieve upon account creation. """ + class UpdateParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters( + TypedDict, + ): + account_subcategories: NotRequired[ + List[Literal["checking", "savings"]] + ] + """ + The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`. + """ + class UpdateParamsRendering(TypedDict): amount_tax_display: NotRequired[ "Literal['']|Literal['exclude_tax', 'include_inclusive_tax']" diff --git a/stripe/_invoice_upcoming_lines_service.py b/stripe/_invoice_upcoming_lines_service.py index 32c437c43..039df7778 100644 --- a/stripe/_invoice_upcoming_lines_service.py +++ b/stripe/_invoice_upcoming_lines_service.py @@ -299,6 +299,7 @@ class ListParamsCustomerDetailsTaxId(TypedDict): "ca_pst_mb", "ca_pst_sk", "ca_qst", + "ch_uid", "ch_vat", "cl_tin", "cn_tin", @@ -357,7 +358,7 @@ class ListParamsCustomerDetailsTaxId(TypedDict): "za_vat", ] """ - Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `ve_rif`, `vn_tin`, or `za_vat` + Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `ve_rif`, `vn_tin`, or `za_vat` """ value: str """ diff --git a/stripe/_margin.py b/stripe/_margin.py index 836f72e04..d3563029b 100644 --- a/stripe/_margin.py +++ b/stripe/_margin.py @@ -47,7 +47,7 @@ class CreateParams(RequestOptions): class ListParams(RequestOptions): active: NotRequired[bool] """ - Only return margins that are active or inactive, i.e., pass false to list all inactive margins. + Only return margins that are active or inactive. For example, pass `true` to only list active margins. """ ending_before: NotRequired[str] """ @@ -130,7 +130,7 @@ class RetrieveParams(RequestOptions): @classmethod def create(cls, **params: Unpack["Margin.CreateParams"]) -> "Margin": """ - Create a margin object to be used with invoices, invoice items, and invoice line items for a customer to represent a partner discount.A margin has a percent_off which is the percent that will be taken off the subtotal after all items and other discounts and promotions) of any invoices for a customer. Calculation of prorations do not include any partner margins applied on the original invoice item. + Create a margin object to be used with invoices, invoice items, and invoice line items for a customer to represent a partner discount. A margin has a percent_off which is the percent that will be taken off the subtotal after all items and other discounts and promotions) of any invoices for a customer. Calculation of prorations do not include any partner margins applied on the original invoice item. """ return cast( "Margin", @@ -146,7 +146,7 @@ async def create_async( cls, **params: Unpack["Margin.CreateParams"] ) -> "Margin": """ - Create a margin object to be used with invoices, invoice items, and invoice line items for a customer to represent a partner discount.A margin has a percent_off which is the percent that will be taken off the subtotal after all items and other discounts and promotions) of any invoices for a customer. Calculation of prorations do not include any partner margins applied on the original invoice item. + Create a margin object to be used with invoices, invoice items, and invoice line items for a customer to represent a partner discount. A margin has a percent_off which is the percent that will be taken off the subtotal after all items and other discounts and promotions) of any invoices for a customer. Calculation of prorations do not include any partner margins applied on the original invoice item. """ return cast( "Margin", diff --git a/stripe/_margin_service.py b/stripe/_margin_service.py index 131fadf89..65e53be62 100644 --- a/stripe/_margin_service.py +++ b/stripe/_margin_service.py @@ -35,7 +35,7 @@ class CreateParams(TypedDict): class ListParams(TypedDict): active: NotRequired[bool] """ - Only return margins that are active or inactive, i.e., pass false to list all inactive margins. + Only return margins that are active or inactive. For example, pass `true` to only list active margins. """ ending_before: NotRequired[str] """ @@ -124,7 +124,7 @@ def create( options: RequestOptions = {}, ) -> Margin: """ - Create a margin object to be used with invoices, invoice items, and invoice line items for a customer to represent a partner discount.A margin has a percent_off which is the percent that will be taken off the subtotal after all items and other discounts and promotions) of any invoices for a customer. Calculation of prorations do not include any partner margins applied on the original invoice item. + Create a margin object to be used with invoices, invoice items, and invoice line items for a customer to represent a partner discount. A margin has a percent_off which is the percent that will be taken off the subtotal after all items and other discounts and promotions) of any invoices for a customer. Calculation of prorations do not include any partner margins applied on the original invoice item. """ return cast( Margin, @@ -144,7 +144,7 @@ async def create_async( options: RequestOptions = {}, ) -> Margin: """ - Create a margin object to be used with invoices, invoice items, and invoice line items for a customer to represent a partner discount.A margin has a percent_off which is the percent that will be taken off the subtotal after all items and other discounts and promotions) of any invoices for a customer. Calculation of prorations do not include any partner margins applied on the original invoice item. + Create a margin object to be used with invoices, invoice items, and invoice line items for a customer to represent a partner discount. A margin has a percent_off which is the percent that will be taken off the subtotal after all items and other discounts and promotions) of any invoices for a customer. Calculation of prorations do not include any partner margins applied on the original invoice item. """ return cast( Margin, diff --git a/stripe/_object_classes.py b/stripe/_object_classes.py index bcc204f2e..88d9c342e 100644 --- a/stripe/_object_classes.py +++ b/stripe/_object_classes.py @@ -94,7 +94,6 @@ stripe.Payout.OBJECT_NAME: stripe.Payout, stripe.Person.OBJECT_NAME: stripe.Person, stripe.Plan.OBJECT_NAME: stripe.Plan, - stripe.PlatformTaxFee.OBJECT_NAME: stripe.PlatformTaxFee, stripe.Price.OBJECT_NAME: stripe.Price, stripe.Product.OBJECT_NAME: stripe.Product, stripe.ProductFeature.OBJECT_NAME: stripe.ProductFeature, diff --git a/stripe/_order.py b/stripe/_order.py index f070da413..7ea64f22b 100644 --- a/stripe/_order.py +++ b/stripe/_order.py @@ -718,6 +718,7 @@ class TaxId(StripeObject): "ca_pst_mb", "ca_pst_sk", "ca_qst", + "ch_uid", "ch_vat", "cl_tin", "cn_tin", @@ -777,7 +778,7 @@ class TaxId(StripeObject): "za_vat", ] """ - The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, or `unknown` + The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, or `unknown` """ value: Optional[str] """ @@ -1088,7 +1089,7 @@ class CreateParamsLineItemPriceData(TypedDict): """ ID of the product this price belongs to. - Use this to implement a variable-pricing model in your integration. This is required if `product_data` is not specifed. + Use this to implement a variable-pricing model in your integration. This is required if `product_data` is not specified. """ tax_behavior: NotRequired[ Literal["exclusive", "inclusive", "unspecified"] @@ -1994,6 +1995,7 @@ class CreateParamsTaxDetailsTaxId(TypedDict): "ca_pst_mb", "ca_pst_sk", "ca_qst", + "ch_uid", "ch_vat", "cl_tin", "cn_tin", @@ -2052,7 +2054,7 @@ class CreateParamsTaxDetailsTaxId(TypedDict): "za_vat", ] """ - Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `ve_rif`, `vn_tin`, or `za_vat` + Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `ve_rif`, `vn_tin`, or `za_vat` """ value: str """ @@ -2312,7 +2314,7 @@ class ModifyParamsLineItemPriceData(TypedDict): """ ID of the product this price belongs to. - Use this to implement a variable-pricing model in your integration. This is required if `product_data` is not specifed. + Use this to implement a variable-pricing model in your integration. This is required if `product_data` is not specified. """ tax_behavior: NotRequired[ Literal["exclusive", "inclusive", "unspecified"] @@ -3218,6 +3220,7 @@ class ModifyParamsTaxDetailsTaxId(TypedDict): "ca_pst_mb", "ca_pst_sk", "ca_qst", + "ch_uid", "ch_vat", "cl_tin", "cn_tin", @@ -3276,7 +3279,7 @@ class ModifyParamsTaxDetailsTaxId(TypedDict): "za_vat", ] """ - Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `ve_rif`, `vn_tin`, or `za_vat` + Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `ve_rif`, `vn_tin`, or `za_vat` """ value: str """ diff --git a/stripe/_order_service.py b/stripe/_order_service.py index 4837da48a..ce07882ac 100644 --- a/stripe/_order_service.py +++ b/stripe/_order_service.py @@ -236,7 +236,7 @@ class CreateParamsLineItemPriceData(TypedDict): """ ID of the product this price belongs to. - Use this to implement a variable-pricing model in your integration. This is required if `product_data` is not specifed. + Use this to implement a variable-pricing model in your integration. This is required if `product_data` is not specified. """ tax_behavior: NotRequired[ Literal["exclusive", "inclusive", "unspecified"] @@ -1142,6 +1142,7 @@ class CreateParamsTaxDetailsTaxId(TypedDict): "ca_pst_mb", "ca_pst_sk", "ca_qst", + "ch_uid", "ch_vat", "cl_tin", "cn_tin", @@ -1200,7 +1201,7 @@ class CreateParamsTaxDetailsTaxId(TypedDict): "za_vat", ] """ - Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `ve_rif`, `vn_tin`, or `za_vat` + Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `ve_rif`, `vn_tin`, or `za_vat` """ value: str """ @@ -1470,7 +1471,7 @@ class UpdateParamsLineItemPriceData(TypedDict): """ ID of the product this price belongs to. - Use this to implement a variable-pricing model in your integration. This is required if `product_data` is not specifed. + Use this to implement a variable-pricing model in your integration. This is required if `product_data` is not specified. """ tax_behavior: NotRequired[ Literal["exclusive", "inclusive", "unspecified"] @@ -2376,6 +2377,7 @@ class UpdateParamsTaxDetailsTaxId(TypedDict): "ca_pst_mb", "ca_pst_sk", "ca_qst", + "ch_uid", "ch_vat", "cl_tin", "cn_tin", @@ -2434,7 +2436,7 @@ class UpdateParamsTaxDetailsTaxId(TypedDict): "za_vat", ] """ - Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `ve_rif`, `vn_tin`, or `za_vat` + Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `ve_rif`, `vn_tin`, or `za_vat` """ value: str """ diff --git a/stripe/_payment_intent.py b/stripe/_payment_intent.py index 282996c06..f255e472e 100644 --- a/stripe/_payment_intent.py +++ b/stripe/_payment_intent.py @@ -2120,12 +2120,21 @@ class Twint(StripeObject): class UsBankAccount(StripeObject): class FinancialConnections(StripeObject): + class Filters(StripeObject): + account_subcategories: Optional[ + List[Literal["checking", "savings"]] + ] + """ + The account subcategories to use to filter for possible accounts to link. Valid subcategories are `checking` and `savings`. + """ + class ManualEntry(StripeObject): mode: Optional[Literal["automatic", "custom"]] """ Settings for configuring manual entry of account details. """ + filters: Optional[Filters] manual_entry: Optional[ManualEntry] permissions: Optional[ List[ @@ -2157,7 +2166,10 @@ class ManualEntry(StripeObject): """ For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app. """ - _inner_class_types = {"manual_entry": ManualEntry} + _inner_class_types = { + "filters": Filters, + "manual_entry": ManualEntry, + } class MandateOptions(StripeObject): collection_method: Optional[Literal["paper"]] @@ -6045,6 +6057,12 @@ class ConfirmParamsPaymentMethodOptionsUsBankAccount(TypedDict): class ConfirmParamsPaymentMethodOptionsUsBankAccountFinancialConnections( TypedDict, ): + filters: NotRequired[ + "PaymentIntent.ConfirmParamsPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters" + ] + """ + Provide filters for the linked accounts that the customer can select for the payment method + """ manual_entry: NotRequired[ "PaymentIntent.ConfirmParamsPaymentMethodOptionsUsBankAccountFinancialConnectionsManualEntry" ] @@ -6079,6 +6097,16 @@ class ConfirmParamsPaymentMethodOptionsUsBankAccountFinancialConnections( For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app. """ + class ConfirmParamsPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters( + TypedDict, + ): + account_subcategories: NotRequired[ + List[Literal["checking", "savings"]] + ] + """ + The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`. + """ + class ConfirmParamsPaymentMethodOptionsUsBankAccountFinancialConnectionsManualEntry( TypedDict, ): @@ -9179,6 +9207,12 @@ class CreateParamsPaymentMethodOptionsUsBankAccount(TypedDict): class CreateParamsPaymentMethodOptionsUsBankAccountFinancialConnections( TypedDict, ): + filters: NotRequired[ + "PaymentIntent.CreateParamsPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters" + ] + """ + Provide filters for the linked accounts that the customer can select for the payment method + """ manual_entry: NotRequired[ "PaymentIntent.CreateParamsPaymentMethodOptionsUsBankAccountFinancialConnectionsManualEntry" ] @@ -9213,6 +9247,16 @@ class CreateParamsPaymentMethodOptionsUsBankAccountFinancialConnections( For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app. """ + class CreateParamsPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters( + TypedDict, + ): + account_subcategories: NotRequired[ + List[Literal["checking", "savings"]] + ] + """ + The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`. + """ + class CreateParamsPaymentMethodOptionsUsBankAccountFinancialConnectionsManualEntry( TypedDict, ): @@ -12370,6 +12414,12 @@ class ModifyParamsPaymentMethodOptionsUsBankAccount(TypedDict): class ModifyParamsPaymentMethodOptionsUsBankAccountFinancialConnections( TypedDict, ): + filters: NotRequired[ + "PaymentIntent.ModifyParamsPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters" + ] + """ + Provide filters for the linked accounts that the customer can select for the payment method + """ manual_entry: NotRequired[ "PaymentIntent.ModifyParamsPaymentMethodOptionsUsBankAccountFinancialConnectionsManualEntry" ] @@ -12404,6 +12454,16 @@ class ModifyParamsPaymentMethodOptionsUsBankAccountFinancialConnections( For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app. """ + class ModifyParamsPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters( + TypedDict, + ): + account_subcategories: NotRequired[ + List[Literal["checking", "savings"]] + ] + """ + The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`. + """ + class ModifyParamsPaymentMethodOptionsUsBankAccountFinancialConnectionsManualEntry( TypedDict, ): diff --git a/stripe/_payment_intent_service.py b/stripe/_payment_intent_service.py index dde54fbbf..a54c350e5 100644 --- a/stripe/_payment_intent_service.py +++ b/stripe/_payment_intent_service.py @@ -3711,6 +3711,12 @@ class ConfirmParamsPaymentMethodOptionsUsBankAccount(TypedDict): class ConfirmParamsPaymentMethodOptionsUsBankAccountFinancialConnections( TypedDict, ): + filters: NotRequired[ + "PaymentIntentService.ConfirmParamsPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters" + ] + """ + Provide filters for the linked accounts that the customer can select for the payment method + """ manual_entry: NotRequired[ "PaymentIntentService.ConfirmParamsPaymentMethodOptionsUsBankAccountFinancialConnectionsManualEntry" ] @@ -3745,6 +3751,16 @@ class ConfirmParamsPaymentMethodOptionsUsBankAccountFinancialConnections( For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app. """ + class ConfirmParamsPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters( + TypedDict, + ): + account_subcategories: NotRequired[ + List[Literal["checking", "savings"]] + ] + """ + The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`. + """ + class ConfirmParamsPaymentMethodOptionsUsBankAccountFinancialConnectionsManualEntry( TypedDict, ): @@ -6885,6 +6901,12 @@ class CreateParamsPaymentMethodOptionsUsBankAccount(TypedDict): class CreateParamsPaymentMethodOptionsUsBankAccountFinancialConnections( TypedDict, ): + filters: NotRequired[ + "PaymentIntentService.CreateParamsPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters" + ] + """ + Provide filters for the linked accounts that the customer can select for the payment method + """ manual_entry: NotRequired[ "PaymentIntentService.CreateParamsPaymentMethodOptionsUsBankAccountFinancialConnectionsManualEntry" ] @@ -6919,6 +6941,16 @@ class CreateParamsPaymentMethodOptionsUsBankAccountFinancialConnections( For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app. """ + class CreateParamsPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters( + TypedDict, + ): + account_subcategories: NotRequired[ + List[Literal["checking", "savings"]] + ] + """ + The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`. + """ + class CreateParamsPaymentMethodOptionsUsBankAccountFinancialConnectionsManualEntry( TypedDict, ): @@ -10146,6 +10178,12 @@ class UpdateParamsPaymentMethodOptionsUsBankAccount(TypedDict): class UpdateParamsPaymentMethodOptionsUsBankAccountFinancialConnections( TypedDict, ): + filters: NotRequired[ + "PaymentIntentService.UpdateParamsPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters" + ] + """ + Provide filters for the linked accounts that the customer can select for the payment method + """ manual_entry: NotRequired[ "PaymentIntentService.UpdateParamsPaymentMethodOptionsUsBankAccountFinancialConnectionsManualEntry" ] @@ -10180,6 +10218,16 @@ class UpdateParamsPaymentMethodOptionsUsBankAccountFinancialConnections( For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app. """ + class UpdateParamsPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters( + TypedDict, + ): + account_subcategories: NotRequired[ + List[Literal["checking", "savings"]] + ] + """ + The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`. + """ + class UpdateParamsPaymentMethodOptionsUsBankAccountFinancialConnectionsManualEntry( TypedDict, ): diff --git a/stripe/_payment_link.py b/stripe/_payment_link.py index 31ba7f183..7cd67469d 100644 --- a/stripe/_payment_link.py +++ b/stripe/_payment_link.py @@ -789,6 +789,8 @@ class CreateParams(RequestOptions): "klarna", "konbini", "link", + "mobilepay", + "multibanco", "oxxo", "p24", "paynow", @@ -798,8 +800,10 @@ class CreateParams(RequestOptions): "sepa_debit", "sofort", "swish", + "twint", "us_bank_account", "wechat_pay", + "zip", ] ] ] @@ -1535,7 +1539,7 @@ class CreateParamsSubscriptionDataTrialSettingsEndBehavior(TypedDict): class CreateParamsTaxIdCollection(TypedDict): enabled: bool """ - Set to `true` to enable tax ID collection. + Enable tax ID collection during checkout. Defaults to `false`. """ class CreateParamsTransferData(TypedDict): @@ -1667,7 +1671,7 @@ class ModifyParams(RequestOptions): If you'd like information on how to collect a payment method outside of Checkout, read the guide on [configuring subscriptions with a free trial](https://stripe.com/docs/payments/checkout/free-trials). """ payment_method_types: NotRequired[ - "Literal['']|List[Literal['affirm', 'afterpay_clearpay', 'alipay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'blik', 'boleto', 'card', 'cashapp', 'eps', 'fpx', 'giropay', 'grabpay', 'ideal', 'klarna', 'konbini', 'link', 'oxxo', 'p24', 'paynow', 'paypal', 'pix', 'promptpay', 'sepa_debit', 'sofort', 'swish', 'us_bank_account', 'wechat_pay']]" + "Literal['']|List[Literal['affirm', 'afterpay_clearpay', 'alipay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'blik', 'boleto', 'card', 'cashapp', 'eps', 'fpx', 'giropay', 'grabpay', 'ideal', 'klarna', 'konbini', 'link', 'mobilepay', 'multibanco', 'oxxo', 'p24', 'paynow', 'paypal', 'pix', 'promptpay', 'sepa_debit', 'sofort', 'swish', 'twint', 'us_bank_account', 'wechat_pay', 'zip']]" ] """ The list of payment method types that customers can use. Pass an empty string to enable dynamic payment methods that use your [payment method settings](https://dashboard.stripe.com/settings/payment_methods). @@ -1690,6 +1694,12 @@ class ModifyParams(RequestOptions): """ When creating a subscription, the specified configuration data will be used. There must be at least one line item with a recurring price to use `subscription_data`. """ + tax_id_collection: NotRequired[ + "PaymentLink.ModifyParamsTaxIdCollection" + ] + """ + Controls tax ID collection during checkout. + """ class ModifyParamsAfterCompletion(TypedDict): hosted_confirmation: NotRequired[ @@ -2306,6 +2316,12 @@ class ModifyParamsSubscriptionDataTrialSettingsEndBehavior(TypedDict): Indicates how the subscription should change when the trial ends if the user did not provide a payment method. """ + class ModifyParamsTaxIdCollection(TypedDict): + enabled: bool + """ + Enable tax ID collection during checkout. Defaults to `false`. + """ + class RetrieveParams(RequestOptions): expand: NotRequired[List[str]] """ @@ -2416,6 +2432,8 @@ class RetrieveParams(RequestOptions): "klarna", "konbini", "link", + "mobilepay", + "multibanco", "oxxo", "p24", "paynow", @@ -2425,8 +2443,10 @@ class RetrieveParams(RequestOptions): "sepa_debit", "sofort", "swish", + "twint", "us_bank_account", "wechat_pay", + "zip", ] ] ] diff --git a/stripe/_payment_link_service.py b/stripe/_payment_link_service.py index 553136978..026046830 100644 --- a/stripe/_payment_link_service.py +++ b/stripe/_payment_link_service.py @@ -131,6 +131,8 @@ class CreateParams(TypedDict): "klarna", "konbini", "link", + "mobilepay", + "multibanco", "oxxo", "p24", "paynow", @@ -140,8 +142,10 @@ class CreateParams(TypedDict): "sepa_debit", "sofort", "swish", + "twint", "us_bank_account", "wechat_pay", + "zip", ] ] ] @@ -887,7 +891,7 @@ class CreateParamsSubscriptionDataTrialSettingsEndBehavior(TypedDict): class CreateParamsTaxIdCollection(TypedDict): enabled: bool """ - Set to `true` to enable tax ID collection. + Enable tax ID collection during checkout. Defaults to `false`. """ class CreateParamsTransferData(TypedDict): @@ -1011,7 +1015,7 @@ class UpdateParams(TypedDict): If you'd like information on how to collect a payment method outside of Checkout, read the guide on [configuring subscriptions with a free trial](https://stripe.com/docs/payments/checkout/free-trials). """ payment_method_types: NotRequired[ - "Literal['']|List[Literal['affirm', 'afterpay_clearpay', 'alipay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'blik', 'boleto', 'card', 'cashapp', 'eps', 'fpx', 'giropay', 'grabpay', 'ideal', 'klarna', 'konbini', 'link', 'oxxo', 'p24', 'paynow', 'paypal', 'pix', 'promptpay', 'sepa_debit', 'sofort', 'swish', 'us_bank_account', 'wechat_pay']]" + "Literal['']|List[Literal['affirm', 'afterpay_clearpay', 'alipay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'blik', 'boleto', 'card', 'cashapp', 'eps', 'fpx', 'giropay', 'grabpay', 'ideal', 'klarna', 'konbini', 'link', 'mobilepay', 'multibanco', 'oxxo', 'p24', 'paynow', 'paypal', 'pix', 'promptpay', 'sepa_debit', 'sofort', 'swish', 'twint', 'us_bank_account', 'wechat_pay', 'zip']]" ] """ The list of payment method types that customers can use. Pass an empty string to enable dynamic payment methods that use your [payment method settings](https://dashboard.stripe.com/settings/payment_methods). @@ -1034,6 +1038,12 @@ class UpdateParams(TypedDict): """ When creating a subscription, the specified configuration data will be used. There must be at least one line item with a recurring price to use `subscription_data`. """ + tax_id_collection: NotRequired[ + "PaymentLinkService.UpdateParamsTaxIdCollection" + ] + """ + Controls tax ID collection during checkout. + """ class UpdateParamsAfterCompletion(TypedDict): hosted_confirmation: NotRequired[ @@ -1656,6 +1666,12 @@ class UpdateParamsSubscriptionDataTrialSettingsEndBehavior(TypedDict): Indicates how the subscription should change when the trial ends if the user did not provide a payment method. """ + class UpdateParamsTaxIdCollection(TypedDict): + enabled: bool + """ + Enable tax ID collection during checkout. Defaults to `false`. + """ + def list( self, params: "PaymentLinkService.ListParams" = {}, diff --git a/stripe/_platform_tax_fee.py b/stripe/_platform_tax_fee.py deleted file mode 100644 index 9939d0324..000000000 --- a/stripe/_platform_tax_fee.py +++ /dev/null @@ -1,29 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from typing import ClassVar -from typing_extensions import Literal - - -class PlatformTaxFee(StripeObject): - OBJECT_NAME: ClassVar[Literal["platform_tax_fee"]] = "platform_tax_fee" - account: str - """ - The Connected account that incurred this charge. - """ - id: str - """ - Unique identifier for the object. - """ - object: Literal["platform_tax_fee"] - """ - String representing the object's type. Objects of the same type share the same value. - """ - source_transaction: str - """ - The payment object that caused this tax to be inflicted. - """ - type: str - """ - The type of tax (VAT). - """ diff --git a/stripe/_quote_preview_invoice.py b/stripe/_quote_preview_invoice.py index 558caee23..f7737a27f 100644 --- a/stripe/_quote_preview_invoice.py +++ b/stripe/_quote_preview_invoice.py @@ -243,6 +243,7 @@ class CustomerTaxId(StripeObject): "ca_pst_mb", "ca_pst_sk", "ca_qst", + "ch_uid", "ch_vat", "cl_tin", "cn_tin", @@ -302,7 +303,7 @@ class CustomerTaxId(StripeObject): "za_vat", ] """ - The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, or `unknown` + The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, or `unknown` """ value: Optional[str] """ @@ -671,6 +672,15 @@ class SepaDebit(StripeObject): class UsBankAccount(StripeObject): class FinancialConnections(StripeObject): + class Filters(StripeObject): + account_subcategories: Optional[ + List[Literal["checking", "savings"]] + ] + """ + The account subcategories to use to filter for possible accounts to link. Valid subcategories are `checking` and `savings`. + """ + + filters: Optional[Filters] permissions: Optional[ List[ Literal[ @@ -697,6 +707,7 @@ class FinancialConnections(StripeObject): """ Data features requested to be retrieved upon account creation. """ + _inner_class_types = {"filters": Filters} financial_connections: Optional[FinancialConnections] verification_method: Optional[ diff --git a/stripe/_setup_intent.py b/stripe/_setup_intent.py index bd20a1843..9dfb1a99b 100644 --- a/stripe/_setup_intent.py +++ b/stripe/_setup_intent.py @@ -631,12 +631,21 @@ class MandateOptions(StripeObject): class UsBankAccount(StripeObject): class FinancialConnections(StripeObject): + class Filters(StripeObject): + account_subcategories: Optional[ + List[Literal["checking", "savings"]] + ] + """ + The account subcategories to use to filter for possible accounts to link. Valid subcategories are `checking` and `savings`. + """ + class ManualEntry(StripeObject): mode: Optional[Literal["automatic", "custom"]] """ Settings for configuring manual entry of account details. """ + filters: Optional[Filters] manual_entry: Optional[ManualEntry] permissions: Optional[ List[ @@ -668,7 +677,10 @@ class ManualEntry(StripeObject): """ For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app. """ - _inner_class_types = {"manual_entry": ManualEntry} + _inner_class_types = { + "filters": Filters, + "manual_entry": ManualEntry, + } class MandateOptions(StripeObject): collection_method: Optional[Literal["paper"]] @@ -1840,6 +1852,12 @@ class ConfirmParamsPaymentMethodOptionsUsBankAccount(TypedDict): class ConfirmParamsPaymentMethodOptionsUsBankAccountFinancialConnections( TypedDict, ): + filters: NotRequired[ + "SetupIntent.ConfirmParamsPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters" + ] + """ + Provide filters for the linked accounts that the customer can select for the payment method + """ manual_entry: NotRequired[ "SetupIntent.ConfirmParamsPaymentMethodOptionsUsBankAccountFinancialConnectionsManualEntry" ] @@ -1874,6 +1892,16 @@ class ConfirmParamsPaymentMethodOptionsUsBankAccountFinancialConnections( For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app. """ + class ConfirmParamsPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters( + TypedDict, + ): + account_subcategories: NotRequired[ + List[Literal["checking", "savings"]] + ] + """ + The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`. + """ + class ConfirmParamsPaymentMethodOptionsUsBankAccountFinancialConnectionsManualEntry( TypedDict, ): @@ -3081,6 +3109,12 @@ class CreateParamsPaymentMethodOptionsUsBankAccount(TypedDict): class CreateParamsPaymentMethodOptionsUsBankAccountFinancialConnections( TypedDict, ): + filters: NotRequired[ + "SetupIntent.CreateParamsPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters" + ] + """ + Provide filters for the linked accounts that the customer can select for the payment method + """ manual_entry: NotRequired[ "SetupIntent.CreateParamsPaymentMethodOptionsUsBankAccountFinancialConnectionsManualEntry" ] @@ -3115,6 +3149,16 @@ class CreateParamsPaymentMethodOptionsUsBankAccountFinancialConnections( For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app. """ + class CreateParamsPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters( + TypedDict, + ): + account_subcategories: NotRequired[ + List[Literal["checking", "savings"]] + ] + """ + The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`. + """ + class CreateParamsPaymentMethodOptionsUsBankAccountFinancialConnectionsManualEntry( TypedDict, ): @@ -4289,6 +4333,12 @@ class ModifyParamsPaymentMethodOptionsUsBankAccount(TypedDict): class ModifyParamsPaymentMethodOptionsUsBankAccountFinancialConnections( TypedDict, ): + filters: NotRequired[ + "SetupIntent.ModifyParamsPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters" + ] + """ + Provide filters for the linked accounts that the customer can select for the payment method + """ manual_entry: NotRequired[ "SetupIntent.ModifyParamsPaymentMethodOptionsUsBankAccountFinancialConnectionsManualEntry" ] @@ -4323,6 +4373,16 @@ class ModifyParamsPaymentMethodOptionsUsBankAccountFinancialConnections( For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app. """ + class ModifyParamsPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters( + TypedDict, + ): + account_subcategories: NotRequired[ + List[Literal["checking", "savings"]] + ] + """ + The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`. + """ + class ModifyParamsPaymentMethodOptionsUsBankAccountFinancialConnectionsManualEntry( TypedDict, ): diff --git a/stripe/_setup_intent_service.py b/stripe/_setup_intent_service.py index 19b72119b..8c6a5671a 100644 --- a/stripe/_setup_intent_service.py +++ b/stripe/_setup_intent_service.py @@ -1184,6 +1184,12 @@ class ConfirmParamsPaymentMethodOptionsUsBankAccount(TypedDict): class ConfirmParamsPaymentMethodOptionsUsBankAccountFinancialConnections( TypedDict, ): + filters: NotRequired[ + "SetupIntentService.ConfirmParamsPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters" + ] + """ + Provide filters for the linked accounts that the customer can select for the payment method + """ manual_entry: NotRequired[ "SetupIntentService.ConfirmParamsPaymentMethodOptionsUsBankAccountFinancialConnectionsManualEntry" ] @@ -1218,6 +1224,16 @@ class ConfirmParamsPaymentMethodOptionsUsBankAccountFinancialConnections( For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app. """ + class ConfirmParamsPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters( + TypedDict, + ): + account_subcategories: NotRequired[ + List[Literal["checking", "savings"]] + ] + """ + The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`. + """ + class ConfirmParamsPaymentMethodOptionsUsBankAccountFinancialConnectionsManualEntry( TypedDict, ): @@ -2461,6 +2477,12 @@ class CreateParamsPaymentMethodOptionsUsBankAccount(TypedDict): class CreateParamsPaymentMethodOptionsUsBankAccountFinancialConnections( TypedDict, ): + filters: NotRequired[ + "SetupIntentService.CreateParamsPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters" + ] + """ + Provide filters for the linked accounts that the customer can select for the payment method + """ manual_entry: NotRequired[ "SetupIntentService.CreateParamsPaymentMethodOptionsUsBankAccountFinancialConnectionsManualEntry" ] @@ -2495,6 +2517,16 @@ class CreateParamsPaymentMethodOptionsUsBankAccountFinancialConnections( For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app. """ + class CreateParamsPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters( + TypedDict, + ): + account_subcategories: NotRequired[ + List[Literal["checking", "savings"]] + ] + """ + The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`. + """ + class CreateParamsPaymentMethodOptionsUsBankAccountFinancialConnectionsManualEntry( TypedDict, ): @@ -3715,6 +3747,12 @@ class UpdateParamsPaymentMethodOptionsUsBankAccount(TypedDict): class UpdateParamsPaymentMethodOptionsUsBankAccountFinancialConnections( TypedDict, ): + filters: NotRequired[ + "SetupIntentService.UpdateParamsPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters" + ] + """ + Provide filters for the linked accounts that the customer can select for the payment method + """ manual_entry: NotRequired[ "SetupIntentService.UpdateParamsPaymentMethodOptionsUsBankAccountFinancialConnectionsManualEntry" ] @@ -3749,6 +3787,16 @@ class UpdateParamsPaymentMethodOptionsUsBankAccountFinancialConnections( For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app. """ + class UpdateParamsPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters( + TypedDict, + ): + account_subcategories: NotRequired[ + List[Literal["checking", "savings"]] + ] + """ + The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`. + """ + class UpdateParamsPaymentMethodOptionsUsBankAccountFinancialConnectionsManualEntry( TypedDict, ): diff --git a/stripe/_subscription.py b/stripe/_subscription.py index cb45b2c40..d4912fd75 100644 --- a/stripe/_subscription.py +++ b/stripe/_subscription.py @@ -269,6 +269,15 @@ class SepaDebit(StripeObject): class UsBankAccount(StripeObject): class FinancialConnections(StripeObject): + class Filters(StripeObject): + account_subcategories: Optional[ + List[Literal["checking", "savings"]] + ] + """ + The account subcategories to use to filter for possible accounts to link. Valid subcategories are `checking` and `savings`. + """ + + filters: Optional[Filters] permissions: Optional[ List[ Literal[ @@ -295,6 +304,7 @@ class FinancialConnections(StripeObject): """ Data features requested to be retrieved upon account creation. """ + _inner_class_types = {"filters": Filters} financial_connections: Optional[FinancialConnections] verification_method: Optional[ @@ -1246,6 +1256,12 @@ class CreateParamsPaymentSettingsPaymentMethodOptionsUsBankAccount( class CreateParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnections( TypedDict, ): + filters: NotRequired[ + "Subscription.CreateParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters" + ] + """ + Provide filters for the linked accounts that the customer can select for the payment method. + """ permissions: NotRequired[ List[ Literal[ @@ -1270,6 +1286,16 @@ class CreateParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConne List of data features that you would like to retrieve upon account creation. """ + class CreateParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters( + TypedDict, + ): + account_subcategories: NotRequired[ + List[Literal["checking", "savings"]] + ] + """ + The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`. + """ + class CreateParamsPendingInvoiceItemInterval(TypedDict): interval: Literal["day", "month", "week", "year"] """ @@ -2176,6 +2202,12 @@ class ModifyParamsPaymentSettingsPaymentMethodOptionsUsBankAccount( class ModifyParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnections( TypedDict, ): + filters: NotRequired[ + "Subscription.ModifyParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters" + ] + """ + Provide filters for the linked accounts that the customer can select for the payment method. + """ permissions: NotRequired[ List[ Literal[ @@ -2200,6 +2232,16 @@ class ModifyParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConne List of data features that you would like to retrieve upon account creation. """ + class ModifyParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters( + TypedDict, + ): + account_subcategories: NotRequired[ + List[Literal["checking", "savings"]] + ] + """ + The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`. + """ + class ModifyParamsPendingInvoiceItemInterval(TypedDict): interval: Literal["day", "month", "week", "year"] """ diff --git a/stripe/_subscription_service.py b/stripe/_subscription_service.py index 43e047b0d..eb0bfcd79 100644 --- a/stripe/_subscription_service.py +++ b/stripe/_subscription_service.py @@ -794,6 +794,12 @@ class CreateParamsPaymentSettingsPaymentMethodOptionsUsBankAccount( class CreateParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnections( TypedDict, ): + filters: NotRequired[ + "SubscriptionService.CreateParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters" + ] + """ + Provide filters for the linked accounts that the customer can select for the payment method. + """ permissions: NotRequired[ List[ Literal[ @@ -818,6 +824,16 @@ class CreateParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConne List of data features that you would like to retrieve upon account creation. """ + class CreateParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters( + TypedDict, + ): + account_subcategories: NotRequired[ + List[Literal["checking", "savings"]] + ] + """ + The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`. + """ + class CreateParamsPendingInvoiceItemInterval(TypedDict): interval: Literal["day", "month", "week", "year"] """ @@ -1780,6 +1796,12 @@ class UpdateParamsPaymentSettingsPaymentMethodOptionsUsBankAccount( class UpdateParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnections( TypedDict, ): + filters: NotRequired[ + "SubscriptionService.UpdateParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters" + ] + """ + Provide filters for the linked accounts that the customer can select for the payment method. + """ permissions: NotRequired[ List[ Literal[ @@ -1804,6 +1826,16 @@ class UpdateParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConne List of data features that you would like to retrieve upon account creation. """ + class UpdateParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters( + TypedDict, + ): + account_subcategories: NotRequired[ + List[Literal["checking", "savings"]] + ] + """ + The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`. + """ + class UpdateParamsPendingInvoiceItemInterval(TypedDict): interval: Literal["day", "month", "week", "year"] """ diff --git a/stripe/_tax_id.py b/stripe/_tax_id.py index 16972e008..436e6ade3 100644 --- a/stripe/_tax_id.py +++ b/stripe/_tax_id.py @@ -95,6 +95,7 @@ class CreateParams(RequestOptions): "ca_pst_mb", "ca_pst_sk", "ca_qst", + "ch_uid", "ch_vat", "cl_tin", "cn_tin", @@ -153,7 +154,7 @@ class CreateParams(RequestOptions): "za_vat", ] """ - Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `ve_rif`, `vn_tin`, or `za_vat` + Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `ve_rif`, `vn_tin`, or `za_vat` """ value: str """ @@ -264,6 +265,7 @@ class RetrieveParams(RequestOptions): "ca_pst_mb", "ca_pst_sk", "ca_qst", + "ch_uid", "ch_vat", "cl_tin", "cn_tin", @@ -323,7 +325,7 @@ class RetrieveParams(RequestOptions): "za_vat", ] """ - Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `ve_rif`, `vn_tin`, or `za_vat`. Note that some legacy tax IDs have type `unknown` + Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `ve_rif`, `vn_tin`, or `za_vat`. Note that some legacy tax IDs have type `unknown` """ value: str """ diff --git a/stripe/_tax_id_service.py b/stripe/_tax_id_service.py index 0ac3eac42..aa6e28c27 100644 --- a/stripe/_tax_id_service.py +++ b/stripe/_tax_id_service.py @@ -36,6 +36,7 @@ class CreateParams(TypedDict): "ca_pst_mb", "ca_pst_sk", "ca_qst", + "ch_uid", "ch_vat", "cl_tin", "cn_tin", @@ -94,7 +95,7 @@ class CreateParams(TypedDict): "za_vat", ] """ - Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `ve_rif`, `vn_tin`, or `za_vat` + Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `ve_rif`, `vn_tin`, or `za_vat` """ value: str """ diff --git a/stripe/_webhook_endpoint.py b/stripe/_webhook_endpoint.py index eaf49351a..f79fa8b15 100644 --- a/stripe/_webhook_endpoint.py +++ b/stripe/_webhook_endpoint.py @@ -133,6 +133,7 @@ class CreateParams(RequestOptions): "2023-08-16", "2023-10-16", "2024-04-10", + "2024-06-20", ] ] """ diff --git a/stripe/_webhook_endpoint_service.py b/stripe/_webhook_endpoint_service.py index 36726678a..b6eaebff4 100644 --- a/stripe/_webhook_endpoint_service.py +++ b/stripe/_webhook_endpoint_service.py @@ -114,6 +114,7 @@ class CreateParams(TypedDict): "2023-08-16", "2023-10-16", "2024-04-10", + "2024-06-20", ] ] """ diff --git a/stripe/api_resources/__init__.py b/stripe/api_resources/__init__.py index 3be9fd252..a113daa1d 100644 --- a/stripe/api_resources/__init__.py +++ b/stripe/api_resources/__init__.py @@ -98,7 +98,6 @@ from stripe.api_resources.payout import Payout from stripe.api_resources.person import Person from stripe.api_resources.plan import Plan - from stripe.api_resources.platform_tax_fee import PlatformTaxFee from stripe.api_resources.price import Price from stripe.api_resources.product import Product from stripe.api_resources.product_feature import ProductFeature diff --git a/stripe/api_resources/platform_tax_fee.py b/stripe/api_resources/platform_tax_fee.py deleted file mode 100644 index d184bf42d..000000000 --- a/stripe/api_resources/platform_tax_fee.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.platform_tax_fee package is deprecated, please change your - imports to import from stripe directly. - From: - from stripe.api_resources.platform_tax_fee import PlatformTaxFee - To: - from stripe import PlatformTaxFee - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe._platform_tax_fee import ( # noqa - PlatformTaxFee, - ) diff --git a/stripe/billing/_meter.py b/stripe/billing/_meter.py index 084c06e2a..f2fe0f0ee 100644 --- a/stripe/billing/_meter.py +++ b/stripe/billing/_meter.py @@ -148,9 +148,9 @@ class ListEventSummariesParams(RequestOptions): """ A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. """ - value_grouping_window: NotRequired[Literal["hour"]] + value_grouping_window: NotRequired[Literal["day", "hour"]] """ - Specifies what granularity to use when generating event summaries. If not specified, a single event summary would be returned for the specified time range. + Specifies what granularity to use when generating event summaries. If not specified, a single event summary would be returned for the specified time range. For hourly granularity, start and end times must align with hour boundaries (e.g., 00:00, 01:00, ..., 23:00). For daily granularity, start and end times must align with UTC day boundaries (00:00 UTC). """ class ListParams(RequestOptions): diff --git a/stripe/billing/_meter_event_summary_service.py b/stripe/billing/_meter_event_summary_service.py index 73096be0e..48b2cacb5 100644 --- a/stripe/billing/_meter_event_summary_service.py +++ b/stripe/billing/_meter_event_summary_service.py @@ -39,9 +39,9 @@ class ListParams(TypedDict): """ A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. """ - value_grouping_window: NotRequired[Literal["hour"]] + value_grouping_window: NotRequired[Literal["day", "hour"]] """ - Specifies what granularity to use when generating event summaries. If not specified, a single event summary would be returned for the specified time range. + Specifies what granularity to use when generating event summaries. If not specified, a single event summary would be returned for the specified time range. For hourly granularity, start and end times must align with hour boundaries (e.g., 00:00, 01:00, ..., 23:00). For daily granularity, start and end times must align with UTC day boundaries (00:00 UTC). """ def list( diff --git a/stripe/checkout/_session.py b/stripe/checkout/_session.py index d0d2edcbd..591948fc9 100644 --- a/stripe/checkout/_session.py +++ b/stripe/checkout/_session.py @@ -351,6 +351,7 @@ class TaxId(StripeObject): "ca_pst_mb", "ca_pst_sk", "ca_qst", + "ch_uid", "ch_vat", "cl_tin", "cn_tin", @@ -410,7 +411,7 @@ class TaxId(StripeObject): "za_vat", ] """ - The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, or `unknown` + The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, or `unknown` """ value: Optional[str] """ @@ -970,12 +971,21 @@ class Swish(StripeObject): class UsBankAccount(StripeObject): class FinancialConnections(StripeObject): + class Filters(StripeObject): + account_subcategories: Optional[ + List[Literal["checking", "savings"]] + ] + """ + The account subcategories to use to filter for possible accounts to link. Valid subcategories are `checking` and `savings`. + """ + class ManualEntry(StripeObject): mode: Optional[Literal["automatic", "custom"]] """ Settings for configuring manual entry of account details. """ + filters: Optional[Filters] manual_entry: Optional[ManualEntry] permissions: Optional[ List[ @@ -1007,7 +1017,10 @@ class ManualEntry(StripeObject): """ For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app. """ - _inner_class_types = {"manual_entry": ManualEntry} + _inner_class_types = { + "filters": Filters, + "manual_entry": ManualEntry, + } financial_connections: Optional[FinancialConnections] setup_future_usage: Optional[ @@ -1880,7 +1893,7 @@ class CreateParams(RequestOptions): """ tax_id_collection: NotRequired["Session.CreateParamsTaxIdCollection"] """ - Controls tax ID collection settings for the session. + Controls tax ID collection during checkout. """ ui_mode: NotRequired[Literal["embedded", "hosted"]] """ @@ -3687,7 +3700,7 @@ class CreateParamsSubscriptionDataTrialSettingsEndBehavior(TypedDict): class CreateParamsTaxIdCollection(TypedDict): enabled: bool """ - Set to true to enable Tax ID collection. + Enable tax ID collection during checkout. Defaults to `false`. """ class ExpireParams(RequestOptions): diff --git a/stripe/checkout/_session_service.py b/stripe/checkout/_session_service.py index 7b0a3ab86..d5f326cea 100644 --- a/stripe/checkout/_session_service.py +++ b/stripe/checkout/_session_service.py @@ -344,7 +344,7 @@ class CreateParams(TypedDict): "SessionService.CreateParamsTaxIdCollection" ] """ - Controls tax ID collection settings for the session. + Controls tax ID collection during checkout. """ ui_mode: NotRequired[Literal["embedded", "hosted"]] """ @@ -2189,7 +2189,7 @@ class CreateParamsSubscriptionDataTrialSettingsEndBehavior(TypedDict): class CreateParamsTaxIdCollection(TypedDict): enabled: bool """ - Set to true to enable Tax ID collection. + Enable tax ID collection during checkout. Defaults to `false`. """ class ExpireParams(TypedDict): diff --git a/stripe/financial_connections/_session.py b/stripe/financial_connections/_session.py index a76ad10e6..1e69386ec 100644 --- a/stripe/financial_connections/_session.py +++ b/stripe/financial_connections/_session.py @@ -46,6 +46,20 @@ class AccountHolder(StripeObject): """ class Filters(StripeObject): + account_subcategories: Optional[ + List[ + Literal[ + "checking", + "credit_card", + "line_of_credit", + "mortgage", + "savings", + ] + ] + ] + """ + Restricts the Session to subcategories of accounts that can be linked. Valid subcategories are: `checking`, `savings`, `mortgage`, `line_of_credit`, `credit_card`. + """ countries: Optional[List[str]] """ List of countries from which to filter accounts. @@ -132,6 +146,20 @@ class CreateParamsAccountHolder(TypedDict): """ class CreateParamsFilters(TypedDict): + account_subcategories: NotRequired[ + List[ + Literal[ + "checking", + "credit_card", + "line_of_credit", + "mortgage", + "savings", + ] + ] + ] + """ + Restricts the Session to subcategories of accounts that can be linked. Valid subcategories are: `checking`, `savings`, `mortgage`, `line_of_credit`, `credit_card`. + """ countries: NotRequired[List[str]] """ List of countries from which to collect accounts. diff --git a/stripe/financial_connections/_session_service.py b/stripe/financial_connections/_session_service.py index b470c1944..c959e5781 100644 --- a/stripe/financial_connections/_session_service.py +++ b/stripe/financial_connections/_session_service.py @@ -71,6 +71,20 @@ class CreateParamsAccountHolder(TypedDict): """ class CreateParamsFilters(TypedDict): + account_subcategories: NotRequired[ + List[ + Literal[ + "checking", + "credit_card", + "line_of_credit", + "mortgage", + "savings", + ] + ] + ] + """ + Restricts the Session to subcategories of accounts that can be linked. Valid subcategories are: `checking`, `savings`, `mortgage`, `line_of_credit`, `credit_card`. + """ countries: NotRequired[List[str]] """ List of countries from which to collect accounts. diff --git a/stripe/issuing/_authorization.py b/stripe/issuing/_authorization.py index 1ad54228d..2fa24ec97 100644 --- a/stripe/issuing/_authorization.py +++ b/stripe/issuing/_authorization.py @@ -52,6 +52,144 @@ class AmountDetails(StripeObject): The amount of cash requested by the cardholder. """ + class Fleet(StripeObject): + class CardholderPromptData(StripeObject): + alphanumeric_id: Optional[str] + """ + [Deprecated] An alphanumeric ID, though typical point of sales only support numeric entry. The card program can be configured to prompt for a vehicle ID, driver ID, or generic ID. + """ + driver_id: Optional[str] + """ + Driver ID. + """ + odometer: Optional[int] + """ + Odometer reading. + """ + unspecified_id: Optional[str] + """ + An alphanumeric ID. This field is used when a vehicle ID, driver ID, or generic ID is entered by the cardholder, but the merchant or card network did not specify the prompt type. + """ + user_id: Optional[str] + """ + User ID. + """ + vehicle_number: Optional[str] + """ + Vehicle number. + """ + + class ReportedBreakdown(StripeObject): + class Fuel(StripeObject): + gross_amount_decimal: Optional[str] + """ + Gross fuel amount that should equal Fuel Quantity multiplied by Fuel Unit Cost, inclusive of taxes. + """ + + class NonFuel(StripeObject): + gross_amount_decimal: Optional[str] + """ + Gross non-fuel amount that should equal the sum of the line items, inclusive of taxes. + """ + + class Tax(StripeObject): + local_amount_decimal: Optional[str] + """ + Amount of state or provincial Sales Tax included in the transaction amount. `null` if not reported by merchant or not subject to tax. + """ + national_amount_decimal: Optional[str] + """ + Amount of national Sales Tax or VAT included in the transaction amount. `null` if not reported by merchant or not subject to tax. + """ + + fuel: Optional[Fuel] + """ + Breakdown of fuel portion of the purchase. + """ + non_fuel: Optional[NonFuel] + """ + Breakdown of non-fuel portion of the purchase. + """ + tax: Optional[Tax] + """ + Information about tax included in this transaction. + """ + _inner_class_types = { + "fuel": Fuel, + "non_fuel": NonFuel, + "tax": Tax, + } + + cardholder_prompt_data: Optional[CardholderPromptData] + """ + Answers to prompts presented to the cardholder at the point of sale. Prompted fields vary depending on the configuration of your physical fleet cards. Typical points of sale support only numeric entry. + """ + purchase_type: Optional[ + Literal[ + "fuel_and_non_fuel_purchase", + "fuel_purchase", + "non_fuel_purchase", + ] + ] + """ + The type of purchase. + """ + reported_breakdown: Optional[ReportedBreakdown] + """ + More information about the total amount. Typically this information is received from the merchant after the authorization has been approved and the fuel dispensed. This information is not guaranteed to be accurate as some merchants may provide unreliable data. + """ + service_type: Optional[ + Literal["full_service", "non_fuel_transaction", "self_service"] + ] + """ + The type of fuel service. + """ + _inner_class_types = { + "cardholder_prompt_data": CardholderPromptData, + "reported_breakdown": ReportedBreakdown, + } + + class Fuel(StripeObject): + industry_product_code: Optional[str] + """ + [Conexxus Payment System Product Code](https://www.conexxus.org/conexxus-payment-system-product-codes) identifying the primary fuel product purchased. + """ + quantity_decimal: Optional[str] + """ + The quantity of `unit`s of fuel that was dispensed, represented as a decimal string with at most 12 decimal places. + """ + type: Optional[ + Literal[ + "diesel", + "other", + "unleaded_plus", + "unleaded_regular", + "unleaded_super", + ] + ] + """ + The type of fuel that was purchased. + """ + unit: Optional[ + Literal[ + "charging_minute", + "imperial_gallon", + "kilogram", + "kilowatt_hour", + "liter", + "other", + "pound", + "us_gallon", + ] + ] + """ + The units for `quantity_decimal`. + """ + unit_cost_decimal: Optional[str] + """ + The cost in cents per each unit of fuel, represented as a decimal string with at most 12 decimal places. + """ + class MerchantData(StripeObject): category: str """ @@ -199,11 +337,16 @@ class AmountDetails(StripeObject): reason: Literal[ "account_disabled", "card_active", + "card_canceled", + "card_expired", "card_inactive", + "cardholder_blocked", "cardholder_inactive", "cardholder_verification_required", + "insecure_authorization_method", "insufficient_funds", "not_allowed", + "pin_blocked", "spending_controls", "suspected_fraud", "verification_failed", @@ -328,6 +471,10 @@ class CaptureParams(RequestOptions): """ class CaptureParamsPurchaseDetails(TypedDict): + fleet: NotRequired["Authorization.CaptureParamsPurchaseDetailsFleet"] + """ + Fleet-specific information for transactions using Fleet cards. + """ flight: NotRequired["Authorization.CaptureParamsPurchaseDetailsFlight"] """ Information about the flight that was purchased with this transaction. @@ -353,6 +500,100 @@ class CaptureParamsPurchaseDetails(TypedDict): A merchant-specific order number. """ + class CaptureParamsPurchaseDetailsFleet(TypedDict): + cardholder_prompt_data: NotRequired[ + "Authorization.CaptureParamsPurchaseDetailsFleetCardholderPromptData" + ] + """ + Answers to prompts presented to the cardholder at the point of sale. Prompted fields vary depending on the configuration of your physical fleet cards. Typical points of sale support only numeric entry. + """ + purchase_type: NotRequired[ + Literal[ + "fuel_and_non_fuel_purchase", + "fuel_purchase", + "non_fuel_purchase", + ] + ] + """ + The type of purchase. One of `fuel_purchase`, `non_fuel_purchase`, or `fuel_and_non_fuel_purchase`. + """ + reported_breakdown: NotRequired[ + "Authorization.CaptureParamsPurchaseDetailsFleetReportedBreakdown" + ] + """ + More information about the total amount. This information is not guaranteed to be accurate as some merchants may provide unreliable data. + """ + service_type: NotRequired[ + Literal["full_service", "non_fuel_transaction", "self_service"] + ] + """ + The type of fuel service. One of `non_fuel_transaction`, `full_service`, or `self_service`. + """ + + class CaptureParamsPurchaseDetailsFleetCardholderPromptData(TypedDict): + driver_id: NotRequired[str] + """ + Driver ID. + """ + odometer: NotRequired[int] + """ + Odometer reading. + """ + unspecified_id: NotRequired[str] + """ + An alphanumeric ID. This field is used when a vehicle ID, driver ID, or generic ID is entered by the cardholder, but the merchant or card network did not specify the prompt type. + """ + user_id: NotRequired[str] + """ + User ID. + """ + vehicle_number: NotRequired[str] + """ + Vehicle number. + """ + + class CaptureParamsPurchaseDetailsFleetReportedBreakdown(TypedDict): + fuel: NotRequired[ + "Authorization.CaptureParamsPurchaseDetailsFleetReportedBreakdownFuel" + ] + """ + Breakdown of fuel portion of the purchase. + """ + non_fuel: NotRequired[ + "Authorization.CaptureParamsPurchaseDetailsFleetReportedBreakdownNonFuel" + ] + """ + Breakdown of non-fuel portion of the purchase. + """ + tax: NotRequired[ + "Authorization.CaptureParamsPurchaseDetailsFleetReportedBreakdownTax" + ] + """ + Information about tax included in this transaction. + """ + + class CaptureParamsPurchaseDetailsFleetReportedBreakdownFuel(TypedDict): + gross_amount_decimal: NotRequired[str] + """ + Gross fuel amount that should equal Fuel Volume multipled by Fuel Unit Cost, inclusive of taxes. + """ + + class CaptureParamsPurchaseDetailsFleetReportedBreakdownNonFuel(TypedDict): + gross_amount_decimal: NotRequired[str] + """ + Gross non-fuel amount that should equal the sum of the line items, inclusive of taxes. + """ + + class CaptureParamsPurchaseDetailsFleetReportedBreakdownTax(TypedDict): + local_amount_decimal: NotRequired[str] + """ + Amount of state or provincial Sales Tax included in the transaction amount. Null if not reported by merchant or not subject to tax. + """ + national_amount_decimal: NotRequired[str] + """ + Amount of national Sales Tax or VAT included in the transaction amount. Null if not reported by merchant or not subject to tax. + """ + class CaptureParamsPurchaseDetailsFlight(TypedDict): departure_at: NotRequired[int] """ @@ -404,6 +645,14 @@ class CaptureParamsPurchaseDetailsFlightSegment(TypedDict): """ class CaptureParamsPurchaseDetailsFuel(TypedDict): + industry_product_code: NotRequired[str] + """ + [Conexxus Payment System Product Code](https://www.conexxus.org/conexxus-payment-system-product-codes) identifying the primary fuel product purchased. + """ + quantity_decimal: NotRequired[str] + """ + The quantity of `unit`s of fuel that was dispensed, represented as a decimal string with at most 12 decimal places. + """ type: NotRequired[ Literal[ "diesel", @@ -416,18 +665,25 @@ class CaptureParamsPurchaseDetailsFuel(TypedDict): """ The type of fuel that was purchased. One of `diesel`, `unleaded_plus`, `unleaded_regular`, `unleaded_super`, or `other`. """ - unit: NotRequired[Literal["liter", "other", "us_gallon"]] + unit: NotRequired[ + Literal[ + "charging_minute", + "imperial_gallon", + "kilogram", + "kilowatt_hour", + "liter", + "other", + "pound", + "us_gallon", + ] + ] """ - The units for `volume_decimal`. One of `liter`, `us_gallon`, or `other`. + The units for `quantity_decimal`. One of `charging_minute`, `imperial_gallon`, `kilogram`, `kilowatt_hour`, `liter`, `pound`, `us_gallon`, or `other`. """ unit_cost_decimal: NotRequired[str] """ The cost in cents per each unit of fuel, represented as a decimal string with at most 12 decimal places. """ - volume_decimal: NotRequired[str] - """ - The volume of the fuel that was pumped, represented as a decimal string with at most 12 decimal places. - """ class CaptureParamsPurchaseDetailsLodging(TypedDict): check_in_at: NotRequired[int] @@ -472,6 +728,14 @@ class CreateParams(RequestOptions): """ Specifies which fields in the response should be expanded. """ + fleet: NotRequired["Authorization.CreateParamsFleet"] + """ + Fleet-specific information for authorizations using Fleet cards. + """ + fuel: NotRequired["Authorization.CreateParamsFuel"] + """ + Information about fuel that was purchased with this transaction. + """ is_amount_controllable: NotRequired[bool] """ If set `true`, you may provide [amount](https://stripe.com/docs/api/issuing/authorizations/approve#approve_issuing_authorization-amount) to control how much to hold for the authorization. @@ -505,6 +769,139 @@ class CreateParamsAmountDetails(TypedDict): The amount of cash requested by the cardholder. """ + class CreateParamsFleet(TypedDict): + cardholder_prompt_data: NotRequired[ + "Authorization.CreateParamsFleetCardholderPromptData" + ] + """ + Answers to prompts presented to the cardholder at the point of sale. Prompted fields vary depending on the configuration of your physical fleet cards. Typical points of sale support only numeric entry. + """ + purchase_type: NotRequired[ + Literal[ + "fuel_and_non_fuel_purchase", + "fuel_purchase", + "non_fuel_purchase", + ] + ] + """ + The type of purchase. One of `fuel_purchase`, `non_fuel_purchase`, or `fuel_and_non_fuel_purchase`. + """ + reported_breakdown: NotRequired[ + "Authorization.CreateParamsFleetReportedBreakdown" + ] + """ + More information about the total amount. This information is not guaranteed to be accurate as some merchants may provide unreliable data. + """ + service_type: NotRequired[ + Literal["full_service", "non_fuel_transaction", "self_service"] + ] + """ + The type of fuel service. One of `non_fuel_transaction`, `full_service`, or `self_service`. + """ + + class CreateParamsFleetCardholderPromptData(TypedDict): + driver_id: NotRequired[str] + """ + Driver ID. + """ + odometer: NotRequired[int] + """ + Odometer reading. + """ + unspecified_id: NotRequired[str] + """ + An alphanumeric ID. This field is used when a vehicle ID, driver ID, or generic ID is entered by the cardholder, but the merchant or card network did not specify the prompt type. + """ + user_id: NotRequired[str] + """ + User ID. + """ + vehicle_number: NotRequired[str] + """ + Vehicle number. + """ + + class CreateParamsFleetReportedBreakdown(TypedDict): + fuel: NotRequired[ + "Authorization.CreateParamsFleetReportedBreakdownFuel" + ] + """ + Breakdown of fuel portion of the purchase. + """ + non_fuel: NotRequired[ + "Authorization.CreateParamsFleetReportedBreakdownNonFuel" + ] + """ + Breakdown of non-fuel portion of the purchase. + """ + tax: NotRequired["Authorization.CreateParamsFleetReportedBreakdownTax"] + """ + Information about tax included in this transaction. + """ + + class CreateParamsFleetReportedBreakdownFuel(TypedDict): + gross_amount_decimal: NotRequired[str] + """ + Gross fuel amount that should equal Fuel Volume multipled by Fuel Unit Cost, inclusive of taxes. + """ + + class CreateParamsFleetReportedBreakdownNonFuel(TypedDict): + gross_amount_decimal: NotRequired[str] + """ + Gross non-fuel amount that should equal the sum of the line items, inclusive of taxes. + """ + + class CreateParamsFleetReportedBreakdownTax(TypedDict): + local_amount_decimal: NotRequired[str] + """ + Amount of state or provincial Sales Tax included in the transaction amount. Null if not reported by merchant or not subject to tax. + """ + national_amount_decimal: NotRequired[str] + """ + Amount of national Sales Tax or VAT included in the transaction amount. Null if not reported by merchant or not subject to tax. + """ + + class CreateParamsFuel(TypedDict): + industry_product_code: NotRequired[str] + """ + [Conexxus Payment System Product Code](https://www.conexxus.org/conexxus-payment-system-product-codes) identifying the primary fuel product purchased. + """ + quantity_decimal: NotRequired[str] + """ + The quantity of `unit`s of fuel that was dispensed, represented as a decimal string with at most 12 decimal places. + """ + type: NotRequired[ + Literal[ + "diesel", + "other", + "unleaded_plus", + "unleaded_regular", + "unleaded_super", + ] + ] + """ + The type of fuel that was purchased. One of `diesel`, `unleaded_plus`, `unleaded_regular`, `unleaded_super`, or `other`. + """ + unit: NotRequired[ + Literal[ + "charging_minute", + "imperial_gallon", + "kilogram", + "kilowatt_hour", + "liter", + "other", + "pound", + "us_gallon", + ] + ] + """ + The units for `quantity_decimal`. One of `charging_minute`, `imperial_gallon`, `kilogram`, `kilowatt_hour`, `liter`, `pound`, `us_gallon`, or `other`. + """ + unit_cost_decimal: NotRequired[str] + """ + The cost in cents per each unit of fuel, represented as a decimal string with at most 12 decimal places. + """ + class CreateParamsMerchantData(TypedDict): category: NotRequired[ Literal[ @@ -916,6 +1313,159 @@ class ExpireParams(RequestOptions): Specifies which fields in the response should be expanded. """ + class FinalizeAmountParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + final_amount: int + """ + The final authorization amount that will be captured by the merchant. This amount is in the authorization currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + """ + fleet: NotRequired["Authorization.FinalizeAmountParamsFleet"] + """ + Fleet-specific information for authorizations using Fleet cards. + """ + fuel: NotRequired["Authorization.FinalizeAmountParamsFuel"] + """ + Information about fuel that was purchased with this transaction. + """ + + class FinalizeAmountParamsFleet(TypedDict): + cardholder_prompt_data: NotRequired[ + "Authorization.FinalizeAmountParamsFleetCardholderPromptData" + ] + """ + Answers to prompts presented to the cardholder at the point of sale. Prompted fields vary depending on the configuration of your physical fleet cards. Typical points of sale support only numeric entry. + """ + purchase_type: NotRequired[ + Literal[ + "fuel_and_non_fuel_purchase", + "fuel_purchase", + "non_fuel_purchase", + ] + ] + """ + The type of purchase. One of `fuel_purchase`, `non_fuel_purchase`, or `fuel_and_non_fuel_purchase`. + """ + reported_breakdown: NotRequired[ + "Authorization.FinalizeAmountParamsFleetReportedBreakdown" + ] + """ + More information about the total amount. This information is not guaranteed to be accurate as some merchants may provide unreliable data. + """ + service_type: NotRequired[ + Literal["full_service", "non_fuel_transaction", "self_service"] + ] + """ + The type of fuel service. One of `non_fuel_transaction`, `full_service`, or `self_service`. + """ + + class FinalizeAmountParamsFleetCardholderPromptData(TypedDict): + driver_id: NotRequired[str] + """ + Driver ID. + """ + odometer: NotRequired[int] + """ + Odometer reading. + """ + unspecified_id: NotRequired[str] + """ + An alphanumeric ID. This field is used when a vehicle ID, driver ID, or generic ID is entered by the cardholder, but the merchant or card network did not specify the prompt type. + """ + user_id: NotRequired[str] + """ + User ID. + """ + vehicle_number: NotRequired[str] + """ + Vehicle number. + """ + + class FinalizeAmountParamsFleetReportedBreakdown(TypedDict): + fuel: NotRequired[ + "Authorization.FinalizeAmountParamsFleetReportedBreakdownFuel" + ] + """ + Breakdown of fuel portion of the purchase. + """ + non_fuel: NotRequired[ + "Authorization.FinalizeAmountParamsFleetReportedBreakdownNonFuel" + ] + """ + Breakdown of non-fuel portion of the purchase. + """ + tax: NotRequired[ + "Authorization.FinalizeAmountParamsFleetReportedBreakdownTax" + ] + """ + Information about tax included in this transaction. + """ + + class FinalizeAmountParamsFleetReportedBreakdownFuel(TypedDict): + gross_amount_decimal: NotRequired[str] + """ + Gross fuel amount that should equal Fuel Volume multipled by Fuel Unit Cost, inclusive of taxes. + """ + + class FinalizeAmountParamsFleetReportedBreakdownNonFuel(TypedDict): + gross_amount_decimal: NotRequired[str] + """ + Gross non-fuel amount that should equal the sum of the line items, inclusive of taxes. + """ + + class FinalizeAmountParamsFleetReportedBreakdownTax(TypedDict): + local_amount_decimal: NotRequired[str] + """ + Amount of state or provincial Sales Tax included in the transaction amount. Null if not reported by merchant or not subject to tax. + """ + national_amount_decimal: NotRequired[str] + """ + Amount of national Sales Tax or VAT included in the transaction amount. Null if not reported by merchant or not subject to tax. + """ + + class FinalizeAmountParamsFuel(TypedDict): + industry_product_code: NotRequired[str] + """ + [Conexxus Payment System Product Code](https://www.conexxus.org/conexxus-payment-system-product-codes) identifying the primary fuel product purchased. + """ + quantity_decimal: NotRequired[str] + """ + The quantity of `unit`s of fuel that was dispensed, represented as a decimal string with at most 12 decimal places. + """ + type: NotRequired[ + Literal[ + "diesel", + "other", + "unleaded_plus", + "unleaded_regular", + "unleaded_super", + ] + ] + """ + The type of fuel that was purchased. One of `diesel`, `unleaded_plus`, `unleaded_regular`, `unleaded_super`, or `other`. + """ + unit: NotRequired[ + Literal[ + "charging_minute", + "imperial_gallon", + "kilogram", + "kilowatt_hour", + "liter", + "other", + "pound", + "us_gallon", + ] + ] + """ + The units for `quantity_decimal`. One of `charging_minute`, `imperial_gallon`, `kilogram`, `kilowatt_hour`, `liter`, `pound`, `us_gallon`, or `other`. + """ + unit_cost_decimal: NotRequired[str] + """ + The cost in cents per each unit of fuel, represented as a decimal string with at most 12 decimal places. + """ + class IncrementParams(RequestOptions): expand: NotRequired[List[str]] """ @@ -1046,6 +1596,14 @@ class ReverseParams(RequestOptions): """ The currency of the cardholder. This currency can be different from the currency presented at authorization and the `merchant_currency` field on this authorization. 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). """ + fleet: Optional[Fleet] + """ + Fleet-specific information for authorizations using Fleet cards. + """ + fuel: Optional[Fuel] + """ + Information about fuel that was purchased with this transaction. Typically this information is received from the merchant after the authorization has been approved and the fuel dispensed. + """ id: str """ Unique identifier for the object. @@ -1708,6 +2266,122 @@ async def expire_async( # pyright: ignore[reportGeneralTypeIssues] ), ) + @classmethod + def _cls_finalize_amount( + cls, + authorization: str, + **params: Unpack["Authorization.FinalizeAmountParams"], + ) -> "Authorization": + """ + Finalize the amount on an Authorization prior to capture, when the initial authorization was for an estimated amount. + """ + return cast( + "Authorization", + cls._static_request( + "post", + "/v1/test_helpers/issuing/authorizations/{authorization}/finalize_amount".format( + authorization=sanitize_id(authorization) + ), + params=params, + ), + ) + + @overload + @staticmethod + def finalize_amount( + authorization: str, + **params: Unpack["Authorization.FinalizeAmountParams"], + ) -> "Authorization": + """ + Finalize the amount on an Authorization prior to capture, when the initial authorization was for an estimated amount. + """ + ... + + @overload + def finalize_amount( + self, **params: Unpack["Authorization.FinalizeAmountParams"] + ) -> "Authorization": + """ + Finalize the amount on an Authorization prior to capture, when the initial authorization was for an estimated amount. + """ + ... + + @class_method_variant("_cls_finalize_amount") + def finalize_amount( # pyright: ignore[reportGeneralTypeIssues] + self, **params: Unpack["Authorization.FinalizeAmountParams"] + ) -> "Authorization": + """ + Finalize the amount on an Authorization prior to capture, when the initial authorization was for an estimated amount. + """ + return cast( + "Authorization", + self.resource._request( + "post", + "/v1/test_helpers/issuing/authorizations/{authorization}/finalize_amount".format( + authorization=sanitize_id(self.resource.get("id")) + ), + params=params, + ), + ) + + @classmethod + async def _cls_finalize_amount_async( + cls, + authorization: str, + **params: Unpack["Authorization.FinalizeAmountParams"], + ) -> "Authorization": + """ + Finalize the amount on an Authorization prior to capture, when the initial authorization was for an estimated amount. + """ + return cast( + "Authorization", + await cls._static_request_async( + "post", + "/v1/test_helpers/issuing/authorizations/{authorization}/finalize_amount".format( + authorization=sanitize_id(authorization) + ), + params=params, + ), + ) + + @overload + @staticmethod + async def finalize_amount_async( + authorization: str, + **params: Unpack["Authorization.FinalizeAmountParams"], + ) -> "Authorization": + """ + Finalize the amount on an Authorization prior to capture, when the initial authorization was for an estimated amount. + """ + ... + + @overload + async def finalize_amount_async( + self, **params: Unpack["Authorization.FinalizeAmountParams"] + ) -> "Authorization": + """ + Finalize the amount on an Authorization prior to capture, when the initial authorization was for an estimated amount. + """ + ... + + @class_method_variant("_cls_finalize_amount_async") + async def finalize_amount_async( # pyright: ignore[reportGeneralTypeIssues] + self, **params: Unpack["Authorization.FinalizeAmountParams"] + ) -> "Authorization": + """ + Finalize the amount on an Authorization prior to capture, when the initial authorization was for an estimated amount. + """ + return cast( + "Authorization", + await self.resource._request_async( + "post", + "/v1/test_helpers/issuing/authorizations/{authorization}/finalize_amount".format( + authorization=sanitize_id(self.resource.get("id")) + ), + params=params, + ), + ) + @classmethod def _cls_increment( cls, @@ -1944,6 +2618,8 @@ def test_helpers(self): _inner_class_types = { "amount_details": AmountDetails, + "fleet": Fleet, + "fuel": Fuel, "merchant_data": MerchantData, "network_data": NetworkData, "pending_request": PendingRequest, diff --git a/stripe/issuing/_transaction.py b/stripe/issuing/_transaction.py index c61ce560c..dbfde9e50 100644 --- a/stripe/issuing/_transaction.py +++ b/stripe/issuing/_transaction.py @@ -110,6 +110,91 @@ class NetworkData(StripeObject): """ class PurchaseDetails(StripeObject): + class Fleet(StripeObject): + class CardholderPromptData(StripeObject): + driver_id: Optional[str] + """ + Driver ID. + """ + odometer: Optional[int] + """ + Odometer reading. + """ + unspecified_id: Optional[str] + """ + An alphanumeric ID. This field is used when a vehicle ID, driver ID, or generic ID is entered by the cardholder, but the merchant or card network did not specify the prompt type. + """ + user_id: Optional[str] + """ + User ID. + """ + vehicle_number: Optional[str] + """ + Vehicle number. + """ + + class ReportedBreakdown(StripeObject): + class Fuel(StripeObject): + gross_amount_decimal: Optional[str] + """ + Gross fuel amount that should equal Fuel Volume multipled by Fuel Unit Cost, inclusive of taxes. + """ + + class NonFuel(StripeObject): + gross_amount_decimal: Optional[str] + """ + Gross non-fuel amount that should equal the sum of the line items, inclusive of taxes. + """ + + class Tax(StripeObject): + local_amount_decimal: Optional[str] + """ + Amount of state or provincial Sales Tax included in the transaction amount. Null if not reported by merchant or not subject to tax. + """ + national_amount_decimal: Optional[str] + """ + Amount of national Sales Tax or VAT included in the transaction amount. Null if not reported by merchant or not subject to tax. + """ + + fuel: Optional[Fuel] + """ + Breakdown of fuel portion of the purchase. + """ + non_fuel: Optional[NonFuel] + """ + Breakdown of non-fuel portion of the purchase. + """ + tax: Optional[Tax] + """ + Information about tax included in this transaction. + """ + _inner_class_types = { + "fuel": Fuel, + "non_fuel": NonFuel, + "tax": Tax, + } + + cardholder_prompt_data: Optional[CardholderPromptData] + """ + Answers to prompts presented to cardholder at point of sale. + """ + purchase_type: Optional[str] + """ + The type of purchase. One of `fuel_purchase`, `non_fuel_purchase`, or `fuel_and_non_fuel_purchase`. + """ + reported_breakdown: Optional[ReportedBreakdown] + """ + More information about the total amount. This information is not guaranteed to be accurate as some merchants may provide unreliable data. + """ + service_type: Optional[str] + """ + The type of fuel service. One of `non_fuel_transaction`, `full_service`, or `self_service`. + """ + _inner_class_types = { + "cardholder_prompt_data": CardholderPromptData, + "reported_breakdown": ReportedBreakdown, + } + class Flight(StripeObject): class Segment(StripeObject): arrival_airport_code: Optional[str] @@ -160,22 +245,26 @@ class Segment(StripeObject): _inner_class_types = {"segments": Segment} class Fuel(StripeObject): + industry_product_code: Optional[str] + """ + [Conexxus Payment System Product Code](https://www.conexxus.org/conexxus-payment-system-product-codes) identifying the primary fuel product purchased. + """ + quantity_decimal: Optional[str] + """ + The quantity of `unit`s of fuel that was dispensed, represented as a decimal string with at most 12 decimal places. + """ type: str """ The type of fuel that was purchased. One of `diesel`, `unleaded_plus`, `unleaded_regular`, `unleaded_super`, or `other`. """ unit: str """ - The units for `volume_decimal`. One of `liter`, `us_gallon`, or `other`. + The units for `quantity_decimal`. One of `charging_minute`, `imperial_gallon`, `kilogram`, `kilowatt_hour`, `liter`, `pound`, `us_gallon`, or `other`. """ unit_cost_decimal: str """ The cost in cents per each unit of fuel, represented as a decimal string with at most 12 decimal places. """ - volume_decimal: Optional[str] - """ - The volume of the fuel that was pumped, represented as a decimal string with at most 12 decimal places. - """ class Lodging(StripeObject): check_in_at: Optional[int] @@ -205,6 +294,10 @@ class Receipt(StripeObject): The unit cost of the item in cents. """ + fleet: Optional[Fleet] + """ + Fleet-specific information for transactions using Fleet cards. + """ flight: Optional[Flight] """ Information about the flight that was purchased with this transaction. @@ -226,6 +319,7 @@ class Receipt(StripeObject): A merchant-specific order number. """ _inner_class_types = { + "fleet": Fleet, "flight": Flight, "fuel": Fuel, "lodging": Lodging, @@ -608,6 +702,12 @@ class CreateForceCaptureParamsMerchantData(TypedDict): """ class CreateForceCaptureParamsPurchaseDetails(TypedDict): + fleet: NotRequired[ + "Transaction.CreateForceCaptureParamsPurchaseDetailsFleet" + ] + """ + Fleet-specific information for transactions using Fleet cards. + """ flight: NotRequired[ "Transaction.CreateForceCaptureParamsPurchaseDetailsFlight" ] @@ -637,6 +737,110 @@ class CreateForceCaptureParamsPurchaseDetails(TypedDict): A merchant-specific order number. """ + class CreateForceCaptureParamsPurchaseDetailsFleet(TypedDict): + cardholder_prompt_data: NotRequired[ + "Transaction.CreateForceCaptureParamsPurchaseDetailsFleetCardholderPromptData" + ] + """ + Answers to prompts presented to the cardholder at the point of sale. Prompted fields vary depending on the configuration of your physical fleet cards. Typical points of sale support only numeric entry. + """ + purchase_type: NotRequired[ + Literal[ + "fuel_and_non_fuel_purchase", + "fuel_purchase", + "non_fuel_purchase", + ] + ] + """ + The type of purchase. One of `fuel_purchase`, `non_fuel_purchase`, or `fuel_and_non_fuel_purchase`. + """ + reported_breakdown: NotRequired[ + "Transaction.CreateForceCaptureParamsPurchaseDetailsFleetReportedBreakdown" + ] + """ + More information about the total amount. This information is not guaranteed to be accurate as some merchants may provide unreliable data. + """ + service_type: NotRequired[ + Literal["full_service", "non_fuel_transaction", "self_service"] + ] + """ + The type of fuel service. One of `non_fuel_transaction`, `full_service`, or `self_service`. + """ + + class CreateForceCaptureParamsPurchaseDetailsFleetCardholderPromptData( + TypedDict, + ): + driver_id: NotRequired[str] + """ + Driver ID. + """ + odometer: NotRequired[int] + """ + Odometer reading. + """ + unspecified_id: NotRequired[str] + """ + An alphanumeric ID. This field is used when a vehicle ID, driver ID, or generic ID is entered by the cardholder, but the merchant or card network did not specify the prompt type. + """ + user_id: NotRequired[str] + """ + User ID. + """ + vehicle_number: NotRequired[str] + """ + Vehicle number. + """ + + class CreateForceCaptureParamsPurchaseDetailsFleetReportedBreakdown( + TypedDict, + ): + fuel: NotRequired[ + "Transaction.CreateForceCaptureParamsPurchaseDetailsFleetReportedBreakdownFuel" + ] + """ + Breakdown of fuel portion of the purchase. + """ + non_fuel: NotRequired[ + "Transaction.CreateForceCaptureParamsPurchaseDetailsFleetReportedBreakdownNonFuel" + ] + """ + Breakdown of non-fuel portion of the purchase. + """ + tax: NotRequired[ + "Transaction.CreateForceCaptureParamsPurchaseDetailsFleetReportedBreakdownTax" + ] + """ + Information about tax included in this transaction. + """ + + class CreateForceCaptureParamsPurchaseDetailsFleetReportedBreakdownFuel( + TypedDict, + ): + gross_amount_decimal: NotRequired[str] + """ + Gross fuel amount that should equal Fuel Volume multipled by Fuel Unit Cost, inclusive of taxes. + """ + + class CreateForceCaptureParamsPurchaseDetailsFleetReportedBreakdownNonFuel( + TypedDict, + ): + gross_amount_decimal: NotRequired[str] + """ + Gross non-fuel amount that should equal the sum of the line items, inclusive of taxes. + """ + + class CreateForceCaptureParamsPurchaseDetailsFleetReportedBreakdownTax( + TypedDict, + ): + local_amount_decimal: NotRequired[str] + """ + Amount of state or provincial Sales Tax included in the transaction amount. Null if not reported by merchant or not subject to tax. + """ + national_amount_decimal: NotRequired[str] + """ + Amount of national Sales Tax or VAT included in the transaction amount. Null if not reported by merchant or not subject to tax. + """ + class CreateForceCaptureParamsPurchaseDetailsFlight(TypedDict): departure_at: NotRequired[int] """ @@ -690,6 +894,14 @@ class CreateForceCaptureParamsPurchaseDetailsFlightSegment(TypedDict): """ class CreateForceCaptureParamsPurchaseDetailsFuel(TypedDict): + industry_product_code: NotRequired[str] + """ + [Conexxus Payment System Product Code](https://www.conexxus.org/conexxus-payment-system-product-codes) identifying the primary fuel product purchased. + """ + quantity_decimal: NotRequired[str] + """ + The quantity of `unit`s of fuel that was dispensed, represented as a decimal string with at most 12 decimal places. + """ type: NotRequired[ Literal[ "diesel", @@ -702,18 +914,25 @@ class CreateForceCaptureParamsPurchaseDetailsFuel(TypedDict): """ The type of fuel that was purchased. One of `diesel`, `unleaded_plus`, `unleaded_regular`, `unleaded_super`, or `other`. """ - unit: NotRequired[Literal["liter", "other", "us_gallon"]] + unit: NotRequired[ + Literal[ + "charging_minute", + "imperial_gallon", + "kilogram", + "kilowatt_hour", + "liter", + "other", + "pound", + "us_gallon", + ] + ] """ - The units for `volume_decimal`. One of `liter`, `us_gallon`, or `other`. + The units for `quantity_decimal`. One of `charging_minute`, `imperial_gallon`, `kilogram`, `kilowatt_hour`, `liter`, `pound`, `us_gallon`, or `other`. """ unit_cost_decimal: NotRequired[str] """ The cost in cents per each unit of fuel, represented as a decimal string with at most 12 decimal places. """ - volume_decimal: NotRequired[str] - """ - The volume of the fuel that was pumped, represented as a decimal string with at most 12 decimal places. - """ class CreateForceCaptureParamsPurchaseDetailsLodging(TypedDict): check_in_at: NotRequired[int] @@ -1097,6 +1316,12 @@ class CreateUnlinkedRefundParamsMerchantData(TypedDict): """ class CreateUnlinkedRefundParamsPurchaseDetails(TypedDict): + fleet: NotRequired[ + "Transaction.CreateUnlinkedRefundParamsPurchaseDetailsFleet" + ] + """ + Fleet-specific information for transactions using Fleet cards. + """ flight: NotRequired[ "Transaction.CreateUnlinkedRefundParamsPurchaseDetailsFlight" ] @@ -1128,6 +1353,110 @@ class CreateUnlinkedRefundParamsPurchaseDetails(TypedDict): A merchant-specific order number. """ + class CreateUnlinkedRefundParamsPurchaseDetailsFleet(TypedDict): + cardholder_prompt_data: NotRequired[ + "Transaction.CreateUnlinkedRefundParamsPurchaseDetailsFleetCardholderPromptData" + ] + """ + Answers to prompts presented to the cardholder at the point of sale. Prompted fields vary depending on the configuration of your physical fleet cards. Typical points of sale support only numeric entry. + """ + purchase_type: NotRequired[ + Literal[ + "fuel_and_non_fuel_purchase", + "fuel_purchase", + "non_fuel_purchase", + ] + ] + """ + The type of purchase. One of `fuel_purchase`, `non_fuel_purchase`, or `fuel_and_non_fuel_purchase`. + """ + reported_breakdown: NotRequired[ + "Transaction.CreateUnlinkedRefundParamsPurchaseDetailsFleetReportedBreakdown" + ] + """ + More information about the total amount. This information is not guaranteed to be accurate as some merchants may provide unreliable data. + """ + service_type: NotRequired[ + Literal["full_service", "non_fuel_transaction", "self_service"] + ] + """ + The type of fuel service. One of `non_fuel_transaction`, `full_service`, or `self_service`. + """ + + class CreateUnlinkedRefundParamsPurchaseDetailsFleetCardholderPromptData( + TypedDict, + ): + driver_id: NotRequired[str] + """ + Driver ID. + """ + odometer: NotRequired[int] + """ + Odometer reading. + """ + unspecified_id: NotRequired[str] + """ + An alphanumeric ID. This field is used when a vehicle ID, driver ID, or generic ID is entered by the cardholder, but the merchant or card network did not specify the prompt type. + """ + user_id: NotRequired[str] + """ + User ID. + """ + vehicle_number: NotRequired[str] + """ + Vehicle number. + """ + + class CreateUnlinkedRefundParamsPurchaseDetailsFleetReportedBreakdown( + TypedDict, + ): + fuel: NotRequired[ + "Transaction.CreateUnlinkedRefundParamsPurchaseDetailsFleetReportedBreakdownFuel" + ] + """ + Breakdown of fuel portion of the purchase. + """ + non_fuel: NotRequired[ + "Transaction.CreateUnlinkedRefundParamsPurchaseDetailsFleetReportedBreakdownNonFuel" + ] + """ + Breakdown of non-fuel portion of the purchase. + """ + tax: NotRequired[ + "Transaction.CreateUnlinkedRefundParamsPurchaseDetailsFleetReportedBreakdownTax" + ] + """ + Information about tax included in this transaction. + """ + + class CreateUnlinkedRefundParamsPurchaseDetailsFleetReportedBreakdownFuel( + TypedDict, + ): + gross_amount_decimal: NotRequired[str] + """ + Gross fuel amount that should equal Fuel Volume multipled by Fuel Unit Cost, inclusive of taxes. + """ + + class CreateUnlinkedRefundParamsPurchaseDetailsFleetReportedBreakdownNonFuel( + TypedDict, + ): + gross_amount_decimal: NotRequired[str] + """ + Gross non-fuel amount that should equal the sum of the line items, inclusive of taxes. + """ + + class CreateUnlinkedRefundParamsPurchaseDetailsFleetReportedBreakdownTax( + TypedDict, + ): + local_amount_decimal: NotRequired[str] + """ + Amount of state or provincial Sales Tax included in the transaction amount. Null if not reported by merchant or not subject to tax. + """ + national_amount_decimal: NotRequired[str] + """ + Amount of national Sales Tax or VAT included in the transaction amount. Null if not reported by merchant or not subject to tax. + """ + class CreateUnlinkedRefundParamsPurchaseDetailsFlight(TypedDict): departure_at: NotRequired[int] """ @@ -1181,6 +1510,14 @@ class CreateUnlinkedRefundParamsPurchaseDetailsFlightSegment(TypedDict): """ class CreateUnlinkedRefundParamsPurchaseDetailsFuel(TypedDict): + industry_product_code: NotRequired[str] + """ + [Conexxus Payment System Product Code](https://www.conexxus.org/conexxus-payment-system-product-codes) identifying the primary fuel product purchased. + """ + quantity_decimal: NotRequired[str] + """ + The quantity of `unit`s of fuel that was dispensed, represented as a decimal string with at most 12 decimal places. + """ type: NotRequired[ Literal[ "diesel", @@ -1193,18 +1530,25 @@ class CreateUnlinkedRefundParamsPurchaseDetailsFuel(TypedDict): """ The type of fuel that was purchased. One of `diesel`, `unleaded_plus`, `unleaded_regular`, `unleaded_super`, or `other`. """ - unit: NotRequired[Literal["liter", "other", "us_gallon"]] + unit: NotRequired[ + Literal[ + "charging_minute", + "imperial_gallon", + "kilogram", + "kilowatt_hour", + "liter", + "other", + "pound", + "us_gallon", + ] + ] """ - The units for `volume_decimal`. One of `liter`, `us_gallon`, or `other`. + The units for `quantity_decimal`. One of `charging_minute`, `imperial_gallon`, `kilogram`, `kilowatt_hour`, `liter`, `pound`, `us_gallon`, or `other`. """ unit_cost_decimal: NotRequired[str] """ The cost in cents per each unit of fuel, represented as a decimal string with at most 12 decimal places. """ - volume_decimal: NotRequired[str] - """ - The volume of the fuel that was pumped, represented as a decimal string with at most 12 decimal places. - """ class CreateUnlinkedRefundParamsPurchaseDetailsLodging(TypedDict): check_in_at: NotRequired[int] diff --git a/stripe/tax/_calculation.py b/stripe/tax/_calculation.py index eabc373a4..0acc9b5ca 100644 --- a/stripe/tax/_calculation.py +++ b/stripe/tax/_calculation.py @@ -72,6 +72,7 @@ class TaxId(StripeObject): "ca_pst_mb", "ca_pst_sk", "ca_qst", + "ch_uid", "ch_vat", "cl_tin", "cn_tin", @@ -131,7 +132,7 @@ class TaxId(StripeObject): "za_vat", ] """ - The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, or `unknown` + The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, or `unknown` """ value: str """ @@ -486,6 +487,7 @@ class CreateParamsCustomerDetailsTaxId(TypedDict): "ca_pst_mb", "ca_pst_sk", "ca_qst", + "ch_uid", "ch_vat", "cl_tin", "cn_tin", @@ -544,7 +546,7 @@ class CreateParamsCustomerDetailsTaxId(TypedDict): "za_vat", ] """ - Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `ve_rif`, `vn_tin`, or `za_vat` + Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `ve_rif`, `vn_tin`, or `za_vat` """ value: str """ @@ -711,7 +713,7 @@ def create( cls, **params: Unpack["Calculation.CreateParams"] ) -> "Calculation": """ - Calculates tax based on input and returns a Tax Calculation object. + Calculates tax based on the input and returns a Tax Calculation object. """ return cast( "Calculation", @@ -727,7 +729,7 @@ async def create_async( cls, **params: Unpack["Calculation.CreateParams"] ) -> "Calculation": """ - Calculates tax based on input and returns a Tax Calculation object. + Calculates tax based on the input and returns a Tax Calculation object. """ return cast( "Calculation", @@ -745,7 +747,7 @@ def _cls_list_line_items( **params: Unpack["Calculation.ListLineItemsParams"], ) -> ListObject["CalculationLineItem"]: """ - Retrieves the line items of a persisted tax calculation as a collection. + Retrieves the line items of a tax calculation as a collection, if the calculation hasn't expired. """ return cast( ListObject["CalculationLineItem"], @@ -764,7 +766,7 @@ def list_line_items( calculation: str, **params: Unpack["Calculation.ListLineItemsParams"] ) -> ListObject["CalculationLineItem"]: """ - Retrieves the line items of a persisted tax calculation as a collection. + Retrieves the line items of a tax calculation as a collection, if the calculation hasn't expired. """ ... @@ -773,7 +775,7 @@ def list_line_items( self, **params: Unpack["Calculation.ListLineItemsParams"] ) -> ListObject["CalculationLineItem"]: """ - Retrieves the line items of a persisted tax calculation as a collection. + Retrieves the line items of a tax calculation as a collection, if the calculation hasn't expired. """ ... @@ -782,7 +784,7 @@ def list_line_items( # pyright: ignore[reportGeneralTypeIssues] self, **params: Unpack["Calculation.ListLineItemsParams"] ) -> ListObject["CalculationLineItem"]: """ - Retrieves the line items of a persisted tax calculation as a collection. + Retrieves the line items of a tax calculation as a collection, if the calculation hasn't expired. """ return cast( ListObject["CalculationLineItem"], @@ -802,7 +804,7 @@ async def _cls_list_line_items_async( **params: Unpack["Calculation.ListLineItemsParams"], ) -> ListObject["CalculationLineItem"]: """ - Retrieves the line items of a persisted tax calculation as a collection. + Retrieves the line items of a tax calculation as a collection, if the calculation hasn't expired. """ return cast( ListObject["CalculationLineItem"], @@ -821,7 +823,7 @@ async def list_line_items_async( calculation: str, **params: Unpack["Calculation.ListLineItemsParams"] ) -> ListObject["CalculationLineItem"]: """ - Retrieves the line items of a persisted tax calculation as a collection. + Retrieves the line items of a tax calculation as a collection, if the calculation hasn't expired. """ ... @@ -830,7 +832,7 @@ async def list_line_items_async( self, **params: Unpack["Calculation.ListLineItemsParams"] ) -> ListObject["CalculationLineItem"]: """ - Retrieves the line items of a persisted tax calculation as a collection. + Retrieves the line items of a tax calculation as a collection, if the calculation hasn't expired. """ ... @@ -839,7 +841,7 @@ async def list_line_items_async( # pyright: ignore[reportGeneralTypeIssues] self, **params: Unpack["Calculation.ListLineItemsParams"] ) -> ListObject["CalculationLineItem"]: """ - Retrieves the line items of a persisted tax calculation as a collection. + Retrieves the line items of a tax calculation as a collection, if the calculation hasn't expired. """ return cast( ListObject["CalculationLineItem"], diff --git a/stripe/tax/_calculation_line_item_service.py b/stripe/tax/_calculation_line_item_service.py index 1061d0ed2..08651f8eb 100644 --- a/stripe/tax/_calculation_line_item_service.py +++ b/stripe/tax/_calculation_line_item_service.py @@ -35,7 +35,7 @@ def list( options: RequestOptions = {}, ) -> ListObject[CalculationLineItem]: """ - Retrieves the line items of a persisted tax calculation as a collection. + Retrieves the line items of a tax calculation as a collection, if the calculation hasn't expired. """ return cast( ListObject[CalculationLineItem], @@ -58,7 +58,7 @@ async def list_async( options: RequestOptions = {}, ) -> ListObject[CalculationLineItem]: """ - Retrieves the line items of a persisted tax calculation as a collection. + Retrieves the line items of a tax calculation as a collection, if the calculation hasn't expired. """ return cast( ListObject[CalculationLineItem], diff --git a/stripe/tax/_calculation_service.py b/stripe/tax/_calculation_service.py index 0d760b549..0ae2bb045 100644 --- a/stripe/tax/_calculation_service.py +++ b/stripe/tax/_calculation_service.py @@ -127,6 +127,7 @@ class CreateParamsCustomerDetailsTaxId(TypedDict): "ca_pst_mb", "ca_pst_sk", "ca_qst", + "ch_uid", "ch_vat", "cl_tin", "cn_tin", @@ -185,7 +186,7 @@ class CreateParamsCustomerDetailsTaxId(TypedDict): "za_vat", ] """ - Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `ve_rif`, `vn_tin`, or `za_vat` + Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `ve_rif`, `vn_tin`, or `za_vat` """ value: str """ @@ -277,7 +278,7 @@ def create( options: RequestOptions = {}, ) -> Calculation: """ - Calculates tax based on input and returns a Tax Calculation object. + Calculates tax based on the input and returns a Tax Calculation object. """ return cast( Calculation, @@ -297,7 +298,7 @@ async def create_async( options: RequestOptions = {}, ) -> Calculation: """ - Calculates tax based on input and returns a Tax Calculation object. + Calculates tax based on the input and returns a Tax Calculation object. """ return cast( Calculation, diff --git a/stripe/tax/_transaction.py b/stripe/tax/_transaction.py index 52c0b6cfe..c4f5b90a3 100644 --- a/stripe/tax/_transaction.py +++ b/stripe/tax/_transaction.py @@ -72,6 +72,7 @@ class TaxId(StripeObject): "ca_pst_mb", "ca_pst_sk", "ca_qst", + "ch_uid", "ch_vat", "cl_tin", "cn_tin", @@ -131,7 +132,7 @@ class TaxId(StripeObject): "za_vat", ] """ - The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, or `unknown` + The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, or `unknown` """ value: str """ diff --git a/stripe/terminal/_configuration.py b/stripe/terminal/_configuration.py index a9f1351c9..84a7dda32 100644 --- a/stripe/terminal/_configuration.py +++ b/stripe/terminal/_configuration.py @@ -48,6 +48,16 @@ class Offline(StripeObject): Determines whether to allow transactions to be collected while reader is offline. Defaults to false. """ + class RebootWindow(StripeObject): + end_hour: int + """ + Integer between 0 to 23 that represents the end hour of the reboot time window. The value must be different than the start_hour. + """ + start_hour: int + """ + Integer between 0 to 23 that represents the start hour of the reboot time window. + """ + class StripeS700(StripeObject): splashscreen: Optional[ExpandableField["File"]] """ @@ -305,6 +315,10 @@ class CreateParams(RequestOptions): """ Configurations for collecting transactions offline. """ + reboot_window: NotRequired["Configuration.CreateParamsRebootWindow"] + """ + Reboot time settings for readers that support customized reboot time configuration. + """ stripe_s700: NotRequired["Configuration.CreateParamsStripeS700"] """ An object containing device type specific settings for Stripe S700 readers @@ -330,6 +344,16 @@ class CreateParamsOffline(TypedDict): Determines whether to allow transactions to be collected while reader is offline. Defaults to false. """ + class CreateParamsRebootWindow(TypedDict): + end_hour: int + """ + Integer between 0 to 23 that represents the end hour of the reboot time window. The value must be different than the start_hour. + """ + start_hour: int + """ + Integer between 0 to 23 that represents the start hour of the reboot time window. + """ + class CreateParamsStripeS700(TypedDict): splashscreen: NotRequired["Literal['']|str"] """ @@ -640,6 +664,12 @@ class ModifyParams(RequestOptions): """ Configurations for collecting transactions offline. """ + reboot_window: NotRequired[ + "Literal['']|Configuration.ModifyParamsRebootWindow" + ] + """ + Reboot time settings for readers that support customized reboot time configuration. + """ stripe_s700: NotRequired[ "Literal['']|Configuration.ModifyParamsStripeS700" ] @@ -669,6 +699,16 @@ class ModifyParamsOffline(TypedDict): Determines whether to allow transactions to be collected while reader is offline. Defaults to false. """ + class ModifyParamsRebootWindow(TypedDict): + end_hour: int + """ + Integer between 0 to 23 that represents the end hour of the reboot time window. The value must be different than the start_hour. + """ + start_hour: int + """ + Integer between 0 to 23 that represents the start hour of the reboot time window. + """ + class ModifyParamsStripeS700(TypedDict): splashscreen: NotRequired["Literal['']|str"] """ @@ -963,6 +1003,7 @@ class RetrieveParams(RequestOptions): String representing the object's type. Objects of the same type share the same value. """ offline: Optional[Offline] + reboot_window: Optional[RebootWindow] stripe_s700: Optional[StripeS700] tipping: Optional[Tipping] verifone_p400: Optional[VerifoneP400] @@ -1200,6 +1241,7 @@ async def retrieve_async( _inner_class_types = { "bbpos_wisepos_e": BbposWiseposE, "offline": Offline, + "reboot_window": RebootWindow, "stripe_s700": StripeS700, "tipping": Tipping, "verifone_p400": VerifoneP400, diff --git a/stripe/terminal/_configuration_service.py b/stripe/terminal/_configuration_service.py index 7a87a5fc2..002f55fb5 100644 --- a/stripe/terminal/_configuration_service.py +++ b/stripe/terminal/_configuration_service.py @@ -31,6 +31,12 @@ class CreateParams(TypedDict): """ Configurations for collecting transactions offline. """ + reboot_window: NotRequired[ + "ConfigurationService.CreateParamsRebootWindow" + ] + """ + Reboot time settings for readers that support customized reboot time configuration. + """ stripe_s700: NotRequired["ConfigurationService.CreateParamsStripeS700"] """ An object containing device type specific settings for Stripe S700 readers @@ -60,6 +66,16 @@ class CreateParamsOffline(TypedDict): Determines whether to allow transactions to be collected while reader is offline. Defaults to false. """ + class CreateParamsRebootWindow(TypedDict): + end_hour: int + """ + Integer between 0 to 23 that represents the end hour of the reboot time window. The value must be different than the start_hour. + """ + start_hour: int + """ + Integer between 0 to 23 that represents the start hour of the reboot time window. + """ + class CreateParamsStripeS700(TypedDict): splashscreen: NotRequired["Literal['']|str"] """ @@ -378,6 +394,12 @@ class UpdateParams(TypedDict): """ Configurations for collecting transactions offline. """ + reboot_window: NotRequired[ + "Literal['']|ConfigurationService.UpdateParamsRebootWindow" + ] + """ + Reboot time settings for readers that support customized reboot time configuration. + """ stripe_s700: NotRequired[ "Literal['']|ConfigurationService.UpdateParamsStripeS700" ] @@ -409,6 +431,16 @@ class UpdateParamsOffline(TypedDict): Determines whether to allow transactions to be collected while reader is offline. Defaults to false. """ + class UpdateParamsRebootWindow(TypedDict): + end_hour: int + """ + Integer between 0 to 23 that represents the end hour of the reboot time window. The value must be different than the start_hour. + """ + start_hour: int + """ + Integer between 0 to 23 that represents the start hour of the reboot time window. + """ + class UpdateParamsStripeS700(TypedDict): splashscreen: NotRequired["Literal['']|str"] """ diff --git a/stripe/terminal/_connection_token.py b/stripe/terminal/_connection_token.py index a454b68dc..4500eefe1 100644 --- a/stripe/terminal/_connection_token.py +++ b/stripe/terminal/_connection_token.py @@ -24,12 +24,12 @@ class CreateParams(RequestOptions): """ location: NotRequired[str] """ - The id of the location that this connection token is scoped to. If specified the connection token will only be usable with readers assigned to that location, otherwise the connection token will be usable with all readers. Note that location scoping only applies to internet-connected readers. For more details, see [the docs on scoping connection tokens](https://stripe.com/docs/terminal/fleet/locations#connection-tokens). + The id of the location that this connection token is scoped to. If specified the connection token will only be usable with readers assigned to that location, otherwise the connection token will be usable with all readers. Note that location scoping only applies to internet-connected readers. For more details, see [the docs on scoping connection tokens](https://docs.stripe.com/terminal/fleet/locations-and-zones?dashboard-or-api=api#connection-tokens). """ location: Optional[str] """ - The id of the location that this connection token is scoped to. Note that location scoping only applies to internet-connected readers. For more details, see [the docs on scoping connection tokens](https://stripe.com/docs/terminal/fleet/locations#connection-tokens). + The id of the location that this connection token is scoped to. Note that location scoping only applies to internet-connected readers. For more details, see [the docs on scoping connection tokens](https://docs.stripe.com/terminal/fleet/locations-and-zones?dashboard-or-api=api#connection-tokens). """ object: Literal["terminal.connection_token"] """ diff --git a/stripe/terminal/_connection_token_service.py b/stripe/terminal/_connection_token_service.py index 12861c259..536ca8795 100644 --- a/stripe/terminal/_connection_token_service.py +++ b/stripe/terminal/_connection_token_service.py @@ -15,7 +15,7 @@ class CreateParams(TypedDict): """ location: NotRequired[str] """ - The id of the location that this connection token is scoped to. If specified the connection token will only be usable with readers assigned to that location, otherwise the connection token will be usable with all readers. Note that location scoping only applies to internet-connected readers. For more details, see [the docs on scoping connection tokens](https://stripe.com/docs/terminal/fleet/locations#connection-tokens). + The id of the location that this connection token is scoped to. If specified the connection token will only be usable with readers assigned to that location, otherwise the connection token will be usable with all readers. Note that location scoping only applies to internet-connected readers. For more details, see [the docs on scoping connection tokens](https://docs.stripe.com/terminal/fleet/locations-and-zones?dashboard-or-api=api#connection-tokens). """ def create( diff --git a/stripe/test_helpers/issuing/_authorization_service.py b/stripe/test_helpers/issuing/_authorization_service.py index bf41b79b8..7279e4d19 100644 --- a/stripe/test_helpers/issuing/_authorization_service.py +++ b/stripe/test_helpers/issuing/_authorization_service.py @@ -30,6 +30,12 @@ class CaptureParams(TypedDict): """ class CaptureParamsPurchaseDetails(TypedDict): + fleet: NotRequired[ + "AuthorizationService.CaptureParamsPurchaseDetailsFleet" + ] + """ + Fleet-specific information for transactions using Fleet cards. + """ flight: NotRequired[ "AuthorizationService.CaptureParamsPurchaseDetailsFlight" ] @@ -59,6 +65,100 @@ class CaptureParamsPurchaseDetails(TypedDict): A merchant-specific order number. """ + class CaptureParamsPurchaseDetailsFleet(TypedDict): + cardholder_prompt_data: NotRequired[ + "AuthorizationService.CaptureParamsPurchaseDetailsFleetCardholderPromptData" + ] + """ + Answers to prompts presented to the cardholder at the point of sale. Prompted fields vary depending on the configuration of your physical fleet cards. Typical points of sale support only numeric entry. + """ + purchase_type: NotRequired[ + Literal[ + "fuel_and_non_fuel_purchase", + "fuel_purchase", + "non_fuel_purchase", + ] + ] + """ + The type of purchase. One of `fuel_purchase`, `non_fuel_purchase`, or `fuel_and_non_fuel_purchase`. + """ + reported_breakdown: NotRequired[ + "AuthorizationService.CaptureParamsPurchaseDetailsFleetReportedBreakdown" + ] + """ + More information about the total amount. This information is not guaranteed to be accurate as some merchants may provide unreliable data. + """ + service_type: NotRequired[ + Literal["full_service", "non_fuel_transaction", "self_service"] + ] + """ + The type of fuel service. One of `non_fuel_transaction`, `full_service`, or `self_service`. + """ + + class CaptureParamsPurchaseDetailsFleetCardholderPromptData(TypedDict): + driver_id: NotRequired[str] + """ + Driver ID. + """ + odometer: NotRequired[int] + """ + Odometer reading. + """ + unspecified_id: NotRequired[str] + """ + An alphanumeric ID. This field is used when a vehicle ID, driver ID, or generic ID is entered by the cardholder, but the merchant or card network did not specify the prompt type. + """ + user_id: NotRequired[str] + """ + User ID. + """ + vehicle_number: NotRequired[str] + """ + Vehicle number. + """ + + class CaptureParamsPurchaseDetailsFleetReportedBreakdown(TypedDict): + fuel: NotRequired[ + "AuthorizationService.CaptureParamsPurchaseDetailsFleetReportedBreakdownFuel" + ] + """ + Breakdown of fuel portion of the purchase. + """ + non_fuel: NotRequired[ + "AuthorizationService.CaptureParamsPurchaseDetailsFleetReportedBreakdownNonFuel" + ] + """ + Breakdown of non-fuel portion of the purchase. + """ + tax: NotRequired[ + "AuthorizationService.CaptureParamsPurchaseDetailsFleetReportedBreakdownTax" + ] + """ + Information about tax included in this transaction. + """ + + class CaptureParamsPurchaseDetailsFleetReportedBreakdownFuel(TypedDict): + gross_amount_decimal: NotRequired[str] + """ + Gross fuel amount that should equal Fuel Volume multipled by Fuel Unit Cost, inclusive of taxes. + """ + + class CaptureParamsPurchaseDetailsFleetReportedBreakdownNonFuel(TypedDict): + gross_amount_decimal: NotRequired[str] + """ + Gross non-fuel amount that should equal the sum of the line items, inclusive of taxes. + """ + + class CaptureParamsPurchaseDetailsFleetReportedBreakdownTax(TypedDict): + local_amount_decimal: NotRequired[str] + """ + Amount of state or provincial Sales Tax included in the transaction amount. Null if not reported by merchant or not subject to tax. + """ + national_amount_decimal: NotRequired[str] + """ + Amount of national Sales Tax or VAT included in the transaction amount. Null if not reported by merchant or not subject to tax. + """ + class CaptureParamsPurchaseDetailsFlight(TypedDict): departure_at: NotRequired[int] """ @@ -112,6 +212,14 @@ class CaptureParamsPurchaseDetailsFlightSegment(TypedDict): """ class CaptureParamsPurchaseDetailsFuel(TypedDict): + industry_product_code: NotRequired[str] + """ + [Conexxus Payment System Product Code](https://www.conexxus.org/conexxus-payment-system-product-codes) identifying the primary fuel product purchased. + """ + quantity_decimal: NotRequired[str] + """ + The quantity of `unit`s of fuel that was dispensed, represented as a decimal string with at most 12 decimal places. + """ type: NotRequired[ Literal[ "diesel", @@ -124,18 +232,25 @@ class CaptureParamsPurchaseDetailsFuel(TypedDict): """ The type of fuel that was purchased. One of `diesel`, `unleaded_plus`, `unleaded_regular`, `unleaded_super`, or `other`. """ - unit: NotRequired[Literal["liter", "other", "us_gallon"]] + unit: NotRequired[ + Literal[ + "charging_minute", + "imperial_gallon", + "kilogram", + "kilowatt_hour", + "liter", + "other", + "pound", + "us_gallon", + ] + ] """ - The units for `volume_decimal`. One of `liter`, `us_gallon`, or `other`. + The units for `quantity_decimal`. One of `charging_minute`, `imperial_gallon`, `kilogram`, `kilowatt_hour`, `liter`, `pound`, `us_gallon`, or `other`. """ unit_cost_decimal: NotRequired[str] """ The cost in cents per each unit of fuel, represented as a decimal string with at most 12 decimal places. """ - volume_decimal: NotRequired[str] - """ - The volume of the fuel that was pumped, represented as a decimal string with at most 12 decimal places. - """ class CaptureParamsPurchaseDetailsLodging(TypedDict): check_in_at: NotRequired[int] @@ -182,6 +297,14 @@ class CreateParams(TypedDict): """ Specifies which fields in the response should be expanded. """ + fleet: NotRequired["AuthorizationService.CreateParamsFleet"] + """ + Fleet-specific information for authorizations using Fleet cards. + """ + fuel: NotRequired["AuthorizationService.CreateParamsFuel"] + """ + Information about fuel that was purchased with this transaction. + """ is_amount_controllable: NotRequired[bool] """ If set `true`, you may provide [amount](https://stripe.com/docs/api/issuing/authorizations/approve#approve_issuing_authorization-amount) to control how much to hold for the authorization. @@ -219,6 +342,141 @@ class CreateParamsAmountDetails(TypedDict): The amount of cash requested by the cardholder. """ + class CreateParamsFleet(TypedDict): + cardholder_prompt_data: NotRequired[ + "AuthorizationService.CreateParamsFleetCardholderPromptData" + ] + """ + Answers to prompts presented to the cardholder at the point of sale. Prompted fields vary depending on the configuration of your physical fleet cards. Typical points of sale support only numeric entry. + """ + purchase_type: NotRequired[ + Literal[ + "fuel_and_non_fuel_purchase", + "fuel_purchase", + "non_fuel_purchase", + ] + ] + """ + The type of purchase. One of `fuel_purchase`, `non_fuel_purchase`, or `fuel_and_non_fuel_purchase`. + """ + reported_breakdown: NotRequired[ + "AuthorizationService.CreateParamsFleetReportedBreakdown" + ] + """ + More information about the total amount. This information is not guaranteed to be accurate as some merchants may provide unreliable data. + """ + service_type: NotRequired[ + Literal["full_service", "non_fuel_transaction", "self_service"] + ] + """ + The type of fuel service. One of `non_fuel_transaction`, `full_service`, or `self_service`. + """ + + class CreateParamsFleetCardholderPromptData(TypedDict): + driver_id: NotRequired[str] + """ + Driver ID. + """ + odometer: NotRequired[int] + """ + Odometer reading. + """ + unspecified_id: NotRequired[str] + """ + An alphanumeric ID. This field is used when a vehicle ID, driver ID, or generic ID is entered by the cardholder, but the merchant or card network did not specify the prompt type. + """ + user_id: NotRequired[str] + """ + User ID. + """ + vehicle_number: NotRequired[str] + """ + Vehicle number. + """ + + class CreateParamsFleetReportedBreakdown(TypedDict): + fuel: NotRequired[ + "AuthorizationService.CreateParamsFleetReportedBreakdownFuel" + ] + """ + Breakdown of fuel portion of the purchase. + """ + non_fuel: NotRequired[ + "AuthorizationService.CreateParamsFleetReportedBreakdownNonFuel" + ] + """ + Breakdown of non-fuel portion of the purchase. + """ + tax: NotRequired[ + "AuthorizationService.CreateParamsFleetReportedBreakdownTax" + ] + """ + Information about tax included in this transaction. + """ + + class CreateParamsFleetReportedBreakdownFuel(TypedDict): + gross_amount_decimal: NotRequired[str] + """ + Gross fuel amount that should equal Fuel Volume multipled by Fuel Unit Cost, inclusive of taxes. + """ + + class CreateParamsFleetReportedBreakdownNonFuel(TypedDict): + gross_amount_decimal: NotRequired[str] + """ + Gross non-fuel amount that should equal the sum of the line items, inclusive of taxes. + """ + + class CreateParamsFleetReportedBreakdownTax(TypedDict): + local_amount_decimal: NotRequired[str] + """ + Amount of state or provincial Sales Tax included in the transaction amount. Null if not reported by merchant or not subject to tax. + """ + national_amount_decimal: NotRequired[str] + """ + Amount of national Sales Tax or VAT included in the transaction amount. Null if not reported by merchant or not subject to tax. + """ + + class CreateParamsFuel(TypedDict): + industry_product_code: NotRequired[str] + """ + [Conexxus Payment System Product Code](https://www.conexxus.org/conexxus-payment-system-product-codes) identifying the primary fuel product purchased. + """ + quantity_decimal: NotRequired[str] + """ + The quantity of `unit`s of fuel that was dispensed, represented as a decimal string with at most 12 decimal places. + """ + type: NotRequired[ + Literal[ + "diesel", + "other", + "unleaded_plus", + "unleaded_regular", + "unleaded_super", + ] + ] + """ + The type of fuel that was purchased. One of `diesel`, `unleaded_plus`, `unleaded_regular`, `unleaded_super`, or `other`. + """ + unit: NotRequired[ + Literal[ + "charging_minute", + "imperial_gallon", + "kilogram", + "kilowatt_hour", + "liter", + "other", + "pound", + "us_gallon", + ] + ] + """ + The units for `quantity_decimal`. One of `charging_minute`, `imperial_gallon`, `kilogram`, `kilowatt_hour`, `liter`, `pound`, `us_gallon`, or `other`. + """ + unit_cost_decimal: NotRequired[str] + """ + The cost in cents per each unit of fuel, represented as a decimal string with at most 12 decimal places. + """ + class CreateParamsMerchantData(TypedDict): category: NotRequired[ Literal[ @@ -620,6 +878,159 @@ class ExpireParams(TypedDict): Specifies which fields in the response should be expanded. """ + class FinalizeAmountParams(TypedDict): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + final_amount: int + """ + The final authorization amount that will be captured by the merchant. This amount is in the authorization currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + """ + fleet: NotRequired["AuthorizationService.FinalizeAmountParamsFleet"] + """ + Fleet-specific information for authorizations using Fleet cards. + """ + fuel: NotRequired["AuthorizationService.FinalizeAmountParamsFuel"] + """ + Information about fuel that was purchased with this transaction. + """ + + class FinalizeAmountParamsFleet(TypedDict): + cardholder_prompt_data: NotRequired[ + "AuthorizationService.FinalizeAmountParamsFleetCardholderPromptData" + ] + """ + Answers to prompts presented to the cardholder at the point of sale. Prompted fields vary depending on the configuration of your physical fleet cards. Typical points of sale support only numeric entry. + """ + purchase_type: NotRequired[ + Literal[ + "fuel_and_non_fuel_purchase", + "fuel_purchase", + "non_fuel_purchase", + ] + ] + """ + The type of purchase. One of `fuel_purchase`, `non_fuel_purchase`, or `fuel_and_non_fuel_purchase`. + """ + reported_breakdown: NotRequired[ + "AuthorizationService.FinalizeAmountParamsFleetReportedBreakdown" + ] + """ + More information about the total amount. This information is not guaranteed to be accurate as some merchants may provide unreliable data. + """ + service_type: NotRequired[ + Literal["full_service", "non_fuel_transaction", "self_service"] + ] + """ + The type of fuel service. One of `non_fuel_transaction`, `full_service`, or `self_service`. + """ + + class FinalizeAmountParamsFleetCardholderPromptData(TypedDict): + driver_id: NotRequired[str] + """ + Driver ID. + """ + odometer: NotRequired[int] + """ + Odometer reading. + """ + unspecified_id: NotRequired[str] + """ + An alphanumeric ID. This field is used when a vehicle ID, driver ID, or generic ID is entered by the cardholder, but the merchant or card network did not specify the prompt type. + """ + user_id: NotRequired[str] + """ + User ID. + """ + vehicle_number: NotRequired[str] + """ + Vehicle number. + """ + + class FinalizeAmountParamsFleetReportedBreakdown(TypedDict): + fuel: NotRequired[ + "AuthorizationService.FinalizeAmountParamsFleetReportedBreakdownFuel" + ] + """ + Breakdown of fuel portion of the purchase. + """ + non_fuel: NotRequired[ + "AuthorizationService.FinalizeAmountParamsFleetReportedBreakdownNonFuel" + ] + """ + Breakdown of non-fuel portion of the purchase. + """ + tax: NotRequired[ + "AuthorizationService.FinalizeAmountParamsFleetReportedBreakdownTax" + ] + """ + Information about tax included in this transaction. + """ + + class FinalizeAmountParamsFleetReportedBreakdownFuel(TypedDict): + gross_amount_decimal: NotRequired[str] + """ + Gross fuel amount that should equal Fuel Volume multipled by Fuel Unit Cost, inclusive of taxes. + """ + + class FinalizeAmountParamsFleetReportedBreakdownNonFuel(TypedDict): + gross_amount_decimal: NotRequired[str] + """ + Gross non-fuel amount that should equal the sum of the line items, inclusive of taxes. + """ + + class FinalizeAmountParamsFleetReportedBreakdownTax(TypedDict): + local_amount_decimal: NotRequired[str] + """ + Amount of state or provincial Sales Tax included in the transaction amount. Null if not reported by merchant or not subject to tax. + """ + national_amount_decimal: NotRequired[str] + """ + Amount of national Sales Tax or VAT included in the transaction amount. Null if not reported by merchant or not subject to tax. + """ + + class FinalizeAmountParamsFuel(TypedDict): + industry_product_code: NotRequired[str] + """ + [Conexxus Payment System Product Code](https://www.conexxus.org/conexxus-payment-system-product-codes) identifying the primary fuel product purchased. + """ + quantity_decimal: NotRequired[str] + """ + The quantity of `unit`s of fuel that was dispensed, represented as a decimal string with at most 12 decimal places. + """ + type: NotRequired[ + Literal[ + "diesel", + "other", + "unleaded_plus", + "unleaded_regular", + "unleaded_super", + ] + ] + """ + The type of fuel that was purchased. One of `diesel`, `unleaded_plus`, `unleaded_regular`, `unleaded_super`, or `other`. + """ + unit: NotRequired[ + Literal[ + "charging_minute", + "imperial_gallon", + "kilogram", + "kilowatt_hour", + "liter", + "other", + "pound", + "us_gallon", + ] + ] + """ + The units for `quantity_decimal`. One of `charging_minute`, `imperial_gallon`, `kilogram`, `kilowatt_hour`, `liter`, `pound`, `us_gallon`, or `other`. + """ + unit_cost_decimal: NotRequired[str] + """ + The cost in cents per each unit of fuel, represented as a decimal string with at most 12 decimal places. + """ + class IncrementParams(TypedDict): expand: NotRequired[List[str]] """ @@ -776,6 +1187,52 @@ async def expire_async( ), ) + def finalize_amount( + self, + authorization: str, + params: "AuthorizationService.FinalizeAmountParams", + options: RequestOptions = {}, + ) -> Authorization: + """ + Finalize the amount on an Authorization prior to capture, when the initial authorization was for an estimated amount. + """ + return cast( + Authorization, + self._request( + "post", + "/v1/test_helpers/issuing/authorizations/{authorization}/finalize_amount".format( + authorization=sanitize_id(authorization), + ), + api_mode="V1", + base_address="api", + params=params, + options=options, + ), + ) + + async def finalize_amount_async( + self, + authorization: str, + params: "AuthorizationService.FinalizeAmountParams", + options: RequestOptions = {}, + ) -> Authorization: + """ + Finalize the amount on an Authorization prior to capture, when the initial authorization was for an estimated amount. + """ + return cast( + Authorization, + await self._request_async( + "post", + "/v1/test_helpers/issuing/authorizations/{authorization}/finalize_amount".format( + authorization=sanitize_id(authorization), + ), + api_mode="V1", + base_address="api", + params=params, + options=options, + ), + ) + def increment( self, authorization: str, diff --git a/stripe/test_helpers/issuing/_transaction_service.py b/stripe/test_helpers/issuing/_transaction_service.py index 2f93fce32..a585ce908 100644 --- a/stripe/test_helpers/issuing/_transaction_service.py +++ b/stripe/test_helpers/issuing/_transaction_service.py @@ -375,6 +375,12 @@ class CreateForceCaptureParamsMerchantData(TypedDict): """ class CreateForceCaptureParamsPurchaseDetails(TypedDict): + fleet: NotRequired[ + "TransactionService.CreateForceCaptureParamsPurchaseDetailsFleet" + ] + """ + Fleet-specific information for transactions using Fleet cards. + """ flight: NotRequired[ "TransactionService.CreateForceCaptureParamsPurchaseDetailsFlight" ] @@ -406,6 +412,110 @@ class CreateForceCaptureParamsPurchaseDetails(TypedDict): A merchant-specific order number. """ + class CreateForceCaptureParamsPurchaseDetailsFleet(TypedDict): + cardholder_prompt_data: NotRequired[ + "TransactionService.CreateForceCaptureParamsPurchaseDetailsFleetCardholderPromptData" + ] + """ + Answers to prompts presented to the cardholder at the point of sale. Prompted fields vary depending on the configuration of your physical fleet cards. Typical points of sale support only numeric entry. + """ + purchase_type: NotRequired[ + Literal[ + "fuel_and_non_fuel_purchase", + "fuel_purchase", + "non_fuel_purchase", + ] + ] + """ + The type of purchase. One of `fuel_purchase`, `non_fuel_purchase`, or `fuel_and_non_fuel_purchase`. + """ + reported_breakdown: NotRequired[ + "TransactionService.CreateForceCaptureParamsPurchaseDetailsFleetReportedBreakdown" + ] + """ + More information about the total amount. This information is not guaranteed to be accurate as some merchants may provide unreliable data. + """ + service_type: NotRequired[ + Literal["full_service", "non_fuel_transaction", "self_service"] + ] + """ + The type of fuel service. One of `non_fuel_transaction`, `full_service`, or `self_service`. + """ + + class CreateForceCaptureParamsPurchaseDetailsFleetCardholderPromptData( + TypedDict, + ): + driver_id: NotRequired[str] + """ + Driver ID. + """ + odometer: NotRequired[int] + """ + Odometer reading. + """ + unspecified_id: NotRequired[str] + """ + An alphanumeric ID. This field is used when a vehicle ID, driver ID, or generic ID is entered by the cardholder, but the merchant or card network did not specify the prompt type. + """ + user_id: NotRequired[str] + """ + User ID. + """ + vehicle_number: NotRequired[str] + """ + Vehicle number. + """ + + class CreateForceCaptureParamsPurchaseDetailsFleetReportedBreakdown( + TypedDict, + ): + fuel: NotRequired[ + "TransactionService.CreateForceCaptureParamsPurchaseDetailsFleetReportedBreakdownFuel" + ] + """ + Breakdown of fuel portion of the purchase. + """ + non_fuel: NotRequired[ + "TransactionService.CreateForceCaptureParamsPurchaseDetailsFleetReportedBreakdownNonFuel" + ] + """ + Breakdown of non-fuel portion of the purchase. + """ + tax: NotRequired[ + "TransactionService.CreateForceCaptureParamsPurchaseDetailsFleetReportedBreakdownTax" + ] + """ + Information about tax included in this transaction. + """ + + class CreateForceCaptureParamsPurchaseDetailsFleetReportedBreakdownFuel( + TypedDict, + ): + gross_amount_decimal: NotRequired[str] + """ + Gross fuel amount that should equal Fuel Volume multipled by Fuel Unit Cost, inclusive of taxes. + """ + + class CreateForceCaptureParamsPurchaseDetailsFleetReportedBreakdownNonFuel( + TypedDict, + ): + gross_amount_decimal: NotRequired[str] + """ + Gross non-fuel amount that should equal the sum of the line items, inclusive of taxes. + """ + + class CreateForceCaptureParamsPurchaseDetailsFleetReportedBreakdownTax( + TypedDict, + ): + local_amount_decimal: NotRequired[str] + """ + Amount of state or provincial Sales Tax included in the transaction amount. Null if not reported by merchant or not subject to tax. + """ + national_amount_decimal: NotRequired[str] + """ + Amount of national Sales Tax or VAT included in the transaction amount. Null if not reported by merchant or not subject to tax. + """ + class CreateForceCaptureParamsPurchaseDetailsFlight(TypedDict): departure_at: NotRequired[int] """ @@ -459,6 +569,14 @@ class CreateForceCaptureParamsPurchaseDetailsFlightSegment(TypedDict): """ class CreateForceCaptureParamsPurchaseDetailsFuel(TypedDict): + industry_product_code: NotRequired[str] + """ + [Conexxus Payment System Product Code](https://www.conexxus.org/conexxus-payment-system-product-codes) identifying the primary fuel product purchased. + """ + quantity_decimal: NotRequired[str] + """ + The quantity of `unit`s of fuel that was dispensed, represented as a decimal string with at most 12 decimal places. + """ type: NotRequired[ Literal[ "diesel", @@ -471,18 +589,25 @@ class CreateForceCaptureParamsPurchaseDetailsFuel(TypedDict): """ The type of fuel that was purchased. One of `diesel`, `unleaded_plus`, `unleaded_regular`, `unleaded_super`, or `other`. """ - unit: NotRequired[Literal["liter", "other", "us_gallon"]] + unit: NotRequired[ + Literal[ + "charging_minute", + "imperial_gallon", + "kilogram", + "kilowatt_hour", + "liter", + "other", + "pound", + "us_gallon", + ] + ] """ - The units for `volume_decimal`. One of `liter`, `us_gallon`, or `other`. + The units for `quantity_decimal`. One of `charging_minute`, `imperial_gallon`, `kilogram`, `kilowatt_hour`, `liter`, `pound`, `us_gallon`, or `other`. """ unit_cost_decimal: NotRequired[str] """ The cost in cents per each unit of fuel, represented as a decimal string with at most 12 decimal places. """ - volume_decimal: NotRequired[str] - """ - The volume of the fuel that was pumped, represented as a decimal string with at most 12 decimal places. - """ class CreateForceCaptureParamsPurchaseDetailsLodging(TypedDict): check_in_at: NotRequired[int] @@ -866,6 +991,12 @@ class CreateUnlinkedRefundParamsMerchantData(TypedDict): """ class CreateUnlinkedRefundParamsPurchaseDetails(TypedDict): + fleet: NotRequired[ + "TransactionService.CreateUnlinkedRefundParamsPurchaseDetailsFleet" + ] + """ + Fleet-specific information for transactions using Fleet cards. + """ flight: NotRequired[ "TransactionService.CreateUnlinkedRefundParamsPurchaseDetailsFlight" ] @@ -897,6 +1028,110 @@ class CreateUnlinkedRefundParamsPurchaseDetails(TypedDict): A merchant-specific order number. """ + class CreateUnlinkedRefundParamsPurchaseDetailsFleet(TypedDict): + cardholder_prompt_data: NotRequired[ + "TransactionService.CreateUnlinkedRefundParamsPurchaseDetailsFleetCardholderPromptData" + ] + """ + Answers to prompts presented to the cardholder at the point of sale. Prompted fields vary depending on the configuration of your physical fleet cards. Typical points of sale support only numeric entry. + """ + purchase_type: NotRequired[ + Literal[ + "fuel_and_non_fuel_purchase", + "fuel_purchase", + "non_fuel_purchase", + ] + ] + """ + The type of purchase. One of `fuel_purchase`, `non_fuel_purchase`, or `fuel_and_non_fuel_purchase`. + """ + reported_breakdown: NotRequired[ + "TransactionService.CreateUnlinkedRefundParamsPurchaseDetailsFleetReportedBreakdown" + ] + """ + More information about the total amount. This information is not guaranteed to be accurate as some merchants may provide unreliable data. + """ + service_type: NotRequired[ + Literal["full_service", "non_fuel_transaction", "self_service"] + ] + """ + The type of fuel service. One of `non_fuel_transaction`, `full_service`, or `self_service`. + """ + + class CreateUnlinkedRefundParamsPurchaseDetailsFleetCardholderPromptData( + TypedDict, + ): + driver_id: NotRequired[str] + """ + Driver ID. + """ + odometer: NotRequired[int] + """ + Odometer reading. + """ + unspecified_id: NotRequired[str] + """ + An alphanumeric ID. This field is used when a vehicle ID, driver ID, or generic ID is entered by the cardholder, but the merchant or card network did not specify the prompt type. + """ + user_id: NotRequired[str] + """ + User ID. + """ + vehicle_number: NotRequired[str] + """ + Vehicle number. + """ + + class CreateUnlinkedRefundParamsPurchaseDetailsFleetReportedBreakdown( + TypedDict, + ): + fuel: NotRequired[ + "TransactionService.CreateUnlinkedRefundParamsPurchaseDetailsFleetReportedBreakdownFuel" + ] + """ + Breakdown of fuel portion of the purchase. + """ + non_fuel: NotRequired[ + "TransactionService.CreateUnlinkedRefundParamsPurchaseDetailsFleetReportedBreakdownNonFuel" + ] + """ + Breakdown of non-fuel portion of the purchase. + """ + tax: NotRequired[ + "TransactionService.CreateUnlinkedRefundParamsPurchaseDetailsFleetReportedBreakdownTax" + ] + """ + Information about tax included in this transaction. + """ + + class CreateUnlinkedRefundParamsPurchaseDetailsFleetReportedBreakdownFuel( + TypedDict, + ): + gross_amount_decimal: NotRequired[str] + """ + Gross fuel amount that should equal Fuel Volume multipled by Fuel Unit Cost, inclusive of taxes. + """ + + class CreateUnlinkedRefundParamsPurchaseDetailsFleetReportedBreakdownNonFuel( + TypedDict, + ): + gross_amount_decimal: NotRequired[str] + """ + Gross non-fuel amount that should equal the sum of the line items, inclusive of taxes. + """ + + class CreateUnlinkedRefundParamsPurchaseDetailsFleetReportedBreakdownTax( + TypedDict, + ): + local_amount_decimal: NotRequired[str] + """ + Amount of state or provincial Sales Tax included in the transaction amount. Null if not reported by merchant or not subject to tax. + """ + national_amount_decimal: NotRequired[str] + """ + Amount of national Sales Tax or VAT included in the transaction amount. Null if not reported by merchant or not subject to tax. + """ + class CreateUnlinkedRefundParamsPurchaseDetailsFlight(TypedDict): departure_at: NotRequired[int] """ @@ -950,6 +1185,14 @@ class CreateUnlinkedRefundParamsPurchaseDetailsFlightSegment(TypedDict): """ class CreateUnlinkedRefundParamsPurchaseDetailsFuel(TypedDict): + industry_product_code: NotRequired[str] + """ + [Conexxus Payment System Product Code](https://www.conexxus.org/conexxus-payment-system-product-codes) identifying the primary fuel product purchased. + """ + quantity_decimal: NotRequired[str] + """ + The quantity of `unit`s of fuel that was dispensed, represented as a decimal string with at most 12 decimal places. + """ type: NotRequired[ Literal[ "diesel", @@ -962,18 +1205,25 @@ class CreateUnlinkedRefundParamsPurchaseDetailsFuel(TypedDict): """ The type of fuel that was purchased. One of `diesel`, `unleaded_plus`, `unleaded_regular`, `unleaded_super`, or `other`. """ - unit: NotRequired[Literal["liter", "other", "us_gallon"]] + unit: NotRequired[ + Literal[ + "charging_minute", + "imperial_gallon", + "kilogram", + "kilowatt_hour", + "liter", + "other", + "pound", + "us_gallon", + ] + ] """ - The units for `volume_decimal`. One of `liter`, `us_gallon`, or `other`. + The units for `quantity_decimal`. One of `charging_minute`, `imperial_gallon`, `kilogram`, `kilowatt_hour`, `liter`, `pound`, `us_gallon`, or `other`. """ unit_cost_decimal: NotRequired[str] """ The cost in cents per each unit of fuel, represented as a decimal string with at most 12 decimal places. """ - volume_decimal: NotRequired[str] - """ - The volume of the fuel that was pumped, represented as a decimal string with at most 12 decimal places. - """ class CreateUnlinkedRefundParamsPurchaseDetailsLodging(TypedDict): check_in_at: NotRequired[int] diff --git a/tests/test_generated_examples.py b/tests/test_generated_examples.py index f733c0c2d..567057a69 100644 --- a/tests/test_generated_examples.py +++ b/tests/test_generated_examples.py @@ -26173,7 +26173,7 @@ def test_test_helpers_issuing_authorizations_capture_post( "type": "diesel", "unit": "liter", "unit_cost_decimal": "3.5", - "volume_decimal": "10", + "quantity_decimal": "10", }, "lodging": {"check_in_at": 1633651200, "nights": 2}, "receipt": [ @@ -26191,7 +26191,7 @@ def test_test_helpers_issuing_authorizations_capture_post( "post", path="/v1/test_helpers/issuing/authorizations/example_authorization/capture", query_string="", - post_data="capture_amount=100&close_authorization=True&purchase_details[flight][departure_at]=1633651200&purchase_details[flight][passenger_name]=John%20Doe&purchase_details[flight][refundable]=True&purchase_details[flight][segments][0][arrival_airport_code]=SFO&purchase_details[flight][segments][0][carrier]=Delta&purchase_details[flight][segments][0][departure_airport_code]=LAX&purchase_details[flight][segments][0][flight_number]=DL100&purchase_details[flight][segments][0][service_class]=Economy&purchase_details[flight][segments][0][stopover_allowed]=True&purchase_details[flight][travel_agency]=Orbitz&purchase_details[fuel][type]=diesel&purchase_details[fuel][unit]=liter&purchase_details[fuel][unit_cost_decimal]=3.5&purchase_details[fuel][volume_decimal]=10&purchase_details[lodging][check_in_at]=1633651200&purchase_details[lodging][nights]=2&purchase_details[receipt][0][description]=Room%20charge&purchase_details[receipt][0][quantity]=1&purchase_details[receipt][0][total]=200&purchase_details[receipt][0][unit_cost]=200&purchase_details[reference]=foo", + post_data="capture_amount=100&close_authorization=True&purchase_details[flight][departure_at]=1633651200&purchase_details[flight][passenger_name]=John%20Doe&purchase_details[flight][refundable]=True&purchase_details[flight][segments][0][arrival_airport_code]=SFO&purchase_details[flight][segments][0][carrier]=Delta&purchase_details[flight][segments][0][departure_airport_code]=LAX&purchase_details[flight][segments][0][flight_number]=DL100&purchase_details[flight][segments][0][service_class]=Economy&purchase_details[flight][segments][0][stopover_allowed]=True&purchase_details[flight][travel_agency]=Orbitz&purchase_details[fuel][type]=diesel&purchase_details[fuel][unit]=liter&purchase_details[fuel][unit_cost_decimal]=3.5&purchase_details[fuel][quantity_decimal]=10&purchase_details[lodging][check_in_at]=1633651200&purchase_details[lodging][nights]=2&purchase_details[receipt][0][description]=Room%20charge&purchase_details[receipt][0][quantity]=1&purchase_details[receipt][0][total]=200&purchase_details[receipt][0][unit_cost]=200&purchase_details[reference]=foo", ) def test_test_helpers_issuing_authorizations_capture_post_service( @@ -26232,7 +26232,7 @@ def test_test_helpers_issuing_authorizations_capture_post_service( "type": "diesel", "unit": "liter", "unit_cost_decimal": "3.5", - "volume_decimal": "10", + "quantity_decimal": "10", }, "lodging": {"check_in_at": 1633651200, "nights": 2}, "receipt": [ @@ -26252,7 +26252,7 @@ def test_test_helpers_issuing_authorizations_capture_post_service( path="/v1/test_helpers/issuing/authorizations/example_authorization/capture", query_string="", api_base="https://api.stripe.com", - post_data="capture_amount=100&close_authorization=True&purchase_details[flight][departure_at]=1633651200&purchase_details[flight][passenger_name]=John%20Doe&purchase_details[flight][refundable]=True&purchase_details[flight][segments][0][arrival_airport_code]=SFO&purchase_details[flight][segments][0][carrier]=Delta&purchase_details[flight][segments][0][departure_airport_code]=LAX&purchase_details[flight][segments][0][flight_number]=DL100&purchase_details[flight][segments][0][service_class]=Economy&purchase_details[flight][segments][0][stopover_allowed]=True&purchase_details[flight][travel_agency]=Orbitz&purchase_details[fuel][type]=diesel&purchase_details[fuel][unit]=liter&purchase_details[fuel][unit_cost_decimal]=3.5&purchase_details[fuel][volume_decimal]=10&purchase_details[lodging][check_in_at]=1633651200&purchase_details[lodging][nights]=2&purchase_details[receipt][0][description]=Room%20charge&purchase_details[receipt][0][quantity]=1&purchase_details[receipt][0][total]=200&purchase_details[receipt][0][unit_cost]=200&purchase_details[reference]=foo", + post_data="capture_amount=100&close_authorization=True&purchase_details[flight][departure_at]=1633651200&purchase_details[flight][passenger_name]=John%20Doe&purchase_details[flight][refundable]=True&purchase_details[flight][segments][0][arrival_airport_code]=SFO&purchase_details[flight][segments][0][carrier]=Delta&purchase_details[flight][segments][0][departure_airport_code]=LAX&purchase_details[flight][segments][0][flight_number]=DL100&purchase_details[flight][segments][0][service_class]=Economy&purchase_details[flight][segments][0][stopover_allowed]=True&purchase_details[flight][travel_agency]=Orbitz&purchase_details[fuel][type]=diesel&purchase_details[fuel][unit]=liter&purchase_details[fuel][unit_cost_decimal]=3.5&purchase_details[fuel][quantity_decimal]=10&purchase_details[lodging][check_in_at]=1633651200&purchase_details[lodging][nights]=2&purchase_details[receipt][0][description]=Room%20charge&purchase_details[receipt][0][quantity]=1&purchase_details[receipt][0][total]=200&purchase_details[receipt][0][unit_cost]=200&purchase_details[reference]=foo", ) @pytest.mark.anyio @@ -26284,7 +26284,7 @@ async def test_test_helpers_issuing_authorizations_capture_post_async( "type": "diesel", "unit": "liter", "unit_cost_decimal": "3.5", - "volume_decimal": "10", + "quantity_decimal": "10", }, "lodging": {"check_in_at": 1633651200, "nights": 2}, "receipt": [ @@ -26302,7 +26302,7 @@ async def test_test_helpers_issuing_authorizations_capture_post_async( "post", path="/v1/test_helpers/issuing/authorizations/example_authorization/capture", query_string="", - post_data="capture_amount=100&close_authorization=True&purchase_details[flight][departure_at]=1633651200&purchase_details[flight][passenger_name]=John%20Doe&purchase_details[flight][refundable]=True&purchase_details[flight][segments][0][arrival_airport_code]=SFO&purchase_details[flight][segments][0][carrier]=Delta&purchase_details[flight][segments][0][departure_airport_code]=LAX&purchase_details[flight][segments][0][flight_number]=DL100&purchase_details[flight][segments][0][service_class]=Economy&purchase_details[flight][segments][0][stopover_allowed]=True&purchase_details[flight][travel_agency]=Orbitz&purchase_details[fuel][type]=diesel&purchase_details[fuel][unit]=liter&purchase_details[fuel][unit_cost_decimal]=3.5&purchase_details[fuel][volume_decimal]=10&purchase_details[lodging][check_in_at]=1633651200&purchase_details[lodging][nights]=2&purchase_details[receipt][0][description]=Room%20charge&purchase_details[receipt][0][quantity]=1&purchase_details[receipt][0][total]=200&purchase_details[receipt][0][unit_cost]=200&purchase_details[reference]=foo", + post_data="capture_amount=100&close_authorization=True&purchase_details[flight][departure_at]=1633651200&purchase_details[flight][passenger_name]=John%20Doe&purchase_details[flight][refundable]=True&purchase_details[flight][segments][0][arrival_airport_code]=SFO&purchase_details[flight][segments][0][carrier]=Delta&purchase_details[flight][segments][0][departure_airport_code]=LAX&purchase_details[flight][segments][0][flight_number]=DL100&purchase_details[flight][segments][0][service_class]=Economy&purchase_details[flight][segments][0][stopover_allowed]=True&purchase_details[flight][travel_agency]=Orbitz&purchase_details[fuel][type]=diesel&purchase_details[fuel][unit]=liter&purchase_details[fuel][unit_cost_decimal]=3.5&purchase_details[fuel][quantity_decimal]=10&purchase_details[lodging][check_in_at]=1633651200&purchase_details[lodging][nights]=2&purchase_details[receipt][0][description]=Room%20charge&purchase_details[receipt][0][quantity]=1&purchase_details[receipt][0][total]=200&purchase_details[receipt][0][unit_cost]=200&purchase_details[reference]=foo", ) @pytest.mark.anyio @@ -26344,7 +26344,7 @@ async def test_test_helpers_issuing_authorizations_capture_post_service_async( "type": "diesel", "unit": "liter", "unit_cost_decimal": "3.5", - "volume_decimal": "10", + "quantity_decimal": "10", }, "lodging": {"check_in_at": 1633651200, "nights": 2}, "receipt": [ @@ -26364,7 +26364,7 @@ async def test_test_helpers_issuing_authorizations_capture_post_service_async( path="/v1/test_helpers/issuing/authorizations/example_authorization/capture", query_string="", api_base="https://api.stripe.com", - post_data="capture_amount=100&close_authorization=True&purchase_details[flight][departure_at]=1633651200&purchase_details[flight][passenger_name]=John%20Doe&purchase_details[flight][refundable]=True&purchase_details[flight][segments][0][arrival_airport_code]=SFO&purchase_details[flight][segments][0][carrier]=Delta&purchase_details[flight][segments][0][departure_airport_code]=LAX&purchase_details[flight][segments][0][flight_number]=DL100&purchase_details[flight][segments][0][service_class]=Economy&purchase_details[flight][segments][0][stopover_allowed]=True&purchase_details[flight][travel_agency]=Orbitz&purchase_details[fuel][type]=diesel&purchase_details[fuel][unit]=liter&purchase_details[fuel][unit_cost_decimal]=3.5&purchase_details[fuel][volume_decimal]=10&purchase_details[lodging][check_in_at]=1633651200&purchase_details[lodging][nights]=2&purchase_details[receipt][0][description]=Room%20charge&purchase_details[receipt][0][quantity]=1&purchase_details[receipt][0][total]=200&purchase_details[receipt][0][unit_cost]=200&purchase_details[reference]=foo", + post_data="capture_amount=100&close_authorization=True&purchase_details[flight][departure_at]=1633651200&purchase_details[flight][passenger_name]=John%20Doe&purchase_details[flight][refundable]=True&purchase_details[flight][segments][0][arrival_airport_code]=SFO&purchase_details[flight][segments][0][carrier]=Delta&purchase_details[flight][segments][0][departure_airport_code]=LAX&purchase_details[flight][segments][0][flight_number]=DL100&purchase_details[flight][segments][0][service_class]=Economy&purchase_details[flight][segments][0][stopover_allowed]=True&purchase_details[flight][travel_agency]=Orbitz&purchase_details[fuel][type]=diesel&purchase_details[fuel][unit]=liter&purchase_details[fuel][unit_cost_decimal]=3.5&purchase_details[fuel][quantity_decimal]=10&purchase_details[lodging][check_in_at]=1633651200&purchase_details[lodging][nights]=2&purchase_details[receipt][0][description]=Room%20charge&purchase_details[receipt][0][quantity]=1&purchase_details[receipt][0][total]=200&purchase_details[receipt][0][unit_cost]=200&purchase_details[reference]=foo", ) def test_test_helpers_issuing_authorizations_expire_post( @@ -27267,7 +27267,7 @@ def test_test_helpers_issuing_transactions_create_force_capture_post( "type": "diesel", "unit": "liter", "unit_cost_decimal": "3.5", - "volume_decimal": "10", + "quantity_decimal": "10", }, "lodging": {"check_in_at": 1533651200, "nights": 2}, "receipt": [ @@ -27285,7 +27285,7 @@ def test_test_helpers_issuing_transactions_create_force_capture_post( "post", path="/v1/test_helpers/issuing/transactions/create_force_capture", query_string="", - post_data="amount=100&card=foo¤cy=usd&merchant_data[category]=ac_refrigeration_repair&merchant_data[city]=foo&merchant_data[country]=US&merchant_data[name]=foo&merchant_data[network_id]=bar&merchant_data[postal_code]=10001&merchant_data[state]=NY&merchant_data[terminal_id]=foo&purchase_details[flight][departure_at]=1633651200&purchase_details[flight][passenger_name]=John%20Doe&purchase_details[flight][refundable]=True&purchase_details[flight][segments][0][arrival_airport_code]=SFO&purchase_details[flight][segments][0][carrier]=Delta&purchase_details[flight][segments][0][departure_airport_code]=LAX&purchase_details[flight][segments][0][flight_number]=DL100&purchase_details[flight][segments][0][service_class]=Economy&purchase_details[flight][segments][0][stopover_allowed]=True&purchase_details[flight][travel_agency]=Orbitz&purchase_details[fuel][type]=diesel&purchase_details[fuel][unit]=liter&purchase_details[fuel][unit_cost_decimal]=3.5&purchase_details[fuel][volume_decimal]=10&purchase_details[lodging][check_in_at]=1533651200&purchase_details[lodging][nights]=2&purchase_details[receipt][0][description]=Room%20charge&purchase_details[receipt][0][quantity]=1&purchase_details[receipt][0][total]=200&purchase_details[receipt][0][unit_cost]=200&purchase_details[reference]=foo", + post_data="amount=100&card=foo¤cy=usd&merchant_data[category]=ac_refrigeration_repair&merchant_data[city]=foo&merchant_data[country]=US&merchant_data[name]=foo&merchant_data[network_id]=bar&merchant_data[postal_code]=10001&merchant_data[state]=NY&merchant_data[terminal_id]=foo&purchase_details[flight][departure_at]=1633651200&purchase_details[flight][passenger_name]=John%20Doe&purchase_details[flight][refundable]=True&purchase_details[flight][segments][0][arrival_airport_code]=SFO&purchase_details[flight][segments][0][carrier]=Delta&purchase_details[flight][segments][0][departure_airport_code]=LAX&purchase_details[flight][segments][0][flight_number]=DL100&purchase_details[flight][segments][0][service_class]=Economy&purchase_details[flight][segments][0][stopover_allowed]=True&purchase_details[flight][travel_agency]=Orbitz&purchase_details[fuel][type]=diesel&purchase_details[fuel][unit]=liter&purchase_details[fuel][unit_cost_decimal]=3.5&purchase_details[fuel][quantity_decimal]=10&purchase_details[lodging][check_in_at]=1533651200&purchase_details[lodging][nights]=2&purchase_details[receipt][0][description]=Room%20charge&purchase_details[receipt][0][quantity]=1&purchase_details[receipt][0][total]=200&purchase_details[receipt][0][unit_cost]=200&purchase_details[reference]=foo", ) def test_test_helpers_issuing_transactions_create_force_capture_post_service( @@ -27336,7 +27336,7 @@ def test_test_helpers_issuing_transactions_create_force_capture_post_service( "type": "diesel", "unit": "liter", "unit_cost_decimal": "3.5", - "volume_decimal": "10", + "quantity_decimal": "10", }, "lodging": {"check_in_at": 1533651200, "nights": 2}, "receipt": [ @@ -27356,7 +27356,7 @@ def test_test_helpers_issuing_transactions_create_force_capture_post_service( path="/v1/test_helpers/issuing/transactions/create_force_capture", query_string="", api_base="https://api.stripe.com", - post_data="amount=100&card=foo¤cy=usd&merchant_data[category]=ac_refrigeration_repair&merchant_data[city]=foo&merchant_data[country]=US&merchant_data[name]=foo&merchant_data[network_id]=bar&merchant_data[postal_code]=10001&merchant_data[state]=NY&merchant_data[terminal_id]=foo&purchase_details[flight][departure_at]=1633651200&purchase_details[flight][passenger_name]=John%20Doe&purchase_details[flight][refundable]=True&purchase_details[flight][segments][0][arrival_airport_code]=SFO&purchase_details[flight][segments][0][carrier]=Delta&purchase_details[flight][segments][0][departure_airport_code]=LAX&purchase_details[flight][segments][0][flight_number]=DL100&purchase_details[flight][segments][0][service_class]=Economy&purchase_details[flight][segments][0][stopover_allowed]=True&purchase_details[flight][travel_agency]=Orbitz&purchase_details[fuel][type]=diesel&purchase_details[fuel][unit]=liter&purchase_details[fuel][unit_cost_decimal]=3.5&purchase_details[fuel][volume_decimal]=10&purchase_details[lodging][check_in_at]=1533651200&purchase_details[lodging][nights]=2&purchase_details[receipt][0][description]=Room%20charge&purchase_details[receipt][0][quantity]=1&purchase_details[receipt][0][total]=200&purchase_details[receipt][0][unit_cost]=200&purchase_details[reference]=foo", + post_data="amount=100&card=foo¤cy=usd&merchant_data[category]=ac_refrigeration_repair&merchant_data[city]=foo&merchant_data[country]=US&merchant_data[name]=foo&merchant_data[network_id]=bar&merchant_data[postal_code]=10001&merchant_data[state]=NY&merchant_data[terminal_id]=foo&purchase_details[flight][departure_at]=1633651200&purchase_details[flight][passenger_name]=John%20Doe&purchase_details[flight][refundable]=True&purchase_details[flight][segments][0][arrival_airport_code]=SFO&purchase_details[flight][segments][0][carrier]=Delta&purchase_details[flight][segments][0][departure_airport_code]=LAX&purchase_details[flight][segments][0][flight_number]=DL100&purchase_details[flight][segments][0][service_class]=Economy&purchase_details[flight][segments][0][stopover_allowed]=True&purchase_details[flight][travel_agency]=Orbitz&purchase_details[fuel][type]=diesel&purchase_details[fuel][unit]=liter&purchase_details[fuel][unit_cost_decimal]=3.5&purchase_details[fuel][quantity_decimal]=10&purchase_details[lodging][check_in_at]=1533651200&purchase_details[lodging][nights]=2&purchase_details[receipt][0][description]=Room%20charge&purchase_details[receipt][0][quantity]=1&purchase_details[receipt][0][total]=200&purchase_details[receipt][0][unit_cost]=200&purchase_details[reference]=foo", ) @pytest.mark.anyio @@ -27399,7 +27399,7 @@ async def test_test_helpers_issuing_transactions_create_force_capture_post_async "type": "diesel", "unit": "liter", "unit_cost_decimal": "3.5", - "volume_decimal": "10", + "quantity_decimal": "10", }, "lodging": {"check_in_at": 1533651200, "nights": 2}, "receipt": [ @@ -27418,7 +27418,7 @@ async def test_test_helpers_issuing_transactions_create_force_capture_post_async "post", path="/v1/test_helpers/issuing/transactions/create_force_capture", query_string="", - post_data="amount=100&card=foo¤cy=usd&merchant_data[category]=ac_refrigeration_repair&merchant_data[city]=foo&merchant_data[country]=US&merchant_data[name]=foo&merchant_data[network_id]=bar&merchant_data[postal_code]=10001&merchant_data[state]=NY&merchant_data[terminal_id]=foo&purchase_details[flight][departure_at]=1633651200&purchase_details[flight][passenger_name]=John%20Doe&purchase_details[flight][refundable]=True&purchase_details[flight][segments][0][arrival_airport_code]=SFO&purchase_details[flight][segments][0][carrier]=Delta&purchase_details[flight][segments][0][departure_airport_code]=LAX&purchase_details[flight][segments][0][flight_number]=DL100&purchase_details[flight][segments][0][service_class]=Economy&purchase_details[flight][segments][0][stopover_allowed]=True&purchase_details[flight][travel_agency]=Orbitz&purchase_details[fuel][type]=diesel&purchase_details[fuel][unit]=liter&purchase_details[fuel][unit_cost_decimal]=3.5&purchase_details[fuel][volume_decimal]=10&purchase_details[lodging][check_in_at]=1533651200&purchase_details[lodging][nights]=2&purchase_details[receipt][0][description]=Room%20charge&purchase_details[receipt][0][quantity]=1&purchase_details[receipt][0][total]=200&purchase_details[receipt][0][unit_cost]=200&purchase_details[reference]=foo", + post_data="amount=100&card=foo¤cy=usd&merchant_data[category]=ac_refrigeration_repair&merchant_data[city]=foo&merchant_data[country]=US&merchant_data[name]=foo&merchant_data[network_id]=bar&merchant_data[postal_code]=10001&merchant_data[state]=NY&merchant_data[terminal_id]=foo&purchase_details[flight][departure_at]=1633651200&purchase_details[flight][passenger_name]=John%20Doe&purchase_details[flight][refundable]=True&purchase_details[flight][segments][0][arrival_airport_code]=SFO&purchase_details[flight][segments][0][carrier]=Delta&purchase_details[flight][segments][0][departure_airport_code]=LAX&purchase_details[flight][segments][0][flight_number]=DL100&purchase_details[flight][segments][0][service_class]=Economy&purchase_details[flight][segments][0][stopover_allowed]=True&purchase_details[flight][travel_agency]=Orbitz&purchase_details[fuel][type]=diesel&purchase_details[fuel][unit]=liter&purchase_details[fuel][unit_cost_decimal]=3.5&purchase_details[fuel][quantity_decimal]=10&purchase_details[lodging][check_in_at]=1533651200&purchase_details[lodging][nights]=2&purchase_details[receipt][0][description]=Room%20charge&purchase_details[receipt][0][quantity]=1&purchase_details[receipt][0][total]=200&purchase_details[receipt][0][unit_cost]=200&purchase_details[reference]=foo", ) @pytest.mark.anyio @@ -27470,7 +27470,7 @@ async def test_test_helpers_issuing_transactions_create_force_capture_post_servi "type": "diesel", "unit": "liter", "unit_cost_decimal": "3.5", - "volume_decimal": "10", + "quantity_decimal": "10", }, "lodging": {"check_in_at": 1533651200, "nights": 2}, "receipt": [ @@ -27490,7 +27490,7 @@ async def test_test_helpers_issuing_transactions_create_force_capture_post_servi path="/v1/test_helpers/issuing/transactions/create_force_capture", query_string="", api_base="https://api.stripe.com", - post_data="amount=100&card=foo¤cy=usd&merchant_data[category]=ac_refrigeration_repair&merchant_data[city]=foo&merchant_data[country]=US&merchant_data[name]=foo&merchant_data[network_id]=bar&merchant_data[postal_code]=10001&merchant_data[state]=NY&merchant_data[terminal_id]=foo&purchase_details[flight][departure_at]=1633651200&purchase_details[flight][passenger_name]=John%20Doe&purchase_details[flight][refundable]=True&purchase_details[flight][segments][0][arrival_airport_code]=SFO&purchase_details[flight][segments][0][carrier]=Delta&purchase_details[flight][segments][0][departure_airport_code]=LAX&purchase_details[flight][segments][0][flight_number]=DL100&purchase_details[flight][segments][0][service_class]=Economy&purchase_details[flight][segments][0][stopover_allowed]=True&purchase_details[flight][travel_agency]=Orbitz&purchase_details[fuel][type]=diesel&purchase_details[fuel][unit]=liter&purchase_details[fuel][unit_cost_decimal]=3.5&purchase_details[fuel][volume_decimal]=10&purchase_details[lodging][check_in_at]=1533651200&purchase_details[lodging][nights]=2&purchase_details[receipt][0][description]=Room%20charge&purchase_details[receipt][0][quantity]=1&purchase_details[receipt][0][total]=200&purchase_details[receipt][0][unit_cost]=200&purchase_details[reference]=foo", + post_data="amount=100&card=foo¤cy=usd&merchant_data[category]=ac_refrigeration_repair&merchant_data[city]=foo&merchant_data[country]=US&merchant_data[name]=foo&merchant_data[network_id]=bar&merchant_data[postal_code]=10001&merchant_data[state]=NY&merchant_data[terminal_id]=foo&purchase_details[flight][departure_at]=1633651200&purchase_details[flight][passenger_name]=John%20Doe&purchase_details[flight][refundable]=True&purchase_details[flight][segments][0][arrival_airport_code]=SFO&purchase_details[flight][segments][0][carrier]=Delta&purchase_details[flight][segments][0][departure_airport_code]=LAX&purchase_details[flight][segments][0][flight_number]=DL100&purchase_details[flight][segments][0][service_class]=Economy&purchase_details[flight][segments][0][stopover_allowed]=True&purchase_details[flight][travel_agency]=Orbitz&purchase_details[fuel][type]=diesel&purchase_details[fuel][unit]=liter&purchase_details[fuel][unit_cost_decimal]=3.5&purchase_details[fuel][quantity_decimal]=10&purchase_details[lodging][check_in_at]=1533651200&purchase_details[lodging][nights]=2&purchase_details[receipt][0][description]=Room%20charge&purchase_details[receipt][0][quantity]=1&purchase_details[receipt][0][total]=200&purchase_details[receipt][0][unit_cost]=200&purchase_details[reference]=foo", ) def test_test_helpers_issuing_transactions_create_unlinked_refund_post( @@ -27531,7 +27531,7 @@ def test_test_helpers_issuing_transactions_create_unlinked_refund_post( "type": "diesel", "unit": "liter", "unit_cost_decimal": "3.5", - "volume_decimal": "10", + "quantity_decimal": "10", }, "lodging": {"check_in_at": 1533651200, "nights": 2}, "receipt": [ @@ -27549,7 +27549,7 @@ def test_test_helpers_issuing_transactions_create_unlinked_refund_post( "post", path="/v1/test_helpers/issuing/transactions/create_unlinked_refund", query_string="", - post_data="amount=100&card=foo¤cy=usd&merchant_data[category]=ac_refrigeration_repair&merchant_data[city]=foo&merchant_data[country]=bar&merchant_data[name]=foo&merchant_data[network_id]=bar&merchant_data[postal_code]=foo&merchant_data[state]=bar&merchant_data[terminal_id]=foo&purchase_details[flight][departure_at]=1533651200&purchase_details[flight][passenger_name]=John%20Doe&purchase_details[flight][refundable]=True&purchase_details[flight][segments][0][arrival_airport_code]=SFO&purchase_details[flight][segments][0][carrier]=Delta&purchase_details[flight][segments][0][departure_airport_code]=LAX&purchase_details[flight][segments][0][flight_number]=DL100&purchase_details[flight][segments][0][service_class]=Economy&purchase_details[flight][segments][0][stopover_allowed]=True&purchase_details[flight][travel_agency]=Orbitz&purchase_details[fuel][type]=diesel&purchase_details[fuel][unit]=liter&purchase_details[fuel][unit_cost_decimal]=3.5&purchase_details[fuel][volume_decimal]=10&purchase_details[lodging][check_in_at]=1533651200&purchase_details[lodging][nights]=2&purchase_details[receipt][0][description]=Room%20charge&purchase_details[receipt][0][quantity]=1&purchase_details[receipt][0][total]=200&purchase_details[receipt][0][unit_cost]=200&purchase_details[reference]=foo", + post_data="amount=100&card=foo¤cy=usd&merchant_data[category]=ac_refrigeration_repair&merchant_data[city]=foo&merchant_data[country]=bar&merchant_data[name]=foo&merchant_data[network_id]=bar&merchant_data[postal_code]=foo&merchant_data[state]=bar&merchant_data[terminal_id]=foo&purchase_details[flight][departure_at]=1533651200&purchase_details[flight][passenger_name]=John%20Doe&purchase_details[flight][refundable]=True&purchase_details[flight][segments][0][arrival_airport_code]=SFO&purchase_details[flight][segments][0][carrier]=Delta&purchase_details[flight][segments][0][departure_airport_code]=LAX&purchase_details[flight][segments][0][flight_number]=DL100&purchase_details[flight][segments][0][service_class]=Economy&purchase_details[flight][segments][0][stopover_allowed]=True&purchase_details[flight][travel_agency]=Orbitz&purchase_details[fuel][type]=diesel&purchase_details[fuel][unit]=liter&purchase_details[fuel][unit_cost_decimal]=3.5&purchase_details[fuel][quantity_decimal]=10&purchase_details[lodging][check_in_at]=1533651200&purchase_details[lodging][nights]=2&purchase_details[receipt][0][description]=Room%20charge&purchase_details[receipt][0][quantity]=1&purchase_details[receipt][0][total]=200&purchase_details[receipt][0][unit_cost]=200&purchase_details[reference]=foo", ) def test_test_helpers_issuing_transactions_create_unlinked_refund_post_service( @@ -27600,7 +27600,7 @@ def test_test_helpers_issuing_transactions_create_unlinked_refund_post_service( "type": "diesel", "unit": "liter", "unit_cost_decimal": "3.5", - "volume_decimal": "10", + "quantity_decimal": "10", }, "lodging": {"check_in_at": 1533651200, "nights": 2}, "receipt": [ @@ -27620,7 +27620,7 @@ def test_test_helpers_issuing_transactions_create_unlinked_refund_post_service( path="/v1/test_helpers/issuing/transactions/create_unlinked_refund", query_string="", api_base="https://api.stripe.com", - post_data="amount=100&card=foo¤cy=usd&merchant_data[category]=ac_refrigeration_repair&merchant_data[city]=foo&merchant_data[country]=bar&merchant_data[name]=foo&merchant_data[network_id]=bar&merchant_data[postal_code]=foo&merchant_data[state]=bar&merchant_data[terminal_id]=foo&purchase_details[flight][departure_at]=1533651200&purchase_details[flight][passenger_name]=John%20Doe&purchase_details[flight][refundable]=True&purchase_details[flight][segments][0][arrival_airport_code]=SFO&purchase_details[flight][segments][0][carrier]=Delta&purchase_details[flight][segments][0][departure_airport_code]=LAX&purchase_details[flight][segments][0][flight_number]=DL100&purchase_details[flight][segments][0][service_class]=Economy&purchase_details[flight][segments][0][stopover_allowed]=True&purchase_details[flight][travel_agency]=Orbitz&purchase_details[fuel][type]=diesel&purchase_details[fuel][unit]=liter&purchase_details[fuel][unit_cost_decimal]=3.5&purchase_details[fuel][volume_decimal]=10&purchase_details[lodging][check_in_at]=1533651200&purchase_details[lodging][nights]=2&purchase_details[receipt][0][description]=Room%20charge&purchase_details[receipt][0][quantity]=1&purchase_details[receipt][0][total]=200&purchase_details[receipt][0][unit_cost]=200&purchase_details[reference]=foo", + post_data="amount=100&card=foo¤cy=usd&merchant_data[category]=ac_refrigeration_repair&merchant_data[city]=foo&merchant_data[country]=bar&merchant_data[name]=foo&merchant_data[network_id]=bar&merchant_data[postal_code]=foo&merchant_data[state]=bar&merchant_data[terminal_id]=foo&purchase_details[flight][departure_at]=1533651200&purchase_details[flight][passenger_name]=John%20Doe&purchase_details[flight][refundable]=True&purchase_details[flight][segments][0][arrival_airport_code]=SFO&purchase_details[flight][segments][0][carrier]=Delta&purchase_details[flight][segments][0][departure_airport_code]=LAX&purchase_details[flight][segments][0][flight_number]=DL100&purchase_details[flight][segments][0][service_class]=Economy&purchase_details[flight][segments][0][stopover_allowed]=True&purchase_details[flight][travel_agency]=Orbitz&purchase_details[fuel][type]=diesel&purchase_details[fuel][unit]=liter&purchase_details[fuel][unit_cost_decimal]=3.5&purchase_details[fuel][quantity_decimal]=10&purchase_details[lodging][check_in_at]=1533651200&purchase_details[lodging][nights]=2&purchase_details[receipt][0][description]=Room%20charge&purchase_details[receipt][0][quantity]=1&purchase_details[receipt][0][total]=200&purchase_details[receipt][0][unit_cost]=200&purchase_details[reference]=foo", ) @pytest.mark.anyio @@ -27662,7 +27662,7 @@ async def test_test_helpers_issuing_transactions_create_unlinked_refund_post_asy "type": "diesel", "unit": "liter", "unit_cost_decimal": "3.5", - "volume_decimal": "10", + "quantity_decimal": "10", }, "lodging": {"check_in_at": 1533651200, "nights": 2}, "receipt": [ @@ -27680,7 +27680,7 @@ async def test_test_helpers_issuing_transactions_create_unlinked_refund_post_asy "post", path="/v1/test_helpers/issuing/transactions/create_unlinked_refund", query_string="", - post_data="amount=100&card=foo¤cy=usd&merchant_data[category]=ac_refrigeration_repair&merchant_data[city]=foo&merchant_data[country]=bar&merchant_data[name]=foo&merchant_data[network_id]=bar&merchant_data[postal_code]=foo&merchant_data[state]=bar&merchant_data[terminal_id]=foo&purchase_details[flight][departure_at]=1533651200&purchase_details[flight][passenger_name]=John%20Doe&purchase_details[flight][refundable]=True&purchase_details[flight][segments][0][arrival_airport_code]=SFO&purchase_details[flight][segments][0][carrier]=Delta&purchase_details[flight][segments][0][departure_airport_code]=LAX&purchase_details[flight][segments][0][flight_number]=DL100&purchase_details[flight][segments][0][service_class]=Economy&purchase_details[flight][segments][0][stopover_allowed]=True&purchase_details[flight][travel_agency]=Orbitz&purchase_details[fuel][type]=diesel&purchase_details[fuel][unit]=liter&purchase_details[fuel][unit_cost_decimal]=3.5&purchase_details[fuel][volume_decimal]=10&purchase_details[lodging][check_in_at]=1533651200&purchase_details[lodging][nights]=2&purchase_details[receipt][0][description]=Room%20charge&purchase_details[receipt][0][quantity]=1&purchase_details[receipt][0][total]=200&purchase_details[receipt][0][unit_cost]=200&purchase_details[reference]=foo", + post_data="amount=100&card=foo¤cy=usd&merchant_data[category]=ac_refrigeration_repair&merchant_data[city]=foo&merchant_data[country]=bar&merchant_data[name]=foo&merchant_data[network_id]=bar&merchant_data[postal_code]=foo&merchant_data[state]=bar&merchant_data[terminal_id]=foo&purchase_details[flight][departure_at]=1533651200&purchase_details[flight][passenger_name]=John%20Doe&purchase_details[flight][refundable]=True&purchase_details[flight][segments][0][arrival_airport_code]=SFO&purchase_details[flight][segments][0][carrier]=Delta&purchase_details[flight][segments][0][departure_airport_code]=LAX&purchase_details[flight][segments][0][flight_number]=DL100&purchase_details[flight][segments][0][service_class]=Economy&purchase_details[flight][segments][0][stopover_allowed]=True&purchase_details[flight][travel_agency]=Orbitz&purchase_details[fuel][type]=diesel&purchase_details[fuel][unit]=liter&purchase_details[fuel][unit_cost_decimal]=3.5&purchase_details[fuel][quantity_decimal]=10&purchase_details[lodging][check_in_at]=1533651200&purchase_details[lodging][nights]=2&purchase_details[receipt][0][description]=Room%20charge&purchase_details[receipt][0][quantity]=1&purchase_details[receipt][0][total]=200&purchase_details[receipt][0][unit_cost]=200&purchase_details[reference]=foo", ) @pytest.mark.anyio @@ -27732,7 +27732,7 @@ async def test_test_helpers_issuing_transactions_create_unlinked_refund_post_ser "type": "diesel", "unit": "liter", "unit_cost_decimal": "3.5", - "volume_decimal": "10", + "quantity_decimal": "10", }, "lodging": {"check_in_at": 1533651200, "nights": 2}, "receipt": [ @@ -27752,7 +27752,7 @@ async def test_test_helpers_issuing_transactions_create_unlinked_refund_post_ser path="/v1/test_helpers/issuing/transactions/create_unlinked_refund", query_string="", api_base="https://api.stripe.com", - post_data="amount=100&card=foo¤cy=usd&merchant_data[category]=ac_refrigeration_repair&merchant_data[city]=foo&merchant_data[country]=bar&merchant_data[name]=foo&merchant_data[network_id]=bar&merchant_data[postal_code]=foo&merchant_data[state]=bar&merchant_data[terminal_id]=foo&purchase_details[flight][departure_at]=1533651200&purchase_details[flight][passenger_name]=John%20Doe&purchase_details[flight][refundable]=True&purchase_details[flight][segments][0][arrival_airport_code]=SFO&purchase_details[flight][segments][0][carrier]=Delta&purchase_details[flight][segments][0][departure_airport_code]=LAX&purchase_details[flight][segments][0][flight_number]=DL100&purchase_details[flight][segments][0][service_class]=Economy&purchase_details[flight][segments][0][stopover_allowed]=True&purchase_details[flight][travel_agency]=Orbitz&purchase_details[fuel][type]=diesel&purchase_details[fuel][unit]=liter&purchase_details[fuel][unit_cost_decimal]=3.5&purchase_details[fuel][volume_decimal]=10&purchase_details[lodging][check_in_at]=1533651200&purchase_details[lodging][nights]=2&purchase_details[receipt][0][description]=Room%20charge&purchase_details[receipt][0][quantity]=1&purchase_details[receipt][0][total]=200&purchase_details[receipt][0][unit_cost]=200&purchase_details[reference]=foo", + post_data="amount=100&card=foo¤cy=usd&merchant_data[category]=ac_refrigeration_repair&merchant_data[city]=foo&merchant_data[country]=bar&merchant_data[name]=foo&merchant_data[network_id]=bar&merchant_data[postal_code]=foo&merchant_data[state]=bar&merchant_data[terminal_id]=foo&purchase_details[flight][departure_at]=1533651200&purchase_details[flight][passenger_name]=John%20Doe&purchase_details[flight][refundable]=True&purchase_details[flight][segments][0][arrival_airport_code]=SFO&purchase_details[flight][segments][0][carrier]=Delta&purchase_details[flight][segments][0][departure_airport_code]=LAX&purchase_details[flight][segments][0][flight_number]=DL100&purchase_details[flight][segments][0][service_class]=Economy&purchase_details[flight][segments][0][stopover_allowed]=True&purchase_details[flight][travel_agency]=Orbitz&purchase_details[fuel][type]=diesel&purchase_details[fuel][unit]=liter&purchase_details[fuel][unit_cost_decimal]=3.5&purchase_details[fuel][quantity_decimal]=10&purchase_details[lodging][check_in_at]=1533651200&purchase_details[lodging][nights]=2&purchase_details[receipt][0][description]=Room%20charge&purchase_details[receipt][0][quantity]=1&purchase_details[receipt][0][total]=200&purchase_details[receipt][0][unit_cost]=200&purchase_details[reference]=foo", ) def test_test_helpers_issuing_transactions_refund_post(