From 7d5ff0ea572ef5b1ee21a5b1cbc7148527fb0755 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Mon, 24 Jun 2024 18:21:36 +0000 Subject: [PATCH 1/2] Update generated code for v1094 --- OPENAPI_VERSION | 2 +- stripe/__init__.py | 1 - stripe/_api_version.py | 2 +- stripe/_balance_transaction.py | 2 - stripe/_customer.py | 6 +- stripe/_customer_service.py | 3 +- stripe/_customer_tax_id_service.py | 3 +- stripe/_invoice.py | 12 +- stripe/_invoice_service.py | 6 +- stripe/_invoice_upcoming_lines_service.py | 3 +- stripe/_object_classes.py | 1 - stripe/_payment_link.py | 4 +- stripe/_payment_link_service.py | 4 +- stripe/_platform_tax_fee.py | 29 - stripe/_tax_id.py | 6 +- stripe/_tax_id_service.py | 3 +- stripe/_webhook_endpoint.py | 1 + stripe/_webhook_endpoint_service.py | 1 + stripe/api_resources/__init__.py | 1 - stripe/api_resources/platform_tax_fee.py | 21 - stripe/checkout/_session.py | 7 +- stripe/checkout/_session_service.py | 4 +- stripe/issuing/_authorization.py | 688 +++++++++++++++++- stripe/issuing/_transaction.py | 378 +++++++++- stripe/tax/_calculation.py | 10 +- stripe/tax/_calculation_service.py | 7 +- stripe/tax/_transaction.py | 3 +- .../issuing/_authorization_service.py | 469 +++++++++++- .../issuing/_transaction_service.py | 274 ++++++- tests/test_generated_examples.py | 48 +- 30 files changed, 1846 insertions(+), 153 deletions(-) delete mode 100644 stripe/_platform_tax_fee.py delete mode 100644 stripe/api_resources/platform_tax_fee.py diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index eeeff1529..ef0925653 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1083 \ No newline at end of file +v1094 \ No newline at end of file diff --git a/stripe/__init__.py b/stripe/__init__.py index 10b4feefc..e8d3e8578 100644 --- a/stripe/__init__.py +++ b/stripe/__init__.py @@ -423,7 +423,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/_api_version.py b/stripe/_api_version.py index 000e03f4a..3e3f977ff 100644 --- a/stripe/_api_version.py +++ b/stripe/_api_version.py @@ -1,4 +1,4 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec class _ApiVersion: - CURRENT = "2024-04-10" + CURRENT = "2024-06-20" 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/_customer.py b/stripe/_customer.py index c6500dff1..28d8ff286 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_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 fceb346bb..609963f3e 100644 --- a/stripe/_invoice.py +++ b/stripe/_invoice.py @@ -224,6 +224,7 @@ class CustomerTaxId(StripeObject): "ca_pst_mb", "ca_pst_sk", "ca_qst", + "ch_uid", "ch_vat", "cl_tin", "cn_tin", @@ -283,7 +284,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] """ @@ -1812,6 +1813,7 @@ class CreatePreviewParamsCustomerDetailsTaxId(TypedDict): "ca_pst_mb", "ca_pst_sk", "ca_qst", + "ch_uid", "ch_vat", "cl_tin", "cn_tin", @@ -1870,7 +1872,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 """ @@ -3608,6 +3610,7 @@ class UpcomingLinesParamsCustomerDetailsTaxId(TypedDict): "ca_pst_mb", "ca_pst_sk", "ca_qst", + "ch_uid", "ch_vat", "cl_tin", "cn_tin", @@ -3666,7 +3669,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 """ @@ -4741,6 +4744,7 @@ class UpcomingParamsCustomerDetailsTaxId(TypedDict): "ca_pst_mb", "ca_pst_sk", "ca_qst", + "ch_uid", "ch_vat", "cl_tin", "cn_tin", @@ -4799,7 +4803,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 2d1b54e33..41ce4c565 100644 --- a/stripe/_invoice_service.py +++ b/stripe/_invoice_service.py @@ -847,6 +847,7 @@ class CreatePreviewParamsCustomerDetailsTaxId(TypedDict): "ca_pst_mb", "ca_pst_sk", "ca_qst", + "ch_uid", "ch_vat", "cl_tin", "cn_tin", @@ -905,7 +906,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 """ @@ -2040,6 +2041,7 @@ class UpcomingParamsCustomerDetailsTaxId(TypedDict): "ca_pst_mb", "ca_pst_sk", "ca_qst", + "ch_uid", "ch_vat", "cl_tin", "cn_tin", @@ -2098,7 +2100,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_upcoming_lines_service.py b/stripe/_invoice_upcoming_lines_service.py index 916bcf090..a8b353801 100644 --- a/stripe/_invoice_upcoming_lines_service.py +++ b/stripe/_invoice_upcoming_lines_service.py @@ -293,6 +293,7 @@ class ListParamsCustomerDetailsTaxId(TypedDict): "ca_pst_mb", "ca_pst_sk", "ca_qst", + "ch_uid", "ch_vat", "cl_tin", "cn_tin", @@ -351,7 +352,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/_object_classes.py b/stripe/_object_classes.py index 5ae5ac434..62daa5bf0 100644 --- a/stripe/_object_classes.py +++ b/stripe/_object_classes.py @@ -83,7 +83,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/_payment_link.py b/stripe/_payment_link.py index 0dea20568..2e83eeadb 100644 --- a/stripe/_payment_link.py +++ b/stripe/_payment_link.py @@ -1536,7 +1536,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): @@ -2316,7 +2316,7 @@ class ModifyParamsSubscriptionDataTrialSettingsEndBehavior(TypedDict): class ModifyParamsTaxIdCollection(TypedDict): enabled: bool """ - Set to `true` to enable tax ID collection. + Enable tax ID collection during checkout. Defaults to `false`. """ class RetrieveParams(RequestOptions): diff --git a/stripe/_payment_link_service.py b/stripe/_payment_link_service.py index 771f8b27f..f9a83c5be 100644 --- a/stripe/_payment_link_service.py +++ b/stripe/_payment_link_service.py @@ -888,7 +888,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): @@ -1666,7 +1666,7 @@ class UpdateParamsSubscriptionDataTrialSettingsEndBehavior(TypedDict): class UpdateParamsTaxIdCollection(TypedDict): enabled: bool """ - Set to `true` to enable tax ID collection. + Enable tax ID collection during checkout. Defaults to `false`. """ def list( 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/_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 4b32c05f8..a8d934cb8 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 2a97e832c..7b3c2c745 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 46233b160..73e6b55f7 100644 --- a/stripe/api_resources/__init__.py +++ b/stripe/api_resources/__init__.py @@ -92,7 +92,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/checkout/_session.py b/stripe/checkout/_session.py index 6122ec416..7b1f3ed88 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] """ @@ -1861,7 +1862,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"]] """ @@ -3653,7 +3654,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 a64338c94..a2b09b0eb 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"]] """ @@ -2174,7 +2174,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/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 0d4ad60a2..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", 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/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 02e9cb3f2..64b304971 100644 --- a/tests/test_generated_examples.py +++ b/tests/test_generated_examples.py @@ -26039,7 +26039,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": [ @@ -26057,7 +26057,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( @@ -26098,7 +26098,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": [ @@ -26118,7 +26118,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 @@ -26150,7 +26150,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": [ @@ -26168,7 +26168,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 @@ -26210,7 +26210,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": [ @@ -26230,7 +26230,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( @@ -27133,7 +27133,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": [ @@ -27151,7 +27151,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( @@ -27202,7 +27202,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": [ @@ -27222,7 +27222,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 @@ -27265,7 +27265,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": [ @@ -27284,7 +27284,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 @@ -27336,7 +27336,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": [ @@ -27356,7 +27356,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( @@ -27397,7 +27397,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": [ @@ -27415,7 +27415,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( @@ -27466,7 +27466,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": [ @@ -27486,7 +27486,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 @@ -27528,7 +27528,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": [ @@ -27546,7 +27546,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 @@ -27598,7 +27598,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": [ @@ -27618,7 +27618,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( From 40a0d634f3725950258c0428dccdc146b96a82e1 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Mon, 24 Jun 2024 18:50:59 +0000 Subject: [PATCH 2/2] Update generated code for v1095 --- OPENAPI_VERSION | 2 +- stripe/_capability.py | 36 +++++++++++++++++++++++++++++------- 2 files changed, 30 insertions(+), 8 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index ef0925653..eb43ae0c9 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1094 \ No newline at end of file +v1095 \ No newline at end of file diff --git a/stripe/_capability.py b/stripe/_capability.py index 53ca37edd..3c8670d29 100644 --- a/stripe/_capability.py +++ b/stripe/_capability.py @@ -145,7 +145,20 @@ 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. """ @@ -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] """