From 3ccb76820abd2c973d8b0090e76040afb2bc33be Mon Sep 17 00:00:00 2001 From: "stripe-openapi[bot]" <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Thu, 20 Jul 2023 17:19:23 +0000 Subject: [PATCH] Update generated code for beta (#1690) * Update generated code for v417 * Update generated code for v418 * Update generated code for v419 * Update generated code for v420 * Update generated code for v421 * Update generated code for v422 * Update generated code for v423 * Update generated code for v423 * Update generated code for v424 * Update generated code for v425 * Update generated code for v425 * Update generated code (#1691) * Update generated code for v418 * Update generated code for v419 * Update generated code for v420 * Update generated code for v421 * Update generated code for v423 * Update generated code for v424 * Update generated code for v425 --------- Co-authored-by: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> * Bump version to 74.27.0 --------- Co-authored-by: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Co-authored-by: Pavel Krymets Co-authored-by: pakrym-stripe <99349468+pakrym-stripe@users.noreply.github.com> --- CHANGELOG.md | 16 ++++++- OPENAPI_VERSION | 2 +- api_version.go | 2 +- balance.go | 2 +- checkout_session.go | 5 +- customer.go | 2 +- customercashbalancetransaction.go | 4 +- example/generated_examples_test.go | 6 +-- invoice.go | 6 +-- order.go | 73 ++++++++++++++---------------- quote.go | 6 +-- quote/client.go | 30 ++++++------ quotephase.go | 33 ++++++-------- setupintent.go | 4 ++ shippingrate.go | 5 +- tax_calculation.go | 7 +-- tax_transaction.go | 5 +- taxid.go | 7 +-- taxrate.go | 1 + terminal_reader.go | 4 ++ 20 files changed, 119 insertions(+), 101 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 81f14f0aec..951940fafa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,20 @@ # Changelog +## 74.27.0 - 2023-07-20 +* [#1691](https://github.com/stripe/stripe-go/pull/1691) Update generated code + * Add support for new value `ro_tin` on enums `CheckoutSessionCustomerDetailsTaxIdsType`, `InvoiceCustomerTaxIdsType`, `TaxCalculationCustomerDetailsTaxIdsType`, and `TaxTransactionCustomerDetailsTaxIdsType` + * Remove support for values `excluded_territory`, `jurisdiction_unsupported`, and `vat_exempt` from enums `CheckoutSessionShippingCostTaxesTaxabilityReason`, `CheckoutSessionTotalDetailsBreakdownTaxesTaxabilityReason`, `CreditNoteShippingCostTaxesTaxabilityReason`, `InvoiceShippingCostTaxesTaxabilityReason`, `LineItemTaxesTaxabilityReason`, `QuoteComputedRecurringTotalDetailsBreakdownTaxesTaxabilityReason`, `QuoteComputedUpfrontTotalDetailsBreakdownTaxesTaxabilityReason`, and `QuoteTotalDetailsBreakdownTaxesTaxabilityReason` + * Add support for `UseStripeSDK` on `SetupIntentConfirmParams` and `SetupIntentParams` + * Add support for new value `service_tax` on enum `TaxRateTaxType` +* [#1688](https://github.com/stripe/stripe-go/pull/1688) Update generated code + * Add support for new resource `Tax.Settings` + * Add support for `Get` and `Update` methods on resource `Settings` + * Add support for new value `invalid_tax_location` on enums `InvoiceLastFinalizationErrorCode`, `PaymentIntentLastPaymentErrorCode`, `SetupAttemptSetupErrorCode`, `SetupIntentLastSetupErrorCode`, and `StripeErrorCode` + * Add support for `OrderID` on `ChargePaymentMethodDetailsAfterpayClearpay` + * Add support for `AllowRedirects` on `PaymentIntentAutomaticPaymentMethodsParams`, `PaymentIntentAutomaticPaymentMethods`, `SetupIntentAutomaticPaymentMethodsParams`, and `SetupIntentAutomaticPaymentMethods` + * Add support for new values `amusement_tax` and `communications_tax` on enums `TaxCalculationLineItemTaxBreakdownTaxRateDetailsTaxType`, `TaxCalculationShippingCostTaxBreakdownTaxRateDetailsTaxType`, `TaxCalculationTaxBreakdownTaxRateDetailsTaxType`, and `TaxTransactionShippingCostTaxBreakdownTaxRateDetailsTaxType` + * Add support for `Product` on `TaxTransactionLineItem` + ## 74.27.0-beta.1 - 2023-07-13 * [#1689](https://github.com/stripe/stripe-go/pull/1689) Update generated code for beta Release specs are identical. @@ -10,7 +25,6 @@ * Add support for `PaymentMethodConfigurationDetails` on `PaymentIntent` * [#1685](https://github.com/stripe/stripe-go/pull/1685) Update generated code for beta - ## 74.26.0 - 2023-07-13 * [#1688](https://github.com/stripe/stripe-go/pull/1688) Update generated code * Add support for new resource `Tax.Settings` diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index bfd5e01b8b..ae2bb14615 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v417 \ No newline at end of file +v425 \ No newline at end of file diff --git a/api_version.go b/api_version.go index 5bde501ed5..379f214ff0 100644 --- a/api_version.go +++ b/api_version.go @@ -8,5 +8,5 @@ package stripe const ( apiVersion string = "2022-11-15" - previewVersion string = "20230712T200515" + previewVersion string = "2023-07-13.preview-v2" ) diff --git a/balance.go b/balance.go index 12bed429bc..5f65960a3d 100644 --- a/balance.go +++ b/balance.go @@ -60,6 +60,6 @@ type Balance struct { Livemode bool `json:"livemode"` // String representing the object's type. Objects of the same type share the same value. Object string `json:"object"` - // Funds that are not yet available in the balance, due to the 7-day rolling pay cycle. The pending balance for each currency, and for each payment type, can be found in the `source_types` property. + // Funds that are not yet available in the balance. The pending balance for each currency, and for each payment type, can be found in the `source_types` property. Pending []*Amount `json:"pending"` } diff --git a/checkout_session.go b/checkout_session.go index ab8601ac36..2ffb9f3fc2 100644 --- a/checkout_session.go +++ b/checkout_session.go @@ -100,7 +100,7 @@ const ( CheckoutSessionCustomerDetailsTaxExemptReverse CheckoutSessionCustomerDetailsTaxExempt = "reverse" ) -// 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`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `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`, 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`, `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`, or `unknown` type CheckoutSessionCustomerDetailsTaxIDType string // List of values that CheckoutSessionCustomerDetailsTaxIDType can take @@ -153,6 +153,7 @@ const ( CheckoutSessionCustomerDetailsTaxIDTypeNZGST CheckoutSessionCustomerDetailsTaxIDType = "nz_gst" CheckoutSessionCustomerDetailsTaxIDTypePERUC CheckoutSessionCustomerDetailsTaxIDType = "pe_ruc" CheckoutSessionCustomerDetailsTaxIDTypePHTIN CheckoutSessionCustomerDetailsTaxIDType = "ph_tin" + CheckoutSessionCustomerDetailsTaxIDTypeROTIN CheckoutSessionCustomerDetailsTaxIDType = "ro_tin" CheckoutSessionCustomerDetailsTaxIDTypeRSPIB CheckoutSessionCustomerDetailsTaxIDType = "rs_pib" CheckoutSessionCustomerDetailsTaxIDTypeRUINN CheckoutSessionCustomerDetailsTaxIDType = "ru_inn" CheckoutSessionCustomerDetailsTaxIDTypeRUKPP CheckoutSessionCustomerDetailsTaxIDType = "ru_kpp" @@ -1887,7 +1888,7 @@ type CheckoutSessionCustomText struct { // The customer's tax IDs after a completed Checkout Session. type CheckoutSessionCustomerDetailsTaxID struct { - // 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`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `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`, 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`, `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`, or `unknown` Type CheckoutSessionCustomerDetailsTaxIDType `json:"type"` // The value of the tax ID. Value string `json:"value"` diff --git a/customer.go b/customer.go index efe5585f35..33cdffaffd 100644 --- a/customer.go +++ b/customer.go @@ -119,7 +119,7 @@ type CustomerTaxParams struct { // The customer's tax IDs. type CustomerTaxIDDataParams struct { - // Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `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`, `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`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `no_vat`, `nz_gst`, `pe_ruc`, `ph_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`, `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`, `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`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `no_vat`, `nz_gst`, `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 *string `form:"type"` // Value of the tax ID. Value *string `form:"value"` diff --git a/customercashbalancetransaction.go b/customercashbalancetransaction.go index 3b9db3f256..69709b9ead 100644 --- a/customercashbalancetransaction.go +++ b/customercashbalancetransaction.go @@ -28,7 +28,7 @@ const ( CustomerCashBalanceTransactionFundedBankTransferUSBankTransferNetworkSwift CustomerCashBalanceTransactionFundedBankTransferUSBankTransferNetwork = "swift" ) -// The type of the cash balance transaction. One of `applied_to_payment`, `unapplied_from_payment`, `refunded_from_payment`, `funded`, `return_initiated`, or `return_canceled`. New types may be added in future. See [Customer Balance](https://stripe.com/docs/payments/customer-balance#types) to learn more about these types. +// The type of the cash balance transaction. New types may be added in future. See [Customer Balance](https://stripe.com/docs/payments/customer-balance#types) to learn more about these types. type CustomerCashBalanceTransactionType string // List of values that CustomerCashBalanceTransactionType can take @@ -134,7 +134,7 @@ type CustomerCashBalanceTransaction struct { // String representing the object's type. Objects of the same type share the same value. Object string `json:"object"` RefundedFromPayment *CustomerCashBalanceTransactionRefundedFromPayment `json:"refunded_from_payment"` - // The type of the cash balance transaction. One of `applied_to_payment`, `unapplied_from_payment`, `refunded_from_payment`, `funded`, `return_initiated`, or `return_canceled`. New types may be added in future. See [Customer Balance](https://stripe.com/docs/payments/customer-balance#types) to learn more about these types. + // The type of the cash balance transaction. New types may be added in future. See [Customer Balance](https://stripe.com/docs/payments/customer-balance#types) to learn more about these types. Type CustomerCashBalanceTransactionType `json:"type"` UnappliedFromPayment *CustomerCashBalanceTransactionUnappliedFromPayment `json:"unapplied_from_payment"` } diff --git a/example/generated_examples_test.go b/example/generated_examples_test.go index 7285f2b3cc..ebcf8c9dfb 100644 --- a/example/generated_examples_test.go +++ b/example/generated_examples_test.go @@ -3204,12 +3204,12 @@ func TestTaxCalculationListLineItems(t *testing.T) { assert.Nil(t, result.Err()) } -func TestQuotePreviewInvoiceLines(t *testing.T) { - params := &stripe.QuotePreviewInvoiceLinesParams{ +func TestQuoteListPreviewInvoiceLines(t *testing.T) { + params := &stripe.QuoteListPreviewInvoiceLinesParams{ Quote: stripe.String("qt_xyz"), PreviewInvoice: stripe.String("in_xyz"), } - result := quote.PreviewInvoiceLines(params) + result := quote.ListPreviewInvoiceLines(params) assert.NotNil(t, result) assert.Nil(t, result.Err()) } diff --git a/invoice.go b/invoice.go index 8a6ef1a0c4..c10b63a757 100644 --- a/invoice.go +++ b/invoice.go @@ -260,7 +260,7 @@ type InvoiceUpcomingCustomerDetailsTaxParams struct { // The customer's tax IDs. type InvoiceUpcomingCustomerDetailsTaxIDParams struct { - // Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `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`, `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`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `no_vat`, `nz_gst`, `pe_ruc`, `ph_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`, `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`, `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`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `no_vat`, `nz_gst`, `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 *string `form:"type"` // Value of the tax ID. Value *string `form:"value"` @@ -763,7 +763,7 @@ type InvoiceUpcomingLinesCustomerDetailsTaxParams struct { // The customer's tax IDs. type InvoiceUpcomingLinesCustomerDetailsTaxIDParams struct { - // Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `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`, `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`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `no_vat`, `nz_gst`, `pe_ruc`, `ph_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`, `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`, `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`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `no_vat`, `nz_gst`, `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 *string `form:"type"` // Value of the tax ID. Value *string `form:"value"` @@ -1131,7 +1131,7 @@ type InvoiceCustomField struct { // The customer's tax IDs. Until the invoice is finalized, this field will contain the same tax IDs as `customer.tax_ids`. Once the invoice is finalized, this field will no longer be updated. type InvoiceCustomerTaxID struct { - // 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`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `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`, 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`, `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`, or `unknown` Type *TaxIDType `json:"type"` // The value of the tax ID. Value string `json:"value"` diff --git a/order.go b/order.go index 083f1fc7f5..75430bd4fa 100644 --- a/order.go +++ b/order.go @@ -425,24 +425,21 @@ type OrderShippingCostTaxTaxabilityReason string // List of values that OrderShippingCostTaxTaxabilityReason can take const ( - OrderShippingCostTaxTaxabilityReasonCustomerExempt OrderShippingCostTaxTaxabilityReason = "customer_exempt" - OrderShippingCostTaxTaxabilityReasonExcludedTerritory OrderShippingCostTaxTaxabilityReason = "excluded_territory" - OrderShippingCostTaxTaxabilityReasonJurisdictionUnsupported OrderShippingCostTaxTaxabilityReason = "jurisdiction_unsupported" - OrderShippingCostTaxTaxabilityReasonNotCollecting OrderShippingCostTaxTaxabilityReason = "not_collecting" - OrderShippingCostTaxTaxabilityReasonNotSubjectToTax OrderShippingCostTaxTaxabilityReason = "not_subject_to_tax" - OrderShippingCostTaxTaxabilityReasonNotSupported OrderShippingCostTaxTaxabilityReason = "not_supported" - OrderShippingCostTaxTaxabilityReasonPortionProductExempt OrderShippingCostTaxTaxabilityReason = "portion_product_exempt" - OrderShippingCostTaxTaxabilityReasonPortionReducedRated OrderShippingCostTaxTaxabilityReason = "portion_reduced_rated" - OrderShippingCostTaxTaxabilityReasonPortionStandardRated OrderShippingCostTaxTaxabilityReason = "portion_standard_rated" - OrderShippingCostTaxTaxabilityReasonProductExempt OrderShippingCostTaxTaxabilityReason = "product_exempt" - OrderShippingCostTaxTaxabilityReasonProductExemptHoliday OrderShippingCostTaxTaxabilityReason = "product_exempt_holiday" - OrderShippingCostTaxTaxabilityReasonProportionallyRated OrderShippingCostTaxTaxabilityReason = "proportionally_rated" - OrderShippingCostTaxTaxabilityReasonReducedRated OrderShippingCostTaxTaxabilityReason = "reduced_rated" - OrderShippingCostTaxTaxabilityReasonReverseCharge OrderShippingCostTaxTaxabilityReason = "reverse_charge" - OrderShippingCostTaxTaxabilityReasonStandardRated OrderShippingCostTaxTaxabilityReason = "standard_rated" - OrderShippingCostTaxTaxabilityReasonTaxableBasisReduced OrderShippingCostTaxTaxabilityReason = "taxable_basis_reduced" - OrderShippingCostTaxTaxabilityReasonVATExempt OrderShippingCostTaxTaxabilityReason = "vat_exempt" - OrderShippingCostTaxTaxabilityReasonZeroRated OrderShippingCostTaxTaxabilityReason = "zero_rated" + OrderShippingCostTaxTaxabilityReasonCustomerExempt OrderShippingCostTaxTaxabilityReason = "customer_exempt" + OrderShippingCostTaxTaxabilityReasonNotCollecting OrderShippingCostTaxTaxabilityReason = "not_collecting" + OrderShippingCostTaxTaxabilityReasonNotSubjectToTax OrderShippingCostTaxTaxabilityReason = "not_subject_to_tax" + OrderShippingCostTaxTaxabilityReasonNotSupported OrderShippingCostTaxTaxabilityReason = "not_supported" + OrderShippingCostTaxTaxabilityReasonPortionProductExempt OrderShippingCostTaxTaxabilityReason = "portion_product_exempt" + OrderShippingCostTaxTaxabilityReasonPortionReducedRated OrderShippingCostTaxTaxabilityReason = "portion_reduced_rated" + OrderShippingCostTaxTaxabilityReasonPortionStandardRated OrderShippingCostTaxTaxabilityReason = "portion_standard_rated" + OrderShippingCostTaxTaxabilityReasonProductExempt OrderShippingCostTaxTaxabilityReason = "product_exempt" + OrderShippingCostTaxTaxabilityReasonProductExemptHoliday OrderShippingCostTaxTaxabilityReason = "product_exempt_holiday" + OrderShippingCostTaxTaxabilityReasonProportionallyRated OrderShippingCostTaxTaxabilityReason = "proportionally_rated" + OrderShippingCostTaxTaxabilityReasonReducedRated OrderShippingCostTaxTaxabilityReason = "reduced_rated" + OrderShippingCostTaxTaxabilityReasonReverseCharge OrderShippingCostTaxTaxabilityReason = "reverse_charge" + OrderShippingCostTaxTaxabilityReasonStandardRated OrderShippingCostTaxTaxabilityReason = "standard_rated" + OrderShippingCostTaxTaxabilityReasonTaxableBasisReduced OrderShippingCostTaxTaxabilityReason = "taxable_basis_reduced" + OrderShippingCostTaxTaxabilityReasonZeroRated OrderShippingCostTaxTaxabilityReason = "zero_rated" ) // The overall status of the order. @@ -467,7 +464,7 @@ const ( OrderTaxDetailsTaxExemptReverse OrderTaxDetailsTaxExempt = "reverse" ) -// 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`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `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`, 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`, `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`, or `unknown` type OrderTaxDetailsTaxIDType string // List of values that OrderTaxDetailsTaxIDType can take @@ -520,6 +517,7 @@ const ( OrderTaxDetailsTaxIDTypeNZGST OrderTaxDetailsTaxIDType = "nz_gst" OrderTaxDetailsTaxIDTypePERUC OrderTaxDetailsTaxIDType = "pe_ruc" OrderTaxDetailsTaxIDTypePHTIN OrderTaxDetailsTaxIDType = "ph_tin" + OrderTaxDetailsTaxIDTypeROTIN OrderTaxDetailsTaxIDType = "ro_tin" OrderTaxDetailsTaxIDTypeRSPIB OrderTaxDetailsTaxIDType = "rs_pib" OrderTaxDetailsTaxIDTypeRUINN OrderTaxDetailsTaxIDType = "ru_inn" OrderTaxDetailsTaxIDTypeRUKPP OrderTaxDetailsTaxIDType = "ru_kpp" @@ -545,24 +543,21 @@ type OrderTotalDetailsBreakdownTaxTaxabilityReason string // List of values that OrderTotalDetailsBreakdownTaxTaxabilityReason can take const ( - OrderTotalDetailsBreakdownTaxTaxabilityReasonCustomerExempt OrderTotalDetailsBreakdownTaxTaxabilityReason = "customer_exempt" - OrderTotalDetailsBreakdownTaxTaxabilityReasonExcludedTerritory OrderTotalDetailsBreakdownTaxTaxabilityReason = "excluded_territory" - OrderTotalDetailsBreakdownTaxTaxabilityReasonJurisdictionUnsupported OrderTotalDetailsBreakdownTaxTaxabilityReason = "jurisdiction_unsupported" - OrderTotalDetailsBreakdownTaxTaxabilityReasonNotCollecting OrderTotalDetailsBreakdownTaxTaxabilityReason = "not_collecting" - OrderTotalDetailsBreakdownTaxTaxabilityReasonNotSubjectToTax OrderTotalDetailsBreakdownTaxTaxabilityReason = "not_subject_to_tax" - OrderTotalDetailsBreakdownTaxTaxabilityReasonNotSupported OrderTotalDetailsBreakdownTaxTaxabilityReason = "not_supported" - OrderTotalDetailsBreakdownTaxTaxabilityReasonPortionProductExempt OrderTotalDetailsBreakdownTaxTaxabilityReason = "portion_product_exempt" - OrderTotalDetailsBreakdownTaxTaxabilityReasonPortionReducedRated OrderTotalDetailsBreakdownTaxTaxabilityReason = "portion_reduced_rated" - OrderTotalDetailsBreakdownTaxTaxabilityReasonPortionStandardRated OrderTotalDetailsBreakdownTaxTaxabilityReason = "portion_standard_rated" - OrderTotalDetailsBreakdownTaxTaxabilityReasonProductExempt OrderTotalDetailsBreakdownTaxTaxabilityReason = "product_exempt" - OrderTotalDetailsBreakdownTaxTaxabilityReasonProductExemptHoliday OrderTotalDetailsBreakdownTaxTaxabilityReason = "product_exempt_holiday" - OrderTotalDetailsBreakdownTaxTaxabilityReasonProportionallyRated OrderTotalDetailsBreakdownTaxTaxabilityReason = "proportionally_rated" - OrderTotalDetailsBreakdownTaxTaxabilityReasonReducedRated OrderTotalDetailsBreakdownTaxTaxabilityReason = "reduced_rated" - OrderTotalDetailsBreakdownTaxTaxabilityReasonReverseCharge OrderTotalDetailsBreakdownTaxTaxabilityReason = "reverse_charge" - OrderTotalDetailsBreakdownTaxTaxabilityReasonStandardRated OrderTotalDetailsBreakdownTaxTaxabilityReason = "standard_rated" - OrderTotalDetailsBreakdownTaxTaxabilityReasonTaxableBasisReduced OrderTotalDetailsBreakdownTaxTaxabilityReason = "taxable_basis_reduced" - OrderTotalDetailsBreakdownTaxTaxabilityReasonVATExempt OrderTotalDetailsBreakdownTaxTaxabilityReason = "vat_exempt" - OrderTotalDetailsBreakdownTaxTaxabilityReasonZeroRated OrderTotalDetailsBreakdownTaxTaxabilityReason = "zero_rated" + OrderTotalDetailsBreakdownTaxTaxabilityReasonCustomerExempt OrderTotalDetailsBreakdownTaxTaxabilityReason = "customer_exempt" + OrderTotalDetailsBreakdownTaxTaxabilityReasonNotCollecting OrderTotalDetailsBreakdownTaxTaxabilityReason = "not_collecting" + OrderTotalDetailsBreakdownTaxTaxabilityReasonNotSubjectToTax OrderTotalDetailsBreakdownTaxTaxabilityReason = "not_subject_to_tax" + OrderTotalDetailsBreakdownTaxTaxabilityReasonNotSupported OrderTotalDetailsBreakdownTaxTaxabilityReason = "not_supported" + OrderTotalDetailsBreakdownTaxTaxabilityReasonPortionProductExempt OrderTotalDetailsBreakdownTaxTaxabilityReason = "portion_product_exempt" + OrderTotalDetailsBreakdownTaxTaxabilityReasonPortionReducedRated OrderTotalDetailsBreakdownTaxTaxabilityReason = "portion_reduced_rated" + OrderTotalDetailsBreakdownTaxTaxabilityReasonPortionStandardRated OrderTotalDetailsBreakdownTaxTaxabilityReason = "portion_standard_rated" + OrderTotalDetailsBreakdownTaxTaxabilityReasonProductExempt OrderTotalDetailsBreakdownTaxTaxabilityReason = "product_exempt" + OrderTotalDetailsBreakdownTaxTaxabilityReasonProductExemptHoliday OrderTotalDetailsBreakdownTaxTaxabilityReason = "product_exempt_holiday" + OrderTotalDetailsBreakdownTaxTaxabilityReasonProportionallyRated OrderTotalDetailsBreakdownTaxTaxabilityReason = "proportionally_rated" + OrderTotalDetailsBreakdownTaxTaxabilityReasonReducedRated OrderTotalDetailsBreakdownTaxTaxabilityReason = "reduced_rated" + OrderTotalDetailsBreakdownTaxTaxabilityReasonReverseCharge OrderTotalDetailsBreakdownTaxTaxabilityReason = "reverse_charge" + OrderTotalDetailsBreakdownTaxTaxabilityReasonStandardRated OrderTotalDetailsBreakdownTaxTaxabilityReason = "standard_rated" + OrderTotalDetailsBreakdownTaxTaxabilityReasonTaxableBasisReduced OrderTotalDetailsBreakdownTaxTaxabilityReason = "taxable_basis_reduced" + OrderTotalDetailsBreakdownTaxTaxabilityReasonZeroRated OrderTotalDetailsBreakdownTaxTaxabilityReason = "zero_rated" ) // Settings for automatic tax calculation for this order. @@ -1123,7 +1118,7 @@ type OrderShippingDetailsParams struct { // The purchaser's tax IDs to be used for this order. type OrderTaxDetailsTaxIDParams struct { - // Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `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`, `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`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `no_vat`, `nz_gst`, `pe_ruc`, `ph_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`, `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`, `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`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `no_vat`, `nz_gst`, `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 *string `form:"type"` // Value of the tax ID. Value *string `form:"value"` @@ -1522,7 +1517,7 @@ type OrderShippingDetails struct { // The purchaser's tax IDs to be used in calculation of tax for this Order. type OrderTaxDetailsTaxID struct { - // 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`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `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`, 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`, `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`, or `unknown` Type OrderTaxDetailsTaxIDType `json:"type"` // The value of the tax ID. Value string `json:"value"` diff --git a/quote.go b/quote.go index 365f5d9eca..2adcb39be2 100644 --- a/quote.go +++ b/quote.go @@ -1108,20 +1108,20 @@ type QuoteListComputedUpfrontLineItemsParams struct { } // Preview the invoices that would be generated by accepting the quote. -type QuotePreviewInvoicesParams struct { +type QuoteListPreviewInvoicesParams struct { ListParams `form:"*"` Quote *string `form:"-"` // Included in URL } // Preview the invoice line items that would be generated by accepting the quote. -type QuotePreviewInvoiceLinesParams struct { +type QuoteListPreviewInvoiceLinesParams struct { ListParams `form:"*"` PreviewInvoice *string `form:"-"` // Included in URL Quote *string `form:"-"` // Included in URL } // Preview the schedules that would be generated by accepting the quote -type QuotePreviewSubscriptionSchedulesParams struct { +type QuoteListPreviewSubscriptionSchedulesParams struct { ListParams `form:"*"` Quote *string `form:"-"` // Included in URL } diff --git a/quote/client.go b/quote/client.go index 8b8ca43d43..b700714729 100644 --- a/quote/client.go +++ b/quote/client.go @@ -301,13 +301,13 @@ func (i *LineIter) QuoteLineList() *stripe.QuoteLineList { return i.List().(*stripe.QuoteLineList) } -// PreviewInvoiceLines is the method for the `GET /v1/quotes/{quote}/preview_invoices/{preview_invoice}/lines` API. -func PreviewInvoiceLines(params *stripe.QuotePreviewInvoiceLinesParams) *InvoiceLineItemIter { - return getC().PreviewInvoiceLines(params) +// ListPreviewInvoiceLines is the method for the `GET /v1/quotes/{quote}/preview_invoices/{preview_invoice}/lines` API. +func ListPreviewInvoiceLines(params *stripe.QuoteListPreviewInvoiceLinesParams) *InvoiceLineItemIter { + return getC().ListPreviewInvoiceLines(params) } -// PreviewInvoiceLines is the method for the `GET /v1/quotes/{quote}/preview_invoices/{preview_invoice}/lines` API. -func (c Client) PreviewInvoiceLines(listParams *stripe.QuotePreviewInvoiceLinesParams) *InvoiceLineItemIter { +// ListPreviewInvoiceLines is the method for the `GET /v1/quotes/{quote}/preview_invoices/{preview_invoice}/lines` API. +func (c Client) ListPreviewInvoiceLines(listParams *stripe.QuoteListPreviewInvoiceLinesParams) *InvoiceLineItemIter { path := stripe.FormatURLPath( "/v1/quotes/%s/preview_invoices/%s/lines", stripe.StringValue(listParams.Quote), @@ -345,13 +345,13 @@ func (i *InvoiceLineItemIter) InvoiceLineItemList() *stripe.InvoiceLineItemList return i.List().(*stripe.InvoiceLineItemList) } -// PreviewInvoices is the method for the `GET /v1/quotes/{quote}/preview_invoices` API. -func PreviewInvoices(params *stripe.QuotePreviewInvoicesParams) *InvoiceIter { - return getC().PreviewInvoices(params) +// ListPreviewInvoices is the method for the `GET /v1/quotes/{quote}/preview_invoices` API. +func ListPreviewInvoices(params *stripe.QuoteListPreviewInvoicesParams) *InvoiceIter { + return getC().ListPreviewInvoices(params) } -// PreviewInvoices is the method for the `GET /v1/quotes/{quote}/preview_invoices` API. -func (c Client) PreviewInvoices(listParams *stripe.QuotePreviewInvoicesParams) *InvoiceIter { +// ListPreviewInvoices is the method for the `GET /v1/quotes/{quote}/preview_invoices` API. +func (c Client) ListPreviewInvoices(listParams *stripe.QuoteListPreviewInvoicesParams) *InvoiceIter { path := stripe.FormatURLPath( "/v1/quotes/%s/preview_invoices", stripe.StringValue(listParams.Quote), @@ -388,13 +388,13 @@ func (i *InvoiceIter) InvoiceList() *stripe.InvoiceList { return i.List().(*stripe.InvoiceList) } -// PreviewSubscriptionSchedules is the method for the `GET /v1/quotes/{quote}/preview_subscription_schedules` API. -func PreviewSubscriptionSchedules(params *stripe.QuotePreviewSubscriptionSchedulesParams) *SubscriptionScheduleIter { - return getC().PreviewSubscriptionSchedules(params) +// ListPreviewSubscriptionSchedules is the method for the `GET /v1/quotes/{quote}/preview_subscription_schedules` API. +func ListPreviewSubscriptionSchedules(params *stripe.QuoteListPreviewSubscriptionSchedulesParams) *SubscriptionScheduleIter { + return getC().ListPreviewSubscriptionSchedules(params) } -// PreviewSubscriptionSchedules is the method for the `GET /v1/quotes/{quote}/preview_subscription_schedules` API. -func (c Client) PreviewSubscriptionSchedules(listParams *stripe.QuotePreviewSubscriptionSchedulesParams) *SubscriptionScheduleIter { +// ListPreviewSubscriptionSchedules is the method for the `GET /v1/quotes/{quote}/preview_subscription_schedules` API. +func (c Client) ListPreviewSubscriptionSchedules(listParams *stripe.QuoteListPreviewSubscriptionSchedulesParams) *SubscriptionScheduleIter { path := stripe.FormatURLPath( "/v1/quotes/%s/preview_subscription_schedules", stripe.StringValue(listParams.Quote), diff --git a/quotephase.go b/quotephase.go index a24b656ce5..25fdd6e189 100644 --- a/quotephase.go +++ b/quotephase.go @@ -38,24 +38,21 @@ type QuotePhaseTotalDetailsBreakdownTaxTaxabilityReason string // List of values that QuotePhaseTotalDetailsBreakdownTaxTaxabilityReason can take const ( - QuotePhaseTotalDetailsBreakdownTaxTaxabilityReasonCustomerExempt QuotePhaseTotalDetailsBreakdownTaxTaxabilityReason = "customer_exempt" - QuotePhaseTotalDetailsBreakdownTaxTaxabilityReasonExcludedTerritory QuotePhaseTotalDetailsBreakdownTaxTaxabilityReason = "excluded_territory" - QuotePhaseTotalDetailsBreakdownTaxTaxabilityReasonJurisdictionUnsupported QuotePhaseTotalDetailsBreakdownTaxTaxabilityReason = "jurisdiction_unsupported" - QuotePhaseTotalDetailsBreakdownTaxTaxabilityReasonNotCollecting QuotePhaseTotalDetailsBreakdownTaxTaxabilityReason = "not_collecting" - QuotePhaseTotalDetailsBreakdownTaxTaxabilityReasonNotSubjectToTax QuotePhaseTotalDetailsBreakdownTaxTaxabilityReason = "not_subject_to_tax" - QuotePhaseTotalDetailsBreakdownTaxTaxabilityReasonNotSupported QuotePhaseTotalDetailsBreakdownTaxTaxabilityReason = "not_supported" - QuotePhaseTotalDetailsBreakdownTaxTaxabilityReasonPortionProductExempt QuotePhaseTotalDetailsBreakdownTaxTaxabilityReason = "portion_product_exempt" - QuotePhaseTotalDetailsBreakdownTaxTaxabilityReasonPortionReducedRated QuotePhaseTotalDetailsBreakdownTaxTaxabilityReason = "portion_reduced_rated" - QuotePhaseTotalDetailsBreakdownTaxTaxabilityReasonPortionStandardRated QuotePhaseTotalDetailsBreakdownTaxTaxabilityReason = "portion_standard_rated" - QuotePhaseTotalDetailsBreakdownTaxTaxabilityReasonProductExempt QuotePhaseTotalDetailsBreakdownTaxTaxabilityReason = "product_exempt" - QuotePhaseTotalDetailsBreakdownTaxTaxabilityReasonProductExemptHoliday QuotePhaseTotalDetailsBreakdownTaxTaxabilityReason = "product_exempt_holiday" - QuotePhaseTotalDetailsBreakdownTaxTaxabilityReasonProportionallyRated QuotePhaseTotalDetailsBreakdownTaxTaxabilityReason = "proportionally_rated" - QuotePhaseTotalDetailsBreakdownTaxTaxabilityReasonReducedRated QuotePhaseTotalDetailsBreakdownTaxTaxabilityReason = "reduced_rated" - QuotePhaseTotalDetailsBreakdownTaxTaxabilityReasonReverseCharge QuotePhaseTotalDetailsBreakdownTaxTaxabilityReason = "reverse_charge" - QuotePhaseTotalDetailsBreakdownTaxTaxabilityReasonStandardRated QuotePhaseTotalDetailsBreakdownTaxTaxabilityReason = "standard_rated" - QuotePhaseTotalDetailsBreakdownTaxTaxabilityReasonTaxableBasisReduced QuotePhaseTotalDetailsBreakdownTaxTaxabilityReason = "taxable_basis_reduced" - QuotePhaseTotalDetailsBreakdownTaxTaxabilityReasonVATExempt QuotePhaseTotalDetailsBreakdownTaxTaxabilityReason = "vat_exempt" - QuotePhaseTotalDetailsBreakdownTaxTaxabilityReasonZeroRated QuotePhaseTotalDetailsBreakdownTaxTaxabilityReason = "zero_rated" + QuotePhaseTotalDetailsBreakdownTaxTaxabilityReasonCustomerExempt QuotePhaseTotalDetailsBreakdownTaxTaxabilityReason = "customer_exempt" + QuotePhaseTotalDetailsBreakdownTaxTaxabilityReasonNotCollecting QuotePhaseTotalDetailsBreakdownTaxTaxabilityReason = "not_collecting" + QuotePhaseTotalDetailsBreakdownTaxTaxabilityReasonNotSubjectToTax QuotePhaseTotalDetailsBreakdownTaxTaxabilityReason = "not_subject_to_tax" + QuotePhaseTotalDetailsBreakdownTaxTaxabilityReasonNotSupported QuotePhaseTotalDetailsBreakdownTaxTaxabilityReason = "not_supported" + QuotePhaseTotalDetailsBreakdownTaxTaxabilityReasonPortionProductExempt QuotePhaseTotalDetailsBreakdownTaxTaxabilityReason = "portion_product_exempt" + QuotePhaseTotalDetailsBreakdownTaxTaxabilityReasonPortionReducedRated QuotePhaseTotalDetailsBreakdownTaxTaxabilityReason = "portion_reduced_rated" + QuotePhaseTotalDetailsBreakdownTaxTaxabilityReasonPortionStandardRated QuotePhaseTotalDetailsBreakdownTaxTaxabilityReason = "portion_standard_rated" + QuotePhaseTotalDetailsBreakdownTaxTaxabilityReasonProductExempt QuotePhaseTotalDetailsBreakdownTaxTaxabilityReason = "product_exempt" + QuotePhaseTotalDetailsBreakdownTaxTaxabilityReasonProductExemptHoliday QuotePhaseTotalDetailsBreakdownTaxTaxabilityReason = "product_exempt_holiday" + QuotePhaseTotalDetailsBreakdownTaxTaxabilityReasonProportionallyRated QuotePhaseTotalDetailsBreakdownTaxTaxabilityReason = "proportionally_rated" + QuotePhaseTotalDetailsBreakdownTaxTaxabilityReasonReducedRated QuotePhaseTotalDetailsBreakdownTaxTaxabilityReason = "reduced_rated" + QuotePhaseTotalDetailsBreakdownTaxTaxabilityReasonReverseCharge QuotePhaseTotalDetailsBreakdownTaxTaxabilityReason = "reverse_charge" + QuotePhaseTotalDetailsBreakdownTaxTaxabilityReasonStandardRated QuotePhaseTotalDetailsBreakdownTaxTaxabilityReason = "standard_rated" + QuotePhaseTotalDetailsBreakdownTaxTaxabilityReasonTaxableBasisReduced QuotePhaseTotalDetailsBreakdownTaxTaxabilityReason = "taxable_basis_reduced" + QuotePhaseTotalDetailsBreakdownTaxTaxabilityReasonZeroRated QuotePhaseTotalDetailsBreakdownTaxTaxabilityReason = "zero_rated" ) // Returns a list of quote phases. diff --git a/setupintent.go b/setupintent.go index 2e751ca6f1..d43c3c9b2b 100644 --- a/setupintent.go +++ b/setupintent.go @@ -736,6 +736,8 @@ type SetupIntentParams struct { SingleUse *SetupIntentSingleUseParams `form:"single_use"` // Indicates how the payment method is intended to be used in the future. If not provided, this value defaults to `off_session`. Usage *string `form:"usage"` + // Set to `true` when confirming server-side and using Stripe.js, iOS, or Android client-side SDKs to handle the next actions. + UseStripeSDK *bool `form:"use_stripe_sdk"` } // Returns a list of SetupIntents. @@ -1034,6 +1036,8 @@ type SetupIntentConfirmParams struct { // If you'd prefer to redirect to a mobile application, you can alternatively supply an application URI scheme. // This parameter is only used for cards and other redirect-based payment methods. ReturnURL *string `form:"return_url"` + // Set to `true` when confirming server-side and using Stripe.js, iOS, or Android client-side SDKs to handle the next actions. + UseStripeSDK *bool `form:"use_stripe_sdk"` } // A SetupIntent object can be canceled when it is in one of these statuses: requires_payment_method, requires_confirmation, or requires_action. diff --git a/shippingrate.go b/shippingrate.go index e4d3ed976d..31ae48251d 100644 --- a/shippingrate.go +++ b/shippingrate.go @@ -174,9 +174,8 @@ type ShippingRateFixedAmount struct { CurrencyOptions map[string]*ShippingRateFixedAmountCurrencyOptions `json:"currency_options"` } -// Shipping rates describe the price of shipping presented to your customers and can be -// applied to [Checkout Sessions](https://stripe.com/docs/payments/checkout/shipping) -// and [Orders](https://stripe.com/docs/orders/shipping) to collect shipping costs. +// Shipping rates describe the price of shipping presented to your customers and +// applied to a purchase. For more information, see [Charge for shipping](https://stripe.com/docs/payments/during-payment/charge-shipping). type ShippingRate struct { APIResource // Whether the shipping rate can be used for new purchases. Defaults to `true`. diff --git a/tax_calculation.go b/tax_calculation.go index 81822ccdc4..1bfd2d9b56 100644 --- a/tax_calculation.go +++ b/tax_calculation.go @@ -15,7 +15,7 @@ const ( TaxCalculationCustomerDetailsAddressSourceShipping TaxCalculationCustomerDetailsAddressSource = "shipping" ) -// 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`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `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`, 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`, `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`, or `unknown` type TaxCalculationCustomerDetailsTaxIDType string // List of values that TaxCalculationCustomerDetailsTaxIDType can take @@ -68,6 +68,7 @@ const ( TaxCalculationCustomerDetailsTaxIDTypeNZGST TaxCalculationCustomerDetailsTaxIDType = "nz_gst" TaxCalculationCustomerDetailsTaxIDTypePERUC TaxCalculationCustomerDetailsTaxIDType = "pe_ruc" TaxCalculationCustomerDetailsTaxIDTypePHTIN TaxCalculationCustomerDetailsTaxIDType = "ph_tin" + TaxCalculationCustomerDetailsTaxIDTypeROTIN TaxCalculationCustomerDetailsTaxIDType = "ro_tin" TaxCalculationCustomerDetailsTaxIDTypeRSPIB TaxCalculationCustomerDetailsTaxIDType = "rs_pib" TaxCalculationCustomerDetailsTaxIDTypeRUINN TaxCalculationCustomerDetailsTaxIDType = "ru_inn" TaxCalculationCustomerDetailsTaxIDTypeRUKPP TaxCalculationCustomerDetailsTaxIDType = "ru_kpp" @@ -212,7 +213,7 @@ const ( // The customer's tax IDs. type TaxCalculationCustomerDetailsTaxIDParams struct { - // Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `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`, `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`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `no_vat`, `nz_gst`, `pe_ruc`, `ph_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`, `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`, `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`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `no_vat`, `nz_gst`, `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 *string `form:"type"` // Value of the tax ID. Value *string `form:"value"` @@ -285,7 +286,7 @@ type TaxCalculationListLineItemsParams struct { // The customer's tax IDs (for example, EU VAT numbers). type TaxCalculationCustomerDetailsTaxID struct { - // 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`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `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`, 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`, `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`, or `unknown` Type TaxCalculationCustomerDetailsTaxIDType `json:"type"` // The value of the tax ID. Value string `json:"value"` diff --git a/tax_transaction.go b/tax_transaction.go index 3198615e57..20453ffe77 100644 --- a/tax_transaction.go +++ b/tax_transaction.go @@ -15,7 +15,7 @@ const ( TaxTransactionCustomerDetailsAddressSourceShipping TaxTransactionCustomerDetailsAddressSource = "shipping" ) -// 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`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `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`, 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`, `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`, or `unknown` type TaxTransactionCustomerDetailsTaxIDType string // List of values that TaxTransactionCustomerDetailsTaxIDType can take @@ -68,6 +68,7 @@ const ( TaxTransactionCustomerDetailsTaxIDTypeNZGST TaxTransactionCustomerDetailsTaxIDType = "nz_gst" TaxTransactionCustomerDetailsTaxIDTypePERUC TaxTransactionCustomerDetailsTaxIDType = "pe_ruc" TaxTransactionCustomerDetailsTaxIDTypePHTIN TaxTransactionCustomerDetailsTaxIDType = "ph_tin" + TaxTransactionCustomerDetailsTaxIDTypeROTIN TaxTransactionCustomerDetailsTaxIDType = "ro_tin" TaxTransactionCustomerDetailsTaxIDTypeRSPIB TaxTransactionCustomerDetailsTaxIDType = "rs_pib" TaxTransactionCustomerDetailsTaxIDTypeRUINN TaxTransactionCustomerDetailsTaxIDType = "ru_inn" TaxTransactionCustomerDetailsTaxIDTypeRUKPP TaxTransactionCustomerDetailsTaxIDType = "ru_kpp" @@ -239,7 +240,7 @@ type TaxTransactionListLineItemsParams struct { // The customer's tax IDs (for example, EU VAT numbers). type TaxTransactionCustomerDetailsTaxID struct { - // 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`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `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`, 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`, `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`, or `unknown` Type TaxTransactionCustomerDetailsTaxIDType `json:"type"` // The value of the tax ID. Value string `json:"value"` diff --git a/taxid.go b/taxid.go index 0b1bb2bd9f..a5508e9f1f 100644 --- a/taxid.go +++ b/taxid.go @@ -8,7 +8,7 @@ package stripe import "encoding/json" -// Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `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`, `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`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `no_vat`, `nz_gst`, `pe_ruc`, `ph_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`, `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`, `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`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `no_vat`, `nz_gst`, `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 TaxIDType string // List of values that TaxIDType can take @@ -61,6 +61,7 @@ const ( TaxIDTypeNZGST TaxIDType = "nz_gst" TaxIDTypePERUC TaxIDType = "pe_ruc" TaxIDTypePHTIN TaxIDType = "ph_tin" + TaxIDTypeROTIN TaxIDType = "ro_tin" TaxIDTypeRSPIB TaxIDType = "rs_pib" TaxIDTypeRUINN TaxIDType = "ru_inn" TaxIDTypeRUKPP TaxIDType = "ru_kpp" @@ -96,7 +97,7 @@ const ( type TaxIDParams struct { Params `form:"*"` Customer *string `form:"-"` // Included in URL - // Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `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`, `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`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `no_vat`, `nz_gst`, `pe_ruc`, `ph_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`, `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`, `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`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `no_vat`, `nz_gst`, `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 *string `form:"type"` // Value of the tax ID. Value *string `form:"value"` @@ -137,7 +138,7 @@ type TaxID struct { Livemode bool `json:"livemode"` // String representing the object's type. Objects of the same type share the same value. Object string `json:"object"` - // Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `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`, `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`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `no_vat`, `nz_gst`, `pe_ruc`, `ph_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`, `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`, `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`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `no_vat`, `nz_gst`, `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 TaxIDType `json:"type"` // Value of the tax ID. Value string `json:"value"` diff --git a/taxrate.go b/taxrate.go index 785fad3136..780011d520 100644 --- a/taxrate.go +++ b/taxrate.go @@ -24,6 +24,7 @@ const ( TaxRateTaxTypeQST TaxRateTaxType = "qst" TaxRateTaxTypeRST TaxRateTaxType = "rst" TaxRateTaxTypeSalesTax TaxRateTaxType = "sales_tax" + TaxRateTaxTypeServiceTax TaxRateTaxType = "service_tax" TaxRateTaxTypeVAT TaxRateTaxType = "vat" ) diff --git a/terminal_reader.go b/terminal_reader.go index e0ac38d932..de56d1ab3f 100644 --- a/terminal_reader.go +++ b/terminal_reader.go @@ -20,8 +20,12 @@ type TerminalReaderActionCollectInputsInputType string // List of values that TerminalReaderActionCollectInputsInputType can take const ( + TerminalReaderActionCollectInputsInputTypeEmail TerminalReaderActionCollectInputsInputType = "email" + TerminalReaderActionCollectInputsInputTypeNumeric TerminalReaderActionCollectInputsInputType = "numeric" + TerminalReaderActionCollectInputsInputTypePhone TerminalReaderActionCollectInputsInputType = "phone" TerminalReaderActionCollectInputsInputTypeSelection TerminalReaderActionCollectInputsInputType = "selection" TerminalReaderActionCollectInputsInputTypeSignature TerminalReaderActionCollectInputsInputType = "signature" + TerminalReaderActionCollectInputsInputTypeText TerminalReaderActionCollectInputsInputType = "text" ) // The reason for the refund.