From 49e841b22b38825ddf619f399267df8fd4a538c4 Mon Sep 17 00:00:00 2001 From: "stripe-openapi[bot]" <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Tue, 4 Apr 2023 11:53:51 -0700 Subject: [PATCH] Update OpenAPI for 2fccd6482f7257e364ed224614924f29fd88e84b (#1048) Co-authored-by: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Co-authored-by: etsai-stripe <88805634+etsai-stripe@users.noreply.github.com> --- api/openapi-spec/spec3.sdk.json | 2092 ++++++++++++++++++++++++++++++- pkg/cmd/resources_cmds.go | 51 + 2 files changed, 2133 insertions(+), 10 deletions(-) diff --git a/api/openapi-spec/spec3.sdk.json b/api/openapi-spec/spec3.sdk.json index 1161ba539..ab4f9a04b 100644 --- a/api/openapi-spec/spec3.sdk.json +++ b/api/openapi-spec/spec3.sdk.json @@ -2843,7 +2843,7 @@ "type": "string" }, "status": { - "description": "For bank accounts, possible values are `new`, `validated`, `verified`, `verification_failed`, or `errored`. A bank account that hasn't had any activity or validation performed is `new`. If Stripe can determine that the bank account exists, its status will be `validated`. Note that there often isn’t enough information to know (e.g., for smaller credit unions), and the validation is not always run. If customer bank account verification has succeeded, the bank account status will be `verified`. If the verification failed for any reason, such as microdeposit failure, the status will be `verification_failed`. If a transfer sent to this bank account fails, we'll set the status to `errored` and will not continue to send transfers until the bank details are updated.\n\nFor external accounts, possible values are `new` and `errored`. Validations aren't run against external accounts because they're only used for payouts. This means the other statuses don't apply. If a transfer fails, the status is set to `errored` and transfers are stopped until account details are updated.", + "description": "For bank accounts, possible values are `new`, `validated`, `verified`, `verification_failed`, or `errored`. A bank account that hasn't had any activity or validation performed is `new`. If Stripe can determine that the bank account exists, its status will be `validated`. Note that there often isn’t enough information to know (e.g., for smaller credit unions), and the validation is not always run. If customer bank account verification has succeeded, the bank account status will be `verified`. If the verification failed for any reason, such as microdeposit failure, the status will be `verification_failed`. If a transfer sent to this bank account fails, we'll set the status to `errored` and will not continue to send transfers until the bank details are updated.\n\nFor external accounts, possible values are `new`, `errored` and `verification_failed`. If a transfer fails, the status is set to `errored` and transfers are stopped until account details are updated. In India, if we can't [verify the owner of the bank account](https://support.stripe.com/questions/bank-account-ownership-verification), we'll set the status to `verification_failed`. Other validations aren't run against external accounts because they're only used for payouts. This means the other statuses don't apply.", "maxLength": 5000, "type": "string" } @@ -4980,6 +4980,15 @@ "nullable": true, "type": "string" }, + "currency_conversion": { + "anyOf": [ + { + "$ref": "#/components/schemas/payment_pages_checkout_session_currency_conversion" + } + ], + "description": "Currency conversion details for automatic currency conversion sessions", + "nullable": true + }, "custom_fields": { "description": "Collect additional information from your customer using custom fields. Up to 2 fields are supported.", "items": { @@ -5453,6 +5462,7 @@ "automatic_tax", "consent", "consent_collection", + "currency_conversion", "custom_fields", "custom_text", "customer", @@ -5521,6 +5531,7 @@ "payment_pages_checkout_session_automatic_tax", "payment_pages_checkout_session_consent", "payment_pages_checkout_session_consent_collection", + "payment_pages_checkout_session_currency_conversion", "payment_pages_checkout_session_custom_fields", "payment_pages_checkout_session_custom_text", "payment_pages_checkout_session_customer_details", @@ -10312,7 +10323,7 @@ "description": "", "properties": { "due_by": { - "description": "Date by which evidence must be submitted in order to successfully challenge dispute. Will be null if the customer's bank or credit card company doesn't allow a response for this particular dispute.", + "description": "Date by which evidence must be submitted in order to successfully challenge dispute. Will be 0 if the customer's bank or credit card company doesn't allow a response for this particular dispute.", "format": "unix-time", "nullable": true, "type": "integer" @@ -13916,7 +13927,6 @@ "status": { "description": "The status of the invoice, one of `draft`, `open`, `paid`, `uncollectible`, or `void`. [Learn more](https://stripe.com/docs/billing/invoices/workflow#workflow-overview)", "enum": [ - "deleted", "draft", "open", "paid", @@ -13924,7 +13934,8 @@ "void" ], "nullable": true, - "type": "string" + "type": "string", + "x-stripeBypassValidation": true }, "status_transitions": { "$ref": "#/components/schemas/invoices_status_transitions" @@ -20766,6 +20777,16 @@ "description": "Whether the company's executives have been provided. This Boolean will be `true` if you've manually indicated that all executives are provided via [the `executives_provided` parameter](https://stripe.com/docs/api/accounts/update#update_account-company-executives_provided), or if Stripe determined that sufficient executives were provided.", "type": "boolean" }, + "export_license_id": { + "description": "The export license ID number of the company, also referred as Import Export Code (India only).", + "maxLength": 5000, + "type": "string" + }, + "export_purpose_code": { + "description": "The purpose code to use for export transactions (India only).", + "maxLength": 5000, + "type": "string" + }, "name": { "description": "The company's legal name.", "maxLength": 5000, @@ -24944,6 +24965,7 @@ "ideal", "klarna", "konbini", + "link", "oxxo", "p24", "paynow", @@ -29608,6 +29630,11 @@ "payment_method_link": { "description": "", "properties": { + "country": { + "description": "Two-letter ISO code representing the funding source (i.e. card, bank) country beneath the Link payment method.\nYou could use this attribute to get a sense of the international breakdown of funding sources you've collected.", + "maxLength": 5000, + "type": "string" + }, "email": { "description": "Account owner's email address.", "maxLength": 5000, @@ -30894,6 +30921,42 @@ "in_class": "checkout.session" } }, + "payment_pages_checkout_session_currency_conversion": { + "description": "", + "properties": { + "amount_subtotal": { + "description": "Total of all items in source currency before discounts or taxes are applied.", + "type": "integer" + }, + "amount_total": { + "description": "Total of all items in source currency after discounts and taxes are applied.", + "type": "integer" + }, + "fx_rate": { + "description": "Exchange rate used to convert source currency amounts to customer currency amounts", + "format": "decimal", + "type": "string" + }, + "source_currency": { + "description": "Creation currency of the CheckoutSession before localization", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "amount_subtotal", + "amount_total", + "fx_rate", + "source_currency" + ], + "title": "PaymentPagesCheckoutSessionCurrencyConversion", + "type": "object", + "x-expandableFields": [], + "x-stripeResource": { + "class_name": "CurrencyConversion", + "in_class": "checkout.session" + } + }, "payment_pages_checkout_session_custom_fields": { "description": "", "properties": { @@ -35956,7 +36019,7 @@ "type": "string" }, "instructions_email": { - "description": "Email to which refund instructions, if required, are sent to.", + "description": "For payment methods without native refund support (e.g., Konbini, PromptPay), email for the customer to receive refund instructions.", "maxLength": 5000, "type": "string" }, @@ -42857,6 +42920,557 @@ ] } }, + "tax.calculation": { + "description": "A Tax Calculation allows you to calculate the tax to collect from your customer.\n\nRelated guide: [Calculate tax in your custom payment flow](https://stripe.com/docs/tax/custom).", + "properties": { + "amount_total": { + "description": "Total after taxes.", + "type": "integer" + }, + "currency": { + "description": "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).", + "maxLength": 5000, + "type": "string" + }, + "customer": { + "description": "The ID of an existing [Customer](https://stripe.com/docs/api/customers/object) used for the resource.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "customer_details": { + "$ref": "#/components/schemas/tax_product_resource_customer_details" + }, + "expires_at": { + "description": "Timestamp of date at which the tax calculation will expire.", + "format": "unix-time", + "nullable": true, + "type": "integer" + }, + "id": { + "description": "Unique identifier for the calculation.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "line_items": { + "description": "The list of items the customer is purchasing.", + "nullable": true, + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/tax.calculation_line_item" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/tax/calculations/:id/line_items", + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "TaxProductResourceTaxCalculationLineItemList", + "type": "object", + "x-expandableFields": [ + "data" + ] + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "tax.calculation" + ], + "type": "string" + }, + "shipping_cost": { + "anyOf": [ + { + "$ref": "#/components/schemas/tax_product_resource_shipping_cost" + } + ], + "description": "The shipping cost details for the calculation.", + "nullable": true + }, + "tax_amount_exclusive": { + "description": "The amount of tax to be collected on top of the line item prices.", + "type": "integer" + }, + "tax_amount_inclusive": { + "description": "The amount of tax already included in the line item prices.", + "type": "integer" + }, + "tax_breakdown": { + "description": "Breakdown of individual tax amounts that add up to the total.", + "items": { + "$ref": "#/components/schemas/tax_product_resource_tax_breakdown" + }, + "type": "array" + }, + "tax_date": { + "description": "Timestamp of date at which the tax rules and rates in effect applies for the calculation.", + "format": "unix-time", + "type": "integer" + } + }, + "required": [ + "amount_total", + "currency", + "customer", + "customer_details", + "expires_at", + "id", + "line_items", + "livemode", + "object", + "shipping_cost", + "tax_amount_exclusive", + "tax_amount_inclusive", + "tax_breakdown", + "tax_date" + ], + "title": "TaxProductResourceTaxCalculation", + "type": "object", + "x-expandableFields": [ + "customer_details", + "line_items", + "shipping_cost", + "tax_breakdown" + ], + "x-resourceId": "tax.calculation", + "x-stripeOperations": [ + { + "method_name": "create", + "method_on": "service", + "method_type": "create", + "operation": "post", + "path": "/v1/tax/calculations" + }, + { + "method_name": "list_line_items", + "method_on": "service", + "method_type": "custom", + "operation": "get", + "path": "/v1/tax/calculations/{calculation}/line_items" + } + ], + "x-stripeResource": { + "class_name": "Calculation", + "in_package": "Tax", + "inner_classes": [ + "tax_product_resource_customer_details", + "tax_product_resource_tax_breakdown" + ] + } + }, + "tax.calculation_line_item": { + "description": "", + "properties": { + "amount": { + "description": "The line item amount in integer cents. If `tax_behavior=inclusive`, then this amount includes taxes. Otherwise, taxes were calculated on top of this amount.", + "type": "integer" + }, + "amount_tax": { + "description": "The amount of tax calculated for this line item, in integer cents.", + "type": "integer" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "tax.calculation_line_item" + ], + "type": "string" + }, + "product": { + "description": "A Product ID.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "quantity": { + "description": "The number of units of the item being purchased. For reversals, this is the quantity reversed.", + "type": "integer" + }, + "reference": { + "description": "A custom identifier for this line item.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "tax_behavior": { + "description": "Specifies whether the `amount` includes taxes. If `tax_behavior=inclusive`, then the amount includes taxes.", + "enum": [ + "exclusive", + "inclusive" + ], + "type": "string" + }, + "tax_breakdown": { + "description": "Detailed account of taxes relevant to this line item.", + "items": { + "$ref": "#/components/schemas/tax_product_resource_line_item_tax_breakdown" + }, + "nullable": true, + "type": "array" + }, + "tax_code": { + "description": "The [tax code](https://stripe.com/docs/tax/tax-categories) ID used for this resource.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "amount", + "amount_tax", + "id", + "livemode", + "object", + "product", + "quantity", + "reference", + "tax_behavior", + "tax_breakdown", + "tax_code" + ], + "title": "TaxProductResourceTaxCalculationLineItem", + "type": "object", + "x-expandableFields": [ + "tax_breakdown" + ], + "x-resourceId": "tax.calculation_line_item", + "x-stripeResource": { + "class_name": "CalculationLineItem", + "has_collection_class": true, + "in_package": "Tax", + "inner_classes": [ + "tax_product_resource_line_item_tax_breakdown" + ] + } + }, + "tax.transaction": { + "description": "A Tax Transaction records the tax collected from or refunded to your customer.\n\nRelated guide: [Calculate tax in your custom payment flow](https://stripe.com/docs/tax/custom#tax-transaction).", + "properties": { + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "currency": { + "description": "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).", + "maxLength": 5000, + "type": "string" + }, + "customer": { + "description": "The ID of an existing [Customer](https://stripe.com/docs/api/customers/object) used for the resource.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "customer_details": { + "$ref": "#/components/schemas/tax_product_resource_customer_details" + }, + "id": { + "description": "Unique identifier for the transaction.", + "maxLength": 5000, + "type": "string" + }, + "line_items": { + "description": "The tax collected or refunded, by line item.", + "nullable": true, + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/tax.transaction_line_item" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/tax/transactions/:id/line_items", + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "TaxProductResourceTaxTransactionLineItemList", + "type": "object", + "x-expandableFields": [ + "data" + ] + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "nullable": true, + "type": "object" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "tax.transaction" + ], + "type": "string" + }, + "reference": { + "description": "A custom unique identifier, such as 'myOrder_123'.", + "maxLength": 5000, + "type": "string" + }, + "reversal": { + "anyOf": [ + { + "$ref": "#/components/schemas/tax_product_resource_tax_transaction_resource_reversal" + } + ], + "description": "If `type=reversal`, contains information about what was reversed.", + "nullable": true + }, + "shipping_cost": { + "anyOf": [ + { + "$ref": "#/components/schemas/tax_product_resource_shipping_cost" + } + ], + "description": "The shipping cost details for the transaction.", + "nullable": true + }, + "tax_date": { + "description": "Timestamp of date at which the tax rules and rates in effect applies for the calculation.", + "format": "unix-time", + "type": "integer" + }, + "type": { + "description": "If `reversal`, this transaction reverses an earlier transaction.", + "enum": [ + "reversal", + "transaction" + ], + "type": "string" + } + }, + "required": [ + "created", + "currency", + "customer", + "customer_details", + "id", + "line_items", + "livemode", + "metadata", + "object", + "reference", + "reversal", + "shipping_cost", + "tax_date", + "type" + ], + "title": "TaxProductResourceTaxTransaction", + "type": "object", + "x-expandableFields": [ + "customer_details", + "line_items", + "reversal", + "shipping_cost" + ], + "x-resourceId": "tax.transaction", + "x-stripeOperations": [ + { + "method_name": "retrieve", + "method_on": "service", + "method_type": "retrieve", + "operation": "get", + "path": "/v1/tax/transactions/{transaction}" + }, + { + "method_name": "create_reversal", + "method_on": "service", + "method_type": "custom", + "operation": "post", + "path": "/v1/tax/transactions/create_reversal" + }, + { + "method_name": "create_from_calculation", + "method_on": "service", + "method_type": "custom", + "operation": "post", + "path": "/v1/tax/transactions/create_from_calculation" + }, + { + "method_name": "list_line_items", + "method_on": "service", + "method_type": "custom", + "operation": "get", + "path": "/v1/tax/transactions/{transaction}/line_items" + } + ], + "x-stripeResource": { + "class_name": "Transaction", + "in_package": "Tax", + "inner_classes": [ + "tax_product_resource_tax_transaction_resource_reversal" + ] + } + }, + "tax.transaction_line_item": { + "description": "", + "properties": { + "amount": { + "description": "The line item amount in integer cents. If `tax_behavior=inclusive`, then this amount includes taxes. Otherwise, taxes were calculated on top of this amount.", + "type": "integer" + }, + "amount_tax": { + "description": "The amount of tax calculated for this line item, in integer cents.", + "type": "integer" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "nullable": true, + "type": "object" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "tax.transaction_line_item" + ], + "type": "string" + }, + "quantity": { + "description": "The number of units of the item being purchased. For reversals, this is the quantity reversed.", + "type": "integer" + }, + "reference": { + "description": "A custom identifier for this line item in the transaction.", + "maxLength": 5000, + "type": "string" + }, + "reversal": { + "anyOf": [ + { + "$ref": "#/components/schemas/tax_product_resource_tax_transaction_line_item_resource_reversal" + } + ], + "description": "If `type=reversal`, contains information about what was reversed.", + "nullable": true + }, + "tax_behavior": { + "description": "Specifies whether the `amount` includes taxes. If `tax_behavior=inclusive`, then the amount includes taxes.", + "enum": [ + "exclusive", + "inclusive" + ], + "type": "string" + }, + "tax_code": { + "description": "The [tax code](https://stripe.com/docs/tax/tax-categories) ID used for this resource.", + "maxLength": 5000, + "type": "string" + }, + "type": { + "description": "If `reversal`, this line item reverses an earlier transaction.", + "enum": [ + "reversal", + "transaction" + ], + "type": "string" + } + }, + "required": [ + "amount", + "amount_tax", + "id", + "livemode", + "metadata", + "object", + "quantity", + "reference", + "reversal", + "tax_behavior", + "tax_code", + "type" + ], + "title": "TaxProductResourceTaxTransactionLineItem", + "type": "object", + "x-expandableFields": [ + "reversal" + ], + "x-resourceId": "tax.transaction_line_item", + "x-stripeResource": { + "class_name": "TransactionLineItem", + "has_collection_class": true, + "in_package": "Tax", + "inner_classes": [ + "tax_product_resource_tax_transaction_line_item_resource_reversal" + ] + } + }, "tax_code": { "description": "[Tax codes](https://stripe.com/docs/tax/tax-categories) classify goods and services for tax purposes.", "properties": { @@ -43204,6 +43818,545 @@ "in_class": "tax_id" } }, + "tax_product_resource_customer_details": { + "description": "", + "properties": { + "address": { + "anyOf": [ + { + "$ref": "#/components/schemas/tax_product_resource_postal_address" + } + ], + "description": "The customer's postal address (for example, home or business location).", + "nullable": true + }, + "address_source": { + "description": "The type of customer address provided.", + "enum": [ + "billing", + "shipping" + ], + "nullable": true, + "type": "string" + }, + "ip_address": { + "description": "The customer's IP address (IPv4 or IPv6).", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "tax_ids": { + "description": "The customer's tax IDs (for example, EU VAT numbers).", + "items": { + "$ref": "#/components/schemas/tax_product_resource_customer_details_resource_tax_id" + }, + "type": "array" + }, + "taxability_override": { + "description": "The taxability override used for taxation.", + "enum": [ + "customer_exempt", + "none", + "reverse_charge" + ], + "type": "string" + } + }, + "required": [ + "address", + "address_source", + "ip_address", + "tax_ids", + "taxability_override" + ], + "title": "TaxProductResourceCustomerDetails", + "type": "object", + "x-expandableFields": [ + "address", + "tax_ids" + ], + "x-stripeResource": { + "class_name": "CustomerDetails", + "in_class": "tax.calculation", + "inner_classes": [ + "tax_product_resource_customer_details_resource_tax_id", + "tax_product_resource_postal_address" + ] + } + }, + "tax_product_resource_customer_details_resource_tax_id": { + "description": "", + "properties": { + "type": { + "description": "The type of the tax ID, one of `eu_vat`, `br_cnpj`, `br_cpf`, `eu_oss_vat`, `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`", + "enum": [ + "ae_trn", + "au_abn", + "au_arn", + "bg_uic", + "br_cnpj", + "br_cpf", + "ca_bn", + "ca_gst_hst", + "ca_pst_bc", + "ca_pst_mb", + "ca_pst_sk", + "ca_qst", + "ch_vat", + "cl_tin", + "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", + "ph_tin", + "ru_inn", + "ru_kpp", + "sa_vat", + "sg_gst", + "sg_uen", + "si_tin", + "th_vat", + "tr_tin", + "tw_vat", + "ua_vat", + "unknown", + "us_ein", + "za_vat" + ], + "type": "string" + }, + "value": { + "description": "The value of the tax ID.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "type", + "value" + ], + "title": "TaxProductResourceCustomerDetailsResourceTaxId", + "type": "object", + "x-expandableFields": [], + "x-stripeResource": { + "class_name": "TaxID", + "in_class": "tax_product_resource_customer_details" + } + }, + "tax_product_resource_jurisdiction": { + "description": "", + "properties": { + "country": { + "description": "Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).", + "maxLength": 5000, + "type": "string" + }, + "display_name": { + "description": "A human-readable name for the jurisdiction imposing the tax.", + "maxLength": 5000, + "type": "string" + }, + "level": { + "description": "Indicates the level of the jurisdiction imposing the tax.", + "enum": [ + "city", + "country", + "county", + "district", + "state" + ], + "type": "string" + }, + "state": { + "description": "[ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2:US), without country prefix. For example, \"NY\" for New York, United States.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "required": [ + "country", + "display_name", + "level", + "state" + ], + "title": "TaxProductResourceJurisdiction", + "type": "object", + "x-expandableFields": [], + "x-stripeResource": { + "class_name": "Jurisdiction", + "in_class": "tax_product_resource_line_item_tax_breakdown" + } + }, + "tax_product_resource_line_item_tax_breakdown": { + "description": "", + "properties": { + "amount": { + "description": "The amount of tax, in integer cents.", + "type": "integer" + }, + "jurisdiction": { + "$ref": "#/components/schemas/tax_product_resource_jurisdiction" + }, + "sourcing": { + "description": "Indicates whether the jurisdiction was determined by the origin (merchant's address) or destination (customer's address).", + "enum": [ + "destination", + "origin" + ], + "type": "string" + }, + "tax_rate_details": { + "anyOf": [ + { + "$ref": "#/components/schemas/tax_product_resource_line_item_tax_rate_details" + } + ], + "description": "Details regarding the rate for this tax. This field will be `null` when the tax is not imposed, for example if the product is exempt from tax.", + "nullable": true + }, + "taxability_reason": { + "description": "The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported.", + "enum": [ + "customer_exempt", + "not_collecting", + "not_subject_to_tax", + "not_supported", + "portion_product_exempt", + "portion_reduced_rated", + "portion_standard_rated", + "product_exempt", + "product_exempt_holiday", + "proportionally_rated", + "reduced_rated", + "reverse_charge", + "standard_rated", + "taxable_basis_reduced", + "zero_rated" + ], + "type": "string" + }, + "taxable_amount": { + "description": "The amount on which tax is calculated, in integer cents.", + "type": "integer" + } + }, + "required": [ + "amount", + "jurisdiction", + "sourcing", + "tax_rate_details", + "taxability_reason", + "taxable_amount" + ], + "title": "TaxProductResourceLineItemTaxBreakdown", + "type": "object", + "x-expandableFields": [ + "jurisdiction", + "tax_rate_details" + ], + "x-stripeResource": { + "class_name": "LineItemTaxBreakdown", + "in_class": "tax.calculation_line_item", + "inner_classes": [ + "tax_product_resource_jurisdiction", + "tax_product_resource_line_item_tax_rate_details" + ] + } + }, + "tax_product_resource_line_item_tax_rate_details": { + "description": "", + "properties": { + "display_name": { + "description": "A localized display name for tax type, intended to be human-readable. For example, \"Local Sales and Use Tax\", \"Value-added tax (VAT)\", or \"Umsatzsteuer (USt.)\".", + "maxLength": 5000, + "type": "string" + }, + "percentage_decimal": { + "description": "The tax rate percentage as a string. For example, 8.5% is represented as \"8.5\".", + "maxLength": 5000, + "type": "string" + }, + "tax_type": { + "description": "The tax type, such as `vat` or `sales_tax`.", + "enum": [ + "gst", + "hst", + "igst", + "jct", + "lease_tax", + "pst", + "qst", + "rst", + "sales_tax", + "vat" + ], + "type": "string" + } + }, + "required": [ + "display_name", + "percentage_decimal", + "tax_type" + ], + "title": "TaxProductResourceLineItemTaxRateDetails", + "type": "object", + "x-expandableFields": [], + "x-stripeResource": { + "class_name": "LineItemTaxRateDetails", + "in_class": "tax_product_resource_line_item_tax_breakdown" + } + }, + "tax_product_resource_postal_address": { + "description": "", + "properties": { + "city": { + "description": "City, district, suburb, town, or village.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "country": { + "description": "Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).", + "maxLength": 5000, + "type": "string" + }, + "line1": { + "description": "Address line 1 (e.g., street, PO Box, or company name).", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "line2": { + "description": "Address line 2 (e.g., apartment, suite, unit, or building).", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "postal_code": { + "description": "ZIP or postal code.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "state": { + "description": "State/province as an [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) subdivision code, without country prefix. Example: \"NY\" or \"TX\".", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "required": [ + "city", + "country", + "line1", + "line2", + "postal_code", + "state" + ], + "title": "TaxProductResourcePostalAddress", + "type": "object", + "x-expandableFields": [], + "x-stripeResource": { + "class_name": "PostalAddress", + "in_class": "tax_product_resource_customer_details" + } + }, + "tax_product_resource_shipping_cost": { + "description": "", + "properties": { + "amount": { + "description": "The shipping amount in integer cents. If `tax_behavior=inclusive`, then this amount includes taxes. Otherwise, taxes were calculated on top of this amount.", + "type": "integer" + }, + "amount_tax": { + "description": "The amount of tax calculated for shipping, in integer cents.", + "type": "integer" + }, + "shipping_rate": { + "description": "The ID of an existing [ShippingRate](https://stripe.com/docs/api/shipping_rates/object)", + "maxLength": 5000, + "type": "string" + }, + "tax_behavior": { + "description": "Specifies whether the `amount` includes taxes. If `tax_behavior=inclusive`, then the amount includes taxes.", + "enum": [ + "exclusive", + "inclusive" + ], + "type": "string" + }, + "tax_code": { + "description": "The [tax code](https://stripe.com/docs/tax/tax-categories) ID used for shipping.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "amount", + "amount_tax", + "tax_behavior", + "tax_code" + ], + "title": "TaxProductResourceShippingCost", + "type": "object", + "x-expandableFields": [], + "x-stripeResource": { + "class_name": "ShippingCost", + "in_package": "" + } + }, + "tax_product_resource_tax_breakdown": { + "description": "", + "properties": { + "amount": { + "description": "The amount of tax, in integer cents.", + "type": "integer" + }, + "inclusive": { + "description": "Specifies whether the tax amount is included in the line item amount.", + "type": "boolean" + }, + "tax_rate_details": { + "$ref": "#/components/schemas/tax_product_resource_tax_rate_details" + }, + "taxable_amount": { + "description": "The amount on which tax is calculated, in integer cents.", + "type": "integer" + } + }, + "required": [ + "amount", + "inclusive", + "tax_rate_details", + "taxable_amount" + ], + "title": "TaxProductResourceTaxBreakdown", + "type": "object", + "x-expandableFields": [ + "tax_rate_details" + ], + "x-stripeResource": { + "class_name": "TaxBreakdown", + "in_class": "tax.calculation", + "inner_classes": [ + "tax_product_resource_tax_rate_details" + ] + } + }, + "tax_product_resource_tax_rate_details": { + "description": "", + "properties": { + "country": { + "description": "Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "percentage_decimal": { + "description": "The tax rate percentage as a string. For example, 8.5% is represented as `\"8.5\"`.", + "maxLength": 5000, + "type": "string" + }, + "state": { + "description": "State, county, province, or region.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "tax_type": { + "description": "The tax type, such as `vat` or `sales_tax`.", + "enum": [ + "gst", + "hst", + "igst", + "jct", + "lease_tax", + "pst", + "qst", + "rst", + "sales_tax", + "vat" + ], + "nullable": true, + "type": "string" + } + }, + "required": [ + "country", + "percentage_decimal", + "state", + "tax_type" + ], + "title": "TaxProductResourceTaxRateDetails", + "type": "object", + "x-expandableFields": [], + "x-stripeResource": { + "class_name": "TaxRateDetails", + "in_class": "tax_product_resource_tax_breakdown" + } + }, + "tax_product_resource_tax_transaction_line_item_resource_reversal": { + "description": "", + "properties": { + "original_line_item": { + "description": "The `id` of the line item to reverse in the original transaction.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "original_line_item" + ], + "title": "TaxProductResourceTaxTransactionLineItemResourceReversal", + "type": "object", + "x-expandableFields": [], + "x-stripeResource": { + "class_name": "Reversal", + "in_class": "tax.transaction_line_item" + } + }, + "tax_product_resource_tax_transaction_resource_reversal": { + "description": "", + "properties": { + "original_transaction": { + "description": "The `id` of the reversed `Transaction` object.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "required": [ + "original_transaction" + ], + "title": "TaxProductResourceTaxTransactionResourceReversal", + "type": "object", + "x-expandableFields": [], + "x-stripeResource": { + "class_name": "Reversal", + "in_class": "tax.transaction" + } + }, "tax_rate": { "description": "Tax rates can be applied to [invoices](https://stripe.com/docs/billing/invoices/tax-rates), [subscriptions](https://stripe.com/docs/billing/subscriptions/taxes) and [Checkout Sessions](https://stripe.com/docs/payments/checkout/set-up-a-subscription#tax-rates) to collect tax.\n\nRelated guide: [Tax Rates](https://stripe.com/docs/billing/taxes/tax-rates).", "properties": { @@ -49929,6 +51082,16 @@ "description": "Whether the company's executives have been provided. Set this Boolean to `true` after creating all the company's executives with [the Persons API](https://stripe.com/docs/api/persons) for accounts with a `relationship.executive` requirement.", "type": "boolean" }, + "export_license_id": { + "description": "The export license ID number of the company, also referred as Import Export Code (India only).", + "maxLength": 5000, + "type": "string" + }, + "export_purpose_code": { + "description": "The purpose code to use for export transactions (India only).", + "maxLength": 5000, + "type": "string" + }, "name": { "description": "The company's legal name.", "maxLength": 100, @@ -51658,6 +52821,16 @@ "description": "Whether the company's executives have been provided. Set this Boolean to `true` after creating all the company's executives with [the Persons API](https://stripe.com/docs/api/persons) for accounts with a `relationship.executive` requirement.", "type": "boolean" }, + "export_license_id": { + "description": "The export license ID number of the company, also referred as Import Export Code (India only).", + "maxLength": 5000, + "type": "string" + }, + "export_purpose_code": { + "description": "The purpose code to use for export transactions (India only).", + "maxLength": 5000, + "type": "string" + }, "name": { "description": "The company's legal name.", "maxLength": 100, @@ -72023,8 +73196,8 @@ "uncollectible", "void" ], - "maxLength": 5000, - "type": "string" + "type": "string", + "x-stripeBypassValidation": true }, "style": "form" }, @@ -92918,6 +94091,7 @@ "ideal", "klarna", "konbini", + "link", "oxxo", "p24", "paynow", @@ -93895,6 +95069,7 @@ "ideal", "klarna", "konbini", + "link", "oxxo", "p24", "paynow", @@ -102917,7 +104092,7 @@ "type": "array" }, "instructions_email": { - "description": "Address to send refund email, use customer email if not specified", + "description": "For payment methods without native refund support (e.g., Konbini, PromptPay), use this email from the customer to receive refund instructions.", "type": "string" }, "metadata": { @@ -112117,7 +113292,7 @@ "type": "integer" } }, - "title": "common_phase_configuration_param", + "title": "invoice_settings", "type": "object" }, "items": { @@ -112833,7 +114008,7 @@ "type": "integer" } }, - "title": "common_phase_configuration_param", + "title": "invoice_settings", "type": "object" }, "items": { @@ -115955,6 +117130,889 @@ } } }, + "/v1/tax/calculations": { + "post": { + "description": "

Calculates tax based on input and returns a Tax Calculation object.

", + "operationId": "PostTaxCalculations", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "customer_details": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "line_items": { + "explode": true, + "style": "deepObject" + }, + "shipping_cost": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "currency": { + "description": "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).", + "type": "string" + }, + "customer": { + "description": "The ID of an existing customer to use for this calculation. If provided, the customer's address and tax IDs are copied to `customer_details`.", + "maxLength": 5000, + "type": "string" + }, + "customer_details": { + "description": "Details about the customer, including address and tax IDs.", + "properties": { + "address": { + "description": "The customer's postal address (for example, home or business location).", + "properties": { + "city": { + "description": "City, district, suburb, town, or village.", + "maxLength": 5000, + "type": "string" + }, + "country": { + "description": "Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).", + "maxLength": 5000, + "type": "string" + }, + "line1": { + "description": "Address line 1 (e.g., street, PO Box, or company name).", + "maxLength": 5000, + "type": "string" + }, + "line2": { + "description": "Address line 2 (e.g., apartment, suite, unit, or building).", + "maxLength": 5000, + "type": "string" + }, + "postal_code": { + "description": "ZIP or postal code.", + "maxLength": 5000, + "type": "string" + }, + "state": { + "description": "State/province as an [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) subdivision code, without country prefix. Example: \"NY\" or \"TX\".", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "country" + ], + "title": "postal_address", + "type": "object" + }, + "address_source": { + "description": "The type of customer address provided.", + "enum": [ + "billing", + "shipping" + ], + "type": "string" + }, + "ip_address": { + "description": "The customer's IP address (IPv4 or IPv6).", + "type": "string" + }, + "tax_ids": { + "description": "The customer's tax IDs.", + "items": { + "properties": { + "type": { + "description": "Type of the tax ID, one of `ae_trn`, `au_abn`, `au_arn`, `bg_uic`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_vat`, `cl_tin`, `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`, `ph_tin`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, or `za_vat`", + "enum": [ + "ae_trn", + "au_abn", + "au_arn", + "bg_uic", + "br_cnpj", + "br_cpf", + "ca_bn", + "ca_gst_hst", + "ca_pst_bc", + "ca_pst_mb", + "ca_pst_sk", + "ca_qst", + "ch_vat", + "cl_tin", + "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", + "ph_tin", + "ru_inn", + "ru_kpp", + "sa_vat", + "sg_gst", + "sg_uen", + "si_tin", + "th_vat", + "tr_tin", + "tw_vat", + "ua_vat", + "us_ein", + "za_vat" + ], + "maxLength": 5000, + "type": "string", + "x-stripeBypassValidation": true + }, + "value": { + "description": "Value of the tax ID.", + "type": "string" + } + }, + "required": [ + "type", + "value" + ], + "title": "data_params", + "type": "object" + }, + "type": "array" + }, + "taxability_override": { + "description": "Overrides the tax calculation result to allow you to not collect tax from your customer. Use this if you've manually checked your customer's tax exemptions. Prefer providing the customer's `tax_ids` where possible, which automatically determines whether `reverse_charge` applies.", + "enum": [ + "customer_exempt", + "none", + "reverse_charge" + ], + "type": "string" + } + }, + "title": "customer_details", + "type": "object" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "line_items": { + "description": "A list of items the customer is purchasing.", + "items": { + "properties": { + "amount": { + "description": "A positive integer in cents representing the line item's total price. If `tax_behavior=inclusive`, then this amount includes taxes. Otherwise, taxes are calculated on top of this amount.", + "type": "integer" + }, + "product": { + "description": "If provided, the product's `tax_code` will be used as the line item's `tax_code`.", + "maxLength": 5000, + "type": "string" + }, + "quantity": { + "description": "The number of units of the item being purchased. Used to calculate the per-unit price from the total `amount` for the line. For example, if `amount=100` and `quantity=4`, the calculated unit price is 25.", + "type": "integer" + }, + "reference": { + "description": "A custom identifier for this line item, which must be unique across the line items in the calculation. The reference helps identify each line item in exported [tax reports](https://stripe.com/docs/tax/reports).", + "maxLength": 500, + "type": "string" + }, + "tax_behavior": { + "description": "Specifies whether the `amount` includes taxes. Defaults to `exclusive`.", + "enum": [ + "exclusive", + "inclusive" + ], + "type": "string" + }, + "tax_code": { + "description": "A [tax code](https://stripe.com/docs/tax/tax-categories) ID to use for this line item. If not provided, we will use the tax code from the provided `product` param. If neither `tax_code` nor `product` is provided, we will use the default tax code from your Tax Settings.", + "type": "string" + } + }, + "required": [ + "amount" + ], + "title": "calculation_line_item", + "type": "object" + }, + "type": "array" + }, + "shipping_cost": { + "description": "Shipping cost details to be used for the calculation.", + "properties": { + "amount": { + "description": "A positive integer in cents representing the shipping charge. If `tax_behavior=inclusive`, then this amount includes taxes. Otherwise, taxes are calculated on top of this amount.", + "type": "integer" + }, + "shipping_rate": { + "description": "If provided, the [shipping rate](https://stripe.com/docs/api/shipping_rates/object)'s `amount`, `tax_code` and `tax_behavior` are used. If you provide a shipping rate, then you cannot pass the `amount`, `tax_code`, or `tax_behavior` parameters.", + "maxLength": 5000, + "type": "string" + }, + "tax_behavior": { + "description": "Specifies whether the `amount` includes taxes. If `tax_behavior=inclusive`, then the amount includes taxes. Defaults to `exclusive`.", + "enum": [ + "exclusive", + "inclusive" + ], + "type": "string" + }, + "tax_code": { + "description": "The [tax code](https://stripe.com/docs/tax/tax-categories) used to calculate tax on shipping. If not provided, the default shipping tax code from your [Tax Settings](/settings/tax) is used.", + "type": "string" + } + }, + "title": "shipping_cost", + "type": "object" + }, + "tax_date": { + "description": "Timestamp of date at which the tax rules and rates in effect applies for the calculation. Measured in seconds since the Unix epoch. Can be up to 48 hours in the past, and up to 48 hours in the future.", + "type": "integer" + } + }, + "required": [ + "currency", + "line_items" + ], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/tax.calculation" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/tax/calculations/{calculation}/line_items": { + "get": { + "description": "

Retrieves the line items of a persisted tax calculation as a collection.

", + "operationId": "GetTaxCalculationsCalculationLineItems", + "parameters": [ + { + "in": "path", + "name": "calculation", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + }, + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 500, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 500, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/tax.calculation_line_item" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/tax/calculations/:id/line_items", + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "TaxProductResourceTaxCalculationLineItemList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/tax/transactions/create_from_calculation": { + "post": { + "description": "

Creates a Tax Transaction from a calculation.

", + "operationId": "PostTaxTransactionsCreateFromCalculation", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "calculation": { + "description": "Tax Calculation ID to be used as input when creating the transaction.", + "maxLength": 5000, + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.", + "type": "object" + }, + "reference": { + "description": "A custom order or sale identifier, such as 'myOrder_123'. Must be unique across all transactions, including reversals.", + "maxLength": 500, + "type": "string" + } + }, + "required": [ + "calculation", + "reference" + ], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/tax.transaction" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/tax/transactions/create_reversal": { + "post": { + "description": "

Partially or fully reverses a previously created Transaction.

", + "operationId": "PostTaxTransactionsCreateReversal", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "expand": { + "explode": true, + "style": "deepObject" + }, + "line_items": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + }, + "shipping_cost": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "line_items": { + "description": "The line item amounts to reverse.", + "items": { + "properties": { + "amount": { + "description": "The amount to reverse, in negative integer cents.", + "type": "integer" + }, + "amount_tax": { + "description": "The amount of tax to reverse, in negative integer cents.", + "type": "integer" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "type": "object" + }, + "original_line_item": { + "description": "The `id` of the line item to reverse in the original transaction.", + "maxLength": 5000, + "type": "string" + }, + "quantity": { + "description": "The quantity reversed. Appears in [tax exports](https://stripe.com/docs/tax/reports), but does not affect the amount of tax reversed.", + "type": "integer" + }, + "reference": { + "description": "A custom identifier for this line item in the reversal transaction, such as 'L1-refund'.", + "maxLength": 500, + "type": "string" + } + }, + "required": [ + "amount", + "amount_tax", + "original_line_item", + "reference" + ], + "title": "transaction_line_item_reversal", + "type": "object" + }, + "type": "array" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.", + "type": "object" + }, + "mode": { + "description": "If `partial`, the provided line item or shipping cost amounts are reversed. If `full`, the original transaction is fully reversed.", + "enum": [ + "full", + "partial" + ], + "type": "string" + }, + "original_transaction": { + "description": "The ID of the Transaction to partially or fully reverse.", + "maxLength": 5000, + "type": "string" + }, + "reference": { + "description": "A custom identifier for this reversal, such as 'myOrder_123-refund_1', which must be unique across all transactions. The reference helps identify this reversal transaction in exported [tax reports](https://stripe.com/docs/tax/reports).", + "maxLength": 500, + "type": "string" + }, + "shipping_cost": { + "description": "The shipping cost to reverse.", + "properties": { + "amount": { + "description": "The amount to reverse, in negative integer cents.", + "type": "integer" + }, + "amount_tax": { + "description": "The amount of tax to reverse, in negative integer cents.", + "type": "integer" + } + }, + "required": [ + "amount", + "amount_tax" + ], + "title": "transaction_shipping_cost_reversal", + "type": "object" + } + }, + "required": [ + "mode", + "original_transaction", + "reference" + ], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/tax.transaction" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/tax/transactions/{transaction}": { + "get": { + "description": "

Retrieves a Tax Transaction object.

", + "operationId": "GetTaxTransactionsTransaction", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "transaction", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/tax.transaction" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/tax/transactions/{transaction}/line_items": { + "get": { + "description": "

Retrieves the line items of a committed standalone transaction as a collection.

", + "operationId": "GetTaxTransactionsTransactionLineItems", + "parameters": [ + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 500, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 500, + "type": "string" + }, + "style": "form" + }, + { + "in": "path", + "name": "transaction", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "description": "Details about each object.", + "items": { + "$ref": "#/components/schemas/tax.transaction_line_item" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/tax/transactions/:id/line_items", + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "TaxProductResourceTaxTransactionLineItemList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, "/v1/tax_codes": { "get": { "description": "

A list of all tax codes available to add to Products in order to allow specific tax calculations.

", @@ -119908,6 +121966,10 @@ "schema": { "additionalProperties": false, "properties": { + "amount_tip": { + "description": "Simulated on-reader tip amount.", + "type": "integer" + }, "card_present": { "description": "Simulated data for the card_present payment method.", "properties": { @@ -121496,6 +123558,16 @@ "description": "Whether the company's executives have been provided. Set this Boolean to `true` after creating all the company's executives with [the Persons API](https://stripe.com/docs/api/persons) for accounts with a `relationship.executive` requirement.", "type": "boolean" }, + "export_license_id": { + "description": "The export license ID number of the company, also referred as Import Export Code (India only).", + "maxLength": 5000, + "type": "string" + }, + "export_purpose_code": { + "description": "The purpose code to use for export transactions (India only).", + "maxLength": 5000, + "type": "string" + }, "name": { "description": "The company's legal name.", "maxLength": 100, diff --git a/pkg/cmd/resources_cmds.go b/pkg/cmd/resources_cmds.go index 005cf8b86..bae83f78f 100644 --- a/pkg/cmd/resources_cmds.go +++ b/pkg/cmd/resources_cmds.go @@ -25,6 +25,7 @@ func addAllResourcesCmds(rootCmd *cobra.Command) { nsIssuingCmd := resource.NewNamespaceCmd(rootCmd, "issuing") nsRadarCmd := resource.NewNamespaceCmd(rootCmd, "radar") nsReportingCmd := resource.NewNamespaceCmd(rootCmd, "reporting") + nsTaxCmd := resource.NewNamespaceCmd(rootCmd, "tax") nsTerminalCmd := resource.NewNamespaceCmd(rootCmd, "terminal") nsTestHelpersCmd := resource.NewNamespaceCmd(rootCmd, "test_helpers") nsTreasuryCmd := resource.NewNamespaceCmd(rootCmd, "treasury") @@ -113,6 +114,8 @@ func addAllResourcesCmds(rootCmd *cobra.Command) { rRadarValueListsCmd := resource.NewResourceCmd(nsRadarCmd.Cmd, "value_lists") rReportingReportRunsCmd := resource.NewResourceCmd(nsReportingCmd.Cmd, "report_runs") rReportingReportTypesCmd := resource.NewResourceCmd(nsReportingCmd.Cmd, "report_types") + rTaxCalculationsCmd := resource.NewResourceCmd(nsTaxCmd.Cmd, "calculations") + rTaxTransactionsCmd := resource.NewResourceCmd(nsTaxCmd.Cmd, "transactions") rTerminalConfigurationsCmd := resource.NewResourceCmd(nsTerminalCmd.Cmd, "configurations") rTerminalConnectionTokensCmd := resource.NewResourceCmd(nsTerminalCmd.Cmd, "connection_tokens") rTerminalLocationsCmd := resource.NewResourceCmd(nsTerminalCmd.Cmd, "locations") @@ -229,6 +232,8 @@ func addAllResourcesCmds(rootCmd *cobra.Command) { "company.address_kanji.town": "string", "company.directors_provided": "boolean", "company.executives_provided": "boolean", + "company.export_license_id": "string", + "company.export_purpose_code": "string", "company.name": "string", "company.name_kana": "string", "company.name_kanji": "string", @@ -419,6 +424,8 @@ func addAllResourcesCmds(rootCmd *cobra.Command) { "company.address_kanji.town": "string", "company.directors_provided": "boolean", "company.executives_provided": "boolean", + "company.export_license_id": "string", + "company.export_purpose_code": "string", "company.name": "string", "company.name_kana": "string", "company.name_kanji": "string", @@ -2493,6 +2500,8 @@ func addAllResourcesCmds(rootCmd *cobra.Command) { "account.company.address_kanji.town": "string", "account.company.directors_provided": "boolean", "account.company.executives_provided": "boolean", + "account.company.export_license_id": "string", + "account.company.export_purpose_code": "string", "account.company.name": "string", "account.company.name_kana": "string", "account.company.name_kanji": "string", @@ -3188,6 +3197,46 @@ func addAllResourcesCmds(rootCmd *cobra.Command) { resource.NewOperationCmd(rReportingReportRunsCmd.Cmd, "retrieve", "/v1/reporting/report_runs/{report_run}", http.MethodGet, map[string]string{}, &Config) resource.NewOperationCmd(rReportingReportTypesCmd.Cmd, "list", "/v1/reporting/report_types", http.MethodGet, map[string]string{}, &Config) resource.NewOperationCmd(rReportingReportTypesCmd.Cmd, "retrieve", "/v1/reporting/report_types/{report_type}", http.MethodGet, map[string]string{}, &Config) + resource.NewOperationCmd(rTaxCalculationsCmd.Cmd, "create", "/v1/tax/calculations", http.MethodPost, map[string]string{ + "currency": "string", + "customer": "string", + "customer_details.address.city": "string", + "customer_details.address.country": "string", + "customer_details.address.line1": "string", + "customer_details.address.line2": "string", + "customer_details.address.postal_code": "string", + "customer_details.address.state": "string", + "customer_details.address_source": "string", + "customer_details.ip_address": "string", + "customer_details.taxability_override": "string", + "shipping_cost.amount": "integer", + "shipping_cost.shipping_rate": "string", + "shipping_cost.tax_behavior": "string", + "shipping_cost.tax_code": "string", + "tax_date": "integer", + }, &Config) + resource.NewOperationCmd(rTaxCalculationsCmd.Cmd, "list_line_items", "/v1/tax/calculations/{calculation}/line_items", http.MethodGet, map[string]string{ + "ending_before": "string", + "limit": "integer", + "starting_after": "string", + }, &Config) + resource.NewOperationCmd(rTaxTransactionsCmd.Cmd, "create_from_calculation", "/v1/tax/transactions/create_from_calculation", http.MethodPost, map[string]string{ + "calculation": "string", + "reference": "string", + }, &Config) + resource.NewOperationCmd(rTaxTransactionsCmd.Cmd, "create_reversal", "/v1/tax/transactions/create_reversal", http.MethodPost, map[string]string{ + "mode": "string", + "original_transaction": "string", + "reference": "string", + "shipping_cost.amount": "integer", + "shipping_cost.amount_tax": "integer", + }, &Config) + resource.NewOperationCmd(rTaxTransactionsCmd.Cmd, "list_line_items", "/v1/tax/transactions/{transaction}/line_items", http.MethodGet, map[string]string{ + "ending_before": "string", + "limit": "integer", + "starting_after": "string", + }, &Config) + resource.NewOperationCmd(rTaxTransactionsCmd.Cmd, "retrieve", "/v1/tax/transactions/{transaction}", http.MethodGet, map[string]string{}, &Config) resource.NewOperationCmd(rTerminalConfigurationsCmd.Cmd, "create", "/v1/terminal/configurations", http.MethodPost, map[string]string{ "bbpos_wisepos_e.splashscreen": "string", "verifone_p400.splashscreen": "string", @@ -3273,6 +3322,7 @@ func addAllResourcesCmds(rootCmd *cobra.Command) { "label": "string", }, &Config) resource.NewOperationCmd(rTerminalReadersTestHelpersCmd.Cmd, "present_payment_method", "/v1/test_helpers/terminal/readers/{reader}/present_payment_method", http.MethodPost, map[string]string{ + "amount_tip": "integer", "card_present.number": "string", "interac_present.number": "string", "type": "string", @@ -3288,6 +3338,7 @@ func addAllResourcesCmds(rootCmd *cobra.Command) { resource.NewOperationCmd(rTestHelpersIssuingCardsCmd.Cmd, "ship_card", "/v1/test_helpers/issuing/cards/{card}/shipping/ship", http.MethodPost, map[string]string{}, &Config) resource.NewOperationCmd(rTestHelpersRefundsCmd.Cmd, "expire", "/v1/test_helpers/refunds/{refund}/expire", http.MethodPost, map[string]string{}, &Config) resource.NewOperationCmd(rTestHelpersTerminalReadersCmd.Cmd, "present_payment_method", "/v1/test_helpers/terminal/readers/{reader}/present_payment_method", http.MethodPost, map[string]string{ + "amount_tip": "integer", "card_present.number": "string", "interac_present.number": "string", "type": "string",