From fdb6ef7b6812afe1c1bfb359667399dc06e4b61b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mart=C3=ADn=20Ag=C3=BCera?= Date: Wed, 7 Jan 2026 16:14:03 -0300 Subject: [PATCH 1/5] feat: [AI-575] - enhanced order schema by adding tax_lines and discount_lines properties --- schemas/checkouts/checkout.yml | 10 ++++++++++ schemas/orders/order_response.yml | 12 ++++++++++++ 2 files changed, 22 insertions(+) diff --git a/schemas/checkouts/checkout.yml b/schemas/checkouts/checkout.yml index 1b7d77e..2e8bd37 100644 --- a/schemas/checkouts/checkout.yml +++ b/schemas/checkouts/checkout.yml @@ -97,6 +97,16 @@ properties: example: { "key": "value" } maxProperties: 100 description: "It is a set of key-value pairs that you can attach to the order. It can be used to store additional information about the order in a structured format." + tax_lines: + description: "List of [taxes](https://developers.conekta.com/v2.2.0/reference/orderscreatetaxes) that are applied to the order." + type: array + items: + $ref: ../../schemas/orders/order_tax_request.yml + discount_lines: + description: "List of [discounts](https://developers.conekta.com/v2.2.0/reference/orderscreatediscountline) that are applied to the order. You must have at least one discount." + type: array + items: + $ref: ../../schemas/orders/order_discount_lines_request.yml payments_limit_count: type: integer format: int8 diff --git a/schemas/orders/order_response.yml b/schemas/orders/order_response.yml index e7fcfa4..0b96fc4 100644 --- a/schemas/orders/order_response.yml +++ b/schemas/orders/order_response.yml @@ -173,6 +173,18 @@ properties: title: discount_lines_data_response allOf: - $ref: ../../schemas/orders/discount_lines_response.yml + tax_lines: + title: order_tax_lines_response + allOf: + - $ref: ../pagination/pagination.yml + - type: object + properties: + data: + type: array + items: + title: tax_lines_data_response + allOf: + - $ref: ../../schemas/orders/update_order_tax_response.yml fiscal_entity: type: object title: order_fiscal_entity_response From 66f2cc04316fc64b1125839e61e788d8db11befc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mart=C3=ADn=20Ag=C3=BCera?= Date: Wed, 7 Jan 2026 16:18:49 -0300 Subject: [PATCH 2/5] feat: [AI-575] - added tax_lines and order_tax_lines_response schemas to enhance order API documentation --- _build/api.yaml | 75 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) diff --git a/_build/api.yaml b/_build/api.yaml index 0eb6c38..1686df6 100644 --- a/_build/api.yaml +++ b/_build/api.yaml @@ -19265,6 +19265,67 @@ components: $ref: "#/components/schemas/discount_lines_data_response" type: array title: order_discount_lines_response + tax_lines_data_response: + allOf: + - allOf: + - description: create new taxes for an existing order + properties: + amount: + description: The amount to be collected for tax in cents + example: 100 + format: int64 + minimum: 0 + type: integer + description: + description: description or tax's name + example: testing + minLength: 2 + type: string + metadata: + additionalProperties: true + example: + key: value + maxProperties: 100 + type: object + required: + - amount + - description + - properties: + id: + example: tax_lin_2tQ8dC5mg1UADmVPo + type: string + object: + example: tax_line + type: string + parent_id: + example: ord_2tPAmKCEJqh8RE6nY + type: string + description: create new taxes for an existing order response + required: + - id + title: tax_lines_data_response + order_tax_lines_response: + allOf: + - description: pagination metadata + properties: + has_more: + description: Indicates if there are more pages to be requested + example: false + type: boolean + object: + description: "Object type, in this case is list" + example: list + type: string + required: + - has_more + - object + title: pagination metadata + - properties: + data: + items: + $ref: "#/components/schemas/tax_lines_data_response" + type: array + title: order_tax_lines_response order_fiscal_entity_address_response: allOf: - description: Address of the fiscal entity @@ -19600,6 +19661,8 @@ components: $ref: "#/components/schemas/order_response_customer_info" discount_lines: $ref: "#/components/schemas/order_discount_lines_response" + tax_lines: + $ref: "#/components/schemas/order_tax_lines_response" fiscal_entity: $ref: "#/components/schemas/order_fiscal_entity_response" id: @@ -20747,6 +20810,18 @@ components: key: value maxProperties: 100 type: object + tax_lines: + description: "List of [taxes](https://developers.conekta.com/v2.2.0/reference/orderscreatetaxes)\ + \ that are applied to the order." + items: + $ref: "#/components/schemas/a_order_tax_lines_inner" + type: array + discount_lines: + description: "List of [discounts](https://developers.conekta.com/v2.2.0/reference/orderscreatediscountline)\ + \ that are applied to the order. You must have at least one discount." + items: + $ref: "#/components/schemas/order_discount_lines_request" + type: array required: - currency - line_items From 6ad5973ea66f323bc3cb8d6cd34b447e2f88b168 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mart=C3=ADn=20Ag=C3=BCera?= Date: Wed, 7 Jan 2026 16:30:19 -0300 Subject: [PATCH 3/5] refactor: [AI-575] - updated discount_lines description in order schemas for clarity --- _build/api.yaml | 6 +++--- schemas/checkouts/checkout.yml | 2 +- schemas/orders/order_request.yml | 2 +- schemas/orders/order_update_request.yml | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/_build/api.yaml b/_build/api.yaml index 1686df6..7cef91f 100644 --- a/_build/api.yaml +++ b/_build/api.yaml @@ -20080,7 +20080,7 @@ components: $ref: "#/components/schemas/a_order_customer_info" discount_lines: description: "List of [discounts](https://developers.conekta.com/v2.2.0/reference/orderscreatediscountline)\ - \ that are applied to the order. You must have at least one discount." + \ that are applied to the order." items: $ref: "#/components/schemas/order_discount_lines_request" type: array @@ -20196,7 +20196,7 @@ components: $ref: "#/components/schemas/order_update_customer_info" discount_lines: description: "List of [discounts](https://developers.conekta.com/v2.2.0/reference/orderscreatediscountline)\ - \ that are applied to the order. You must have at least one discount." + \ that are applied to the order." items: $ref: "#/components/schemas/order_discount_lines_request" type: array @@ -20818,7 +20818,7 @@ components: type: array discount_lines: description: "List of [discounts](https://developers.conekta.com/v2.2.0/reference/orderscreatediscountline)\ - \ that are applied to the order. You must have at least one discount." + \ that are applied to the order." items: $ref: "#/components/schemas/order_discount_lines_request" type: array diff --git a/schemas/checkouts/checkout.yml b/schemas/checkouts/checkout.yml index 2e8bd37..9c1f45c 100644 --- a/schemas/checkouts/checkout.yml +++ b/schemas/checkouts/checkout.yml @@ -103,7 +103,7 @@ properties: items: $ref: ../../schemas/orders/order_tax_request.yml discount_lines: - description: "List of [discounts](https://developers.conekta.com/v2.2.0/reference/orderscreatediscountline) that are applied to the order. You must have at least one discount." + description: "List of [discounts](https://developers.conekta.com/v2.2.0/reference/orderscreatediscountline) that are applied to the order." type: array items: $ref: ../../schemas/orders/order_discount_lines_request.yml diff --git a/schemas/orders/order_request.yml b/schemas/orders/order_request.yml index fde80d1..bb14548 100644 --- a/schemas/orders/order_request.yml +++ b/schemas/orders/order_request.yml @@ -25,7 +25,7 @@ properties: - $ref: ../customers/customer_info.yml - $ref: ../customers/customer_info_just_customer_id.yml discount_lines: - description: "List of [discounts](https://developers.conekta.com/v2.2.0/reference/orderscreatediscountline) that are applied to the order. You must have at least one discount." + description: "List of [discounts](https://developers.conekta.com/v2.2.0/reference/orderscreatediscountline) that are applied to the order." type: array items: $ref: order_discount_lines_request.yml diff --git a/schemas/orders/order_update_request.yml b/schemas/orders/order_update_request.yml index 0f68f49..107eab3 100644 --- a/schemas/orders/order_update_request.yml +++ b/schemas/orders/order_update_request.yml @@ -19,7 +19,7 @@ properties: - $ref: ../customers/customer_info.yml - $ref: ../customers/customer_info_just_customer_id.yml discount_lines: - description: "List of [discounts](https://developers.conekta.com/v2.2.0/reference/orderscreatediscountline) that are applied to the order. You must have at least one discount." + description: "List of [discounts](https://developers.conekta.com/v2.2.0/reference/orderscreatediscountline) that are applied to the order." type: array items: $ref: order_discount_lines_request.yml From ab4290cbcccb90efe58155b55b16a808c13b4d3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mart=C3=ADn=20Ag=C3=BCera?= Date: Wed, 7 Jan 2026 16:39:06 -0300 Subject: [PATCH 4/5] refactor: [AI-575] - updated order_tax_lines references to order_tax_request in API documentation for consistency --- _build/api.yaml | 13 ++++++++----- schemas/orders/order_tax_request.yml | 1 + 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/_build/api.yaml b/_build/api.yaml index 7cef91f..6ed9d19 100644 --- a/_build/api.yaml +++ b/_build/api.yaml @@ -13398,7 +13398,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/a_order_tax_lines_inner" + $ref: "#/components/schemas/order_tax_request" description: requested field for a taxes required: true responses: @@ -19290,6 +19290,7 @@ components: required: - amount - description + title: order_tax_request - properties: id: example: tax_lin_2tQ8dC5mg1UADmVPo @@ -20036,7 +20037,7 @@ components: required: - amount title: shipping_request - a_order_tax_lines_inner: + order_tax_request: description: create new taxes for an existing order properties: amount: @@ -20059,6 +20060,7 @@ components: required: - amount - description + title: order_tax_request a_order: description: a order properties: @@ -20128,7 +20130,7 @@ components: description: "List of [taxes](https://developers.conekta.com/v2.2.0/reference/orderscreatetaxes)\ \ that are applied to the order." items: - $ref: "#/components/schemas/a_order_tax_lines_inner" + $ref: "#/components/schemas/order_tax_request" type: array three_ds_mode: description: "Indicates the 3DS2 mode for the order, either smart or strict.\ @@ -20225,7 +20227,7 @@ components: type: array tax_lines: items: - $ref: "#/components/schemas/a_order_tax_lines_inner" + $ref: "#/components/schemas/order_tax_request" type: array title: order_update order_capture_request: @@ -20814,7 +20816,7 @@ components: description: "List of [taxes](https://developers.conekta.com/v2.2.0/reference/orderscreatetaxes)\ \ that are applied to the order." items: - $ref: "#/components/schemas/a_order_tax_lines_inner" + $ref: "#/components/schemas/order_tax_request" type: array discount_lines: description: "List of [discounts](https://developers.conekta.com/v2.2.0/reference/orderscreatediscountline)\ @@ -21723,6 +21725,7 @@ components: required: - amount - description + title: order_tax_request - properties: id: example: tax_lin_2tQ8dC5mg1UADmVPo diff --git a/schemas/orders/order_tax_request.yml b/schemas/orders/order_tax_request.yml index 431758e..1c168c9 100644 --- a/schemas/orders/order_tax_request.yml +++ b/schemas/orders/order_tax_request.yml @@ -1,3 +1,4 @@ +title: order_tax_request description: "create new taxes for an existing order" type: object required: From 604f46b66d2e7822b42e9f6141eef27a2b76e4f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mart=C3=ADn=20Ag=C3=BCera?= Date: Thu, 8 Jan 2026 12:07:44 -0300 Subject: [PATCH 5/5] refactor: [AI-575] - renamed and updated order_tax_response schema for clarity and consistency in API documentation --- _build/api.yaml | 208 ++++--------------- schemas/orders/order_response.yml | 28 +-- schemas/orders/update_order_tax_response.yml | 1 + 3 files changed, 52 insertions(+), 185 deletions(-) diff --git a/_build/api.yaml b/_build/api.yaml index 6ed9d19..258e92f 100644 --- a/_build/api.yaml +++ b/_build/api.yaml @@ -13406,7 +13406,7 @@ paths: content: application/vnd.conekta-v2.2.0+json: schema: - $ref: "#/components/schemas/ordersCreateTaxes_200_response" + $ref: "#/components/schemas/order_tax_response" description: successful "401": content: @@ -13517,7 +13517,7 @@ paths: content: application/vnd.conekta-v2.2.0+json: schema: - $ref: "#/components/schemas/ordersCreateTaxes_200_response" + $ref: "#/components/schemas/order_tax_response" description: successful "401": content: @@ -13649,7 +13649,7 @@ paths: content: application/vnd.conekta-v2.2.0+json: schema: - $ref: "#/components/schemas/ordersCreateTaxes_200_response" + $ref: "#/components/schemas/order_tax_response" description: successful "401": content: @@ -19198,135 +19198,45 @@ components: example: cus_23874283647 type: string title: customer_info_response - discount_lines_data_response: + order_tax_response: allOf: - - allOf: - - description: List of discounts that apply to the order. - properties: - amount: - description: "The amount to be deducted from the total sum of all payments,\ - \ in cents." - example: 500 - format: int64 - minimum: 0 - type: integer - code: - description: Discount code. - example: "123" - type: string - type: - description: "It can be 'loyalty', 'campaign', 'coupon' o 'sign'" - example: loyalty - type: string - required: - - amount - - code - - type - title: order_discount_lines_request - name: order_discount_lines_request - - properties: - id: - description: The discount line id - example: dis_lin_2tQQ58HPgPw7StE8z - type: string - object: - description: The object name - example: discount_line - type: string - parent_id: - description: The order id - example: ord_2tPAmKCEJqh8RE6nY - type: string - required: - - id - - object - - parent_id - title: discount_lines_order_response - title: discount_lines_data_response - order_discount_lines_response: - allOf: - - description: pagination metadata + - description: create new taxes for an existing order properties: - has_more: - description: Indicates if there are more pages to be requested - example: false - type: boolean - object: - description: "Object type, in this case is list" - example: list + amount: + description: The amount to be collected for tax in cents + example: 100 + format: int64 + minimum: 0 + type: integer + description: + description: description or tax's name + example: testing + minLength: 2 type: string + metadata: + additionalProperties: true + example: + key: value + maxProperties: 100 + type: object required: - - has_more - - object - title: pagination metadata + - amount + - description + title: order_tax_request - properties: - data: - items: - $ref: "#/components/schemas/discount_lines_data_response" - type: array - title: order_discount_lines_response - tax_lines_data_response: - allOf: - - allOf: - - description: create new taxes for an existing order - properties: - amount: - description: The amount to be collected for tax in cents - example: 100 - format: int64 - minimum: 0 - type: integer - description: - description: description or tax's name - example: testing - minLength: 2 - type: string - metadata: - additionalProperties: true - example: - key: value - maxProperties: 100 - type: object - required: - - amount - - description - title: order_tax_request - - properties: - id: - example: tax_lin_2tQ8dC5mg1UADmVPo - type: string - object: - example: tax_line - type: string - parent_id: - example: ord_2tPAmKCEJqh8RE6nY - type: string - description: create new taxes for an existing order response - required: - - id - title: tax_lines_data_response - order_tax_lines_response: - allOf: - - description: pagination metadata - properties: - has_more: - description: Indicates if there are more pages to be requested - example: false - type: boolean + id: + example: tax_lin_2tQ8dC5mg1UADmVPo + type: string object: - description: "Object type, in this case is list" - example: list + example: tax_line type: string - required: - - has_more - - object - title: pagination metadata - - properties: - data: - items: - $ref: "#/components/schemas/tax_lines_data_response" - type: array - title: order_tax_lines_response + parent_id: + example: ord_2tPAmKCEJqh8RE6nY + type: string + description: create new taxes for an existing order response + required: + - id + title: order_tax_response order_fiscal_entity_address_response: allOf: - description: Address of the fiscal entity @@ -19661,9 +19571,15 @@ components: customer_info: $ref: "#/components/schemas/order_response_customer_info" discount_lines: - $ref: "#/components/schemas/order_discount_lines_response" + description: List of discounts that are applied to the order + items: + $ref: "#/components/schemas/discount_lines_order_response" + type: array tax_lines: - $ref: "#/components/schemas/order_tax_lines_response" + description: List of taxes that are applied to the order + items: + $ref: "#/components/schemas/order_tax_response" + type: array fiscal_entity: $ref: "#/components/schemas/order_fiscal_entity_response" id: @@ -21701,44 +21617,6 @@ components: format: uri type: string title: customer_portal_response - ordersCreateTaxes_200_response: - allOf: - - description: create new taxes for an existing order - properties: - amount: - description: The amount to be collected for tax in cents - example: 100 - format: int64 - minimum: 0 - type: integer - description: - description: description or tax's name - example: testing - minLength: 2 - type: string - metadata: - additionalProperties: true - example: - key: value - maxProperties: 100 - type: object - required: - - amount - - description - title: order_tax_request - - properties: - id: - example: tax_lin_2tQ8dC5mg1UADmVPo - type: string - object: - example: tax_line - type: string - parent_id: - example: ord_2tPAmKCEJqh8RE6nY - type: string - description: create new taxes for an existing order response - required: - - id ordersUpdateTaxes_request: description: create new taxes for an existing order properties: diff --git a/schemas/orders/order_response.yml b/schemas/orders/order_response.yml index 0b96fc4..6330040 100644 --- a/schemas/orders/order_response.yml +++ b/schemas/orders/order_response.yml @@ -162,29 +162,17 @@ properties: - $ref: order_customer_info_response.yml - $ref: ../customers/customer_info_just_customer_id_response.yml discount_lines: + type: array title: order_discount_lines_response - allOf: - - $ref: ../pagination/pagination.yml - - type: object - properties: - data: - type: array - items: - title: discount_lines_data_response - allOf: - - $ref: ../../schemas/orders/discount_lines_response.yml + description: "List of discounts that are applied to the order" + items: + $ref: ../../schemas/orders/discount_lines_response.yml tax_lines: + type: array title: order_tax_lines_response - allOf: - - $ref: ../pagination/pagination.yml - - type: object - properties: - data: - type: array - items: - title: tax_lines_data_response - allOf: - - $ref: ../../schemas/orders/update_order_tax_response.yml + description: "List of taxes that are applied to the order" + items: + $ref: ../../schemas/orders/update_order_tax_response.yml fiscal_entity: type: object title: order_fiscal_entity_response diff --git a/schemas/orders/update_order_tax_response.yml b/schemas/orders/update_order_tax_response.yml index d87e354..983a05d 100644 --- a/schemas/orders/update_order_tax_response.yml +++ b/schemas/orders/update_order_tax_response.yml @@ -1,3 +1,4 @@ +title: order_tax_response description: "create new taxes for an existing order response" required: - id