diff --git a/website/openapi_v2.en.yaml b/website/openapi_v2.en.yaml index 0823d4ab4..42ba8412b 100644 --- a/website/openapi_v2.en.yaml +++ b/website/openapi_v2.en.yaml @@ -13701,7 +13701,22 @@ components: complement_string: type: string description: Original string of the fiscal stamp. - required: [date, sat_signature, sat_cert_number, signature, complement_string] + required: [version, date, sat_signature, sat_cert_number, signature, complement_string] + oneOf: + - type: object + required: [version] + properties: + version: + type: string + enum: ['1.0'] + - type: object + required: [version, rfc_provider_cert] + properties: + version: + type: string + enum: ['1.1'] + rfc_provider_cert: + type: string StampProperties: type: object description: Information about the digital stamp added by the PAC. diff --git a/website/openapi_v2.yaml b/website/openapi_v2.yaml index d00cadc0a..2554e2e5e 100644 --- a/website/openapi_v2.yaml +++ b/website/openapi_v2.yaml @@ -13653,7 +13653,22 @@ components: complement_string: type: string description: Cadena original del timbre fiscal digital. - required: [date, sat_signature, sat_cert_number, signature, complement_string] + required: [version, date, sat_signature, sat_cert_number, signature, complement_string] + oneOf: + - type: object + required: [version] + properties: + version: + type: string + enum: ['1.0'] + - type: object + required: [version, rfc_provider_cert] + properties: + version: + type: string + enum: ['1.1'] + rfc_provider_cert: + type: string StampProperties: type: object description: Información sobre el timbre fiscal digital agregado por el PAC. diff --git a/website/test/openapi-types.fixture.txt b/website/test/openapi-types.fixture.txt index bc7fb1408..7659e76b2 100644 --- a/website/test/openapi-types.fixture.txt +++ b/website/test/openapi-types.fixture.txt @@ -167,7 +167,7 @@ const createdInvoiceStamp: components["schemas"]["Stamp"] | null | undefined = c void createdInvoiceDate; void createdInvoiceStamp; if (createdInvoiceResponse.status === 'valid' || createdInvoiceResponse.status === 'canceled') { - const stampedFields: [string, string, string, string, string, string, string | undefined, string | undefined] = [ + const stampedFields: [string, string, string, string, string, string, string, string | undefined] = [ createdInvoiceResponse.uuid, createdInvoiceResponse.stamp.date, createdInvoiceResponse.stamp.signature, @@ -178,6 +178,10 @@ if (createdInvoiceResponse.status === 'valid' || createdInvoiceResponse.status = createdInvoiceResponse.stamp.legend, ]; void stampedFields; + if (createdInvoiceResponse.stamp.version === '1.1') { + const certifierRfc: string = createdInvoiceResponse.stamp.rfc_provider_cert; + void certifierRfc; + } } // A payment summary can be reused directly in a payment complement.