From 201679890095d21a1acc69e51895d24c89b7f973 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Fri, 21 Jul 2023 21:01:27 +0000 Subject: [PATCH] Update OpenAPI specification --- openapi/spec3.beta.sdk.json | 618 +++++++++++++++++++++++++++++++++++- openapi/spec3.beta.sdk.yaml | 488 +++++++++++++++++++++++++++- 2 files changed, 1104 insertions(+), 2 deletions(-) diff --git a/openapi/spec3.beta.sdk.json b/openapi/spec3.beta.sdk.json index ee75d623..feed5d72 100644 --- a/openapi/spec3.beta.sdk.json +++ b/openapi/spec3.beta.sdk.json @@ -51209,6 +51209,136 @@ ] } }, + "tax.form": { + "description": "Tax forms are legal documents which are delivered to one or more tax authorities for information reporting purposes.\n\nRelated guide: [US tax reporting for Connect platforms](https://stripe.com/docs/connect/tax-reporting)", + "properties": { + "corrected_by": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/tax.form" + } + ], + "description": "The form that corrects this form, if any.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/tax.form" + } + ] + } + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "filing_statuses": { + "description": "A list of tax filing statuses. Note that a filing status will only be included if the form has been filed directly with the jurisdiction’s tax authority.", + "items": { + "$ref": "#/components/schemas/tax_reporting_resource_tax_form_filing_status" + }, + "type": "array" + }, + "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.form" + ], + "type": "string" + }, + "payee": { + "$ref": "#/components/schemas/tax_reporting_resource_tax_form_payee" + }, + "type": { + "description": "The type of the tax form. An additional hash is included on the tax form with a name matching this value. It contains additional information specific to the tax form type.", + "enum": [ + "us_1099_k", + "us_1099_misc", + "us_1099_nec" + ], + "type": "string" + }, + "us_1099_k": { + "$ref": "#/components/schemas/tax_reporting_resource_tax_form_us1099_k" + }, + "us_1099_misc": { + "$ref": "#/components/schemas/tax_reporting_resource_tax_form_us1099_misc" + }, + "us_1099_nec": { + "$ref": "#/components/schemas/tax_reporting_resource_tax_form_us1099_nec" + } + }, + "required": [ + "corrected_by", + "created", + "filing_statuses", + "id", + "livemode", + "object", + "payee", + "type" + ], + "title": "TaxForm", + "type": "object", + "x-expandableFields": [ + "corrected_by", + "filing_statuses", + "payee", + "us_1099_k", + "us_1099_misc", + "us_1099_nec" + ], + "x-resourceId": "tax.form", + "x-stripeOperations": [ + { + "method_name": "list", + "method_on": "service", + "method_type": "list", + "operation": "get", + "path": "/v1/tax/forms" + }, + { + "method_name": "retrieve", + "method_on": "service", + "method_type": "retrieve", + "operation": "get", + "path": "/v1/tax/forms/{id}" + }, + { + "method_name": "pdf", + "method_on": "service", + "method_type": "custom", + "operation": "get", + "path": "/v1/tax/forms/{id}/pdf" + } + ], + "x-stripeResource": { + "class_name": "Form", + "has_collection_class": true, + "in_package": "Tax", + "inner_classes": [ + "tax_reporting_resource_tax_form_filing_status", + "tax_reporting_resource_tax_form_payee", + "tax_reporting_resource_tax_form_us1099_k", + "tax_reporting_resource_tax_form_us1099_misc", + "tax_reporting_resource_tax_form_us1099_nec" + ] + } + }, "tax.registration": { "description": "A Tax `Registration` lets us know that your business is registered to collect tax on payments within a region, enabling you to [automatically collect tax](https://stripe.com/docs/tax).\n\nStripe doesn't register on your behalf with the relevant authorities when you create a Tax `Registration` object. For more information on how to register to collect tax, see [our guide](https://stripe.com/docs/tax/registering).\n\nRelated guide: [Using the Registrations API](https://stripe.com/docs/tax/registrations-api)", "properties": { @@ -53353,6 +53483,183 @@ "in_package": "" } }, + "tax_reporting_resource_tax_form_filing_status": { + "description": "", + "properties": { + "effective_at": { + "description": "Time when the filing status was updated.", + "format": "unix-time", + "type": "integer" + }, + "jurisdiction": { + "$ref": "#/components/schemas/tax_reporting_resource_tax_form_filing_status_resource_jurisdiction" + }, + "value": { + "description": "The current status of the filed form.", + "enum": [ + "accepted", + "filed", + "rejected" + ], + "type": "string" + } + }, + "required": [ + "effective_at", + "jurisdiction", + "value" + ], + "title": "TaxReportingResourceTaxFormFilingStatus", + "type": "object", + "x-expandableFields": [ + "jurisdiction" + ], + "x-stripeResource": { + "class_name": "FilingStatus", + "in_class": "tax.form", + "inner_classes": [ + "tax_reporting_resource_tax_form_filing_status_resource_jurisdiction" + ] + } + }, + "tax_reporting_resource_tax_form_filing_status_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)). Always `US`.", + "maxLength": 5000, + "type": "string" + }, + "level": { + "description": "Indicates the level of the jurisdiction where the form was filed.", + "enum": [ + "country", + "state" + ], + "type": "string" + }, + "state": { + "description": "[ISO 3166-2 U.S. state code](https://en.wikipedia.org/wiki/ISO_3166-2:US), without country prefix, if any. For example, \"NY\" for New York, United States.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "required": [ + "country", + "level", + "state" + ], + "title": "TaxReportingResourceTaxFormFilingStatusResourceJurisdiction", + "type": "object", + "x-expandableFields": [], + "x-stripeResource": { + "class_name": "Jurisdiction", + "in_class": "tax_reporting_resource_tax_form_filing_status" + } + }, + "tax_reporting_resource_tax_form_payee": { + "description": "", + "properties": { + "account": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/account" + } + ], + "description": "The ID of the payee's Stripe account.", + "nullable": true, + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/account" + } + ] + } + }, + "type": { + "description": "Always `account`.", + "enum": [ + "account" + ], + "type": "string" + } + }, + "required": [ + "account", + "type" + ], + "title": "TaxReportingResourceTaxFormPayee", + "type": "object", + "x-expandableFields": [ + "account" + ], + "x-stripeResource": { + "class_name": "Payee", + "in_class": "tax.form" + } + }, + "tax_reporting_resource_tax_form_us1099_k": { + "description": "", + "properties": { + "reporting_year": { + "description": "Year represented by the information reported on the tax form.", + "type": "integer" + } + }, + "required": [ + "reporting_year" + ], + "title": "TaxReportingResourceTaxFormUS1099K", + "type": "object", + "x-expandableFields": [], + "x-stripeResource": { + "class_name": "US1099K", + "in_class": "tax.form" + } + }, + "tax_reporting_resource_tax_form_us1099_misc": { + "description": "", + "properties": { + "reporting_year": { + "description": "Year represented by the information reported on the tax form.", + "type": "integer" + } + }, + "required": [ + "reporting_year" + ], + "title": "TaxReportingResourceTaxFormUS1099MISC", + "type": "object", + "x-expandableFields": [], + "x-stripeResource": { + "class_name": "US1099MISC", + "in_class": "tax.form" + } + }, + "tax_reporting_resource_tax_form_us1099_nec": { + "description": "", + "properties": { + "reporting_year": { + "description": "Year represented by the information reported on the tax form.", + "type": "integer" + } + }, + "required": [ + "reporting_year" + ], + "title": "TaxReportingResourceTaxFormUS1099NEC", + "type": "object", + "x-expandableFields": [], + "x-stripeResource": { + "class_name": "US1099NEC", + "in_class": "tax.form" + } + }, "terminal.configuration": { "description": "A Configurations object represents how features should be configured for terminal readers.", "properties": { @@ -59571,7 +59878,7 @@ "description": "The Stripe REST API. Please see https://stripe.com/docs/api for more details.", "termsOfService": "https://stripe.com/us/terms/", "title": "Stripe API", - "version": "2022-11-15; embedded_connect_beta=v1; server_side_confirmation_beta=v1; orders_beta=v4; gift_cards_beta=v1; tax_calc_beta=v3; tax_txns_beta=v2; tax_regs_beta=v2; unified_accounts_beta=v1; terminal_collect_inputs_beta=v1; terminal_collect_confirm_beta=v1; financial_connections_transactions_beta=v1; payment_method_configs_api_beta=v1; specify_payment_method_config_beta=v1", + "version": "2022-11-15; embedded_connect_beta=v1; server_side_confirmation_beta=v1; orders_beta=v4; gift_cards_beta=v1; tax_calc_beta=v3; tax_txns_beta=v2; tax_regs_beta=v2; unified_accounts_beta=v1; terminal_collect_inputs_beta=v1; terminal_collect_confirm_beta=v1; retrieve_tax_forms_beta=v1; financial_connections_transactions_beta=v1; payment_method_configs_api_beta=v1; specify_payment_method_config_beta=v1", "x-stripeSpecFilename": "spec3.beta.sdk" }, "openapi": "3.0.0", @@ -146775,6 +147082,313 @@ } } }, + "/v1/tax/forms": { + "get": { + "description": "
Returns a list of tax forms which were previously created. The tax forms are returned in sorted order, with the oldest tax forms appearing first.
", + "operationId": "GetTaxForms", + "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": 5000, + "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": "The payee whose volume is represented on the tax form.", + "explode": true, + "in": "query", + "name": "payee", + "required": true, + "schema": { + "properties": { + "account": { + "description": "The ID of the Stripe account whose forms will be retrieved.", + "maxLength": 5000, + "type": "string" + }, + "type": { + "description": "Specifies the payee type. Always `account`.", + "enum": [ + "account" + ], + "type": "string" + } + }, + "required": [ + "type" + ], + "title": "payee_params", + "type": "object" + }, + "style": "deepObject" + }, + { + "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": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "An optional filter on the list, based on the object `type` field. Without the filter, the list includes all current and future tax form types. If your integration expects only one type of tax form in the response, make sure to provide a type value in the request.", + "in": "query", + "name": "type", + "required": false, + "schema": { + "enum": [ + "us_1099_k", + "us_1099_misc", + "us_1099_nec" + ], + "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.form" + }, + "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, + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "TaxReportingResourceTaxFormList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/tax/forms/{id}": { + "get": { + "description": "Retrieves the details of a tax form that has previously been created. Supply the unique tax form ID that was returned from your previous request, and Stripe will return the corresponding tax form information.
", + "operationId": "GetTaxFormsId", + "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": "id", + "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.form" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/tax/forms/{id}/pdf": { + "get": { + "description": "Download the PDF for a tax form.
", + "operationId": "GetTaxFormsIdPdf", + "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": "id", + "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/pdf": { + "schema": { + "format": "binary", + "type": "string" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, "/v1/tax/registrations": { "get": { "description": "Returns a list of Tax Registration
objects.
Returns a list of tax forms which were previously created. The tax + forms are returned in sorted order, with the oldest tax forms appearing + first.
+ operationId: GetTaxForms + 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: 5000 + 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: The payee whose volume is represented on the tax form. + explode: true + in: query + name: payee + required: true + schema: + properties: + account: + description: The ID of the Stripe account whose forms will be retrieved. + maxLength: 5000 + type: string + type: + description: Specifies the payee type. Always `account`. + enum: + - account + type: string + required: + - type + title: payee_params + type: object + style: deepObject + - 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: 5000 + type: string + style: form + - description: >- + An optional filter on the list, based on the object `type` field. + Without the filter, the list includes all current and future tax + form types. If your integration expects only one type of tax form in + the response, make sure to provide a type value in the request. + in: query + name: type + required: false + schema: + enum: + - us_1099_k + - us_1099_misc + - us_1099_nec + 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.form' + 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 + type: string + required: + - data + - has_more + - object + - url + title: TaxReportingResourceTaxFormList + type: object + x-expandableFields: + - data + description: Successful response. + default: + content: + application/json: + schema: + $ref: '#/components/schemas/error' + description: Error response. + '/v1/tax/forms/{id}': + get: + description: >- +Retrieves the details of a tax form that has previously been created. + Supply the unique tax form ID that was returned from your previous + request, and Stripe will return the corresponding tax form + information.
+ operationId: GetTaxFormsId + 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: id + 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.form' + description: Successful response. + default: + content: + application/json: + schema: + $ref: '#/components/schemas/error' + description: Error response. + '/v1/tax/forms/{id}/pdf': + get: + description:Download the PDF for a tax form.
+ operationId: GetTaxFormsIdPdf + 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: id + 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/pdf: + schema: + format: binary + type: string + description: Successful response. + default: + content: + application/json: + schema: + $ref: '#/components/schemas/error' + description: Error response. /v1/tax/registrations: get: description:Returns a list of Tax Registration
objects.