From 117d6cb60466619045184f6c7b08ecdea5a67d74 Mon Sep 17 00:00:00 2001 From: p-woznikowski Date: Thu, 28 Nov 2024 17:15:04 +0100 Subject: [PATCH 01/23] Fix to condition descriptions --- reference/OpenAPI.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reference/OpenAPI.json b/reference/OpenAPI.json index 65e10f27..32a44615 100644 --- a/reference/OpenAPI.json +++ b/reference/OpenAPI.json @@ -29700,7 +29700,7 @@ "ValidationRuleConditions": { "title": "Validation Rule Conditions", "type": "object", - "description": "A set of key value pairs representing the condition name and value. The list of available conditions is provided below: \n\n| **Condition (key)** | **Definition** | \n|---------------------|---------------------------------------------------------------|\n| `$is` | A property is a predefined value. | \n| `$is_not` | A property is not a predefined value. | \n| `$in` | A property is one value of the values in a predefined list of values. | \n|`$not_in` | A property is not one of the values in a predefined list of values. | \n| `$less_than` | A property is less than a predefined value. Can be also used with datetime. | \n| `$less_than_or_equal` | A property is less than or equal to a predefined value. Can be also used with datetime. | \n| `$more_than` | A property is more than a predefined value. Can be also used with datetime. | \n| `$more_than_or_equal` | A property is more than or equal to a predefined value. Can be also used with datetime. | \n| `$starts_with` | A property starts with the predefined sequence of characters. | \n| `$ends_with ` | A property ends with the predefined sequence of characters. | \n| `$contains` | A property contains the predefined sequence of characters. | \n| `$timeframe` | A property occurs within the time frame, i.e. every 1 day for 1 hour, e.g. `$timeframe: [\"2024-11-12T14:59:23.019Z;P1D;PT1H\"]` | \n| `$timeframe_absolute` | A property occurs between two dates and times, e.g. `2024-11-14T16:02:00.000Z;2024-11-28T16:02:00.000Z` | \n| `$timeframe_daily_hours` | A property occurs between selected hours on selected days of the week, e.g. `18:00;20:01;2,3`, where `0` equals Sunday, `1` equals Monday, `2` equals Tuesday, `3` equals Wednesday, `4` equals Thursday, `5` equals Friday, and `6` equals Saturday. | \n| `$dow` | A property occurs within given days of the week, where `0` equals Sunday, `1` equals Monday, `2` equals Tuesday, `3` equals Wednesday, `4` equals Thursday, `5` equals Friday, and `6` equals Saturday. | \n| `$count` | For array metadata; the property must have exactly the defined number of elements. | \n| `$count_more` | For array metadata; the property must have more elements than the defined number. | \n| `$count_less` | For array metadata; the property must have less elements than the defined number. | \n| `$from` | The property must belong to the predefined value. Related to product collections and best used together with the `$is` condition. | \n | `$after` | The value is after the date. | \n| `$before` | The value is before the date. | \n| `$more_than_ago` | The date is more than the defined value ago, relative to today. | \n| `$less_than_ago` | The date is less than the defined value ago, relative to today. | \n| `is_days_ago` | The date is exactly the defined value ago, relative to today. | \n| `$more_than_future` | The date is more than the defined value in the future, relative to today. | \n| `$less_than_ago` | The date is less than the defined value in the future, relative to today. | \n| `$is_days_in_future` | The date is exactly the defined value in the future, relative to today. | \n", + "description": "A set of key value pairs representing the condition name and value. The list of available conditions is provided below: \n\n| **Condition (key)** | **Definition** | \n|---------------------|---------------------------------------------------------------|\n| `$is` | A property is a predefined value. | \n| `$is_not` | A property is not a predefined value. | \n| `$in` | A property is one value of the values in a predefined list of values. | \n|`$not_in` | A property is not one of the values in a predefined list of values. | \n| `$less_than` | A property is less than a predefined value. Can be also used with datetime. | \n| `$less_than_or_equal` | A property is less than or equal to a predefined value. Can be also used with datetime. | \n| `$more_than` | A property is more than a predefined value. Can be also used with datetime. | \n| `$more_than_or_equal` | A property is more than or equal to a predefined value. Can be also used with datetime. | \n| `$starts_with` | A property starts with the predefined sequence of characters. | \n| `$ends_with ` | A property ends with the predefined sequence of characters. | \n| `$contains` | A property contains the predefined sequence of characters. | \n| `$timeframe` | A property occurs within the time frame, i.e. every 1 day for 1 hour, e.g. `$timeframe: [\"2024-11-12T14:59:23.019Z;P1D;PT1H\"]` | \n| `$timeframe_absolute` | A property occurs between two dates and times, e.g. `2024-11-14T16:02:00.000Z;2024-11-28T16:02:00.000Z` | \n| `$timeframe_daily_hours` | A property occurs between selected hours on selected days of the week, e.g. `18:00;20:01;2,3`, where `0` equals Sunday, `1` equals Monday, `2` equals Tuesday, `3` equals Wednesday, `4` equals Thursday, `5` equals Friday, and `6` equals Saturday. | \n| `$dow` | A property occurs within given days of the week, where `0` equals Sunday, `1` equals Monday, `2` equals Tuesday, `3` equals Wednesday, `4` equals Thursday, `5` equals Friday, and `6` equals Saturday. | \n| `$count` | For array metadata; the property must have exactly the defined number of elements. | \n| `$count_more` | For array metadata; the property must have more elements than the defined number. | \n| `$count_less` | For array metadata; the property must have less elements than the defined number. | \n| `$from` | The property must belong to the predefined value. Related to product collections and best used together with the `$is` condition. | \n | `$after` | The value is after the date. | \n| `$before` | The value is before the date. | \n| `$more_than_ago` | The date is more than the defined value ago expressed in number of days, relative to today, e.g. more than 3 days ago. | \n| `$less_than_ago` | The date is less than the defined value ago expressed in number of days, relative to today, less than 3 days ago. | \n| `is_days_ago` | The date is exactly the defined value ago expressed in number of days, relative to today, e.g. exactly 3 days ago. | \n| `$more_than_future` | The date is more than the defined value in the future expressed in number of days, relative to today, e.g. more than 3 days in the future. | \n| `$less_than_ago` | The date is less than the defined value in the future expressed in number of days, relative to today, e.g. less than 3 days in the future. | \n| `$is_days_in_future` | The date is exactly the defined value in the future expressed in number of days, relative to today, e.g. exactly 3 days in the future. | \n", "properties": { "$is": { "$ref": "#/components/schemas/AnyOne" From e69285852ba9f5b7f5da33d0a26a30f8d5ef3f5e Mon Sep 17 00:00:00 2001 From: p-woznikowski Date: Tue, 3 Dec 2024 16:50:46 +0100 Subject: [PATCH 02/23] Bundle rules p.1 --- .../QUALIFICATIONS-Qualification-Object.md | 2 +- ...VALIDATION-RULES-Validation-Rule-Object.md | 9 +- .../VALIDATIONS-Validation-Object.md | 2 +- production/readOnly-openAPI.json | 14 +- reference/OpenAPI.json | 130 +++++++++++++++++- reference/readonly-sdks/java/OpenAPI.json | 28 +++- reference/readonly-sdks/php/OpenAPI.json | 28 +++- reference/readonly-sdks/python/OpenAPI.json | 28 +++- reference/readonly-sdks/ruby/OpenAPI.json | 28 +++- 9 files changed, 254 insertions(+), 15 deletions(-) diff --git a/docs/reference-docs/QUALIFICATIONS-Qualification-Object.md b/docs/reference-docs/QUALIFICATIONS-Qualification-Object.md index 3aa4ee0e..95e45783 100644 --- a/docs/reference-docs/QUALIFICATIONS-Qualification-Object.md +++ b/docs/reference-docs/QUALIFICATIONS-Qualification-Object.md @@ -235,7 +235,7 @@ One of: | order_item_indices
`array` |

Determines the order in which the discount is applied to the products or SKUs sent in the order object in the request. The counting begins from 0.

| | repeat
`integer` |

Determines the recurrence of the discount, e.g. "repeat": 3 means that the discount is applied to every third item.

| | skip_initially
`integer` |

Determines how many items are skipped before the discount is applied.

| -| target
`string` |

Determines to which kinds of objects the discount is applicable. "ITEM" includes products and SKUs.

Available values: `ITEM` | +| target
`string` |

Determines to which kinds of objects the discount is applicable. ITEM includes products and SKUs. UNIT means particular units within an order line.

Available values: `ITEM`, `UNIT` | ## Inapplicable To [Applicable To](#applicable-to) diff --git a/docs/reference-docs/VALIDATION-RULES-Validation-Rule-Object.md b/docs/reference-docs/VALIDATION-RULES-Validation-Rule-Object.md index d75af972..5cf2c942 100644 --- a/docs/reference-docs/VALIDATION-RULES-Validation-Rule-Object.md +++ b/docs/reference-docs/VALIDATION-RULES-Validation-Rule-Object.md @@ -19,6 +19,7 @@ All of: |:-----|:--------| | name
`string` |

Custom, unique name for set of validation rules.

**Example:**

Business Validation Rule

| | rules | See: [Validation Rule Rules](#validation-rule-rules) | +| bundle_rules | See: [Validation Rule Bundle Rules](#validation-rule-bundle-rules) | | error
`object` |

Contains the error message returned from API when validation / redemption fails to meet requirements of defined rules.

AttributesDescription
message
string

The error message returned from API when validation / redemption fails to meet requirements of defined rules.

| | applicable_to
`object` |
AttributesDescription
excluded
array

Defines which items are excluded from a discount.

Array of Applicable To
included
array

Defines which items are included in a discount.

Array of Applicable To
included_all
boolean

Indicates whether all items are included in the discount.

| | type
`string` |

Type of validation rule.

Available values: `expression`, `basic`, `advanced`, `complex` | @@ -30,6 +31,12 @@ All of: | logic
`string` |

Defines the logic between the rules.

**Example:**

(1 and 2) and (3)

| | [propertyName]
`object` |

Contains the name of the validation rule.

AttributesDescription
name
string

Voucherify specific rule name. The list of available names is provided below.

TypeName
Customercustomer.segment
customer.metadata*
Orderorder.amount
order.initial_amount
order.items.count
order.items.price_any
order.items.price_each
order.items.metadata_any
order.items.metadata_each
order.metadata*
Campaigncampaign.orders.amount_discounted
campaign.orders.amount
campaign.redemptions.count
campaign.redemptions.count.daily
campaign.redemptions.count.monthly
campaign.redemptions.customers_count
campaign.redemptions.customers_count.daily
campaign.redemptions.customers_count.monthly
Redemptionredemption.gift.amount
redemption.count.daily
redemption.count.monthly
redemption.count.per_customer
redemption.count.per_customer.daily
redemption.count.per_customer.monthly
redemption.api_key
redemption.count.per_api_key
redemption.user.login
redemption.count.per_user
redemption.metadata
redemption.reward.pay_with_points.points_used
Productproduct.id
product.price
product.quantity
product.discount_applicable
product.metadata*
product.metadata.aggregated_quantity
product.metadata.aggregated_amount
product.metadata.discount_applicable
product.metadata.match_all
SKUsku.id
sku.price
sku.quantity
sku.discount_applicable
Publicationpublication.redeemable_by_linked_customer
Custom Eventcustom_event.metadata*
Order itemsorder.items.every
order.items.any
order.items.none
order.items.cheapest
order.items.most_expensive

*Requires the property field to be defined.

property
string, null

Custom name for a metadata property associated with the condition to be satisfied. Required if the property name is any of the following:
customer_metadata
custom_event_metadata
order_items_metadata
order_metadata
product_metadata
redemption_metadata

conditionsSee: Validation Rule Conditions
rulesSee: Validation Rule Rules
error
object

Contains the error message returned from API when validation / redemption fails to meet requirements of defined rule.

AttributesDescription
message
string

The error message returned from API when validation / redemption fails to meet requirements of defined rule.

| +## Validation Rule Bundle Rules +| Attributes | Description | +|:-----|:--------| +| logic
`string` |

Defines the logic between the rules.

**Example:**

(1 and 2) and (3)

| +| [propertyName]
`object` |

Contains the name of the validation rule.

AttributesDescription
name
string

Voucherify specific rule name. Currently, it is only order.items.any.

Available values: order.items.any
conditions
object

Defines the conditions of the bundle rule. The order items in the customer's cart must meet the conditions. Because the rule concerns order items, the only permissible condition is $is.

AttributesDescription
$is
array
Array of:
AttributesDescription
id
string

Unique identifier of the product, SKU, or collection assigned by Voucherify.

type
string

Type of the order item. It can be a product_or_sku or products_collection

Available values: product_or_sku, products_collection
object
string

Object used in the bundle rule. It can be a products_collection, product, or sku.

Available values: products_collection, product, sku
rules
error
object

Contains the error message returned from API when validation / redemption fails to meet requirements of defined rule.

AttributesDescription
message
string

The error message returned from API when validation / redemption fails to meet requirements of defined rule.

| + ## Applicable To | Attributes | Description | |:-----|:--------| @@ -49,7 +56,7 @@ All of: | order_item_indices
`array` |

Determines the order in which the discount is applied to the products or SKUs sent in the order object in the request. The counting begins from 0.

| | repeat
`integer` |

Determines the recurrence of the discount, e.g. "repeat": 3 means that the discount is applied to every third item.

| | skip_initially
`integer` |

Determines how many items are skipped before the discount is applied.

| -| target
`string` |

Determines to which kinds of objects the discount is applicable. "ITEM" includes products and SKUs.

Available values: `ITEM` | +| target
`string` |

Determines to which kinds of objects the discount is applicable. ITEM includes products and SKUs. UNIT means particular units within an order line.

Available values: `ITEM`, `UNIT` | ## Validation Rule Conditions | Attributes | Description | diff --git a/docs/reference-docs/VALIDATIONS-Validation-Object.md b/docs/reference-docs/VALIDATIONS-Validation-Object.md index 467fda5b..b56164e1 100644 --- a/docs/reference-docs/VALIDATIONS-Validation-Object.md +++ b/docs/reference-docs/VALIDATIONS-Validation-Object.md @@ -129,7 +129,7 @@ One of: | order_item_indices
`array` |

Determines the order in which the discount is applied to the products or SKUs sent in the order object in the request. The counting begins from 0.

| | repeat
`integer` |

Determines the recurrence of the discount, e.g. "repeat": 3 means that the discount is applied to every third item.

| | skip_initially
`integer` |

Determines how many items are skipped before the discount is applied.

| -| target
`string` |

Determines to which kinds of objects the discount is applicable. "ITEM" includes products and SKUs.

Available values: `ITEM` | +| target
`string` |

Determines to which kinds of objects the discount is applicable. ITEM includes products and SKUs. UNIT means particular units within an order line.

Available values: `ITEM`, `UNIT` | ## Inapplicable To [Applicable To](#applicable-to) diff --git a/production/readOnly-openAPI.json b/production/readOnly-openAPI.json index 215ddc8d..a7eaf23a 100644 --- a/production/readOnly-openAPI.json +++ b/production/readOnly-openAPI.json @@ -970,9 +970,10 @@ }, "target": { "type": "string", - "description": "Determines to which kinds of objects the discount is applicable. `\"ITEM\"` includes products and SKUs.", + "description": "Determines to which kinds of objects the discount is applicable. `ITEM` includes products and SKUs. `UNIT` means particular units within an order line.", "enum": [ - "ITEM" + "ITEM", + "UNIT" ], "nullable": true } @@ -26836,6 +26837,9 @@ "rules": { "$ref": "#/components/schemas/ValidationRuleRules" }, + "bundle_rules": { + "$ref": "#/components/schemas/ValidationRuleBundleRules" + }, "error": { "type": "object", "description": "Contains the error message returned from API when validation / redemption fails to meet requirements of defined rules.", @@ -26952,6 +26956,12 @@ } } }, + "ValidationRuleBundleRules": { + "title": "Validation Rule Bundle Rules", + "type": "object", + "nullable": true, + "description": "Contains all the rule definitions for the bundle rule. It is a set of key value pairs representing the rules and logic between the rules. The keys are numbered consecutively beginning from `1`. The values are objects containing the rule conditions." + }, "ValidationRuleRules": { "title": "Validation Rule Rules", "type": "object", diff --git a/reference/OpenAPI.json b/reference/OpenAPI.json index 7e3562f9..e01ef29e 100644 --- a/reference/OpenAPI.json +++ b/reference/OpenAPI.json @@ -29524,6 +29524,128 @@ "total" ] }, + "ValidationRuleBundleRules": { + "title": "Validation Rule Bundle Rules", + "type": "object", + "nullable": true, + "description": "Contains all the rule definitions for the bundle rule. It is a set of key value pairs representing the rules and logic between the rules. The keys are numbered consecutively beginning from `1`. The values are objects containing the rule conditions.", + "properties": { + "logic": { + "type": "string", + "example": "(1 and 2) and (3)", + "description": "Defines the logic between the rules." + } + }, + "additionalProperties": { + "type": "object", + "description": "Contains the name of the validation rule.", + "properties": { + "name": { + "type": "string", + "description": "Voucherify specific rule name. Currently, it is only `order.items.any`.", + "enum": [ + "order.items.any" + ] + }, + "conditions": { + "type": "object", + "description": "Defines the conditions of the bundle rule. The order items in the customer's cart must meet the conditions. Because the rule concerns order items, the only permissible condition is `$is`.", + "properties": { + "$is": { + "type": "array", + "items": { + "type": "object", + "description": "", + "properties": { + "id": { + "type": "string", + "description": "Unique identifier of the product, SKU, or collection assigned by Voucherify." + }, + "type": { + "type": "string", + "description": "Type of the order item. It can be a `product_or_sku` or `products_collection`", + "enum": [ + "product_or_sku", + "products_collection" + ] + }, + "object": { + "type": "string", + "description": "Object used in the bundle rule. It can be a `products_collection`, `product`, or `sku`.", + "enum": [ + "products_collection", + "product", + "sku" + ] + } + } + } + } + } + }, + "rules": { + "properties": { + "logic": { + "type": "string", + "example": "(1 and 2) and (3)", + "description": "Defines the logic between the sub-rules." + } + }, + "additionalProperties": { + "type": "object", + "description": "Contains the name of the validation sub-rule.", + "properties": { + "name": { + "type": "string", + "description": "Voucherify specific sub-rule name. Currently, it is only `order.items.aggregated_quantity`.", + "enum": [ + "order.items.aggregated_quantity" + ] + }, + "conditions": { + "type": "object", + "description": "Defines the conditions of the bundle rule. The quantity of order items in the customer's cart must meet the conditions.", + "properties": { + "$more_than_or_equal": { + "type": "array", + "items": { + "type": "number", + "minimum": 1, + "description": "" + } + } + } + }, + "rules": { + "type": "object", + "description": "An empty object." + }, + "error": { + "type": "object", + "description": "Contains the error message returned from API when validation / redemption fails to meet requirements of defined rule.", + "properties": { + "message": { + "type": "string", + "description": "The error message returned from API when validation / redemption fails to meet requirements of defined rule." + } + } + } + } + } + }, + "error": { + "type": "object", + "description": "Contains the error message returned from API when validation / redemption fails to meet requirements of defined rule.", + "properties": { + "message": { + "type": "string", + "description": "The error message returned from API when validation / redemption fails to meet requirements of defined rule." + } + } + } + } + } + }, "ValidationRuleRules": { "title": "Validation Rule Rules", "type": "object", @@ -29860,6 +29982,9 @@ "rules": { "$ref": "#/components/schemas/ValidationRuleRules" }, + "bundle_rules": { + "$ref": "#/components/schemas/ValidationRuleBundleRules" + }, "error": { "type": "object", "description": "Contains the error message returned from API when validation / redemption fails to meet requirements of defined rules.", @@ -39863,9 +39988,10 @@ }, "target": { "type": "string", - "description": "Determines to which kinds of objects the discount is applicable. `\"ITEM\"` includes products and SKUs.", + "description": "Determines to which kinds of objects the discount is applicable. `ITEM` includes products and SKUs. `UNIT` means particular units within an order line.", "enum": [ - "ITEM" + "ITEM", + "UNIT" ] } }, diff --git a/reference/readonly-sdks/java/OpenAPI.json b/reference/readonly-sdks/java/OpenAPI.json index 0ec3e706..e13789cb 100644 --- a/reference/readonly-sdks/java/OpenAPI.json +++ b/reference/readonly-sdks/java/OpenAPI.json @@ -25308,6 +25308,9 @@ "rules": { "$ref": "#/components/schemas/ValidationRuleRules" }, + "bundle_rules": { + "$ref": "#/components/schemas/ValidationRuleBundleRules" + }, "error": { "title": "ValidationRulesCreateRequestBodyError", "type": "object", @@ -25442,6 +25445,9 @@ "rules": { "$ref": "#/components/schemas/ValidationRuleRules" }, + "bundle_rules": { + "$ref": "#/components/schemas/ValidationRuleBundleRules" + }, "error": { "title": "ValidationRulesCreateResponseBodyError", "type": "object", @@ -25607,6 +25613,9 @@ "rules": { "$ref": "#/components/schemas/ValidationRuleRules" }, + "bundle_rules": { + "$ref": "#/components/schemas/ValidationRuleBundleRules" + }, "error": { "title": "ValidationRulesGetResponseBodyError", "type": "object", @@ -25806,6 +25815,9 @@ "rules": { "$ref": "#/components/schemas/ValidationRuleRules" }, + "bundle_rules": { + "$ref": "#/components/schemas/ValidationRuleBundleRules" + }, "error": { "title": "ValidationRulesUpdateRequestBodyError", "type": "object", @@ -25940,6 +25952,9 @@ "rules": { "$ref": "#/components/schemas/ValidationRuleRules" }, + "bundle_rules": { + "$ref": "#/components/schemas/ValidationRuleBundleRules" + }, "error": { "title": "ValidationRulesUpdateResponseBodyError", "type": "object", @@ -28777,7 +28792,7 @@ }, "target": { "type": "string", - "description": "Determines to which kinds of objects the discount is applicable. `\"ITEM\"` includes products and SKUs.", + "description": "Determines to which kinds of objects the discount is applicable. `ITEM` includes products and SKUs. `UNIT` means particular units within an order line.", "nullable": true } }, @@ -38253,6 +38268,9 @@ "rules": { "$ref": "#/components/schemas/ValidationRuleRules" }, + "bundle_rules": { + "$ref": "#/components/schemas/ValidationRuleBundleRules" + }, "error": { "title": "ValidationRuleError", "type": "object", @@ -38493,6 +38511,12 @@ }, "required": [] }, + "ValidationRuleBundleRules": { + "title": "ValidationRuleBundleRules", + "type": "object", + "nullable": true, + "description": "Contains all the rule definitions for the bundle rule. It is a set of key value pairs representing the rules and logic between the rules. The keys are numbered consecutively beginning from `1`. The values are objects containing the rule conditions." + }, "ValidationRuleRules": { "title": "ValidationRuleRules", "type": "object", @@ -40257,7 +40281,7 @@ }, "target": { "type": "string", - "description": "Determines to which kinds of objects the discount is applicable. `\"ITEM\"` includes products and SKUs.", + "description": "Determines to which kinds of objects the discount is applicable. `ITEM` includes products and SKUs. `UNIT` means particular units within an order line.", "nullable": true } }, diff --git a/reference/readonly-sdks/php/OpenAPI.json b/reference/readonly-sdks/php/OpenAPI.json index 180247f8..104e7fbd 100644 --- a/reference/readonly-sdks/php/OpenAPI.json +++ b/reference/readonly-sdks/php/OpenAPI.json @@ -26143,6 +26143,9 @@ "rules": { "$ref": "#/components/schemas/ValidationRuleRules" }, + "bundle_rules": { + "$ref": "#/components/schemas/ValidationRuleBundleRules" + }, "error": { "title": "ValidationRulesCreateRequestBodyError", "type": "object", @@ -26277,6 +26280,9 @@ "rules": { "$ref": "#/components/schemas/ValidationRuleRules" }, + "bundle_rules": { + "$ref": "#/components/schemas/ValidationRuleBundleRules" + }, "error": { "title": "ValidationRulesCreateResponseBodyError", "type": "object", @@ -26442,6 +26448,9 @@ "rules": { "$ref": "#/components/schemas/ValidationRuleRules" }, + "bundle_rules": { + "$ref": "#/components/schemas/ValidationRuleBundleRules" + }, "error": { "title": "ValidationRulesGetResponseBodyError", "type": "object", @@ -26641,6 +26650,9 @@ "rules": { "$ref": "#/components/schemas/ValidationRuleRules" }, + "bundle_rules": { + "$ref": "#/components/schemas/ValidationRuleBundleRules" + }, "error": { "title": "ValidationRulesUpdateRequestBodyError", "type": "object", @@ -26775,6 +26787,9 @@ "rules": { "$ref": "#/components/schemas/ValidationRuleRules" }, + "bundle_rules": { + "$ref": "#/components/schemas/ValidationRuleBundleRules" + }, "error": { "title": "ValidationRulesUpdateResponseBodyError", "type": "object", @@ -29748,7 +29763,7 @@ }, "target": { "type": "string", - "description": "Determines to which kinds of objects the discount is applicable. `\"ITEM\"` includes products and SKUs.", + "description": "Determines to which kinds of objects the discount is applicable. `ITEM` includes products and SKUs. `UNIT` means particular units within an order line.", "nullable": true } }, @@ -39468,6 +39483,9 @@ "rules": { "$ref": "#/components/schemas/ValidationRuleRules" }, + "bundle_rules": { + "$ref": "#/components/schemas/ValidationRuleBundleRules" + }, "error": { "title": "ValidationRuleError", "type": "object", @@ -39708,6 +39726,12 @@ }, "required": [] }, + "ValidationRuleBundleRules": { + "title": "ValidationRuleBundleRules", + "type": "object", + "nullable": true, + "description": "Contains all the rule definitions for the bundle rule. It is a set of key value pairs representing the rules and logic between the rules. The keys are numbered consecutively beginning from `1`. The values are objects containing the rule conditions." + }, "ValidationRuleRules": { "title": "ValidationRuleRules", "type": "object", @@ -41482,7 +41506,7 @@ }, "target": { "type": "string", - "description": "Determines to which kinds of objects the discount is applicable. `\"ITEM\"` includes products and SKUs.", + "description": "Determines to which kinds of objects the discount is applicable. `ITEM` includes products and SKUs. `UNIT` means particular units within an order line.", "nullable": true } }, diff --git a/reference/readonly-sdks/python/OpenAPI.json b/reference/readonly-sdks/python/OpenAPI.json index a784a7ba..b8c3495e 100644 --- a/reference/readonly-sdks/python/OpenAPI.json +++ b/reference/readonly-sdks/python/OpenAPI.json @@ -25108,6 +25108,9 @@ "rules": { "$ref": "#/components/schemas/ValidationRuleRules" }, + "bundle_rules": { + "$ref": "#/components/schemas/ValidationRuleBundleRules" + }, "error": { "title": "ValidationRulesCreateRequestBodyError", "type": "object", @@ -25242,6 +25245,9 @@ "rules": { "$ref": "#/components/schemas/ValidationRuleRules" }, + "bundle_rules": { + "$ref": "#/components/schemas/ValidationRuleBundleRules" + }, "error": { "title": "ValidationRulesCreateResponseBodyError", "type": "object", @@ -25407,6 +25413,9 @@ "rules": { "$ref": "#/components/schemas/ValidationRuleRules" }, + "bundle_rules": { + "$ref": "#/components/schemas/ValidationRuleBundleRules" + }, "error": { "title": "ValidationRulesGetResponseBodyError", "type": "object", @@ -25606,6 +25615,9 @@ "rules": { "$ref": "#/components/schemas/ValidationRuleRules" }, + "bundle_rules": { + "$ref": "#/components/schemas/ValidationRuleBundleRules" + }, "error": { "title": "ValidationRulesUpdateRequestBodyError", "type": "object", @@ -25740,6 +25752,9 @@ "rules": { "$ref": "#/components/schemas/ValidationRuleRules" }, + "bundle_rules": { + "$ref": "#/components/schemas/ValidationRuleBundleRules" + }, "error": { "title": "ValidationRulesUpdateResponseBodyError", "type": "object", @@ -28577,7 +28592,7 @@ }, "target": { "type": "string", - "description": "Determines to which kinds of objects the discount is applicable. `\"ITEM\"` includes products and SKUs.", + "description": "Determines to which kinds of objects the discount is applicable. `ITEM` includes products and SKUs. `UNIT` means particular units within an order line.", "nullable": true } }, @@ -37698,6 +37713,9 @@ "rules": { "$ref": "#/components/schemas/ValidationRuleRules" }, + "bundle_rules": { + "$ref": "#/components/schemas/ValidationRuleBundleRules" + }, "error": { "title": "ValidationRuleError", "type": "object", @@ -37938,6 +37956,12 @@ }, "required": [] }, + "ValidationRuleBundleRules": { + "title": "ValidationRuleBundleRules", + "type": "object", + "nullable": true, + "description": "Contains all the rule definitions for the bundle rule. It is a set of key value pairs representing the rules and logic between the rules. The keys are numbered consecutively beginning from `1`. The values are objects containing the rule conditions." + }, "ValidationRuleRules": { "title": "ValidationRuleRules", "type": "object", @@ -39702,7 +39726,7 @@ }, "target": { "type": "string", - "description": "Determines to which kinds of objects the discount is applicable. `\"ITEM\"` includes products and SKUs.", + "description": "Determines to which kinds of objects the discount is applicable. `ITEM` includes products and SKUs. `UNIT` means particular units within an order line.", "nullable": true } }, diff --git a/reference/readonly-sdks/ruby/OpenAPI.json b/reference/readonly-sdks/ruby/OpenAPI.json index 27ede772..be0b15ee 100644 --- a/reference/readonly-sdks/ruby/OpenAPI.json +++ b/reference/readonly-sdks/ruby/OpenAPI.json @@ -25342,6 +25342,9 @@ "rules": { "$ref": "#/components/schemas/ValidationRuleRules" }, + "bundle_rules": { + "$ref": "#/components/schemas/ValidationRuleBundleRules" + }, "error": { "title": "ValidationRulesCreateRequestBodyError", "type": "object", @@ -25476,6 +25479,9 @@ "rules": { "$ref": "#/components/schemas/ValidationRuleRules" }, + "bundle_rules": { + "$ref": "#/components/schemas/ValidationRuleBundleRules" + }, "error": { "title": "ValidationRulesCreateResponseBodyError", "type": "object", @@ -25641,6 +25647,9 @@ "rules": { "$ref": "#/components/schemas/ValidationRuleRules" }, + "bundle_rules": { + "$ref": "#/components/schemas/ValidationRuleBundleRules" + }, "error": { "title": "ValidationRulesGetResponseBodyError", "type": "object", @@ -25840,6 +25849,9 @@ "rules": { "$ref": "#/components/schemas/ValidationRuleRules" }, + "bundle_rules": { + "$ref": "#/components/schemas/ValidationRuleBundleRules" + }, "error": { "title": "ValidationRulesUpdateRequestBodyError", "type": "object", @@ -25974,6 +25986,9 @@ "rules": { "$ref": "#/components/schemas/ValidationRuleRules" }, + "bundle_rules": { + "$ref": "#/components/schemas/ValidationRuleBundleRules" + }, "error": { "title": "ValidationRulesUpdateResponseBodyError", "type": "object", @@ -28811,7 +28826,7 @@ }, "target": { "type": "string", - "description": "Determines to which kinds of objects the discount is applicable. `\"ITEM\"` includes products and SKUs.", + "description": "Determines to which kinds of objects the discount is applicable. `ITEM` includes products and SKUs. `UNIT` means particular units within an order line.", "nullable": true } }, @@ -38287,6 +38302,9 @@ "rules": { "$ref": "#/components/schemas/ValidationRuleRules" }, + "bundle_rules": { + "$ref": "#/components/schemas/ValidationRuleBundleRules" + }, "error": { "title": "ValidationRuleError", "type": "object", @@ -38527,6 +38545,12 @@ }, "required": [] }, + "ValidationRuleBundleRules": { + "title": "ValidationRuleBundleRules", + "type": "object", + "nullable": true, + "description": "Contains all the rule definitions for the bundle rule. It is a set of key value pairs representing the rules and logic between the rules. The keys are numbered consecutively beginning from `1`. The values are objects containing the rule conditions." + }, "ValidationRuleRules": { "title": "ValidationRuleRules", "type": "object", @@ -40291,7 +40315,7 @@ }, "target": { "type": "string", - "description": "Determines to which kinds of objects the discount is applicable. `\"ITEM\"` includes products and SKUs.", + "description": "Determines to which kinds of objects the discount is applicable. `ITEM` includes products and SKUs. `UNIT` means particular units within an order line.", "nullable": true } }, From faf786f571cb19b9d239049a9388f6c0ce8fc347 Mon Sep 17 00:00:00 2001 From: p-woznikowski Date: Wed, 4 Dec 2024 16:00:57 +0100 Subject: [PATCH 03/23] Bundle rules p.2 --- changelog/OPEN-API.md | 4 +++ ...VALIDATION-RULES-Validation-Rule-Object.md | 10 +++--- production/readOnly-openAPI.json | 3 +- reference/OpenAPI.json | 33 +++++++++++-------- reference/readonly-sdks/java/OpenAPI.json | 3 +- reference/readonly-sdks/php/OpenAPI.json | 3 +- reference/readonly-sdks/python/OpenAPI.json | 3 +- reference/readonly-sdks/ruby/OpenAPI.json | 3 +- 8 files changed, 34 insertions(+), 28 deletions(-) diff --git a/changelog/OPEN-API.md b/changelog/OPEN-API.md index 19d7ad27..995c993e 100644 --- a/changelog/OPEN-API.md +++ b/changelog/OPEN-API.md @@ -4,6 +4,10 @@ Older changes in [DEPRECATED.md](deprecated/DEPRECATED.md) +## 2024-12-04 + +Added `ValidationRuleBundleRules` schema and `bundle_rules` to the `ValidationRuleBase` schema + ## 2024-12-03 Remove `validation_rules` from Create Loyalty Campaign endpoints by swapping `CampaignsCreateBaseValidationRules` to `CampaignsCreateBase` in `CampaignsCreateLoyaltyCampaign`. diff --git a/docs/reference-docs/VALIDATION-RULES-Validation-Rule-Object.md b/docs/reference-docs/VALIDATION-RULES-Validation-Rule-Object.md index 5cf2c942..6765cffd 100644 --- a/docs/reference-docs/VALIDATION-RULES-Validation-Rule-Object.md +++ b/docs/reference-docs/VALIDATION-RULES-Validation-Rule-Object.md @@ -29,13 +29,13 @@ All of: | Attributes | Description | |:-----|:--------| | logic
`string` |

Defines the logic between the rules.

**Example:**

(1 and 2) and (3)

| -| [propertyName]
`object` |

Contains the name of the validation rule.

AttributesDescription
name
string

Voucherify specific rule name. The list of available names is provided below.

TypeName
Customercustomer.segment
customer.metadata*
Orderorder.amount
order.initial_amount
order.items.count
order.items.price_any
order.items.price_each
order.items.metadata_any
order.items.metadata_each
order.metadata*
Campaigncampaign.orders.amount_discounted
campaign.orders.amount
campaign.redemptions.count
campaign.redemptions.count.daily
campaign.redemptions.count.monthly
campaign.redemptions.customers_count
campaign.redemptions.customers_count.daily
campaign.redemptions.customers_count.monthly
Redemptionredemption.gift.amount
redemption.count.daily
redemption.count.monthly
redemption.count.per_customer
redemption.count.per_customer.daily
redemption.count.per_customer.monthly
redemption.api_key
redemption.count.per_api_key
redemption.user.login
redemption.count.per_user
redemption.metadata
redemption.reward.pay_with_points.points_used
Productproduct.id
product.price
product.quantity
product.discount_applicable
product.metadata*
product.metadata.aggregated_quantity
product.metadata.aggregated_amount
product.metadata.discount_applicable
product.metadata.match_all
SKUsku.id
sku.price
sku.quantity
sku.discount_applicable
Publicationpublication.redeemable_by_linked_customer
Custom Eventcustom_event.metadata*
Order itemsorder.items.every
order.items.any
order.items.none
order.items.cheapest
order.items.most_expensive

*Requires the property field to be defined.

property
string, null

Custom name for a metadata property associated with the condition to be satisfied. Required if the property name is any of the following:
customer_metadata
custom_event_metadata
order_items_metadata
order_metadata
product_metadata
redemption_metadata

conditionsSee: Validation Rule Conditions
rulesSee: Validation Rule Rules
error
object

Contains the error message returned from API when validation / redemption fails to meet requirements of defined rule.

AttributesDescription
message
string

The error message returned from API when validation / redemption fails to meet requirements of defined rule.

| +| [propertyName]
`object` |

Contains the name of the validation rule.

AttributesDescription
name
string

Voucherify's specific rule name. The list of available names is provided below.

TypeName
Customercustomer.segment
customer.metadata*
Orderorder.amount
order.initial_amount
order.items.count
order.items.price_any
order.items.price_each
order.items.metadata_any
order.items.metadata_each
order.metadata*
Campaigncampaign.orders.amount_discounted
campaign.orders.amount
campaign.redemptions.count
campaign.redemptions.count.daily
campaign.redemptions.count.monthly
campaign.redemptions.customers_count
campaign.redemptions.customers_count.daily
campaign.redemptions.customers_count.monthly
Redemptionredemption.gift.amount
redemption.count.daily
redemption.count.monthly
redemption.count.per_customer
redemption.count.per_customer.daily
redemption.count.per_customer.monthly
redemption.api_key
redemption.count.per_api_key
redemption.user.login
redemption.count.per_user
redemption.metadata
redemption.reward.pay_with_points.points_used
Productproduct.id
product.price
product.quantity
product.discount_applicable
product.metadata*
product.metadata.aggregated_quantity
product.metadata.aggregated_amount
product.metadata.discount_applicable
product.metadata.match_all
SKUsku.id
sku.price
sku.quantity
sku.discount_applicable
Publicationpublication.redeemable_by_linked_customer
Custom Eventcustom_event.metadata*
Order itemsorder.items.every
order.items.any
order.items.none
order.items.cheapest
order.items.most_expensive

*Requires the property field to be defined.

property
string, null

Custom name for a metadata property associated with the condition to be satisfied. Required if the property name is any of the following:
customer_metadata
custom_event_metadata
order_items_metadata
order_metadata
product_metadata
redemption_metadata

conditionsSee: Validation Rule Conditions
rulesSee: Validation Rule Rules
error
object

Contains the error message returned from API when validation / redemption fails to meet requirements of defined rule.

AttributesDescription
message
string

The error message returned from API when validation / redemption fails to meet requirements of defined rule.

| ## Validation Rule Bundle Rules | Attributes | Description | |:-----|:--------| | logic
`string` |

Defines the logic between the rules.

**Example:**

(1 and 2) and (3)

| -| [propertyName]
`object` |

Contains the name of the validation rule.

AttributesDescription
name
string

Voucherify specific rule name. Currently, it is only order.items.any.

Available values: order.items.any
conditions
object

Defines the conditions of the bundle rule. The order items in the customer's cart must meet the conditions. Because the rule concerns order items, the only permissible condition is $is.

AttributesDescription
$is
array
Array of:
AttributesDescription
id
string

Unique identifier of the product, SKU, or collection assigned by Voucherify.

type
string

Type of the order item. It can be a product_or_sku or products_collection

Available values: product_or_sku, products_collection
object
string

Object used in the bundle rule. It can be a products_collection, product, or sku.

Available values: products_collection, product, sku
rules
error
object

Contains the error message returned from API when validation / redemption fails to meet requirements of defined rule.

AttributesDescription
message
string

The error message returned from API when validation / redemption fails to meet requirements of defined rule.

| +| [propertyName]
`object` |

Contains the name of the bundle rule.

AttributesDescription
name
string

Voucherify's specific bundle rule name. Currently, it is only order.items.any.

Available values: order.items.any
conditions
object

Defines the conditions of the bundle rule. The order items in the customer's cart must meet the conditions. Because the rule concerns order items, the only permissible condition is $is.

AttributesDescription
$is
array
Array of:
AttributesDescription
id
string

Unique identifier of the product, SKU, or collection assigned by Voucherify.

type
string

Type of the order item. It can be a product_or_sku or products_collection

Available values: product_or_sku, products_collection
object
string

Object used in the bundle rule. It can be a products_collection, product, or sku.

Available values: products_collection, product, sku
rules
error
object

CURRENTLY UNSUPPORTED. Contains the error message returned from API when validation / redemption fails to meet requirements of defined rule.

AttributesDescription
message
string

The error message returned from API when validation / redemption fails to meet requirements of defined rule.

| ## Applicable To | Attributes | Description | @@ -95,7 +95,7 @@ All of: | Attributes | Description | |:-----|:--------| | logic
`string` |

Defines the logic between the rules.

**Example:**

(1 and 2) and (3)

| -| [propertyName]
`object` |

Contains the name of the validation rule.

AttributesDescription
name
string

Voucherify specific rule name. The list of available names is provided below.

TypeName
Customercustomer.segment
customer.metadata*
Orderorder.amount
order.initial_amount
order.items.count
order.items.price_any
order.items.price_each
order.items.metadata_any
order.items.metadata_each
order.metadata*
Campaigncampaign.orders.amount_discounted
campaign.orders.amount
campaign.redemptions.count
campaign.redemptions.count.daily
campaign.redemptions.count.monthly
campaign.redemptions.customers_count
campaign.redemptions.customers_count.daily
campaign.redemptions.customers_count.monthly
Redemptionredemption.gift.amount
redemption.count.daily
redemption.count.monthly
redemption.count.per_customer
redemption.count.per_customer.daily
redemption.count.per_customer.monthly
redemption.api_key
redemption.count.per_api_key
redemption.user.login
redemption.count.per_user
redemption.metadata
redemption.reward.pay_with_points.points_used
Productproduct.id
product.price
product.quantity
product.discount_applicable
product.metadata*
product.metadata.aggregated_quantity
product.metadata.aggregated_amount
product.metadata.discount_applicable
product.metadata.match_all
SKUsku.id
sku.price
sku.quantity
sku.discount_applicable
Publicationpublication.redeemable_by_linked_customer
Custom Eventcustom_event.metadata*
Order itemsorder.items.every
order.items.any
order.items.none
order.items.cheapest
order.items.most_expensive

*Requires the property field to be defined.

property
string, null

Custom name for a metadata property associated with the condition to be satisfied. Required if the property name is any of the following:
customer_metadata
custom_event_metadata
order_items_metadata
order_metadata
product_metadata
redemption_metadata

conditionsSee: Validation Rule Conditions
rulesSee: Validation Rule Rules
error
object

Contains the error message returned from API when validation / redemption fails to meet requirements of defined rule.

AttributesDescription
message
string

The error message returned from API when validation / redemption fails to meet requirements of defined rule.

| +| [propertyName]
`object` |

Contains the name of the validation rule.

AttributesDescription
name
string

Voucherify's specific rule name. The list of available names is provided below.

TypeName
Customercustomer.segment
customer.metadata*
Orderorder.amount
order.initial_amount
order.items.count
order.items.price_any
order.items.price_each
order.items.metadata_any
order.items.metadata_each
order.metadata*
Campaigncampaign.orders.amount_discounted
campaign.orders.amount
campaign.redemptions.count
campaign.redemptions.count.daily
campaign.redemptions.count.monthly
campaign.redemptions.customers_count
campaign.redemptions.customers_count.daily
campaign.redemptions.customers_count.monthly
Redemptionredemption.gift.amount
redemption.count.daily
redemption.count.monthly
redemption.count.per_customer
redemption.count.per_customer.daily
redemption.count.per_customer.monthly
redemption.api_key
redemption.count.per_api_key
redemption.user.login
redemption.count.per_user
redemption.metadata
redemption.reward.pay_with_points.points_used
Productproduct.id
product.price
product.quantity
product.discount_applicable
product.metadata*
product.metadata.aggregated_quantity
product.metadata.aggregated_amount
product.metadata.discount_applicable
product.metadata.match_all
SKUsku.id
sku.price
sku.quantity
sku.discount_applicable
Publicationpublication.redeemable_by_linked_customer
Custom Eventcustom_event.metadata*
Order itemsorder.items.every
order.items.any
order.items.none
order.items.cheapest
order.items.most_expensive

*Requires the property field to be defined.

property
string, null

Custom name for a metadata property associated with the condition to be satisfied. Required if the property name is any of the following:
customer_metadata
custom_event_metadata
order_items_metadata
order_metadata
product_metadata
redemption_metadata

conditionsSee: Validation Rule Conditions
rulesSee: Validation Rule Rules
error
object

Contains the error message returned from API when validation / redemption fails to meet requirements of defined rule.

AttributesDescription
message
string

The error message returned from API when validation / redemption fails to meet requirements of defined rule.

| ## Applicable To Effect Available values: `APPLY_TO_EVERY`, `APPLY_TO_CHEAPEST`, `APPLY_FROM_CHEAPEST`, `APPLY_TO_MOST_EXPENSIVE`, `APPLY_FROM_MOST_EXPENSIVE` @@ -119,13 +119,13 @@ Array any of: string, string | Attributes | Description | |:-----|:--------| | logic
`string` |

Defines the logic between the rules.

**Example:**

(1 and 2) and (3)

| -| [propertyName]
`object` |

Contains the name of the validation rule.

AttributesDescription
name
string

Voucherify specific rule name. The list of available names is provided below.

TypeName
Customercustomer.segment
customer.metadata*
Orderorder.amount
order.initial_amount
order.items.count
order.items.price_any
order.items.price_each
order.items.metadata_any
order.items.metadata_each
order.metadata*
Campaigncampaign.orders.amount_discounted
campaign.orders.amount
campaign.redemptions.count
campaign.redemptions.count.daily
campaign.redemptions.count.monthly
campaign.redemptions.customers_count
campaign.redemptions.customers_count.daily
campaign.redemptions.customers_count.monthly
Redemptionredemption.gift.amount
redemption.count.daily
redemption.count.monthly
redemption.count.per_customer
redemption.count.per_customer.daily
redemption.count.per_customer.monthly
redemption.api_key
redemption.count.per_api_key
redemption.user.login
redemption.count.per_user
redemption.metadata
redemption.reward.pay_with_points.points_used
Productproduct.id
product.price
product.quantity
product.discount_applicable
product.metadata*
product.metadata.aggregated_quantity
product.metadata.aggregated_amount
product.metadata.discount_applicable
product.metadata.match_all
SKUsku.id
sku.price
sku.quantity
sku.discount_applicable
Publicationpublication.redeemable_by_linked_customer
Custom Eventcustom_event.metadata*
Order itemsorder.items.every
order.items.any
order.items.none
order.items.cheapest
order.items.most_expensive

*Requires the property field to be defined.

property
string, null

Custom name for a metadata property associated with the condition to be satisfied. Required if the property name is any of the following:
customer_metadata
custom_event_metadata
order_items_metadata
order_metadata
product_metadata
redemption_metadata

conditionsSee: Validation Rule Conditions
rulesSee: Validation Rule Rules
error
object

Contains the error message returned from API when validation / redemption fails to meet requirements of defined rule.

AttributesDescription
message
string

The error message returned from API when validation / redemption fails to meet requirements of defined rule.

| +| [propertyName]
`object` |

Contains the name of the validation rule.

AttributesDescription
name
string

Voucherify's specific rule name. The list of available names is provided below.

TypeName
Customercustomer.segment
customer.metadata*
Orderorder.amount
order.initial_amount
order.items.count
order.items.price_any
order.items.price_each
order.items.metadata_any
order.items.metadata_each
order.metadata*
Campaigncampaign.orders.amount_discounted
campaign.orders.amount
campaign.redemptions.count
campaign.redemptions.count.daily
campaign.redemptions.count.monthly
campaign.redemptions.customers_count
campaign.redemptions.customers_count.daily
campaign.redemptions.customers_count.monthly
Redemptionredemption.gift.amount
redemption.count.daily
redemption.count.monthly
redemption.count.per_customer
redemption.count.per_customer.daily
redemption.count.per_customer.monthly
redemption.api_key
redemption.count.per_api_key
redemption.user.login
redemption.count.per_user
redemption.metadata
redemption.reward.pay_with_points.points_used
Productproduct.id
product.price
product.quantity
product.discount_applicable
product.metadata*
product.metadata.aggregated_quantity
product.metadata.aggregated_amount
product.metadata.discount_applicable
product.metadata.match_all
SKUsku.id
sku.price
sku.quantity
sku.discount_applicable
Publicationpublication.redeemable_by_linked_customer
Custom Eventcustom_event.metadata*
Order itemsorder.items.every
order.items.any
order.items.none
order.items.cheapest
order.items.most_expensive

*Requires the property field to be defined.

property
string, null

Custom name for a metadata property associated with the condition to be satisfied. Required if the property name is any of the following:
customer_metadata
custom_event_metadata
order_items_metadata
order_metadata
product_metadata
redemption_metadata

conditionsSee: Validation Rule Conditions
rulesSee: Validation Rule Rules
error
object

Contains the error message returned from API when validation / redemption fails to meet requirements of defined rule.

AttributesDescription
message
string

The error message returned from API when validation / redemption fails to meet requirements of defined rule.

| ## Validation Rule Rules | Attributes | Description | |:-----|:--------| | logic
`string` |

Defines the logic between the rules.

**Example:**

(1 and 2) and (3)

| -| [propertyName]
`object` |

Contains the name of the validation rule.

AttributesDescription
name
string

Voucherify specific rule name. The list of available names is provided below.

TypeName
Customercustomer.segment
customer.metadata*
Orderorder.amount
order.initial_amount
order.items.count
order.items.price_any
order.items.price_each
order.items.metadata_any
order.items.metadata_each
order.metadata*
Campaigncampaign.orders.amount_discounted
campaign.orders.amount
campaign.redemptions.count
campaign.redemptions.count.daily
campaign.redemptions.count.monthly
campaign.redemptions.customers_count
campaign.redemptions.customers_count.daily
campaign.redemptions.customers_count.monthly
Redemptionredemption.gift.amount
redemption.count.daily
redemption.count.monthly
redemption.count.per_customer
redemption.count.per_customer.daily
redemption.count.per_customer.monthly
redemption.api_key
redemption.count.per_api_key
redemption.user.login
redemption.count.per_user
redemption.metadata
redemption.reward.pay_with_points.points_used
Productproduct.id
product.price
product.quantity
product.discount_applicable
product.metadata*
product.metadata.aggregated_quantity
product.metadata.aggregated_amount
product.metadata.discount_applicable
product.metadata.match_all
SKUsku.id
sku.price
sku.quantity
sku.discount_applicable
Publicationpublication.redeemable_by_linked_customer
Custom Eventcustom_event.metadata*
Order itemsorder.items.every
order.items.any
order.items.none
order.items.cheapest
order.items.most_expensive

*Requires the property field to be defined.

property
string, null

Custom name for a metadata property associated with the condition to be satisfied. Required if the property name is any of the following:
customer_metadata
custom_event_metadata
order_items_metadata
order_metadata
product_metadata
redemption_metadata

conditionsSee: Validation Rule Conditions
rules
object

Another set of validation rules. If you need to create complex rules with more nested rules, use the validation rule builder in the dashboard.

error
object

Contains the error message returned from API when validation / redemption fails to meet requirements of defined rule.

AttributesDescription
message
string

The error message returned from API when validation / redemption fails to meet requirements of defined rule.

| +| [propertyName]
`object` |

Contains the name of the validation rule.

AttributesDescription
name
string

Voucherify's specific rule name. The list of available names is provided below.

TypeName
Customercustomer.segment
customer.metadata*
Orderorder.amount
order.initial_amount
order.items.count
order.items.price_any
order.items.price_each
order.items.metadata_any
order.items.metadata_each
order.metadata*
Campaigncampaign.orders.amount_discounted
campaign.orders.amount
campaign.redemptions.count
campaign.redemptions.count.daily
campaign.redemptions.count.monthly
campaign.redemptions.customers_count
campaign.redemptions.customers_count.daily
campaign.redemptions.customers_count.monthly
Redemptionredemption.gift.amount
redemption.count.daily
redemption.count.monthly
redemption.count.per_customer
redemption.count.per_customer.daily
redemption.count.per_customer.monthly
redemption.api_key
redemption.count.per_api_key
redemption.user.login
redemption.count.per_user
redemption.metadata
redemption.reward.pay_with_points.points_used
Productproduct.id
product.price
product.quantity
product.discount_applicable
product.metadata*
product.metadata.aggregated_quantity
product.metadata.aggregated_amount
product.metadata.discount_applicable
product.metadata.match_all
SKUsku.id
sku.price
sku.quantity
sku.discount_applicable
Publicationpublication.redeemable_by_linked_customer
Custom Eventcustom_event.metadata*
Order itemsorder.items.every
order.items.any
order.items.none
order.items.cheapest
order.items.most_expensive

*Requires the property field to be defined.

property
string, null

Custom name for a metadata property associated with the condition to be satisfied. Required if the property name is any of the following:
customer_metadata
custom_event_metadata
order_items_metadata
order_metadata
product_metadata
redemption_metadata

conditionsSee: Validation Rule Conditions
rules
object

Another set of validation rules. If you need to create complex rules with more nested rules, use the validation rule builder in the dashboard.

error
object

Contains the error message returned from API when validation / redemption fails to meet requirements of defined rule.

AttributesDescription
message
string

The error message returned from API when validation / redemption fails to meet requirements of defined rule.

| [block:html] { diff --git a/production/readOnly-openAPI.json b/production/readOnly-openAPI.json index a7eaf23a..910123aa 100644 --- a/production/readOnly-openAPI.json +++ b/production/readOnly-openAPI.json @@ -26959,8 +26959,7 @@ "ValidationRuleBundleRules": { "title": "Validation Rule Bundle Rules", "type": "object", - "nullable": true, - "description": "Contains all the rule definitions for the bundle rule. It is a set of key value pairs representing the rules and logic between the rules. The keys are numbered consecutively beginning from `1`. The values are objects containing the rule conditions." + "description": "Contains all the definitions for the bundle rules. It is a set of key value pairs representing the rules and logic between them. The keys are numbered consecutively beginning from `1`. The values are objects containing the rule conditions.\n\nWhile updating with the PUT method, you can pass `\"bundle_rules\": null` to delete the configuration; in the response, an empty object is then returned." }, "ValidationRuleRules": { "title": "Validation Rule Rules", diff --git a/reference/OpenAPI.json b/reference/OpenAPI.json index e01ef29e..85fa5f4c 100644 --- a/reference/OpenAPI.json +++ b/reference/OpenAPI.json @@ -29527,8 +29527,7 @@ "ValidationRuleBundleRules": { "title": "Validation Rule Bundle Rules", "type": "object", - "nullable": true, - "description": "Contains all the rule definitions for the bundle rule. It is a set of key value pairs representing the rules and logic between the rules. The keys are numbered consecutively beginning from `1`. The values are objects containing the rule conditions.", + "description": "Contains all the definitions for the bundle rules. It is a set of key value pairs representing the rules and logic between them. The keys are numbered consecutively beginning from `1`. The values are objects containing the rule conditions.\n\nWhile updating with the PUT method, you can pass `\"bundle_rules\": null` to delete the configuration; in the response, an empty object is then returned.", "properties": { "logic": { "type": "string", @@ -29538,11 +29537,11 @@ }, "additionalProperties": { "type": "object", - "description": "Contains the name of the validation rule.", + "description": "Contains the name of the bundle rule.", "properties": { "name": { "type": "string", - "description": "Voucherify specific rule name. Currently, it is only `order.items.any`.", + "description": "Voucherify's specific bundle rule name. Currently, it is only `order.items.any`.", "enum": [ "order.items.any" ] @@ -29553,6 +29552,7 @@ "properties": { "$is": { "type": "array", + "maxItems": 1, "items": { "type": "object", "description": "", @@ -29578,7 +29578,12 @@ "sku" ] } - } + }, + "required": [ + "id", + "type", + "object" + ] } } } @@ -29594,10 +29599,11 @@ "additionalProperties": { "type": "object", "description": "Contains the name of the validation sub-rule.", + "maxProperties": 1, "properties": { "name": { "type": "string", - "description": "Voucherify specific sub-rule name. Currently, it is only `order.items.aggregated_quantity`.", + "description": "Voucherify's specific sub-rule name. Currently, it is only `order.items.aggregated_quantity`.", "enum": [ "order.items.aggregated_quantity" ] @@ -29608,10 +29614,11 @@ "properties": { "$more_than_or_equal": { "type": "array", + "maxItems": 1, "items": { "type": "number", "minimum": 1, - "description": "" + "description": "The number of units in the customer's cart must be equal or higher than the defined number." } } } @@ -29622,7 +29629,7 @@ }, "error": { "type": "object", - "description": "Contains the error message returned from API when validation / redemption fails to meet requirements of defined rule.", + "description": "**CURRENTLY UNSUPPORTED**. Contains the error message returned from API when validation / redemption fails to meet requirements of defined rule.", "properties": { "message": { "type": "string", @@ -29635,7 +29642,7 @@ }, "error": { "type": "object", - "description": "Contains the error message returned from API when validation / redemption fails to meet requirements of defined rule.", + "description": "**CURRENTLY UNSUPPORTED**. Contains the error message returned from API when validation / redemption fails to meet requirements of defined rule.", "properties": { "message": { "type": "string", @@ -29663,7 +29670,7 @@ "properties": { "name": { "type": "string", - "description": "Voucherify specific rule name. The list of available names is provided below. \n\n|**Type**|**Name** |\n---- | -----------|\n|**Customer** | customer.segment
customer.metadata* |\n|**Order** |order.amount
order.initial_amount
order.items.count
order.items.price_any
order.items.price_each
order.items.metadata_any
order.items.metadata_each
order.metadata* |\n| **Campaign** | campaign.orders.amount_discounted
campaign.orders.amount
campaign.redemptions.count
campaign.redemptions.count.daily
campaign.redemptions.count.monthly
campaign.redemptions.customers_count
campaign.redemptions.customers_count.daily
campaign.redemptions.customers_count.monthly |\n| **Redemption** |redemption.gift.amount
redemption.count.daily
redemption.count.monthly
redemption.count.per_customer
redemption.count.per_customer.daily
redemption.count.per_customer.monthly
redemption.api_key
redemption.count.per_api_key
redemption.user.login
redemption.count.per_user
redemption.metadata
redemption.reward.pay_with_points.points_used |\n| **Product** | product.id
product.price
product.quantity
product.discount_applicable
product.metadata*
product.metadata.aggregated_quantity
product.metadata.aggregated_amount
product.metadata.discount_applicable
product.metadata.match_all |\n| **SKU** | sku.id
sku.price
sku.quantity
sku.discount_applicable |\n| **Publication** | publication.redeemable_by_linked_customer |\n| **Custom Event** | custom_event.metadata* |\n| **Order items** | order.items.every
order.items.any
order.items.none
order.items.cheapest
order.items.most_expensive | order.items.quantity
order.items.aggregated_quantity
order.items.price
order.items.aggregated_amount
order.items.metadata* | \n\n\n\n*Requires the `property` field to be defined." + "description": "Voucherify's specific rule name. The list of available names is provided below. \n\n|**Type**|**Name** |\n---- | -----------|\n|**Customer** | customer.segment
customer.metadata* |\n|**Order** |order.amount
order.initial_amount
order.items.count
order.items.price_any
order.items.price_each
order.items.metadata_any
order.items.metadata_each
order.metadata* |\n| **Campaign** | campaign.orders.amount_discounted
campaign.orders.amount
campaign.redemptions.count
campaign.redemptions.count.daily
campaign.redemptions.count.monthly
campaign.redemptions.customers_count
campaign.redemptions.customers_count.daily
campaign.redemptions.customers_count.monthly |\n| **Redemption** |redemption.gift.amount
redemption.count.daily
redemption.count.monthly
redemption.count.per_customer
redemption.count.per_customer.daily
redemption.count.per_customer.monthly
redemption.api_key
redemption.count.per_api_key
redemption.user.login
redemption.count.per_user
redemption.metadata
redemption.reward.pay_with_points.points_used |\n| **Product** | product.id
product.price
product.quantity
product.discount_applicable
product.metadata*
product.metadata.aggregated_quantity
product.metadata.aggregated_amount
product.metadata.discount_applicable
product.metadata.match_all |\n| **SKU** | sku.id
sku.price
sku.quantity
sku.discount_applicable |\n| **Publication** | publication.redeemable_by_linked_customer |\n| **Custom Event** | custom_event.metadata* |\n| **Order items** | order.items.every
order.items.any
order.items.none
order.items.cheapest
order.items.most_expensive | order.items.quantity
order.items.aggregated_quantity
order.items.price
order.items.aggregated_amount
order.items.metadata* | \n\n\n\n*Requires the `property` field to be defined." }, "property": { "type": "string", @@ -29706,7 +29713,7 @@ "properties": { "name": { "type": "string", - "description": "Voucherify specific rule name. The list of available names is provided below. \n\n|**Type**|**Name** |\n---- | -----------|\n|**Customer** | customer.segment
customer.metadata* |\n|**Order** |order.amount
order.initial_amount
order.items.count
order.items.price_any
order.items.price_each
order.items.metadata_any
order.items.metadata_each
order.metadata* |\n| **Campaign** | campaign.orders.amount_discounted
campaign.orders.amount
campaign.redemptions.count
campaign.redemptions.count.daily
campaign.redemptions.count.monthly
campaign.redemptions.customers_count
campaign.redemptions.customers_count.daily
campaign.redemptions.customers_count.monthly |\n| **Redemption** |redemption.gift.amount
redemption.count.daily
redemption.count.monthly
redemption.count.per_customer
redemption.count.per_customer.daily
redemption.count.per_customer.monthly
redemption.api_key
redemption.count.per_api_key
redemption.user.login
redemption.count.per_user
redemption.metadata
redemption.reward.pay_with_points.points_used |\n| **Product** | product.id
product.price
product.quantity
product.discount_applicable
product.metadata*
product.metadata.aggregated_quantity
product.metadata.aggregated_amount
product.metadata.discount_applicable
product.metadata.match_all |\n| **SKU** | sku.id
sku.price
sku.quantity
sku.discount_applicable |\n| **Publication** | publication.redeemable_by_linked_customer |\n| **Custom Event** | custom_event.metadata* |\n| **Order items** | order.items.every
order.items.any
order.items.none
order.items.cheapest
order.items.most_expensive | order.items.quantity
order.items.aggregated_quantity
order.items.price
order.items.aggregated_amount
order.items.metadata* | \n\n\n\n*Requires the `property` field to be defined." + "description": "Voucherify's specific rule name. The list of available names is provided below. \n\n|**Type**|**Name** |\n---- | -----------|\n|**Customer** | customer.segment
customer.metadata* |\n|**Order** |order.amount
order.initial_amount
order.items.count
order.items.price_any
order.items.price_each
order.items.metadata_any
order.items.metadata_each
order.metadata* |\n| **Campaign** | campaign.orders.amount_discounted
campaign.orders.amount
campaign.redemptions.count
campaign.redemptions.count.daily
campaign.redemptions.count.monthly
campaign.redemptions.customers_count
campaign.redemptions.customers_count.daily
campaign.redemptions.customers_count.monthly |\n| **Redemption** |redemption.gift.amount
redemption.count.daily
redemption.count.monthly
redemption.count.per_customer
redemption.count.per_customer.daily
redemption.count.per_customer.monthly
redemption.api_key
redemption.count.per_api_key
redemption.user.login
redemption.count.per_user
redemption.metadata
redemption.reward.pay_with_points.points_used |\n| **Product** | product.id
product.price
product.quantity
product.discount_applicable
product.metadata*
product.metadata.aggregated_quantity
product.metadata.aggregated_amount
product.metadata.discount_applicable
product.metadata.match_all |\n| **SKU** | sku.id
sku.price
sku.quantity
sku.discount_applicable |\n| **Publication** | publication.redeemable_by_linked_customer |\n| **Custom Event** | custom_event.metadata* |\n| **Order items** | order.items.every
order.items.any
order.items.none
order.items.cheapest
order.items.most_expensive | order.items.quantity
order.items.aggregated_quantity
order.items.price
order.items.aggregated_amount
order.items.metadata* | \n\n\n\n*Requires the `property` field to be defined." }, "property": { "type": "string", @@ -29749,7 +29756,7 @@ "properties": { "name": { "type": "string", - "description": "Voucherify specific rule name. The list of available names is provided below. \n\n|**Type**|**Name** |\n---- | -----------|\n|**Customer** | customer.segment
customer.metadata* |\n|**Order** |order.amount
order.initial_amount
order.items.count
order.items.price_any
order.items.price_each
order.items.metadata_any
order.items.metadata_each
order.metadata* |\n| **Campaign** | campaign.orders.amount_discounted
campaign.orders.amount
campaign.redemptions.count
campaign.redemptions.count.daily
campaign.redemptions.count.monthly
campaign.redemptions.customers_count
campaign.redemptions.customers_count.daily
campaign.redemptions.customers_count.monthly |\n| **Redemption** |redemption.gift.amount
redemption.count.daily
redemption.count.monthly
redemption.count.per_customer
redemption.count.per_customer.daily
redemption.count.per_customer.monthly
redemption.api_key
redemption.count.per_api_key
redemption.user.login
redemption.count.per_user
redemption.metadata
redemption.reward.pay_with_points.points_used |\n| **Product** | product.id
product.price
product.quantity
product.discount_applicable
product.metadata*
product.metadata.aggregated_quantity
product.metadata.aggregated_amount
product.metadata.discount_applicable
product.metadata.match_all |\n| **SKU** | sku.id
sku.price
sku.quantity
sku.discount_applicable |\n| **Publication** | publication.redeemable_by_linked_customer |\n| **Custom Event** | custom_event.metadata* |\n| **Order items** | order.items.every
order.items.any
order.items.none
order.items.cheapest
order.items.most_expensive | order.items.quantity
order.items.aggregated_quantity
order.items.price
order.items.aggregated_amount
order.items.metadata* | \n\n\n\n*Requires the `property` field to be defined." + "description": "Voucherify's specific rule name. The list of available names is provided below. \n\n|**Type**|**Name** |\n---- | -----------|\n|**Customer** | customer.segment
customer.metadata* |\n|**Order** |order.amount
order.initial_amount
order.items.count
order.items.price_any
order.items.price_each
order.items.metadata_any
order.items.metadata_each
order.metadata* |\n| **Campaign** | campaign.orders.amount_discounted
campaign.orders.amount
campaign.redemptions.count
campaign.redemptions.count.daily
campaign.redemptions.count.monthly
campaign.redemptions.customers_count
campaign.redemptions.customers_count.daily
campaign.redemptions.customers_count.monthly |\n| **Redemption** |redemption.gift.amount
redemption.count.daily
redemption.count.monthly
redemption.count.per_customer
redemption.count.per_customer.daily
redemption.count.per_customer.monthly
redemption.api_key
redemption.count.per_api_key
redemption.user.login
redemption.count.per_user
redemption.metadata
redemption.reward.pay_with_points.points_used |\n| **Product** | product.id
product.price
product.quantity
product.discount_applicable
product.metadata*
product.metadata.aggregated_quantity
product.metadata.aggregated_amount
product.metadata.discount_applicable
product.metadata.match_all |\n| **SKU** | sku.id
sku.price
sku.quantity
sku.discount_applicable |\n| **Publication** | publication.redeemable_by_linked_customer |\n| **Custom Event** | custom_event.metadata* |\n| **Order items** | order.items.every
order.items.any
order.items.none
order.items.cheapest
order.items.most_expensive | order.items.quantity
order.items.aggregated_quantity
order.items.price
order.items.aggregated_amount
order.items.metadata* | \n\n\n\n*Requires the `property` field to be defined." }, "property": { "type": "string", @@ -29792,7 +29799,7 @@ "properties": { "name": { "type": "string", - "description": "Voucherify specific rule name. The list of available names is provided below. \n\n|**Type**|**Name** |\n---- | -----------|\n|**Customer** | customer.segment
customer.metadata* |\n|**Order** |order.amount
order.initial_amount
order.items.count
order.items.price_any
order.items.price_each
order.items.metadata_any
order.items.metadata_each
order.metadata* |\n| **Campaign** | campaign.orders.amount_discounted
campaign.orders.amount
campaign.redemptions.count
campaign.redemptions.count.daily
campaign.redemptions.count.monthly
campaign.redemptions.customers_count
campaign.redemptions.customers_count.daily
campaign.redemptions.customers_count.monthly |\n| **Redemption** |redemption.gift.amount
redemption.count.daily
redemption.count.monthly
redemption.count.per_customer
redemption.count.per_customer.daily
redemption.count.per_customer.monthly
redemption.api_key
redemption.count.per_api_key
redemption.user.login
redemption.count.per_user
redemption.metadata
redemption.reward.pay_with_points.points_used |\n| **Product** | product.id
product.price
product.quantity
product.discount_applicable
product.metadata*
product.metadata.aggregated_quantity
product.metadata.aggregated_amount
product.metadata.discount_applicable
product.metadata.match_all |\n| **SKU** | sku.id
sku.price
sku.quantity
sku.discount_applicable |\n| **Publication** | publication.redeemable_by_linked_customer |\n| **Custom Event** | custom_event.metadata* |\n| **Order items** | order.items.every
order.items.any
order.items.none
order.items.cheapest
order.items.most_expensive | order.items.quantity
order.items.aggregated_quantity
order.items.price
order.items.aggregated_amount
order.items.metadata* | \n\n\n\n*Requires the `property` field to be defined." + "description": "Voucherify's specific rule name. The list of available names is provided below. \n\n|**Type**|**Name** |\n---- | -----------|\n|**Customer** | customer.segment
customer.metadata* |\n|**Order** |order.amount
order.initial_amount
order.items.count
order.items.price_any
order.items.price_each
order.items.metadata_any
order.items.metadata_each
order.metadata* |\n| **Campaign** | campaign.orders.amount_discounted
campaign.orders.amount
campaign.redemptions.count
campaign.redemptions.count.daily
campaign.redemptions.count.monthly
campaign.redemptions.customers_count
campaign.redemptions.customers_count.daily
campaign.redemptions.customers_count.monthly |\n| **Redemption** |redemption.gift.amount
redemption.count.daily
redemption.count.monthly
redemption.count.per_customer
redemption.count.per_customer.daily
redemption.count.per_customer.monthly
redemption.api_key
redemption.count.per_api_key
redemption.user.login
redemption.count.per_user
redemption.metadata
redemption.reward.pay_with_points.points_used |\n| **Product** | product.id
product.price
product.quantity
product.discount_applicable
product.metadata*
product.metadata.aggregated_quantity
product.metadata.aggregated_amount
product.metadata.discount_applicable
product.metadata.match_all |\n| **SKU** | sku.id
sku.price
sku.quantity
sku.discount_applicable |\n| **Publication** | publication.redeemable_by_linked_customer |\n| **Custom Event** | custom_event.metadata* |\n| **Order items** | order.items.every
order.items.any
order.items.none
order.items.cheapest
order.items.most_expensive | order.items.quantity
order.items.aggregated_quantity
order.items.price
order.items.aggregated_amount
order.items.metadata* | \n\n\n\n*Requires the `property` field to be defined." }, "property": { "type": "string", diff --git a/reference/readonly-sdks/java/OpenAPI.json b/reference/readonly-sdks/java/OpenAPI.json index e13789cb..e1c5a74c 100644 --- a/reference/readonly-sdks/java/OpenAPI.json +++ b/reference/readonly-sdks/java/OpenAPI.json @@ -38514,8 +38514,7 @@ "ValidationRuleBundleRules": { "title": "ValidationRuleBundleRules", "type": "object", - "nullable": true, - "description": "Contains all the rule definitions for the bundle rule. It is a set of key value pairs representing the rules and logic between the rules. The keys are numbered consecutively beginning from `1`. The values are objects containing the rule conditions." + "description": "Contains all the definitions for the bundle rules. It is a set of key value pairs representing the rules and logic between them. The keys are numbered consecutively beginning from `1`. The values are objects containing the rule conditions.\n\nWhile updating with the PUT method, you can pass `\"bundle_rules\": null` to delete the configuration; in the response, an empty object is then returned." }, "ValidationRuleRules": { "title": "ValidationRuleRules", diff --git a/reference/readonly-sdks/php/OpenAPI.json b/reference/readonly-sdks/php/OpenAPI.json index 104e7fbd..d21e5d20 100644 --- a/reference/readonly-sdks/php/OpenAPI.json +++ b/reference/readonly-sdks/php/OpenAPI.json @@ -39729,8 +39729,7 @@ "ValidationRuleBundleRules": { "title": "ValidationRuleBundleRules", "type": "object", - "nullable": true, - "description": "Contains all the rule definitions for the bundle rule. It is a set of key value pairs representing the rules and logic between the rules. The keys are numbered consecutively beginning from `1`. The values are objects containing the rule conditions." + "description": "Contains all the definitions for the bundle rules. It is a set of key value pairs representing the rules and logic between them. The keys are numbered consecutively beginning from `1`. The values are objects containing the rule conditions.\n\nWhile updating with the PUT method, you can pass `\"bundle_rules\": null` to delete the configuration; in the response, an empty object is then returned." }, "ValidationRuleRules": { "title": "ValidationRuleRules", diff --git a/reference/readonly-sdks/python/OpenAPI.json b/reference/readonly-sdks/python/OpenAPI.json index b8c3495e..8a0668cc 100644 --- a/reference/readonly-sdks/python/OpenAPI.json +++ b/reference/readonly-sdks/python/OpenAPI.json @@ -37959,8 +37959,7 @@ "ValidationRuleBundleRules": { "title": "ValidationRuleBundleRules", "type": "object", - "nullable": true, - "description": "Contains all the rule definitions for the bundle rule. It is a set of key value pairs representing the rules and logic between the rules. The keys are numbered consecutively beginning from `1`. The values are objects containing the rule conditions." + "description": "Contains all the definitions for the bundle rules. It is a set of key value pairs representing the rules and logic between them. The keys are numbered consecutively beginning from `1`. The values are objects containing the rule conditions.\n\nWhile updating with the PUT method, you can pass `\"bundle_rules\": null` to delete the configuration; in the response, an empty object is then returned." }, "ValidationRuleRules": { "title": "ValidationRuleRules", diff --git a/reference/readonly-sdks/ruby/OpenAPI.json b/reference/readonly-sdks/ruby/OpenAPI.json index be0b15ee..a5f39dbd 100644 --- a/reference/readonly-sdks/ruby/OpenAPI.json +++ b/reference/readonly-sdks/ruby/OpenAPI.json @@ -38548,8 +38548,7 @@ "ValidationRuleBundleRules": { "title": "ValidationRuleBundleRules", "type": "object", - "nullable": true, - "description": "Contains all the rule definitions for the bundle rule. It is a set of key value pairs representing the rules and logic between the rules. The keys are numbered consecutively beginning from `1`. The values are objects containing the rule conditions." + "description": "Contains all the definitions for the bundle rules. It is a set of key value pairs representing the rules and logic between them. The keys are numbered consecutively beginning from `1`. The values are objects containing the rule conditions.\n\nWhile updating with the PUT method, you can pass `\"bundle_rules\": null` to delete the configuration; in the response, an empty object is then returned." }, "ValidationRuleRules": { "title": "ValidationRuleRules", From 6dfea23b1c3c0cd4c3a9045939102fb4b48e2bb2 Mon Sep 17 00:00:00 2001 From: p-woznikowski Date: Wed, 4 Dec 2024 20:15:34 +0100 Subject: [PATCH 04/23] order_item_units p.1 --- .../QUALIFICATIONS-Qualification-Object.md | 1 + ...VALIDATION-RULES-Validation-Rule-Object.md | 1 + .../VALIDATIONS-Validation-Object.md | 1 + production/readOnly-openAPI.json | 22 ++++++++ reference/OpenAPI.json | 21 ++++++++ reference/readonly-sdks/java/OpenAPI.json | 52 +++++++++++++++++++ reference/readonly-sdks/php/OpenAPI.json | 52 +++++++++++++++++++ reference/readonly-sdks/python/OpenAPI.json | 52 +++++++++++++++++++ reference/readonly-sdks/ruby/OpenAPI.json | 52 +++++++++++++++++++ 9 files changed, 254 insertions(+) diff --git a/docs/reference-docs/QUALIFICATIONS-Qualification-Object.md b/docs/reference-docs/QUALIFICATIONS-Qualification-Object.md index 95e45783..cbc0d5aa 100644 --- a/docs/reference-docs/QUALIFICATIONS-Qualification-Object.md +++ b/docs/reference-docs/QUALIFICATIONS-Qualification-Object.md @@ -233,6 +233,7 @@ One of: | amount_limit
`integer` |

Upper limit allowed to be applied as a discount per order line item. Value is multiplied by 100 to precisely represent 2 decimal places. For example, a $6 maximum discount is written as 600.

| | aggregated_amount_limit
`integer` |

Maximum discount amount per order. Value is multiplied by 100 to precisely represent 2 decimal places. For example, a $6 maximum discount on the entire order is written as 600. This value is definable for the following discount effects:

  • APPLY_TO_ITEMS (each item subtotal is discounted equally)
  • APPLY_TO_ITEMS_BY_QUANTITY (each unit of matched products has the same discount value)
| | order_item_indices
`array` |

Determines the order in which the discount is applied to the products or SKUs sent in the order object in the request. The counting begins from 0.

| +| order_item_units
`array` | Array of:
AttributesDescription
index
integer
units
array
| | repeat
`integer` |

Determines the recurrence of the discount, e.g. "repeat": 3 means that the discount is applied to every third item.

| | skip_initially
`integer` |

Determines how many items are skipped before the discount is applied.

| | target
`string` |

Determines to which kinds of objects the discount is applicable. ITEM includes products and SKUs. UNIT means particular units within an order line.

Available values: `ITEM`, `UNIT` | diff --git a/docs/reference-docs/VALIDATION-RULES-Validation-Rule-Object.md b/docs/reference-docs/VALIDATION-RULES-Validation-Rule-Object.md index 6765cffd..02b2b51d 100644 --- a/docs/reference-docs/VALIDATION-RULES-Validation-Rule-Object.md +++ b/docs/reference-docs/VALIDATION-RULES-Validation-Rule-Object.md @@ -54,6 +54,7 @@ All of: | amount_limit
`integer` |

Upper limit allowed to be applied as a discount per order line item. Value is multiplied by 100 to precisely represent 2 decimal places. For example, a $6 maximum discount is written as 600.

| | aggregated_amount_limit
`integer` |

Maximum discount amount per order. Value is multiplied by 100 to precisely represent 2 decimal places. For example, a $6 maximum discount on the entire order is written as 600. This value is definable for the following discount effects:

  • APPLY_TO_ITEMS (each item subtotal is discounted equally)
  • APPLY_TO_ITEMS_BY_QUANTITY (each unit of matched products has the same discount value)
| | order_item_indices
`array` |

Determines the order in which the discount is applied to the products or SKUs sent in the order object in the request. The counting begins from 0.

| +| order_item_units
`array` | Array of:
AttributesDescription
index
integer
units
array
| | repeat
`integer` |

Determines the recurrence of the discount, e.g. "repeat": 3 means that the discount is applied to every third item.

| | skip_initially
`integer` |

Determines how many items are skipped before the discount is applied.

| | target
`string` |

Determines to which kinds of objects the discount is applicable. ITEM includes products and SKUs. UNIT means particular units within an order line.

Available values: `ITEM`, `UNIT` | diff --git a/docs/reference-docs/VALIDATIONS-Validation-Object.md b/docs/reference-docs/VALIDATIONS-Validation-Object.md index b56164e1..424e412d 100644 --- a/docs/reference-docs/VALIDATIONS-Validation-Object.md +++ b/docs/reference-docs/VALIDATIONS-Validation-Object.md @@ -127,6 +127,7 @@ One of: | amount_limit
`integer` |

Upper limit allowed to be applied as a discount per order line item. Value is multiplied by 100 to precisely represent 2 decimal places. For example, a $6 maximum discount is written as 600.

| | aggregated_amount_limit
`integer` |

Maximum discount amount per order. Value is multiplied by 100 to precisely represent 2 decimal places. For example, a $6 maximum discount on the entire order is written as 600. This value is definable for the following discount effects:

  • APPLY_TO_ITEMS (each item subtotal is discounted equally)
  • APPLY_TO_ITEMS_BY_QUANTITY (each unit of matched products has the same discount value)
| | order_item_indices
`array` |

Determines the order in which the discount is applied to the products or SKUs sent in the order object in the request. The counting begins from 0.

| +| order_item_units
`array` | Array of:
AttributesDescription
index
integer
units
array
| | repeat
`integer` |

Determines the recurrence of the discount, e.g. "repeat": 3 means that the discount is applied to every third item.

| | skip_initially
`integer` |

Determines how many items are skipped before the discount is applied.

| | target
`string` |

Determines to which kinds of objects the discount is applicable. ITEM includes products and SKUs. UNIT means particular units within an order line.

Available values: `ITEM`, `UNIT` | diff --git a/production/readOnly-openAPI.json b/production/readOnly-openAPI.json index 910123aa..0e3bdc9a 100644 --- a/production/readOnly-openAPI.json +++ b/production/readOnly-openAPI.json @@ -958,6 +958,28 @@ }, "nullable": true }, + "order_item_units": { + "type": "array", + "description": "", + "items": { + "type": "object", + "description": {}, + "properties": { + "index": { + "type": "integer", + "description": "" + }, + "units": { + "type": "array", + "description": "", + "items": { + "type": "integer" + } + } + } + }, + "nullable": true + }, "repeat": { "type": "integer", "description": "Determines the recurrence of the discount, e.g. `\"repeat\": 3` means that the discount is applied to every third item.", diff --git a/reference/OpenAPI.json b/reference/OpenAPI.json index 85fa5f4c..063599a9 100644 --- a/reference/OpenAPI.json +++ b/reference/OpenAPI.json @@ -39985,6 +39985,27 @@ "type": "integer" } }, + "order_item_units": { + "type": "array", + "description": "", + "items": { + "type": "object", + "description": {}, + "properties": { + "index": { + "type": "integer", + "description": "" + }, + "units": { + "type": "array", + "description": "", + "items": { + "type": "integer" + } + } + } + } + }, "repeat": { "type": "integer", "description": "Determines the recurrence of the discount, e.g. `\"repeat\": 3` means that the discount is applied to every third item." diff --git a/reference/readonly-sdks/java/OpenAPI.json b/reference/readonly-sdks/java/OpenAPI.json index e1c5a74c..c4e05045 100644 --- a/reference/readonly-sdks/java/OpenAPI.json +++ b/reference/readonly-sdks/java/OpenAPI.json @@ -28780,6 +28780,32 @@ }, "nullable": true }, + "order_item_units": { + "title": "ApplicableToOrderItemUnits", + "type": "array", + "description": "", + "items": { + "title": "ApplicableToOrderItemUnitsItem", + "type": "object", + "description": {}, + "properties": { + "index": { + "type": "integer", + "description": "" + }, + "units": { + "title": "ApplicableToOrderItemUnitsItemUnits", + "type": "array", + "description": "", + "items": { + "title": "ApplicableToOrderItemUnitsItemUnitsItem", + "type": "integer" + } + } + } + }, + "nullable": true + }, "repeat": { "type": "integer", "description": "Determines the recurrence of the discount, e.g. `\"repeat\": 3` means that the discount is applied to every third item.", @@ -40268,6 +40294,32 @@ }, "nullable": true }, + "order_item_units": { + "title": "InapplicableToOrderItemUnits", + "type": "array", + "description": "", + "items": { + "title": "InapplicableToOrderItemUnitsItem", + "type": "object", + "description": {}, + "properties": { + "index": { + "type": "integer", + "description": "" + }, + "units": { + "title": "InapplicableToOrderItemUnitsItemUnits", + "type": "array", + "description": "", + "items": { + "title": "InapplicableToOrderItemUnitsItemUnitsItem", + "type": "integer" + } + } + } + }, + "nullable": true + }, "repeat": { "type": "integer", "description": "Determines the recurrence of the discount, e.g. `\"repeat\": 3` means that the discount is applied to every third item.", diff --git a/reference/readonly-sdks/php/OpenAPI.json b/reference/readonly-sdks/php/OpenAPI.json index d21e5d20..75f13069 100644 --- a/reference/readonly-sdks/php/OpenAPI.json +++ b/reference/readonly-sdks/php/OpenAPI.json @@ -29751,6 +29751,32 @@ }, "nullable": true }, + "order_item_units": { + "title": "ApplicableToOrderItemUnits", + "type": "array", + "description": "", + "items": { + "title": "ApplicableToOrderItemUnitsItem", + "type": "object", + "description": {}, + "properties": { + "index": { + "type": "integer", + "description": "" + }, + "units": { + "title": "ApplicableToOrderItemUnitsItemUnits", + "type": "array", + "description": "", + "items": { + "title": "ApplicableToOrderItemUnitsItemUnitsItem", + "type": "integer" + } + } + } + }, + "nullable": true + }, "repeat": { "type": "integer", "description": "Determines the recurrence of the discount, e.g. `\"repeat\": 3` means that the discount is applied to every third item.", @@ -41493,6 +41519,32 @@ }, "nullable": true }, + "order_item_units": { + "title": "InapplicableToOrderItemUnits", + "type": "array", + "description": "", + "items": { + "title": "InapplicableToOrderItemUnitsItem", + "type": "object", + "description": {}, + "properties": { + "index": { + "type": "integer", + "description": "" + }, + "units": { + "title": "InapplicableToOrderItemUnitsItemUnits", + "type": "array", + "description": "", + "items": { + "title": "InapplicableToOrderItemUnitsItemUnitsItem", + "type": "integer" + } + } + } + }, + "nullable": true + }, "repeat": { "type": "integer", "description": "Determines the recurrence of the discount, e.g. `\"repeat\": 3` means that the discount is applied to every third item.", diff --git a/reference/readonly-sdks/python/OpenAPI.json b/reference/readonly-sdks/python/OpenAPI.json index 8a0668cc..2126898d 100644 --- a/reference/readonly-sdks/python/OpenAPI.json +++ b/reference/readonly-sdks/python/OpenAPI.json @@ -28580,6 +28580,32 @@ }, "nullable": true }, + "order_item_units": { + "title": "ApplicableToOrderItemUnits", + "type": "array", + "description": "", + "items": { + "title": "ApplicableToOrderItemUnitsItem", + "type": "object", + "description": {}, + "properties": { + "index": { + "type": "integer", + "description": "" + }, + "units": { + "title": "ApplicableToOrderItemUnitsItemUnits", + "type": "array", + "description": "", + "items": { + "title": "ApplicableToOrderItemUnitsItemUnitsItem", + "type": "integer" + } + } + } + }, + "nullable": true + }, "repeat": { "type": "integer", "description": "Determines the recurrence of the discount, e.g. `\"repeat\": 3` means that the discount is applied to every third item.", @@ -39713,6 +39739,32 @@ }, "nullable": true }, + "order_item_units": { + "title": "InapplicableToOrderItemUnits", + "type": "array", + "description": "", + "items": { + "title": "InapplicableToOrderItemUnitsItem", + "type": "object", + "description": {}, + "properties": { + "index": { + "type": "integer", + "description": "" + }, + "units": { + "title": "InapplicableToOrderItemUnitsItemUnits", + "type": "array", + "description": "", + "items": { + "title": "InapplicableToOrderItemUnitsItemUnitsItem", + "type": "integer" + } + } + } + }, + "nullable": true + }, "repeat": { "type": "integer", "description": "Determines the recurrence of the discount, e.g. `\"repeat\": 3` means that the discount is applied to every third item.", diff --git a/reference/readonly-sdks/ruby/OpenAPI.json b/reference/readonly-sdks/ruby/OpenAPI.json index a5f39dbd..f29997b4 100644 --- a/reference/readonly-sdks/ruby/OpenAPI.json +++ b/reference/readonly-sdks/ruby/OpenAPI.json @@ -28814,6 +28814,32 @@ }, "nullable": true }, + "order_item_units": { + "title": "ApplicableToOrderItemUnits", + "type": "array", + "description": "", + "items": { + "title": "ApplicableToOrderItemUnitsItem", + "type": "object", + "description": {}, + "properties": { + "index": { + "type": "integer", + "description": "" + }, + "units": { + "title": "ApplicableToOrderItemUnitsItemUnits", + "type": "array", + "description": "", + "items": { + "title": "ApplicableToOrderItemUnitsItemUnitsItem", + "type": "integer" + } + } + } + }, + "nullable": true + }, "repeat": { "type": "integer", "description": "Determines the recurrence of the discount, e.g. `\"repeat\": 3` means that the discount is applied to every third item.", @@ -40302,6 +40328,32 @@ }, "nullable": true }, + "order_item_units": { + "title": "InapplicableToOrderItemUnits", + "type": "array", + "description": "", + "items": { + "title": "InapplicableToOrderItemUnitsItem", + "type": "object", + "description": {}, + "properties": { + "index": { + "type": "integer", + "description": "" + }, + "units": { + "title": "InapplicableToOrderItemUnitsItemUnits", + "type": "array", + "description": "", + "items": { + "title": "InapplicableToOrderItemUnitsItemUnitsItem", + "type": "integer" + } + } + } + }, + "nullable": true + }, "repeat": { "type": "integer", "description": "Determines the recurrence of the discount, e.g. `\"repeat\": 3` means that the discount is applied to every third item.", From 2770a7658f8d901531c046a214c7a9577863be08 Mon Sep 17 00:00:00 2001 From: p-woznikowski Date: Thu, 5 Dec 2024 13:09:53 +0100 Subject: [PATCH 05/23] order_item_units p.2 --- .../QUALIFICATIONS-Qualification-Object.md | 4 ++-- .../VALIDATION-RULES-Validation-Rule-Object.md | 4 ++-- .../VALIDATIONS-Validation-Object.md | 4 ++-- production/readOnly-openAPI.json | 9 ++++----- reference/OpenAPI.json | 9 ++++----- reference/readonly-sdks/java/OpenAPI.json | 18 ++++++++---------- reference/readonly-sdks/php/OpenAPI.json | 18 ++++++++---------- reference/readonly-sdks/python/OpenAPI.json | 18 ++++++++---------- reference/readonly-sdks/ruby/OpenAPI.json | 18 ++++++++---------- 9 files changed, 46 insertions(+), 56 deletions(-) diff --git a/docs/reference-docs/QUALIFICATIONS-Qualification-Object.md b/docs/reference-docs/QUALIFICATIONS-Qualification-Object.md index cbc0d5aa..5e7de6c8 100644 --- a/docs/reference-docs/QUALIFICATIONS-Qualification-Object.md +++ b/docs/reference-docs/QUALIFICATIONS-Qualification-Object.md @@ -232,8 +232,8 @@ One of: | aggregated_quantity_limit
`integer` |

The maximum number of units allowed to be discounted combined across all matched order line items.

| | amount_limit
`integer` |

Upper limit allowed to be applied as a discount per order line item. Value is multiplied by 100 to precisely represent 2 decimal places. For example, a $6 maximum discount is written as 600.

| | aggregated_amount_limit
`integer` |

Maximum discount amount per order. Value is multiplied by 100 to precisely represent 2 decimal places. For example, a $6 maximum discount on the entire order is written as 600. This value is definable for the following discount effects:

  • APPLY_TO_ITEMS (each item subtotal is discounted equally)
  • APPLY_TO_ITEMS_BY_QUANTITY (each unit of matched products has the same discount value)
| -| order_item_indices
`array` |

Determines the order in which the discount is applied to the products or SKUs sent in the order object in the request. The counting begins from 0.

| -| order_item_units
`array` | Array of:
AttributesDescription
index
integer
units
array
| +| order_item_indices
`array` |

Lists which order lines are (not) covered by the discount. The sequence is determined in accordance with the order object in the request and it starts from 0.

| +| order_item_units
`array` |

Lists which units within order lines are covered by the discount The order line items are listed according to the order sent in the request.

Array of:
AttributesDescription
index
integer

Number assigned to the order line item in accordance with the order_item_indeces. The counting starts from 0.

units
array

Numbers of units in the order line covered by the discount; e.g. 2, 5, 8 for 10 units with the setting "skip_initially": 1, "repeat": 3. The counting starts from 1.

| | repeat
`integer` |

Determines the recurrence of the discount, e.g. "repeat": 3 means that the discount is applied to every third item.

| | skip_initially
`integer` |

Determines how many items are skipped before the discount is applied.

| | target
`string` |

Determines to which kinds of objects the discount is applicable. ITEM includes products and SKUs. UNIT means particular units within an order line.

Available values: `ITEM`, `UNIT` | diff --git a/docs/reference-docs/VALIDATION-RULES-Validation-Rule-Object.md b/docs/reference-docs/VALIDATION-RULES-Validation-Rule-Object.md index 02b2b51d..aa4c0b8e 100644 --- a/docs/reference-docs/VALIDATION-RULES-Validation-Rule-Object.md +++ b/docs/reference-docs/VALIDATION-RULES-Validation-Rule-Object.md @@ -53,8 +53,8 @@ All of: | aggregated_quantity_limit
`integer` |

The maximum number of units allowed to be discounted combined across all matched order line items.

| | amount_limit
`integer` |

Upper limit allowed to be applied as a discount per order line item. Value is multiplied by 100 to precisely represent 2 decimal places. For example, a $6 maximum discount is written as 600.

| | aggregated_amount_limit
`integer` |

Maximum discount amount per order. Value is multiplied by 100 to precisely represent 2 decimal places. For example, a $6 maximum discount on the entire order is written as 600. This value is definable for the following discount effects:

  • APPLY_TO_ITEMS (each item subtotal is discounted equally)
  • APPLY_TO_ITEMS_BY_QUANTITY (each unit of matched products has the same discount value)
| -| order_item_indices
`array` |

Determines the order in which the discount is applied to the products or SKUs sent in the order object in the request. The counting begins from 0.

| -| order_item_units
`array` | Array of:
AttributesDescription
index
integer
units
array
| +| order_item_indices
`array` |

Lists which order lines are (not) covered by the discount. The sequence is determined in accordance with the order object in the request and it starts from 0.

| +| order_item_units
`array` |

Lists which units within order lines are covered by the discount The order line items are listed according to the order sent in the request.

Array of:
AttributesDescription
index
integer

Number assigned to the order line item in accordance with the order_item_indeces. The counting starts from 0.

units
array

Numbers of units in the order line covered by the discount; e.g. 2, 5, 8 for 10 units with the setting "skip_initially": 1, "repeat": 3. The counting starts from 1.

| | repeat
`integer` |

Determines the recurrence of the discount, e.g. "repeat": 3 means that the discount is applied to every third item.

| | skip_initially
`integer` |

Determines how many items are skipped before the discount is applied.

| | target
`string` |

Determines to which kinds of objects the discount is applicable. ITEM includes products and SKUs. UNIT means particular units within an order line.

Available values: `ITEM`, `UNIT` | diff --git a/docs/reference-docs/VALIDATIONS-Validation-Object.md b/docs/reference-docs/VALIDATIONS-Validation-Object.md index 424e412d..65b245b4 100644 --- a/docs/reference-docs/VALIDATIONS-Validation-Object.md +++ b/docs/reference-docs/VALIDATIONS-Validation-Object.md @@ -126,8 +126,8 @@ One of: | aggregated_quantity_limit
`integer` |

The maximum number of units allowed to be discounted combined across all matched order line items.

| | amount_limit
`integer` |

Upper limit allowed to be applied as a discount per order line item. Value is multiplied by 100 to precisely represent 2 decimal places. For example, a $6 maximum discount is written as 600.

| | aggregated_amount_limit
`integer` |

Maximum discount amount per order. Value is multiplied by 100 to precisely represent 2 decimal places. For example, a $6 maximum discount on the entire order is written as 600. This value is definable for the following discount effects:

  • APPLY_TO_ITEMS (each item subtotal is discounted equally)
  • APPLY_TO_ITEMS_BY_QUANTITY (each unit of matched products has the same discount value)
| -| order_item_indices
`array` |

Determines the order in which the discount is applied to the products or SKUs sent in the order object in the request. The counting begins from 0.

| -| order_item_units
`array` | Array of:
AttributesDescription
index
integer
units
array
| +| order_item_indices
`array` |

Lists which order lines are (not) covered by the discount. The sequence is determined in accordance with the order object in the request and it starts from 0.

| +| order_item_units
`array` |

Lists which units within order lines are covered by the discount The order line items are listed according to the order sent in the request.

Array of:
AttributesDescription
index
integer

Number assigned to the order line item in accordance with the order_item_indeces. The counting starts from 0.

units
array

Numbers of units in the order line covered by the discount; e.g. 2, 5, 8 for 10 units with the setting "skip_initially": 1, "repeat": 3. The counting starts from 1.

| | repeat
`integer` |

Determines the recurrence of the discount, e.g. "repeat": 3 means that the discount is applied to every third item.

| | skip_initially
`integer` |

Determines how many items are skipped before the discount is applied.

| | target
`string` |

Determines to which kinds of objects the discount is applicable. ITEM includes products and SKUs. UNIT means particular units within an order line.

Available values: `ITEM`, `UNIT` | diff --git a/production/readOnly-openAPI.json b/production/readOnly-openAPI.json index 0e3bdc9a..7e9a8d22 100644 --- a/production/readOnly-openAPI.json +++ b/production/readOnly-openAPI.json @@ -952,7 +952,7 @@ }, "order_item_indices": { "type": "array", - "description": "Determines the order in which the discount is applied to the products or SKUs sent in the `order` object in the request. The counting begins from `0`.", + "description": "Lists which order lines are (not) covered by the discount. The sequence is determined in accordance with the `order` object in the request and it starts from `0`.", "items": { "type": "integer" }, @@ -960,18 +960,17 @@ }, "order_item_units": { "type": "array", - "description": "", + "description": "Lists which units within order lines are covered by the discount The order line items are listed according to the order sent in the request.", "items": { "type": "object", - "description": {}, "properties": { "index": { "type": "integer", - "description": "" + "description": "Number assigned to the order line item in accordance with the `order_item_indeces`. The counting starts from `0`." }, "units": { "type": "array", - "description": "", + "description": "Numbers of units in the order line covered by the discount; e.g. `2, 5, 8` for 10 units with the setting `\"skip_initially\": 1`, `\"repeat\": 3`. The counting starts from `1`.", "items": { "type": "integer" } diff --git a/reference/OpenAPI.json b/reference/OpenAPI.json index 063599a9..49e8f180 100644 --- a/reference/OpenAPI.json +++ b/reference/OpenAPI.json @@ -39980,25 +39980,24 @@ }, "order_item_indices": { "type": "array", - "description": "Determines the order in which the discount is applied to the products or SKUs sent in the `order` object in the request. The counting begins from `0`.", + "description": "Lists which order lines are (not) covered by the discount. The sequence is determined in accordance with the `order` object in the request and it starts from `0`.", "items": { "type": "integer" } }, "order_item_units": { "type": "array", - "description": "", + "description": "Lists which units within order lines are covered by the discount The order line items are listed according to the order sent in the request.", "items": { "type": "object", - "description": {}, "properties": { "index": { "type": "integer", - "description": "" + "description": "Number assigned to the order line item in accordance with the `order_item_indeces`. The counting starts from `0`." }, "units": { "type": "array", - "description": "", + "description": "Numbers of units in the order line covered by the discount; e.g. `2, 5, 8` for 10 units with the setting `\"skip_initially\": 1`, `\"repeat\": 3`. The counting starts from `1`.", "items": { "type": "integer" } diff --git a/reference/readonly-sdks/java/OpenAPI.json b/reference/readonly-sdks/java/OpenAPI.json index c4e05045..8126667b 100644 --- a/reference/readonly-sdks/java/OpenAPI.json +++ b/reference/readonly-sdks/java/OpenAPI.json @@ -28773,7 +28773,7 @@ "order_item_indices": { "title": "ApplicableToOrderItemIndices", "type": "array", - "description": "Determines the order in which the discount is applied to the products or SKUs sent in the `order` object in the request. The counting begins from `0`.", + "description": "Lists which order lines are (not) covered by the discount. The sequence is determined in accordance with the `order` object in the request and it starts from `0`.", "items": { "title": "ApplicableToOrderItemIndicesItem", "type": "integer" @@ -28783,20 +28783,19 @@ "order_item_units": { "title": "ApplicableToOrderItemUnits", "type": "array", - "description": "", + "description": "Lists which units within order lines are covered by the discount The order line items are listed according to the order sent in the request.", "items": { "title": "ApplicableToOrderItemUnitsItem", "type": "object", - "description": {}, "properties": { "index": { "type": "integer", - "description": "" + "description": "Number assigned to the order line item in accordance with the `order_item_indeces`. The counting starts from `0`." }, "units": { "title": "ApplicableToOrderItemUnitsItemUnits", "type": "array", - "description": "", + "description": "Numbers of units in the order line covered by the discount; e.g. `2, 5, 8` for 10 units with the setting `\"skip_initially\": 1`, `\"repeat\": 3`. The counting starts from `1`.", "items": { "title": "ApplicableToOrderItemUnitsItemUnitsItem", "type": "integer" @@ -40287,7 +40286,7 @@ "order_item_indices": { "title": "InapplicableToOrderItemIndices", "type": "array", - "description": "Determines the order in which the discount is applied to the products or SKUs sent in the `order` object in the request. The counting begins from `0`.", + "description": "Lists which order lines are (not) covered by the discount. The sequence is determined in accordance with the `order` object in the request and it starts from `0`.", "items": { "title": "InapplicableToOrderItemIndicesItem", "type": "integer" @@ -40297,20 +40296,19 @@ "order_item_units": { "title": "InapplicableToOrderItemUnits", "type": "array", - "description": "", + "description": "Lists which units within order lines are covered by the discount The order line items are listed according to the order sent in the request.", "items": { "title": "InapplicableToOrderItemUnitsItem", "type": "object", - "description": {}, "properties": { "index": { "type": "integer", - "description": "" + "description": "Number assigned to the order line item in accordance with the `order_item_indeces`. The counting starts from `0`." }, "units": { "title": "InapplicableToOrderItemUnitsItemUnits", "type": "array", - "description": "", + "description": "Numbers of units in the order line covered by the discount; e.g. `2, 5, 8` for 10 units with the setting `\"skip_initially\": 1`, `\"repeat\": 3`. The counting starts from `1`.", "items": { "title": "InapplicableToOrderItemUnitsItemUnitsItem", "type": "integer" diff --git a/reference/readonly-sdks/php/OpenAPI.json b/reference/readonly-sdks/php/OpenAPI.json index 75f13069..53b97769 100644 --- a/reference/readonly-sdks/php/OpenAPI.json +++ b/reference/readonly-sdks/php/OpenAPI.json @@ -29744,7 +29744,7 @@ "order_item_indices": { "title": "ApplicableToOrderItemIndices", "type": "array", - "description": "Determines the order in which the discount is applied to the products or SKUs sent in the `order` object in the request. The counting begins from `0`.", + "description": "Lists which order lines are (not) covered by the discount. The sequence is determined in accordance with the `order` object in the request and it starts from `0`.", "items": { "title": "ApplicableToOrderItemIndicesItem", "type": "integer" @@ -29754,20 +29754,19 @@ "order_item_units": { "title": "ApplicableToOrderItemUnits", "type": "array", - "description": "", + "description": "Lists which units within order lines are covered by the discount The order line items are listed according to the order sent in the request.", "items": { "title": "ApplicableToOrderItemUnitsItem", "type": "object", - "description": {}, "properties": { "index": { "type": "integer", - "description": "" + "description": "Number assigned to the order line item in accordance with the `order_item_indeces`. The counting starts from `0`." }, "units": { "title": "ApplicableToOrderItemUnitsItemUnits", "type": "array", - "description": "", + "description": "Numbers of units in the order line covered by the discount; e.g. `2, 5, 8` for 10 units with the setting `\"skip_initially\": 1`, `\"repeat\": 3`. The counting starts from `1`.", "items": { "title": "ApplicableToOrderItemUnitsItemUnitsItem", "type": "integer" @@ -41512,7 +41511,7 @@ "order_item_indices": { "title": "InapplicableToOrderItemIndices", "type": "array", - "description": "Determines the order in which the discount is applied to the products or SKUs sent in the `order` object in the request. The counting begins from `0`.", + "description": "Lists which order lines are (not) covered by the discount. The sequence is determined in accordance with the `order` object in the request and it starts from `0`.", "items": { "title": "InapplicableToOrderItemIndicesItem", "type": "integer" @@ -41522,20 +41521,19 @@ "order_item_units": { "title": "InapplicableToOrderItemUnits", "type": "array", - "description": "", + "description": "Lists which units within order lines are covered by the discount The order line items are listed according to the order sent in the request.", "items": { "title": "InapplicableToOrderItemUnitsItem", "type": "object", - "description": {}, "properties": { "index": { "type": "integer", - "description": "" + "description": "Number assigned to the order line item in accordance with the `order_item_indeces`. The counting starts from `0`." }, "units": { "title": "InapplicableToOrderItemUnitsItemUnits", "type": "array", - "description": "", + "description": "Numbers of units in the order line covered by the discount; e.g. `2, 5, 8` for 10 units with the setting `\"skip_initially\": 1`, `\"repeat\": 3`. The counting starts from `1`.", "items": { "title": "InapplicableToOrderItemUnitsItemUnitsItem", "type": "integer" diff --git a/reference/readonly-sdks/python/OpenAPI.json b/reference/readonly-sdks/python/OpenAPI.json index 2126898d..68c6a44f 100644 --- a/reference/readonly-sdks/python/OpenAPI.json +++ b/reference/readonly-sdks/python/OpenAPI.json @@ -28573,7 +28573,7 @@ "order_item_indices": { "title": "ApplicableToOrderItemIndices", "type": "array", - "description": "Determines the order in which the discount is applied to the products or SKUs sent in the `order` object in the request. The counting begins from `0`.", + "description": "Lists which order lines are (not) covered by the discount. The sequence is determined in accordance with the `order` object in the request and it starts from `0`.", "items": { "title": "ApplicableToOrderItemIndicesItem", "type": "integer" @@ -28583,20 +28583,19 @@ "order_item_units": { "title": "ApplicableToOrderItemUnits", "type": "array", - "description": "", + "description": "Lists which units within order lines are covered by the discount The order line items are listed according to the order sent in the request.", "items": { "title": "ApplicableToOrderItemUnitsItem", "type": "object", - "description": {}, "properties": { "index": { "type": "integer", - "description": "" + "description": "Number assigned to the order line item in accordance with the `order_item_indeces`. The counting starts from `0`." }, "units": { "title": "ApplicableToOrderItemUnitsItemUnits", "type": "array", - "description": "", + "description": "Numbers of units in the order line covered by the discount; e.g. `2, 5, 8` for 10 units with the setting `\"skip_initially\": 1`, `\"repeat\": 3`. The counting starts from `1`.", "items": { "title": "ApplicableToOrderItemUnitsItemUnitsItem", "type": "integer" @@ -39732,7 +39731,7 @@ "order_item_indices": { "title": "InapplicableToOrderItemIndices", "type": "array", - "description": "Determines the order in which the discount is applied to the products or SKUs sent in the `order` object in the request. The counting begins from `0`.", + "description": "Lists which order lines are (not) covered by the discount. The sequence is determined in accordance with the `order` object in the request and it starts from `0`.", "items": { "title": "InapplicableToOrderItemIndicesItem", "type": "integer" @@ -39742,20 +39741,19 @@ "order_item_units": { "title": "InapplicableToOrderItemUnits", "type": "array", - "description": "", + "description": "Lists which units within order lines are covered by the discount The order line items are listed according to the order sent in the request.", "items": { "title": "InapplicableToOrderItemUnitsItem", "type": "object", - "description": {}, "properties": { "index": { "type": "integer", - "description": "" + "description": "Number assigned to the order line item in accordance with the `order_item_indeces`. The counting starts from `0`." }, "units": { "title": "InapplicableToOrderItemUnitsItemUnits", "type": "array", - "description": "", + "description": "Numbers of units in the order line covered by the discount; e.g. `2, 5, 8` for 10 units with the setting `\"skip_initially\": 1`, `\"repeat\": 3`. The counting starts from `1`.", "items": { "title": "InapplicableToOrderItemUnitsItemUnitsItem", "type": "integer" diff --git a/reference/readonly-sdks/ruby/OpenAPI.json b/reference/readonly-sdks/ruby/OpenAPI.json index f29997b4..3726ec73 100644 --- a/reference/readonly-sdks/ruby/OpenAPI.json +++ b/reference/readonly-sdks/ruby/OpenAPI.json @@ -28807,7 +28807,7 @@ "order_item_indices": { "title": "ApplicableToOrderItemIndices", "type": "array", - "description": "Determines the order in which the discount is applied to the products or SKUs sent in the `order` object in the request. The counting begins from `0`.", + "description": "Lists which order lines are (not) covered by the discount. The sequence is determined in accordance with the `order` object in the request and it starts from `0`.", "items": { "title": "ApplicableToOrderItemIndicesItem", "type": "integer" @@ -28817,20 +28817,19 @@ "order_item_units": { "title": "ApplicableToOrderItemUnits", "type": "array", - "description": "", + "description": "Lists which units within order lines are covered by the discount The order line items are listed according to the order sent in the request.", "items": { "title": "ApplicableToOrderItemUnitsItem", "type": "object", - "description": {}, "properties": { "index": { "type": "integer", - "description": "" + "description": "Number assigned to the order line item in accordance with the `order_item_indeces`. The counting starts from `0`." }, "units": { "title": "ApplicableToOrderItemUnitsItemUnits", "type": "array", - "description": "", + "description": "Numbers of units in the order line covered by the discount; e.g. `2, 5, 8` for 10 units with the setting `\"skip_initially\": 1`, `\"repeat\": 3`. The counting starts from `1`.", "items": { "title": "ApplicableToOrderItemUnitsItemUnitsItem", "type": "integer" @@ -40321,7 +40320,7 @@ "order_item_indices": { "title": "InapplicableToOrderItemIndices", "type": "array", - "description": "Determines the order in which the discount is applied to the products or SKUs sent in the `order` object in the request. The counting begins from `0`.", + "description": "Lists which order lines are (not) covered by the discount. The sequence is determined in accordance with the `order` object in the request and it starts from `0`.", "items": { "title": "InapplicableToOrderItemIndicesItem", "type": "integer" @@ -40331,20 +40330,19 @@ "order_item_units": { "title": "InapplicableToOrderItemUnits", "type": "array", - "description": "", + "description": "Lists which units within order lines are covered by the discount The order line items are listed according to the order sent in the request.", "items": { "title": "InapplicableToOrderItemUnitsItem", "type": "object", - "description": {}, "properties": { "index": { "type": "integer", - "description": "" + "description": "Number assigned to the order line item in accordance with the `order_item_indeces`. The counting starts from `0`." }, "units": { "title": "InapplicableToOrderItemUnitsItemUnits", "type": "array", - "description": "", + "description": "Numbers of units in the order line covered by the discount; e.g. `2, 5, 8` for 10 units with the setting `\"skip_initially\": 1`, `\"repeat\": 3`. The counting starts from `1`.", "items": { "title": "InapplicableToOrderItemUnitsItemUnitsItem", "type": "integer" From 6f7eb84802b7942eccfbaa24b572d89399d9aa03 Mon Sep 17 00:00:00 2001 From: p-woznikowski Date: Thu, 5 Dec 2024 13:15:22 +0100 Subject: [PATCH 06/23] Update OPEN-API.md --- changelog/OPEN-API.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/changelog/OPEN-API.md b/changelog/OPEN-API.md index 995c993e..e048dae6 100644 --- a/changelog/OPEN-API.md +++ b/changelog/OPEN-API.md @@ -4,6 +4,10 @@ Older changes in [DEPRECATED.md](deprecated/DEPRECATED.md) +## 2024-12-05 + +Added the `order_item_units` array to the `ApplicableTo` schema + ## 2024-12-04 Added `ValidationRuleBundleRules` schema and `bundle_rules` to the `ValidationRuleBase` schema From 3943d252d72af7106d1dc558b3ccf18eecfdcc86 Mon Sep 17 00:00:00 2001 From: p-woznikowski Date: Thu, 5 Dec 2024 16:07:29 +0100 Subject: [PATCH 07/23] order_item_x description fixes --- .../reference-docs/QUALIFICATIONS-Qualification-Object.md | 4 ++-- .../VALIDATION-RULES-Validation-Rule-Object.md | 4 ++-- docs/reference-docs/VALIDATIONS-Validation-Object.md | 4 ++-- production/readOnly-openAPI.json | 8 ++++---- reference/OpenAPI.json | 8 ++++---- 5 files changed, 14 insertions(+), 14 deletions(-) diff --git a/docs/reference-docs/QUALIFICATIONS-Qualification-Object.md b/docs/reference-docs/QUALIFICATIONS-Qualification-Object.md index 5e7de6c8..849e272b 100644 --- a/docs/reference-docs/QUALIFICATIONS-Qualification-Object.md +++ b/docs/reference-docs/QUALIFICATIONS-Qualification-Object.md @@ -232,8 +232,8 @@ One of: | aggregated_quantity_limit
`integer` |

The maximum number of units allowed to be discounted combined across all matched order line items.

| | amount_limit
`integer` |

Upper limit allowed to be applied as a discount per order line item. Value is multiplied by 100 to precisely represent 2 decimal places. For example, a $6 maximum discount is written as 600.

| | aggregated_amount_limit
`integer` |

Maximum discount amount per order. Value is multiplied by 100 to precisely represent 2 decimal places. For example, a $6 maximum discount on the entire order is written as 600. This value is definable for the following discount effects:

  • APPLY_TO_ITEMS (each item subtotal is discounted equally)
  • APPLY_TO_ITEMS_BY_QUANTITY (each unit of matched products has the same discount value)
| -| order_item_indices
`array` |

Lists which order lines are (not) covered by the discount. The sequence is determined in accordance with the order object in the request and it starts from 0.

| -| order_item_units
`array` |

Lists which units within order lines are covered by the discount The order line items are listed according to the order sent in the request.

Array of:
AttributesDescription
index
integer

Number assigned to the order line item in accordance with the order_item_indeces. The counting starts from 0.

units
array

Numbers of units in the order line covered by the discount; e.g. 2, 5, 8 for 10 units with the setting "skip_initially": 1, "repeat": 3. The counting starts from 1.

| +| order_item_indices
`array` |

Lists which order lines are (not) covered by the discount. The order in the array is determined by the sequence of applied discounts, while the numbers correspond to the order lines sent in the order object in the request. The first order line is assigned 0, the second order line is assigned 1, and so on.

| +| order_item_units
`array` |

Lists which units within order lines are covered by the discount. The order line items are listed according to sequence of applied discounts while the index corresponds to the order line sent in the order object in the request.

Array of:
AttributesDescription
index
integer

Number assigned to the order line item in accordance with the order sent in the request.

units
array

Numbers of units in the order line covered by the discount; e.g. 2, 5, 8 for 10 units with the setting "skip_initially": 1, "repeat": 3. The counting of units starts from 1.

| | repeat
`integer` |

Determines the recurrence of the discount, e.g. "repeat": 3 means that the discount is applied to every third item.

| | skip_initially
`integer` |

Determines how many items are skipped before the discount is applied.

| | target
`string` |

Determines to which kinds of objects the discount is applicable. ITEM includes products and SKUs. UNIT means particular units within an order line.

Available values: `ITEM`, `UNIT` | diff --git a/docs/reference-docs/VALIDATION-RULES-Validation-Rule-Object.md b/docs/reference-docs/VALIDATION-RULES-Validation-Rule-Object.md index aa4c0b8e..8ae47be2 100644 --- a/docs/reference-docs/VALIDATION-RULES-Validation-Rule-Object.md +++ b/docs/reference-docs/VALIDATION-RULES-Validation-Rule-Object.md @@ -53,8 +53,8 @@ All of: | aggregated_quantity_limit
`integer` |

The maximum number of units allowed to be discounted combined across all matched order line items.

| | amount_limit
`integer` |

Upper limit allowed to be applied as a discount per order line item. Value is multiplied by 100 to precisely represent 2 decimal places. For example, a $6 maximum discount is written as 600.

| | aggregated_amount_limit
`integer` |

Maximum discount amount per order. Value is multiplied by 100 to precisely represent 2 decimal places. For example, a $6 maximum discount on the entire order is written as 600. This value is definable for the following discount effects:

  • APPLY_TO_ITEMS (each item subtotal is discounted equally)
  • APPLY_TO_ITEMS_BY_QUANTITY (each unit of matched products has the same discount value)
| -| order_item_indices
`array` |

Lists which order lines are (not) covered by the discount. The sequence is determined in accordance with the order object in the request and it starts from 0.

| -| order_item_units
`array` |

Lists which units within order lines are covered by the discount The order line items are listed according to the order sent in the request.

Array of:
AttributesDescription
index
integer

Number assigned to the order line item in accordance with the order_item_indeces. The counting starts from 0.

units
array

Numbers of units in the order line covered by the discount; e.g. 2, 5, 8 for 10 units with the setting "skip_initially": 1, "repeat": 3. The counting starts from 1.

| +| order_item_indices
`array` |

Lists which order lines are (not) covered by the discount. The order in the array is determined by the sequence of applied discounts, while the numbers correspond to the order lines sent in the order object in the request. The first order line is assigned 0, the second order line is assigned 1, and so on.

| +| order_item_units
`array` |

Lists which units within order lines are covered by the discount. The order line items are listed according to sequence of applied discounts while the index corresponds to the order line sent in the order object in the request.

Array of:
AttributesDescription
index
integer

Number assigned to the order line item in accordance with the order sent in the request.

units
array

Numbers of units in the order line covered by the discount; e.g. 2, 5, 8 for 10 units with the setting "skip_initially": 1, "repeat": 3. The counting of units starts from 1.

| | repeat
`integer` |

Determines the recurrence of the discount, e.g. "repeat": 3 means that the discount is applied to every third item.

| | skip_initially
`integer` |

Determines how many items are skipped before the discount is applied.

| | target
`string` |

Determines to which kinds of objects the discount is applicable. ITEM includes products and SKUs. UNIT means particular units within an order line.

Available values: `ITEM`, `UNIT` | diff --git a/docs/reference-docs/VALIDATIONS-Validation-Object.md b/docs/reference-docs/VALIDATIONS-Validation-Object.md index 65b245b4..c9055bac 100644 --- a/docs/reference-docs/VALIDATIONS-Validation-Object.md +++ b/docs/reference-docs/VALIDATIONS-Validation-Object.md @@ -126,8 +126,8 @@ One of: | aggregated_quantity_limit
`integer` |

The maximum number of units allowed to be discounted combined across all matched order line items.

| | amount_limit
`integer` |

Upper limit allowed to be applied as a discount per order line item. Value is multiplied by 100 to precisely represent 2 decimal places. For example, a $6 maximum discount is written as 600.

| | aggregated_amount_limit
`integer` |

Maximum discount amount per order. Value is multiplied by 100 to precisely represent 2 decimal places. For example, a $6 maximum discount on the entire order is written as 600. This value is definable for the following discount effects:

  • APPLY_TO_ITEMS (each item subtotal is discounted equally)
  • APPLY_TO_ITEMS_BY_QUANTITY (each unit of matched products has the same discount value)
| -| order_item_indices
`array` |

Lists which order lines are (not) covered by the discount. The sequence is determined in accordance with the order object in the request and it starts from 0.

| -| order_item_units
`array` |

Lists which units within order lines are covered by the discount The order line items are listed according to the order sent in the request.

Array of:
AttributesDescription
index
integer

Number assigned to the order line item in accordance with the order_item_indeces. The counting starts from 0.

units
array

Numbers of units in the order line covered by the discount; e.g. 2, 5, 8 for 10 units with the setting "skip_initially": 1, "repeat": 3. The counting starts from 1.

| +| order_item_indices
`array` |

Lists which order lines are (not) covered by the discount. The order in the array is determined by the sequence of applied discounts, while the numbers correspond to the order lines sent in the order object in the request. The first order line is assigned 0, the second order line is assigned 1, and so on.

| +| order_item_units
`array` |

Lists which units within order lines are covered by the discount. The order line items are listed according to sequence of applied discounts while the index corresponds to the order line sent in the order object in the request.

Array of:
AttributesDescription
index
integer

Number assigned to the order line item in accordance with the order sent in the request.

units
array

Numbers of units in the order line covered by the discount; e.g. 2, 5, 8 for 10 units with the setting "skip_initially": 1, "repeat": 3. The counting of units starts from 1.

| | repeat
`integer` |

Determines the recurrence of the discount, e.g. "repeat": 3 means that the discount is applied to every third item.

| | skip_initially
`integer` |

Determines how many items are skipped before the discount is applied.

| | target
`string` |

Determines to which kinds of objects the discount is applicable. ITEM includes products and SKUs. UNIT means particular units within an order line.

Available values: `ITEM`, `UNIT` | diff --git a/production/readOnly-openAPI.json b/production/readOnly-openAPI.json index 7e9a8d22..c9ccbc81 100644 --- a/production/readOnly-openAPI.json +++ b/production/readOnly-openAPI.json @@ -952,7 +952,7 @@ }, "order_item_indices": { "type": "array", - "description": "Lists which order lines are (not) covered by the discount. The sequence is determined in accordance with the `order` object in the request and it starts from `0`.", + "description": "Lists which order lines are (not) covered by the discount. The order in the array is determined by the sequence of applied discounts, while the numbers correspond to the order lines sent in the `order` object in the request. The first order line is assigned `0`, the second order line is assigned `1`, and so on.", "items": { "type": "integer" }, @@ -960,17 +960,17 @@ }, "order_item_units": { "type": "array", - "description": "Lists which units within order lines are covered by the discount The order line items are listed according to the order sent in the request.", + "description": "Lists which units within order lines are covered by the discount. The order line items are listed according to sequence of applied discounts while the `index` corresponds to the order line sent in the `order` object in the request.", "items": { "type": "object", "properties": { "index": { "type": "integer", - "description": "Number assigned to the order line item in accordance with the `order_item_indeces`. The counting starts from `0`." + "description": "Number assigned to the order line item in accordance with the order sent in the request." }, "units": { "type": "array", - "description": "Numbers of units in the order line covered by the discount; e.g. `2, 5, 8` for 10 units with the setting `\"skip_initially\": 1`, `\"repeat\": 3`. The counting starts from `1`.", + "description": "Numbers of units in the order line covered by the discount; e.g. `2, 5, 8` for 10 units with the setting `\"skip_initially\": 1`, `\"repeat\": 3`. The counting of units starts from `1`.", "items": { "type": "integer" } diff --git a/reference/OpenAPI.json b/reference/OpenAPI.json index 49e8f180..adbb7c4b 100644 --- a/reference/OpenAPI.json +++ b/reference/OpenAPI.json @@ -39980,24 +39980,24 @@ }, "order_item_indices": { "type": "array", - "description": "Lists which order lines are (not) covered by the discount. The sequence is determined in accordance with the `order` object in the request and it starts from `0`.", + "description": "Lists which order lines are (not) covered by the discount. The order in the array is determined by the sequence of applied discounts, while the numbers correspond to the order lines sent in the `order` object in the request. The first order line is assigned `0`, the second order line is assigned `1`, and so on.", "items": { "type": "integer" } }, "order_item_units": { "type": "array", - "description": "Lists which units within order lines are covered by the discount The order line items are listed according to the order sent in the request.", + "description": "Lists which units within order lines are covered by the discount. The order line items are listed according to sequence of applied discounts while the `index` corresponds to the order line sent in the `order` object in the request.", "items": { "type": "object", "properties": { "index": { "type": "integer", - "description": "Number assigned to the order line item in accordance with the `order_item_indeces`. The counting starts from `0`." + "description": "Number assigned to the order line item in accordance with the order sent in the request." }, "units": { "type": "array", - "description": "Numbers of units in the order line covered by the discount; e.g. `2, 5, 8` for 10 units with the setting `\"skip_initially\": 1`, `\"repeat\": 3`. The counting starts from `1`.", + "description": "Numbers of units in the order line covered by the discount; e.g. `2, 5, 8` for 10 units with the setting `\"skip_initially\": 1`, `\"repeat\": 3`. The counting of units starts from `1`.", "items": { "type": "integer" } From e0f2b97200b00a0527c1ed49a1e2ae841e7cce97 Mon Sep 17 00:00:00 2001 From: p-woznikowski Date: Thu, 5 Dec 2024 16:07:50 +0100 Subject: [PATCH 08/23] auto-gen files --- reference/readonly-sdks/java/OpenAPI.json | 16 ++++++++-------- reference/readonly-sdks/php/OpenAPI.json | 16 ++++++++-------- reference/readonly-sdks/python/OpenAPI.json | 16 ++++++++-------- reference/readonly-sdks/ruby/OpenAPI.json | 16 ++++++++-------- 4 files changed, 32 insertions(+), 32 deletions(-) diff --git a/reference/readonly-sdks/java/OpenAPI.json b/reference/readonly-sdks/java/OpenAPI.json index 8126667b..5e16949a 100644 --- a/reference/readonly-sdks/java/OpenAPI.json +++ b/reference/readonly-sdks/java/OpenAPI.json @@ -28773,7 +28773,7 @@ "order_item_indices": { "title": "ApplicableToOrderItemIndices", "type": "array", - "description": "Lists which order lines are (not) covered by the discount. The sequence is determined in accordance with the `order` object in the request and it starts from `0`.", + "description": "Lists which order lines are (not) covered by the discount. The order in the array is determined by the sequence of applied discounts, while the numbers correspond to the order lines sent in the `order` object in the request. The first order line is assigned `0`, the second order line is assigned `1`, and so on.", "items": { "title": "ApplicableToOrderItemIndicesItem", "type": "integer" @@ -28783,19 +28783,19 @@ "order_item_units": { "title": "ApplicableToOrderItemUnits", "type": "array", - "description": "Lists which units within order lines are covered by the discount The order line items are listed according to the order sent in the request.", + "description": "Lists which units within order lines are covered by the discount. The order line items are listed according to sequence of applied discounts while the `index` corresponds to the order line sent in the `order` object in the request.", "items": { "title": "ApplicableToOrderItemUnitsItem", "type": "object", "properties": { "index": { "type": "integer", - "description": "Number assigned to the order line item in accordance with the `order_item_indeces`. The counting starts from `0`." + "description": "Number assigned to the order line item in accordance with the order sent in the request." }, "units": { "title": "ApplicableToOrderItemUnitsItemUnits", "type": "array", - "description": "Numbers of units in the order line covered by the discount; e.g. `2, 5, 8` for 10 units with the setting `\"skip_initially\": 1`, `\"repeat\": 3`. The counting starts from `1`.", + "description": "Numbers of units in the order line covered by the discount; e.g. `2, 5, 8` for 10 units with the setting `\"skip_initially\": 1`, `\"repeat\": 3`. The counting of units starts from `1`.", "items": { "title": "ApplicableToOrderItemUnitsItemUnitsItem", "type": "integer" @@ -40286,7 +40286,7 @@ "order_item_indices": { "title": "InapplicableToOrderItemIndices", "type": "array", - "description": "Lists which order lines are (not) covered by the discount. The sequence is determined in accordance with the `order` object in the request and it starts from `0`.", + "description": "Lists which order lines are (not) covered by the discount. The order in the array is determined by the sequence of applied discounts, while the numbers correspond to the order lines sent in the `order` object in the request. The first order line is assigned `0`, the second order line is assigned `1`, and so on.", "items": { "title": "InapplicableToOrderItemIndicesItem", "type": "integer" @@ -40296,19 +40296,19 @@ "order_item_units": { "title": "InapplicableToOrderItemUnits", "type": "array", - "description": "Lists which units within order lines are covered by the discount The order line items are listed according to the order sent in the request.", + "description": "Lists which units within order lines are covered by the discount. The order line items are listed according to sequence of applied discounts while the `index` corresponds to the order line sent in the `order` object in the request.", "items": { "title": "InapplicableToOrderItemUnitsItem", "type": "object", "properties": { "index": { "type": "integer", - "description": "Number assigned to the order line item in accordance with the `order_item_indeces`. The counting starts from `0`." + "description": "Number assigned to the order line item in accordance with the order sent in the request." }, "units": { "title": "InapplicableToOrderItemUnitsItemUnits", "type": "array", - "description": "Numbers of units in the order line covered by the discount; e.g. `2, 5, 8` for 10 units with the setting `\"skip_initially\": 1`, `\"repeat\": 3`. The counting starts from `1`.", + "description": "Numbers of units in the order line covered by the discount; e.g. `2, 5, 8` for 10 units with the setting `\"skip_initially\": 1`, `\"repeat\": 3`. The counting of units starts from `1`.", "items": { "title": "InapplicableToOrderItemUnitsItemUnitsItem", "type": "integer" diff --git a/reference/readonly-sdks/php/OpenAPI.json b/reference/readonly-sdks/php/OpenAPI.json index 53b97769..c61e8a8a 100644 --- a/reference/readonly-sdks/php/OpenAPI.json +++ b/reference/readonly-sdks/php/OpenAPI.json @@ -29744,7 +29744,7 @@ "order_item_indices": { "title": "ApplicableToOrderItemIndices", "type": "array", - "description": "Lists which order lines are (not) covered by the discount. The sequence is determined in accordance with the `order` object in the request and it starts from `0`.", + "description": "Lists which order lines are (not) covered by the discount. The order in the array is determined by the sequence of applied discounts, while the numbers correspond to the order lines sent in the `order` object in the request. The first order line is assigned `0`, the second order line is assigned `1`, and so on.", "items": { "title": "ApplicableToOrderItemIndicesItem", "type": "integer" @@ -29754,19 +29754,19 @@ "order_item_units": { "title": "ApplicableToOrderItemUnits", "type": "array", - "description": "Lists which units within order lines are covered by the discount The order line items are listed according to the order sent in the request.", + "description": "Lists which units within order lines are covered by the discount. The order line items are listed according to sequence of applied discounts while the `index` corresponds to the order line sent in the `order` object in the request.", "items": { "title": "ApplicableToOrderItemUnitsItem", "type": "object", "properties": { "index": { "type": "integer", - "description": "Number assigned to the order line item in accordance with the `order_item_indeces`. The counting starts from `0`." + "description": "Number assigned to the order line item in accordance with the order sent in the request." }, "units": { "title": "ApplicableToOrderItemUnitsItemUnits", "type": "array", - "description": "Numbers of units in the order line covered by the discount; e.g. `2, 5, 8` for 10 units with the setting `\"skip_initially\": 1`, `\"repeat\": 3`. The counting starts from `1`.", + "description": "Numbers of units in the order line covered by the discount; e.g. `2, 5, 8` for 10 units with the setting `\"skip_initially\": 1`, `\"repeat\": 3`. The counting of units starts from `1`.", "items": { "title": "ApplicableToOrderItemUnitsItemUnitsItem", "type": "integer" @@ -41511,7 +41511,7 @@ "order_item_indices": { "title": "InapplicableToOrderItemIndices", "type": "array", - "description": "Lists which order lines are (not) covered by the discount. The sequence is determined in accordance with the `order` object in the request and it starts from `0`.", + "description": "Lists which order lines are (not) covered by the discount. The order in the array is determined by the sequence of applied discounts, while the numbers correspond to the order lines sent in the `order` object in the request. The first order line is assigned `0`, the second order line is assigned `1`, and so on.", "items": { "title": "InapplicableToOrderItemIndicesItem", "type": "integer" @@ -41521,19 +41521,19 @@ "order_item_units": { "title": "InapplicableToOrderItemUnits", "type": "array", - "description": "Lists which units within order lines are covered by the discount The order line items are listed according to the order sent in the request.", + "description": "Lists which units within order lines are covered by the discount. The order line items are listed according to sequence of applied discounts while the `index` corresponds to the order line sent in the `order` object in the request.", "items": { "title": "InapplicableToOrderItemUnitsItem", "type": "object", "properties": { "index": { "type": "integer", - "description": "Number assigned to the order line item in accordance with the `order_item_indeces`. The counting starts from `0`." + "description": "Number assigned to the order line item in accordance with the order sent in the request." }, "units": { "title": "InapplicableToOrderItemUnitsItemUnits", "type": "array", - "description": "Numbers of units in the order line covered by the discount; e.g. `2, 5, 8` for 10 units with the setting `\"skip_initially\": 1`, `\"repeat\": 3`. The counting starts from `1`.", + "description": "Numbers of units in the order line covered by the discount; e.g. `2, 5, 8` for 10 units with the setting `\"skip_initially\": 1`, `\"repeat\": 3`. The counting of units starts from `1`.", "items": { "title": "InapplicableToOrderItemUnitsItemUnitsItem", "type": "integer" diff --git a/reference/readonly-sdks/python/OpenAPI.json b/reference/readonly-sdks/python/OpenAPI.json index 68c6a44f..7140c48f 100644 --- a/reference/readonly-sdks/python/OpenAPI.json +++ b/reference/readonly-sdks/python/OpenAPI.json @@ -28573,7 +28573,7 @@ "order_item_indices": { "title": "ApplicableToOrderItemIndices", "type": "array", - "description": "Lists which order lines are (not) covered by the discount. The sequence is determined in accordance with the `order` object in the request and it starts from `0`.", + "description": "Lists which order lines are (not) covered by the discount. The order in the array is determined by the sequence of applied discounts, while the numbers correspond to the order lines sent in the `order` object in the request. The first order line is assigned `0`, the second order line is assigned `1`, and so on.", "items": { "title": "ApplicableToOrderItemIndicesItem", "type": "integer" @@ -28583,19 +28583,19 @@ "order_item_units": { "title": "ApplicableToOrderItemUnits", "type": "array", - "description": "Lists which units within order lines are covered by the discount The order line items are listed according to the order sent in the request.", + "description": "Lists which units within order lines are covered by the discount. The order line items are listed according to sequence of applied discounts while the `index` corresponds to the order line sent in the `order` object in the request.", "items": { "title": "ApplicableToOrderItemUnitsItem", "type": "object", "properties": { "index": { "type": "integer", - "description": "Number assigned to the order line item in accordance with the `order_item_indeces`. The counting starts from `0`." + "description": "Number assigned to the order line item in accordance with the order sent in the request." }, "units": { "title": "ApplicableToOrderItemUnitsItemUnits", "type": "array", - "description": "Numbers of units in the order line covered by the discount; e.g. `2, 5, 8` for 10 units with the setting `\"skip_initially\": 1`, `\"repeat\": 3`. The counting starts from `1`.", + "description": "Numbers of units in the order line covered by the discount; e.g. `2, 5, 8` for 10 units with the setting `\"skip_initially\": 1`, `\"repeat\": 3`. The counting of units starts from `1`.", "items": { "title": "ApplicableToOrderItemUnitsItemUnitsItem", "type": "integer" @@ -39731,7 +39731,7 @@ "order_item_indices": { "title": "InapplicableToOrderItemIndices", "type": "array", - "description": "Lists which order lines are (not) covered by the discount. The sequence is determined in accordance with the `order` object in the request and it starts from `0`.", + "description": "Lists which order lines are (not) covered by the discount. The order in the array is determined by the sequence of applied discounts, while the numbers correspond to the order lines sent in the `order` object in the request. The first order line is assigned `0`, the second order line is assigned `1`, and so on.", "items": { "title": "InapplicableToOrderItemIndicesItem", "type": "integer" @@ -39741,19 +39741,19 @@ "order_item_units": { "title": "InapplicableToOrderItemUnits", "type": "array", - "description": "Lists which units within order lines are covered by the discount The order line items are listed according to the order sent in the request.", + "description": "Lists which units within order lines are covered by the discount. The order line items are listed according to sequence of applied discounts while the `index` corresponds to the order line sent in the `order` object in the request.", "items": { "title": "InapplicableToOrderItemUnitsItem", "type": "object", "properties": { "index": { "type": "integer", - "description": "Number assigned to the order line item in accordance with the `order_item_indeces`. The counting starts from `0`." + "description": "Number assigned to the order line item in accordance with the order sent in the request." }, "units": { "title": "InapplicableToOrderItemUnitsItemUnits", "type": "array", - "description": "Numbers of units in the order line covered by the discount; e.g. `2, 5, 8` for 10 units with the setting `\"skip_initially\": 1`, `\"repeat\": 3`. The counting starts from `1`.", + "description": "Numbers of units in the order line covered by the discount; e.g. `2, 5, 8` for 10 units with the setting `\"skip_initially\": 1`, `\"repeat\": 3`. The counting of units starts from `1`.", "items": { "title": "InapplicableToOrderItemUnitsItemUnitsItem", "type": "integer" diff --git a/reference/readonly-sdks/ruby/OpenAPI.json b/reference/readonly-sdks/ruby/OpenAPI.json index 3726ec73..b24d0e62 100644 --- a/reference/readonly-sdks/ruby/OpenAPI.json +++ b/reference/readonly-sdks/ruby/OpenAPI.json @@ -28807,7 +28807,7 @@ "order_item_indices": { "title": "ApplicableToOrderItemIndices", "type": "array", - "description": "Lists which order lines are (not) covered by the discount. The sequence is determined in accordance with the `order` object in the request and it starts from `0`.", + "description": "Lists which order lines are (not) covered by the discount. The order in the array is determined by the sequence of applied discounts, while the numbers correspond to the order lines sent in the `order` object in the request. The first order line is assigned `0`, the second order line is assigned `1`, and so on.", "items": { "title": "ApplicableToOrderItemIndicesItem", "type": "integer" @@ -28817,19 +28817,19 @@ "order_item_units": { "title": "ApplicableToOrderItemUnits", "type": "array", - "description": "Lists which units within order lines are covered by the discount The order line items are listed according to the order sent in the request.", + "description": "Lists which units within order lines are covered by the discount. The order line items are listed according to sequence of applied discounts while the `index` corresponds to the order line sent in the `order` object in the request.", "items": { "title": "ApplicableToOrderItemUnitsItem", "type": "object", "properties": { "index": { "type": "integer", - "description": "Number assigned to the order line item in accordance with the `order_item_indeces`. The counting starts from `0`." + "description": "Number assigned to the order line item in accordance with the order sent in the request." }, "units": { "title": "ApplicableToOrderItemUnitsItemUnits", "type": "array", - "description": "Numbers of units in the order line covered by the discount; e.g. `2, 5, 8` for 10 units with the setting `\"skip_initially\": 1`, `\"repeat\": 3`. The counting starts from `1`.", + "description": "Numbers of units in the order line covered by the discount; e.g. `2, 5, 8` for 10 units with the setting `\"skip_initially\": 1`, `\"repeat\": 3`. The counting of units starts from `1`.", "items": { "title": "ApplicableToOrderItemUnitsItemUnitsItem", "type": "integer" @@ -40320,7 +40320,7 @@ "order_item_indices": { "title": "InapplicableToOrderItemIndices", "type": "array", - "description": "Lists which order lines are (not) covered by the discount. The sequence is determined in accordance with the `order` object in the request and it starts from `0`.", + "description": "Lists which order lines are (not) covered by the discount. The order in the array is determined by the sequence of applied discounts, while the numbers correspond to the order lines sent in the `order` object in the request. The first order line is assigned `0`, the second order line is assigned `1`, and so on.", "items": { "title": "InapplicableToOrderItemIndicesItem", "type": "integer" @@ -40330,19 +40330,19 @@ "order_item_units": { "title": "InapplicableToOrderItemUnits", "type": "array", - "description": "Lists which units within order lines are covered by the discount The order line items are listed according to the order sent in the request.", + "description": "Lists which units within order lines are covered by the discount. The order line items are listed according to sequence of applied discounts while the `index` corresponds to the order line sent in the `order` object in the request.", "items": { "title": "InapplicableToOrderItemUnitsItem", "type": "object", "properties": { "index": { "type": "integer", - "description": "Number assigned to the order line item in accordance with the `order_item_indeces`. The counting starts from `0`." + "description": "Number assigned to the order line item in accordance with the order sent in the request." }, "units": { "title": "InapplicableToOrderItemUnitsItemUnits", "type": "array", - "description": "Numbers of units in the order line covered by the discount; e.g. `2, 5, 8` for 10 units with the setting `\"skip_initially\": 1`, `\"repeat\": 3`. The counting starts from `1`.", + "description": "Numbers of units in the order line covered by the discount; e.g. `2, 5, 8` for 10 units with the setting `\"skip_initially\": 1`, `\"repeat\": 3`. The counting of units starts from `1`.", "items": { "title": "InapplicableToOrderItemUnitsItemUnitsItem", "type": "integer" From ab42d54e42f5b6d1c9fd78be77f51c10683103b5 Mon Sep 17 00:00:00 2001 From: p-woznikowski Date: Thu, 5 Dec 2024 16:25:16 +0100 Subject: [PATCH 09/23] Loyalty Expiration summary changes --- changelog/OPEN-API.md | 6 +- ...port-Loyalty-Campaign-Point-Expiration.md} | 2 +- ...IES-List-Loyalty-Card-Point-Expiration.md} | 2 +- production/ENDPOINTS-COVERAGE.md | 96 +++++++++---------- production/readOnly-openAPI.json | 4 +- reference/OpenAPI.json | 4 +- reference/readonly-sdks/java/OpenAPI.json | 4 +- reference/readonly-sdks/php/OpenAPI.json | 4 +- reference/readonly-sdks/python/OpenAPI.json | 4 +- reference/readonly-sdks/ruby/OpenAPI.json | 4 +- 10 files changed, 67 insertions(+), 63 deletions(-) rename docs/reference-docs/{LOYALTIES-Create-Points-Expiration-Export.md => LOYALTIES-Export-Loyalty-Campaign-Point-Expiration.md} (90%) rename docs/reference-docs/{LOYALTIES-Get-Points-Expiration.md => LOYALTIES-List-Loyalty-Card-Point-Expiration.md} (91%) diff --git a/changelog/OPEN-API.md b/changelog/OPEN-API.md index e048dae6..376a8ae7 100644 --- a/changelog/OPEN-API.md +++ b/changelog/OPEN-API.md @@ -6,7 +6,11 @@ Older changes in [DEPRECATED.md](deprecated/DEPRECATED.md) ## 2024-12-05 -Added the `order_item_units` array to the `ApplicableTo` schema +- Added the `order_item_units` array to the `ApplicableTo` schema +- Changed the following summary, file names, and titles: + - `Get Points Expiration` to `List Loyalty Card Point Expiration` + - `Create Points Expiration Export` to `Export Loyalty Campaign Point Expiration` + ## 2024-12-04 diff --git a/docs/reference-docs/LOYALTIES-Create-Points-Expiration-Export.md b/docs/reference-docs/LOYALTIES-Export-Loyalty-Campaign-Point-Expiration.md similarity index 90% rename from docs/reference-docs/LOYALTIES-Create-Points-Expiration-Export.md rename to docs/reference-docs/LOYALTIES-Export-Loyalty-Campaign-Point-Expiration.md index 06f9957d..aa301f08 100644 --- a/docs/reference-docs/LOYALTIES-Create-Points-Expiration-Export.md +++ b/docs/reference-docs/LOYALTIES-Export-Loyalty-Campaign-Point-Expiration.md @@ -1,5 +1,5 @@ --- -title: Create Points Expiration Export +title: Export Loyalty Campaign Point Expiration type: endpoint categorySlug: voucherify-api slug: create-points-expiration-export diff --git a/docs/reference-docs/LOYALTIES-Get-Points-Expiration.md b/docs/reference-docs/LOYALTIES-List-Loyalty-Card-Point-Expiration.md similarity index 91% rename from docs/reference-docs/LOYALTIES-Get-Points-Expiration.md rename to docs/reference-docs/LOYALTIES-List-Loyalty-Card-Point-Expiration.md index ad2c7688..87ce11c2 100644 --- a/docs/reference-docs/LOYALTIES-Get-Points-Expiration.md +++ b/docs/reference-docs/LOYALTIES-List-Loyalty-Card-Point-Expiration.md @@ -1,5 +1,5 @@ --- -title: Get Points Expiration +title: List Loyalty Card Point Expiration type: endpoint categorySlug: voucherify-api slug: list-points-expiration diff --git a/production/ENDPOINTS-COVERAGE.md b/production/ENDPOINTS-COVERAGE.md index 126b9096..128877bd 100644 --- a/production/ENDPOINTS-COVERAGE.md +++ b/production/ENDPOINTS-COVERAGE.md @@ -126,54 +126,54 @@ | /v1/rewards/{rewardId}/assignments/{assignmentId} | delete | Delete Reward Assignment | supported | | | /v1/rewards/{rewardId}/assignments/{assignmentId} | get | Get Reward Assignment | supported | | ## Loyalties -| endpoint | method | summary | is supported | is deprecated | -| ------------------------------------------------------------------- | ------ | ------------------------------------ | ------------------------------------ | ------------- | -| /v1/loyalties | get | List Loyalty Campaigns | supported | | -| /v1/loyalties | post | Create Loyalty Campaign | supported | | -| /v1/loyalties/{campaignId} | get | Get Loyalty Campaign | supported | | -| /v1/loyalties/{campaignId} | put | Update Loyalty Campaign | supported | | -| /v1/loyalties/{campaignId} | delete | Delete Loyalty Campaign | supported | | -| /v1/loyalties/{campaignId}/members | get | List Members | supported | | -| /v1/loyalties/{campaignId}/members | post | Add Member | supported | | -| /v1/loyalties/{campaignId}/members/{memberId} | get | Get Member | supported | | -| /v1/loyalties/members/{memberId} | get | Get Member | supported | | -| /v1/loyalties/{campaignId}/members/{memberId}/activity | get | List Member Activity | supported | | -| /v1/loyalties/members/{memberId}/activity | get | List Member Activity | supported | | -| /v1/loyalties/{campaignId}/members/{memberId}/balance | post | Add or Remove Loyalty Card Balance | supported | | -| /v1/loyalties/members/{memberId}/balance | post | Add or Remove Loyalty Card Balance | supported | | -| /v1/loyalties/{campaignId}/members/{memberId}/transfers | post | Transfer Loyalty Points | supported | | -| /v1/loyalties/{campaignId}/transactions | get | List Loyalty Campaign Transactions | | | -| /v1/loyalties/{campaignId}/transactions/export | post | Export Loyalty Campaign Transactions | | | -| /v1/loyalties/{campaignId}/members/{memberId}/transactions | get | List Loyalty Card Transactions | supported | | -| /v1/loyalties/members/{memberId}/transactions | get | List Loyalty Card Transactions | supported | | -| /v1/loyalties/members/{memberId}/transactions/export | post | Export Loyalty Card Transactions | supported | | -| /v1/loyalties/{campaignId}/members/{memberId}/transactions/export | post | Export Loyalty Card Transactions | supported | | -| /v1/loyalties/{campaignId}/members/{memberId}/points-expiration | get | Get Points Expiration | supported | | -| /v1/loyalties/{campaignId}/points-expiration/export | post | Create Points Expiration Export | supported | | -| /v1/loyalties/{campaignId}/earning-rules | get | List Earning Rules | supported | | -| /v1/loyalties/{campaignId}/earning-rules | post | Create Earning Rule | supported | | -| /v1/loyalties/{campaignId}/earning-rules/{earningRuleId} | get | Get Earning Rule | supported | | -| /v1/loyalties/{campaignId}/earning-rules/{earningRuleId} | put | Update Earning Rule | supported | | -| /v1/loyalties/{campaignId}/earning-rules/{earningRuleId} | delete | Delete Earning Rule | supported | | -| /v1/loyalties/{campaignId}/earning-rules/{earningRuleId}/enable | post | Enable Earning Rule | supported | | -| /v1/loyalties/{campaignId}/earning-rules/{earningRuleId}/disable | post | Disable Earning Rule | supported | | -| /v1/loyalties/members/{memberId}/rewards | get | List Member Rewards | supported | | -| /v1/loyalties/{campaignId}/reward-assignments/{assignmentId}/reward | get | Get Reward Details | supported | | -| /v1/loyalties/{campaignId}/reward-assignments | get | List Reward Assignments | supported | | -| /v1/loyalties/{campaignId}/rewards | get | List Reward Assignments | supported | | -| /v1/loyalties/{campaignId}/rewards | post | Create Reward Assignment | supported | | -| /v1/loyalties/{campaignId}/reward-assignments/{assignmentId} | get | Get Reward Assignment | supported | | -| /v1/loyalties/{campaignId}/rewards/{assignmentId} | get | Get Reward Assignment | supported | | -| /v1/loyalties/{campaignId}/rewards/{assignmentId} | put | Update Reward Assignment | supported | | -| /v1/loyalties/{campaignId}/rewards/{assignmentId} | delete | Delete Reward Assignment | supported | | -| /v1/loyalties/{campaignId}/members/{memberId}/redemption | post | Redeem Reward | supported | | -| /v1/loyalties/members/{memberId}/redemption | post | Redeem Reward | supported | | -| /v1/loyalties/{campaignId}/tiers | get | List Loyalty Tiers | supported | | -| /v1/loyalties/{campaignId}/tiers | post | Create loyalty tiers | supported | | -| /v1/loyalties/{campaignId}/tiers/{loyaltyTierId} | get | Get Loyalty Tier | supported | | -| /v1/loyalties/members/{memberId}/tiers | get | List Member's Loyalty Tiers | supported | | -| /v1/loyalties/{campaignId}/tiers/{loyaltyTierId}/earning-rules | get | List Loyalty Tier Earning Rules | supported | | -| /v1/loyalties/{campaignId}/tiers/{loyaltyTierId}/rewards | get | List Loyalty Tier Rewards | supported | | +| endpoint | method | summary | is supported | is deprecated | +| ------------------------------------------------------------------- | ------ | ---------------------------------------- | ------------------------------------ | ------------- | +| /v1/loyalties | get | List Loyalty Campaigns | supported | | +| /v1/loyalties | post | Create Loyalty Campaign | supported | | +| /v1/loyalties/{campaignId} | get | Get Loyalty Campaign | supported | | +| /v1/loyalties/{campaignId} | put | Update Loyalty Campaign | supported | | +| /v1/loyalties/{campaignId} | delete | Delete Loyalty Campaign | supported | | +| /v1/loyalties/{campaignId}/members | get | List Members | supported | | +| /v1/loyalties/{campaignId}/members | post | Add Member | supported | | +| /v1/loyalties/{campaignId}/members/{memberId} | get | Get Member | supported | | +| /v1/loyalties/members/{memberId} | get | Get Member | supported | | +| /v1/loyalties/{campaignId}/members/{memberId}/activity | get | List Member Activity | supported | | +| /v1/loyalties/members/{memberId}/activity | get | List Member Activity | supported | | +| /v1/loyalties/{campaignId}/members/{memberId}/balance | post | Add or Remove Loyalty Card Balance | supported | | +| /v1/loyalties/members/{memberId}/balance | post | Add or Remove Loyalty Card Balance | supported | | +| /v1/loyalties/{campaignId}/members/{memberId}/transfers | post | Transfer Loyalty Points | supported | | +| /v1/loyalties/{campaignId}/transactions | get | List Loyalty Campaign Transactions | | | +| /v1/loyalties/{campaignId}/transactions/export | post | Export Loyalty Campaign Transactions | | | +| /v1/loyalties/{campaignId}/members/{memberId}/transactions | get | List Loyalty Card Transactions | supported | | +| /v1/loyalties/members/{memberId}/transactions | get | List Loyalty Card Transactions | supported | | +| /v1/loyalties/members/{memberId}/transactions/export | post | Export Loyalty Card Transactions | supported | | +| /v1/loyalties/{campaignId}/members/{memberId}/transactions/export | post | Export Loyalty Card Transactions | supported | | +| /v1/loyalties/{campaignId}/members/{memberId}/points-expiration | get | List Loyalty Card Point Expiration | supported | | +| /v1/loyalties/{campaignId}/points-expiration/export | post | Export Loyalty Campaign Point Expiration | supported | | +| /v1/loyalties/{campaignId}/earning-rules | get | List Earning Rules | supported | | +| /v1/loyalties/{campaignId}/earning-rules | post | Create Earning Rule | supported | | +| /v1/loyalties/{campaignId}/earning-rules/{earningRuleId} | get | Get Earning Rule | supported | | +| /v1/loyalties/{campaignId}/earning-rules/{earningRuleId} | put | Update Earning Rule | supported | | +| /v1/loyalties/{campaignId}/earning-rules/{earningRuleId} | delete | Delete Earning Rule | supported | | +| /v1/loyalties/{campaignId}/earning-rules/{earningRuleId}/enable | post | Enable Earning Rule | supported | | +| /v1/loyalties/{campaignId}/earning-rules/{earningRuleId}/disable | post | Disable Earning Rule | supported | | +| /v1/loyalties/members/{memberId}/rewards | get | List Member Rewards | supported | | +| /v1/loyalties/{campaignId}/reward-assignments/{assignmentId}/reward | get | Get Reward Details | supported | | +| /v1/loyalties/{campaignId}/reward-assignments | get | List Reward Assignments | supported | | +| /v1/loyalties/{campaignId}/rewards | get | List Reward Assignments | supported | | +| /v1/loyalties/{campaignId}/rewards | post | Create Reward Assignment | supported | | +| /v1/loyalties/{campaignId}/reward-assignments/{assignmentId} | get | Get Reward Assignment | supported | | +| /v1/loyalties/{campaignId}/rewards/{assignmentId} | get | Get Reward Assignment | supported | | +| /v1/loyalties/{campaignId}/rewards/{assignmentId} | put | Update Reward Assignment | supported | | +| /v1/loyalties/{campaignId}/rewards/{assignmentId} | delete | Delete Reward Assignment | supported | | +| /v1/loyalties/{campaignId}/members/{memberId}/redemption | post | Redeem Reward | supported | | +| /v1/loyalties/members/{memberId}/redemption | post | Redeem Reward | supported | | +| /v1/loyalties/{campaignId}/tiers | get | List Loyalty Tiers | supported | | +| /v1/loyalties/{campaignId}/tiers | post | Create loyalty tiers | supported | | +| /v1/loyalties/{campaignId}/tiers/{loyaltyTierId} | get | Get Loyalty Tier | supported | | +| /v1/loyalties/members/{memberId}/tiers | get | List Member's Loyalty Tiers | supported | | +| /v1/loyalties/{campaignId}/tiers/{loyaltyTierId}/earning-rules | get | List Loyalty Tier Earning Rules | supported | | +| /v1/loyalties/{campaignId}/tiers/{loyaltyTierId}/rewards | get | List Loyalty Tier Rewards | supported | | ## Customers | endpoint | method | summary | is supported | is deprecated | | --------------------------------------------- | ------ | ------------------------------------- | ------------------------------------ | ------------------------------------ | diff --git a/production/readOnly-openAPI.json b/production/readOnly-openAPI.json index c9ccbc81..8d5d7196 100644 --- a/production/readOnly-openAPI.json +++ b/production/readOnly-openAPI.json @@ -44851,7 +44851,7 @@ "tags": [ "Loyalties" ], - "summary": "Get Points Expiration", + "summary": "List Loyalty Card Point Expiration", "description": "Retrieve loyalty point expiration buckets for a given loyalty card. Expired point buckets are not returned in this endpoint. You can use the [Exports API](ref:create-export) to retrieve a list of both `ACTIVE` and `EXPIRED` point buckets.", "parameters": [ { @@ -44958,7 +44958,7 @@ "tags": [ "Loyalties" ], - "summary": "Create Points Expiration Export", + "summary": "Export Loyalty Campaign Point Expiration", "description": "Schedule the generation of a points expiration CSV file for a particular campaign.", "parameters": [], "security": [ diff --git a/reference/OpenAPI.json b/reference/OpenAPI.json index adbb7c4b..1599881b 100644 --- a/reference/OpenAPI.json +++ b/reference/OpenAPI.json @@ -68999,7 +68999,7 @@ "tags": [ "Loyalties" ], - "summary": "Get Points Expiration", + "summary": "List Loyalty Card Point Expiration", "description": "Retrieve loyalty point expiration buckets for a given loyalty card. Expired point buckets are not returned in this endpoint. You can use the [Exports API](ref:create-export) to retrieve a list of both `ACTIVE` and `EXPIRED` point buckets.", "parameters": [ { @@ -69106,7 +69106,7 @@ "tags": [ "Loyalties" ], - "summary": "Create Points Expiration Export", + "summary": "Export Loyalty Campaign Point Expiration", "description": "Schedule the generation of a points expiration CSV file for a particular campaign.", "parameters": [], "security": [ diff --git a/reference/readonly-sdks/java/OpenAPI.json b/reference/readonly-sdks/java/OpenAPI.json index 5e16949a..24503eb6 100644 --- a/reference/readonly-sdks/java/OpenAPI.json +++ b/reference/readonly-sdks/java/OpenAPI.json @@ -56569,7 +56569,7 @@ "tags": [ "Loyalties" ], - "summary": "Get Points Expiration", + "summary": "List Loyalty Card Point Expiration", "description": "Retrieve loyalty point expiration buckets for a given loyalty card. Expired point buckets are not returned in this endpoint. You can use the Exports API to retrieve a list of both ACTIVE and EXPIRED point buckets.", "parameters": [ { @@ -56676,7 +56676,7 @@ "tags": [ "Loyalties" ], - "summary": "Create Points Expiration Export", + "summary": "Export Loyalty Campaign Point Expiration", "description": "Schedule the generation of a points expiration CSV file for a particular campaign.", "parameters": [], "security": [ diff --git a/reference/readonly-sdks/php/OpenAPI.json b/reference/readonly-sdks/php/OpenAPI.json index c61e8a8a..be98fa22 100644 --- a/reference/readonly-sdks/php/OpenAPI.json +++ b/reference/readonly-sdks/php/OpenAPI.json @@ -57795,7 +57795,7 @@ "tags": [ "Loyalties" ], - "summary": "Get Points Expiration", + "summary": "List Loyalty Card Point Expiration", "description": "Retrieve loyalty point expiration buckets for a given loyalty card. Expired point buckets are not returned in this endpoint. You can use the Exports API to retrieve a list of both ACTIVE and EXPIRED point buckets.", "parameters": [ { @@ -57902,7 +57902,7 @@ "tags": [ "Loyalties" ], - "summary": "Create Points Expiration Export", + "summary": "Export Loyalty Campaign Point Expiration", "description": "Schedule the generation of a points expiration CSV file for a particular campaign.", "parameters": [], "security": [ diff --git a/reference/readonly-sdks/python/OpenAPI.json b/reference/readonly-sdks/python/OpenAPI.json index 7140c48f..9c1e22de 100644 --- a/reference/readonly-sdks/python/OpenAPI.json +++ b/reference/readonly-sdks/python/OpenAPI.json @@ -56014,7 +56014,7 @@ "tags": [ "Loyalties" ], - "summary": "Get Points Expiration", + "summary": "List Loyalty Card Point Expiration", "description": "Retrieve loyalty point expiration buckets for a given loyalty card. Expired point buckets are not returned in this endpoint. You can use the Exports API to retrieve a list of both ACTIVE and EXPIRED point buckets.", "parameters": [ { @@ -56121,7 +56121,7 @@ "tags": [ "Loyalties" ], - "summary": "Create Points Expiration Export", + "summary": "Export Loyalty Campaign Point Expiration", "description": "Schedule the generation of a points expiration CSV file for a particular campaign.", "parameters": [], "security": [ diff --git a/reference/readonly-sdks/ruby/OpenAPI.json b/reference/readonly-sdks/ruby/OpenAPI.json index b24d0e62..c24dfabc 100644 --- a/reference/readonly-sdks/ruby/OpenAPI.json +++ b/reference/readonly-sdks/ruby/OpenAPI.json @@ -56603,7 +56603,7 @@ "tags": [ "Loyalties" ], - "summary": "Get Points Expiration", + "summary": "List Loyalty Card Point Expiration", "description": "Retrieve loyalty point expiration buckets for a given loyalty card. Expired point buckets are not returned in this endpoint. You can use the Exports API to retrieve a list of both ACTIVE and EXPIRED point buckets.", "parameters": [ { @@ -56710,7 +56710,7 @@ "tags": [ "Loyalties" ], - "summary": "Create Points Expiration Export", + "summary": "Export Loyalty Campaign Point Expiration", "description": "Schedule the generation of a points expiration CSV file for a particular campaign.", "parameters": [], "security": [ From e3efe8ee7af5b1c821c40c48d4638182baa7c8c6 Mon Sep 17 00:00:00 2001 From: p-woznikowski Date: Wed, 11 Dec 2024 21:46:22 +0100 Subject: [PATCH 10/23] Improve "amount" descriptions --- .../CAMPAIGNS-Campaign-Object.md | 4 +- .../CUSTOMERS-Customer-Activity-Object.md | 36 ++--- docs/reference-docs/ORDERS-Order-Object.md | 18 +-- .../PROMOTIONS-Promotion-Tier-Object.md | 4 +- .../PUBLICATIONS-Publication-Object.md | 4 +- .../QUALIFICATIONS-Qualification-Object.md | 22 +-- .../REDEMPTIONS-Redemption-Object.md | 22 +-- .../REDEMPTIONS-Rollback-Redemption-Object.md | 22 +-- .../VALIDATIONS-Validation-Object.md | 22 +-- .../reference-docs/VOUCHERS-Voucher-Object.md | 4 +- production/readOnly-openAPI.json | 36 ++--- reference/OpenAPI.json | 40 +++--- reference/readonly-sdks/java/OpenAPI.json | 136 +++++++++--------- reference/readonly-sdks/php/OpenAPI.json | 136 +++++++++--------- reference/readonly-sdks/python/OpenAPI.json | 136 +++++++++--------- reference/readonly-sdks/ruby/OpenAPI.json | 136 +++++++++--------- 16 files changed, 399 insertions(+), 379 deletions(-) diff --git a/docs/reference-docs/CAMPAIGNS-Campaign-Object.md b/docs/reference-docs/CAMPAIGNS-Campaign-Object.md index 58fa4f1f..ac1a962b 100644 --- a/docs/reference-docs/CAMPAIGNS-Campaign-Object.md +++ b/docs/reference-docs/CAMPAIGNS-Campaign-Object.md @@ -230,7 +230,7 @@ One of: |:-----|:--------| | type
`string` |

Discount type.

Available values: `UNIT` | | unit_off
`integer` |

Number of units to be granted a full value discount.

| -| unit_off_formula
`string` | | +| unit_off_formula
`string` |

Formula used to calculate the number of units.

| | effect |

Defines how the unit is added to the customer's order.

[Discount Unit Vouchers Effect Types](#discount-unit-vouchers-effect-types) | | unit_type
`string` |

The product deemed as free, chosen from product inventory (e.g. time, items).

| | product |

Contains information about the product.

[Simple Product Discount Unit](#simple-product-discount-unit) | @@ -298,7 +298,7 @@ Available values: `ADD_MISSING_ITEMS`, `ADD_NEW_ITEMS`, `ADD_MANY_ITEMS` | Attributes | Description | |:-----|:--------| | unit_off
`number` |

Number of units to be granted a full value discount.

| -| unit_off_formula
`string` | | +| unit_off_formula
`string` |

Formula used to calculate the number of units.

| | effect
`string` |

Defines how the unit is added to the customer's order.

Available values: `ADD_NEW_ITEMS`, `ADD_MISSING_ITEMS` | | unit_type
`string` |

The product deemed as free, chosen from product inventory (e.g. time, items).

| | product |

Contains information about the product.

[Simple Product Discount Unit](#simple-product-discount-unit) | diff --git a/docs/reference-docs/CUSTOMERS-Customer-Activity-Object.md b/docs/reference-docs/CUSTOMERS-Customer-Activity-Object.md index 909dc9c7..6e267f75 100644 --- a/docs/reference-docs/CUSTOMERS-Customer-Activity-Object.md +++ b/docs/reference-docs/CUSTOMERS-Customer-Activity-Object.md @@ -660,15 +660,15 @@ All of: | id
`string` |

Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.

| | source_id
`string`, `null` |

Unique source ID of an existing order that will be linked to the redemption of this request.

| | status
`string` |

The order status.

Available values: `CREATED`, `PAID`, `CANCELED`, `FULFILLED` | -| amount
`integer` |

A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.

| -| initial_amount
`integer` |

A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.

| -| discount_amount
`integer` |

Sum of all order-level discounts applied to the order.

| -| items_discount_amount
`integer` |

Sum of all product-specific discounts applied to the order.

| -| total_discount_amount
`integer` |

Sum of all order-level AND all product-specific discounts applied to the order.

| -| total_amount
`integer` |

Order amount after undoing all the discounts through the rollback redemption.

| -| applied_discount_amount
`integer` |

This field shows the order-level discount applied.

| -| items_applied_discount_amount
`integer` |

Sum of all product-specific discounts applied in a particular request.
sum(items, i => i.applied_discount_amount)

| -| total_applied_discount_amount
`integer` |

Sum of all order-level AND all product-specific discounts applied in a particular request.
total_applied_discount_amount = applied_discount_amount + items_applied_discount_amount

| +| amount
`integer` |

This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).

| +| initial_amount
`integer` |

This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).

| +| discount_amount
`integer` |

Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).

| +| items_discount_amount
`integer` |

Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).

| +| total_discount_amount
`integer` |

Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).

| +| total_amount
`integer` |

Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).

| +| applied_discount_amount
`integer` |

This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).

| +| items_applied_discount_amount
`integer` |

Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).
sum(items, i => i.applied_discount_amount)

| +| total_applied_discount_amount
`integer` |

Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).
total_applied_discount_amount = applied_discount_amount + items_applied_discount_amount

| | items
`array` |

Array of items applied to the order. It can include up 500 items.

Array of [Order Item Calculated](#order-item-calculated) | | metadata
`object` |

A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.

| | object
`string` |

The type of the object represented by JSON.

Available values: `order` | @@ -1091,13 +1091,13 @@ One of: | customer_id
`string`, `null` |

Unique customer ID of the customer making the purchase.

**Example:**

cust_7iUa6ICKyU6gH40dBU25kQU1

| | referrer_id
`string`, `null` |

Unique referrer ID.

**Example:**

cust_nM4jqPiaXUvQdVSA6vTRUnix

| | amount
`integer` |

A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.

| -| discount_amount
`integer` |

Sum of all order-level discounts applied to the order.

| -| applied_discount_amount
`integer` |

This field shows the order-level discount applied.

| -| items_discount_amount
`integer` |

Sum of all product-specific discounts applied to the order.

| -| items_applied_discount_amount
`integer` |

Sum of all product-specific discounts applied in a particular request.
sum(items, i => i.applied_discount_amount)

| -| total_discount_amount
`integer` |

Sum of all order-level AND all product-specific discounts applied to the order.

| -| total_applied_discount_amount
`integer` |

Sum of all order-level AND all product-specific discounts applied in a particular request.
total_applied_discount_amount = applied_discount_amount + items_applied_discount_amount

| -| total_amount
`integer` |

Order amount after undoing all the discounts through the rollback redemption.

| +| discount_amount
`integer` |

Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).

| +| applied_discount_amount
`integer` |

This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).

| +| items_discount_amount
`integer` |

Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).

| +| items_applied_discount_amount
`integer` |

Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).
sum(items, i => i.applied_discount_amount)

| +| total_discount_amount
`integer` |

Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).

| +| total_applied_discount_amount
`integer` |

Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).
total_applied_discount_amount = applied_discount_amount + items_applied_discount_amount

| +| total_amount
`integer` |

Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).

| | items
`array` |

Array of items applied to the order. It can include up 500 items.

Array of [Simple Order Item](#simple-order-item) | | metadata
`object` |

A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.

| | object
`string` |

The type of the object represented by JSON.

Available values: `order` | @@ -1178,7 +1178,7 @@ All of: |:-----|:--------| | type
`string` |

Discount type.

Available values: `UNIT` | | unit_off
`integer` |

Number of units to be granted a full value discount.

| -| unit_off_formula
`string` | | +| unit_off_formula
`string` |

Formula used to calculate the number of units.

| | effect |

Defines how the unit is added to the customer's order.

[Discount Unit Vouchers Effect Types](#discount-unit-vouchers-effect-types) | | unit_type
`string` |

The product deemed as free, chosen from product inventory (e.g. time, items).

| | product |

Contains information about the product.

[Simple Product Discount Unit](#simple-product-discount-unit) | @@ -1391,7 +1391,7 @@ Available values: `ADD_MISSING_ITEMS`, `ADD_NEW_ITEMS`, `ADD_MANY_ITEMS` | Attributes | Description | |:-----|:--------| | unit_off
`number` |

Number of units to be granted a full value discount.

| -| unit_off_formula
`string` | | +| unit_off_formula
`string` |

Formula used to calculate the number of units.

| | effect
`string` |

Defines how the unit is added to the customer's order.

Available values: `ADD_NEW_ITEMS`, `ADD_MISSING_ITEMS` | | unit_type
`string` |

The product deemed as free, chosen from product inventory (e.g. time, items).

| | product |

Contains information about the product.

[Simple Product Discount Unit](#simple-product-discount-unit) | diff --git a/docs/reference-docs/ORDERS-Order-Object.md b/docs/reference-docs/ORDERS-Order-Object.md index 55cb9c19..6e14c5b3 100644 --- a/docs/reference-docs/ORDERS-Order-Object.md +++ b/docs/reference-docs/ORDERS-Order-Object.md @@ -14,15 +14,15 @@ order: 1 | id
`string` |

Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.

| | source_id
`string`, `null` |

Unique source ID of an existing order that will be linked to the redemption of this request.

| | status
`string` |

The order status.

Available values: `CREATED`, `PAID`, `CANCELED`, `FULFILLED` | -| amount
`integer` |

A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.

| -| initial_amount
`integer` |

A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.

| -| discount_amount
`integer` |

Sum of all order-level discounts applied to the order.

| -| items_discount_amount
`integer` |

Sum of all product-specific discounts applied to the order.

| -| total_discount_amount
`integer` |

Sum of all order-level AND all product-specific discounts applied to the order.

| -| total_amount
`integer` |

Order amount after undoing all the discounts through the rollback redemption.

| -| applied_discount_amount
`integer` |

This field shows the order-level discount applied.

| -| items_applied_discount_amount
`integer` |

Sum of all product-specific discounts applied in a particular request.
sum(items, i => i.applied_discount_amount)

| -| total_applied_discount_amount
`integer` |

Sum of all order-level AND all product-specific discounts applied in a particular request.
total_applied_discount_amount = applied_discount_amount + items_applied_discount_amount

| +| amount
`integer` |

This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).

| +| initial_amount
`integer` |

This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).

| +| discount_amount
`integer` |

Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).

| +| items_discount_amount
`integer` |

Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).

| +| total_discount_amount
`integer` |

Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).

| +| total_amount
`integer` |

Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).

| +| applied_discount_amount
`integer` |

This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).

| +| items_applied_discount_amount
`integer` |

Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).
sum(items, i => i.applied_discount_amount)

| +| total_applied_discount_amount
`integer` |

Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).
total_applied_discount_amount = applied_discount_amount + items_applied_discount_amount

| | items
`array` |

Array of items applied to the order. It can include up 500 items.

Array of [Order Item Calculated](#order-item-calculated) | | metadata
`object` |

A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.

| | object
`string` |

The type of the object represented by JSON.

Available values: `order` | diff --git a/docs/reference-docs/PROMOTIONS-Promotion-Tier-Object.md b/docs/reference-docs/PROMOTIONS-Promotion-Tier-Object.md index ff0e389e..b1f55311 100644 --- a/docs/reference-docs/PROMOTIONS-Promotion-Tier-Object.md +++ b/docs/reference-docs/PROMOTIONS-Promotion-Tier-Object.md @@ -88,7 +88,7 @@ One of: |:-----|:--------| | type
`string` |

Discount type.

Available values: `UNIT` | | unit_off
`integer` |

Number of units to be granted a full value discount.

| -| unit_off_formula
`string` | | +| unit_off_formula
`string` |

Formula used to calculate the number of units.

| | effect |

Defines how the unit is added to the customer's order.

[Discount Unit Vouchers Effect Types](#discount-unit-vouchers-effect-types) | | unit_type
`string` |

The product deemed as free, chosen from product inventory (e.g. time, items).

| | product |

Contains information about the product.

[Simple Product Discount Unit](#simple-product-discount-unit) | @@ -156,7 +156,7 @@ Available values: `ADD_MISSING_ITEMS`, `ADD_NEW_ITEMS`, `ADD_MANY_ITEMS` | Attributes | Description | |:-----|:--------| | unit_off
`number` |

Number of units to be granted a full value discount.

| -| unit_off_formula
`string` | | +| unit_off_formula
`string` |

Formula used to calculate the number of units.

| | effect
`string` |

Defines how the unit is added to the customer's order.

Available values: `ADD_NEW_ITEMS`, `ADD_MISSING_ITEMS` | | unit_type
`string` |

The product deemed as free, chosen from product inventory (e.g. time, items).

| | product |

Contains information about the product.

[Simple Product Discount Unit](#simple-product-discount-unit) | diff --git a/docs/reference-docs/PUBLICATIONS-Publication-Object.md b/docs/reference-docs/PUBLICATIONS-Publication-Object.md index c7678253..2563852b 100644 --- a/docs/reference-docs/PUBLICATIONS-Publication-Object.md +++ b/docs/reference-docs/PUBLICATIONS-Publication-Object.md @@ -216,7 +216,7 @@ One of: |:-----|:--------| | type
`string` |

Discount type.

Available values: `UNIT` | | unit_off
`integer` |

Number of units to be granted a full value discount.

| -| unit_off_formula
`string` | | +| unit_off_formula
`string` |

Formula used to calculate the number of units.

| | effect |

Defines how the unit is added to the customer's order.

[Discount Unit Vouchers Effect Types](#discount-unit-vouchers-effect-types) | | unit_type
`string` |

The product deemed as free, chosen from product inventory (e.g. time, items).

| | product |

Contains information about the product.

[Simple Product Discount Unit](#simple-product-discount-unit) | @@ -274,7 +274,7 @@ Available values: `ADD_MISSING_ITEMS`, `ADD_NEW_ITEMS`, `ADD_MANY_ITEMS` | Attributes | Description | |:-----|:--------| | unit_off
`number` |

Number of units to be granted a full value discount.

| -| unit_off_formula
`string` | | +| unit_off_formula
`string` |

Formula used to calculate the number of units.

| | effect
`string` |

Defines how the unit is added to the customer's order.

Available values: `ADD_NEW_ITEMS`, `ADD_MISSING_ITEMS` | | unit_type
`string` |

The product deemed as free, chosen from product inventory (e.g. time, items).

| | product |

Contains information about the product.

[Simple Product Discount Unit](#simple-product-discount-unit) | diff --git a/docs/reference-docs/QUALIFICATIONS-Qualification-Object.md b/docs/reference-docs/QUALIFICATIONS-Qualification-Object.md index 849e272b..5a1a2097 100644 --- a/docs/reference-docs/QUALIFICATIONS-Qualification-Object.md +++ b/docs/reference-docs/QUALIFICATIONS-Qualification-Object.md @@ -36,15 +36,15 @@ order: 1 | id
`string` |

Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.

| | source_id
`string`, `null` |

Unique source ID of an existing order that will be linked to the redemption of this request.

| | status
`string` |

The order status.

Available values: `CREATED`, `PAID`, `CANCELED`, `FULFILLED` | -| amount
`integer` |

A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.

| -| initial_amount
`integer` |

A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.

| -| discount_amount
`integer` |

Sum of all order-level discounts applied to the order.

| -| items_discount_amount
`integer` |

Sum of all product-specific discounts applied to the order.

| -| total_discount_amount
`integer` |

Sum of all order-level AND all product-specific discounts applied to the order.

| -| total_amount
`integer` |

Order amount after undoing all the discounts through the rollback redemption.

| -| applied_discount_amount
`integer` |

This field shows the order-level discount applied.

| -| items_applied_discount_amount
`integer` |

Sum of all product-specific discounts applied in a particular request.
sum(items, i => i.applied_discount_amount)

| -| total_applied_discount_amount
`integer` |

Sum of all order-level AND all product-specific discounts applied in a particular request.
total_applied_discount_amount = applied_discount_amount + items_applied_discount_amount

| +| amount
`integer` |

This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).

| +| initial_amount
`integer` |

This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).

| +| discount_amount
`integer` |

Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).

| +| items_discount_amount
`integer` |

Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).

| +| total_discount_amount
`integer` |

Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).

| +| total_amount
`integer` |

Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).

| +| applied_discount_amount
`integer` |

This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).

| +| items_applied_discount_amount
`integer` |

Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).
sum(items, i => i.applied_discount_amount)

| +| total_applied_discount_amount
`integer` |

Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).
total_applied_discount_amount = applied_discount_amount + items_applied_discount_amount

| | items
`array` |

Array of items applied to the order. It can include up 500 items.

Array of [Order Item Calculated](#order-item-calculated) | | metadata
`object` |

A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.

| | object
`string` |

The type of the object represented by JSON.

Available values: `order` | @@ -279,7 +279,7 @@ One of: |:-----|:--------| | type
`string` |

Discount type.

Available values: `UNIT` | | unit_off
`integer` |

Number of units to be granted a full value discount.

| -| unit_off_formula
`string` | | +| unit_off_formula
`string` |

Formula used to calculate the number of units.

| | effect |

Defines how the unit is added to the customer's order.

[Discount Unit Vouchers Effect Types](#discount-unit-vouchers-effect-types) | | unit_type
`string` |

The product deemed as free, chosen from product inventory (e.g. time, items).

| | product |

Contains information about the product.

[Simple Product Discount Unit](#simple-product-discount-unit) | @@ -348,7 +348,7 @@ Available values: `ADD_MISSING_ITEMS`, `ADD_NEW_ITEMS`, `ADD_MANY_ITEMS` | Attributes | Description | |:-----|:--------| | unit_off
`number` |

Number of units to be granted a full value discount.

| -| unit_off_formula
`string` | | +| unit_off_formula
`string` |

Formula used to calculate the number of units.

| | effect
`string` |

Defines how the unit is added to the customer's order.

Available values: `ADD_NEW_ITEMS`, `ADD_MISSING_ITEMS` | | unit_type
`string` |

The product deemed as free, chosen from product inventory (e.g. time, items).

| | product |

Contains information about the product.

[Simple Product Discount Unit](#simple-product-discount-unit) | diff --git a/docs/reference-docs/REDEMPTIONS-Redemption-Object.md b/docs/reference-docs/REDEMPTIONS-Redemption-Object.md index 8fa7a077..9d001ad1 100644 --- a/docs/reference-docs/REDEMPTIONS-Redemption-Object.md +++ b/docs/reference-docs/REDEMPTIONS-Redemption-Object.md @@ -31,15 +31,15 @@ All of: | id
`string` |

Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.

| | source_id
`string`, `null` |

Unique source ID of an existing order that will be linked to the redemption of this request.

| | status
`string` |

The order status.

Available values: `CREATED`, `PAID`, `CANCELED`, `FULFILLED` | -| amount
`integer` |

A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.

| -| initial_amount
`integer` |

A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.

| -| discount_amount
`integer` |

Sum of all order-level discounts applied to the order.

| -| items_discount_amount
`integer` |

Sum of all product-specific discounts applied to the order.

| -| total_discount_amount
`integer` |

Sum of all order-level AND all product-specific discounts applied to the order.

| -| total_amount
`integer` |

Order amount after undoing all the discounts through the rollback redemption.

| -| applied_discount_amount
`integer` |

This field shows the order-level discount applied.

| -| items_applied_discount_amount
`integer` |

Sum of all product-specific discounts applied in a particular request.
sum(items, i => i.applied_discount_amount)

| -| total_applied_discount_amount
`integer` |

Sum of all order-level AND all product-specific discounts applied in a particular request.
total_applied_discount_amount = applied_discount_amount + items_applied_discount_amount

| +| amount
`integer` |

This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).

| +| initial_amount
`integer` |

This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).

| +| discount_amount
`integer` |

Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).

| +| items_discount_amount
`integer` |

Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).

| +| total_discount_amount
`integer` |

Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).

| +| total_amount
`integer` |

Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).

| +| applied_discount_amount
`integer` |

This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).

| +| items_applied_discount_amount
`integer` |

Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).
sum(items, i => i.applied_discount_amount)

| +| total_applied_discount_amount
`integer` |

Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).
total_applied_discount_amount = applied_discount_amount + items_applied_discount_amount

| | items
`array` |

Array of items applied to the order. It can include up 500 items.

Array of [Order Item Calculated](#order-item-calculated) | | metadata
`object` |

A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.

| | object
`string` |

The type of the object represented by JSON.

Available values: `order` | @@ -416,7 +416,7 @@ All of: |:-----|:--------| | type
`string` |

Discount type.

Available values: `UNIT` | | unit_off
`integer` |

Number of units to be granted a full value discount.

| -| unit_off_formula
`string` | | +| unit_off_formula
`string` |

Formula used to calculate the number of units.

| | effect |

Defines how the unit is added to the customer's order.

[Discount Unit Vouchers Effect Types](#discount-unit-vouchers-effect-types) | | unit_type
`string` |

The product deemed as free, chosen from product inventory (e.g. time, items).

| | product |

Contains information about the product.

[Simple Product Discount Unit](#simple-product-discount-unit) | @@ -506,7 +506,7 @@ Available values: `ADD_MISSING_ITEMS`, `ADD_NEW_ITEMS`, `ADD_MANY_ITEMS` | Attributes | Description | |:-----|:--------| | unit_off
`number` |

Number of units to be granted a full value discount.

| -| unit_off_formula
`string` | | +| unit_off_formula
`string` |

Formula used to calculate the number of units.

| | effect
`string` |

Defines how the unit is added to the customer's order.

Available values: `ADD_NEW_ITEMS`, `ADD_MISSING_ITEMS` | | unit_type
`string` |

The product deemed as free, chosen from product inventory (e.g. time, items).

| | product |

Contains information about the product.

[Simple Product Discount Unit](#simple-product-discount-unit) | diff --git a/docs/reference-docs/REDEMPTIONS-Rollback-Redemption-Object.md b/docs/reference-docs/REDEMPTIONS-Rollback-Redemption-Object.md index ab40a466..80e75873 100644 --- a/docs/reference-docs/REDEMPTIONS-Rollback-Redemption-Object.md +++ b/docs/reference-docs/REDEMPTIONS-Rollback-Redemption-Object.md @@ -42,15 +42,15 @@ order: 2 | id
`string` |

Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.

| | source_id
`string`, `null` |

Unique source ID of an existing order that will be linked to the redemption of this request.

| | status
`string` |

The order status.

Available values: `CREATED`, `PAID`, `CANCELED`, `FULFILLED` | -| amount
`integer` |

A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.

| -| initial_amount
`integer` |

A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.

| -| discount_amount
`integer` |

Sum of all order-level discounts applied to the order.

| -| items_discount_amount
`integer` |

Sum of all product-specific discounts applied to the order.

| -| total_discount_amount
`integer` |

Sum of all order-level AND all product-specific discounts applied to the order.

| -| total_amount
`integer` |

Order amount after undoing all the discounts through the rollback redemption.

| -| applied_discount_amount
`integer` |

This field shows the order-level discount applied.

| -| items_applied_discount_amount
`integer` |

Sum of all product-specific discounts applied in a particular request.
sum(items, i => i.applied_discount_amount)

| -| total_applied_discount_amount
`integer` |

Sum of all order-level AND all product-specific discounts applied in a particular request.
total_applied_discount_amount = applied_discount_amount + items_applied_discount_amount

| +| amount
`integer` |

This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).

| +| initial_amount
`integer` |

This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).

| +| discount_amount
`integer` |

Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).

| +| items_discount_amount
`integer` |

Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).

| +| total_discount_amount
`integer` |

Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).

| +| total_amount
`integer` |

Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).

| +| applied_discount_amount
`integer` |

This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).

| +| items_applied_discount_amount
`integer` |

Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).
sum(items, i => i.applied_discount_amount)

| +| total_applied_discount_amount
`integer` |

Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).
total_applied_discount_amount = applied_discount_amount + items_applied_discount_amount

| | items
`array` |

Array of items applied to the order. It can include up 500 items.

Array of [Order Item Calculated](#order-item-calculated) | | metadata
`object` |

A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.

| | object
`string` |

The type of the object represented by JSON.

Available values: `order` | @@ -306,7 +306,7 @@ All of: |:-----|:--------| | type
`string` |

Discount type.

Available values: `UNIT` | | unit_off
`integer` |

Number of units to be granted a full value discount.

| -| unit_off_formula
`string` | | +| unit_off_formula
`string` |

Formula used to calculate the number of units.

| | effect |

Defines how the unit is added to the customer's order.

[Discount Unit Vouchers Effect Types](#discount-unit-vouchers-effect-types) | | unit_type
`string` |

The product deemed as free, chosen from product inventory (e.g. time, items).

| | product |

Contains information about the product.

[Simple Product Discount Unit](#simple-product-discount-unit) | @@ -396,7 +396,7 @@ Available values: `ADD_MISSING_ITEMS`, `ADD_NEW_ITEMS`, `ADD_MANY_ITEMS` | Attributes | Description | |:-----|:--------| | unit_off
`number` |

Number of units to be granted a full value discount.

| -| unit_off_formula
`string` | | +| unit_off_formula
`string` |

Formula used to calculate the number of units.

| | effect
`string` |

Defines how the unit is added to the customer's order.

Available values: `ADD_NEW_ITEMS`, `ADD_MISSING_ITEMS` | | unit_type
`string` |

The product deemed as free, chosen from product inventory (e.g. time, items).

| | product |

Contains information about the product.

[Simple Product Discount Unit](#simple-product-discount-unit) | diff --git a/docs/reference-docs/VALIDATIONS-Validation-Object.md b/docs/reference-docs/VALIDATIONS-Validation-Object.md index c9055bac..f21d48d4 100644 --- a/docs/reference-docs/VALIDATIONS-Validation-Object.md +++ b/docs/reference-docs/VALIDATIONS-Validation-Object.md @@ -82,15 +82,15 @@ One of: | id
`string` |

Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.

| | source_id
`string`, `null` |

Unique source ID of an existing order that will be linked to the redemption of this request.

| | status
`string` |

The order status.

Available values: `CREATED`, `PAID`, `CANCELED`, `FULFILLED` | -| amount
`integer` |

A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.

| -| initial_amount
`integer` |

A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.

| -| discount_amount
`integer` |

Sum of all order-level discounts applied to the order.

| -| items_discount_amount
`integer` |

Sum of all product-specific discounts applied to the order.

| -| total_discount_amount
`integer` |

Sum of all order-level AND all product-specific discounts applied to the order.

| -| total_amount
`integer` |

Order amount after undoing all the discounts through the rollback redemption.

| -| applied_discount_amount
`integer` |

This field shows the order-level discount applied.

| -| items_applied_discount_amount
`integer` |

Sum of all product-specific discounts applied in a particular request.
sum(items, i => i.applied_discount_amount)

| -| total_applied_discount_amount
`integer` |

Sum of all order-level AND all product-specific discounts applied in a particular request.
total_applied_discount_amount = applied_discount_amount + items_applied_discount_amount

| +| amount
`integer` |

This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).

| +| initial_amount
`integer` |

This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).

| +| discount_amount
`integer` |

Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).

| +| items_discount_amount
`integer` |

Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).

| +| total_discount_amount
`integer` |

Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).

| +| total_amount
`integer` |

Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).

| +| applied_discount_amount
`integer` |

This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).

| +| items_applied_discount_amount
`integer` |

Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).
sum(items, i => i.applied_discount_amount)

| +| total_applied_discount_amount
`integer` |

Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).
total_applied_discount_amount = applied_discount_amount + items_applied_discount_amount

| | items
`array` |

Array of items applied to the order. It can include up 500 items.

Array of [Order Item Calculated](#order-item-calculated) | | metadata
`object` |

A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.

| | object
`string` |

The type of the object represented by JSON.

Available values: `order` | @@ -150,7 +150,7 @@ One of: |:-----|:--------| | type
`string` |

Discount type.

Available values: `UNIT` | | unit_off
`integer` |

Number of units to be granted a full value discount.

| -| unit_off_formula
`string` | | +| unit_off_formula
`string` |

Formula used to calculate the number of units.

| | effect |

Defines how the unit is added to the customer's order.

[Discount Unit Vouchers Effect Types](#discount-unit-vouchers-effect-types) | | unit_type
`string` |

The product deemed as free, chosen from product inventory (e.g. time, items).

| | product |

Contains information about the product.

[Simple Product Discount Unit](#simple-product-discount-unit) | @@ -257,7 +257,7 @@ Available values: `ADD_MISSING_ITEMS`, `ADD_NEW_ITEMS`, `ADD_MANY_ITEMS` | Attributes | Description | |:-----|:--------| | unit_off
`number` |

Number of units to be granted a full value discount.

| -| unit_off_formula
`string` | | +| unit_off_formula
`string` |

Formula used to calculate the number of units.

| | effect
`string` |

Defines how the unit is added to the customer's order.

Available values: `ADD_NEW_ITEMS`, `ADD_MISSING_ITEMS` | | unit_type
`string` |

The product deemed as free, chosen from product inventory (e.g. time, items).

| | product |

Contains information about the product.

[Simple Product Discount Unit](#simple-product-discount-unit) | diff --git a/docs/reference-docs/VOUCHERS-Voucher-Object.md b/docs/reference-docs/VOUCHERS-Voucher-Object.md index 5b2c2ebc..4d5058d4 100644 --- a/docs/reference-docs/VOUCHERS-Voucher-Object.md +++ b/docs/reference-docs/VOUCHERS-Voucher-Object.md @@ -120,7 +120,7 @@ One of: |:-----|:--------| | type
`string` |

Discount type.

Available values: `UNIT` | | unit_off
`integer` |

Number of units to be granted a full value discount.

| -| unit_off_formula
`string` | | +| unit_off_formula
`string` |

Formula used to calculate the number of units.

| | effect |

Defines how the unit is added to the customer's order.

[Discount Unit Vouchers Effect Types](#discount-unit-vouchers-effect-types) | | unit_type
`string` |

The product deemed as free, chosen from product inventory (e.g. time, items).

| | product |

Contains information about the product.

[Simple Product Discount Unit](#simple-product-discount-unit) | @@ -178,7 +178,7 @@ Available values: `ADD_MISSING_ITEMS`, `ADD_NEW_ITEMS`, `ADD_MANY_ITEMS` | Attributes | Description | |:-----|:--------| | unit_off
`number` |

Number of units to be granted a full value discount.

| -| unit_off_formula
`string` | | +| unit_off_formula
`string` |

Formula used to calculate the number of units.

| | effect
`string` |

Defines how the unit is added to the customer's order.

Available values: `ADD_NEW_ITEMS`, `ADD_MISSING_ITEMS` | | unit_type
`string` |

The product deemed as free, chosen from product inventory (e.g. time, items).

| | product |

Contains information about the product.

[Simple Product Discount Unit](#simple-product-discount-unit) | diff --git a/production/readOnly-openAPI.json b/production/readOnly-openAPI.json index 8d5d7196..1891a810 100644 --- a/production/readOnly-openAPI.json +++ b/production/readOnly-openAPI.json @@ -5317,6 +5317,7 @@ }, "unit_off_formula": { "type": "string", + "description": "Formula used to calculate the number of units.", "nullable": true }, "effect": { @@ -5394,6 +5395,7 @@ }, "unit_off_formula": { "type": "string", + "description": "Formula used to calculate the number of units.", "nullable": true }, "effect": { @@ -16483,7 +16485,7 @@ }, "discount_amount": { "type": "integer", - "description": "Sum of all order-level discounts applied to the order.", + "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "items": { @@ -16529,47 +16531,47 @@ }, "amount": { "type": "integer", - "description": "A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.", + "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "initial_amount": { "type": "integer", - "description": "A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.", + "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "discount_amount": { "type": "integer", - "description": "Sum of all order-level discounts applied to the order.", + "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "items_discount_amount": { "type": "integer", - "description": "Sum of all product-specific discounts applied to the order.", + "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "total_discount_amount": { "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied to the order.", + "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "total_amount": { "type": "integer", - "description": "Order amount after undoing all the discounts through the rollback redemption.", + "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "applied_discount_amount": { "type": "integer", - "description": "This field shows the order-level discount applied.", + "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "items_applied_discount_amount": { "type": "integer", - "description": "Sum of all product-specific discounts applied in a particular request. \n`sum(items, i => i.applied_discount_amount)`", + "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", "nullable": true }, "total_applied_discount_amount": { "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", + "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", "nullable": true }, "items": { @@ -24896,37 +24898,37 @@ }, "discount_amount": { "type": "integer", - "description": "Sum of all order-level discounts applied to the order.", + "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "applied_discount_amount": { "type": "integer", - "description": "This field shows the order-level discount applied.", + "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "items_discount_amount": { "type": "integer", - "description": "Sum of all product-specific discounts applied to the order.", + "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "items_applied_discount_amount": { "type": "integer", - "description": "Sum of all product-specific discounts applied in a particular request. \n`sum(items, i => i.applied_discount_amount)`", + "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", "nullable": true }, "total_discount_amount": { "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied to the order.", + "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "total_applied_discount_amount": { "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", + "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).\n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", "nullable": true }, "total_amount": { "type": "integer", - "description": "Order amount after undoing all the discounts through the rollback redemption.", + "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "items": { diff --git a/reference/OpenAPI.json b/reference/OpenAPI.json index 1599881b..27e136f8 100644 --- a/reference/OpenAPI.json +++ b/reference/OpenAPI.json @@ -2101,31 +2101,31 @@ }, "discount_amount": { "type": "integer", - "description": "Sum of all order-level discounts applied to the order." + "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00)." }, "applied_discount_amount": { "type": "integer", - "description": "This field shows the order-level discount applied." + "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00)." }, "items_discount_amount": { "type": "integer", - "description": "Sum of all product-specific discounts applied to the order." + "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00)." }, "items_applied_discount_amount": { "type": "integer", - "description": "Sum of all product-specific discounts applied in a particular request. \n`sum(items, i => i.applied_discount_amount)`" + "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`" }, "total_discount_amount": { "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied to the order." + "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00)." }, "total_applied_discount_amount": { "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`" + "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).\n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`" }, "total_amount": { "type": "integer", - "description": "Order amount after undoing all the discounts through the rollback redemption." + "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00)." }, "items": { "type": "array", @@ -2181,7 +2181,7 @@ }, "discount_amount": { "type": "integer", - "description": "Sum of all order-level discounts applied to the order." + "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00)." }, "items": { "type": "array", @@ -2241,39 +2241,39 @@ }, "amount": { "type": "integer", - "description": "A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts." + "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00)." }, "initial_amount": { "type": "integer", - "description": "A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts." + "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00)." }, "discount_amount": { "type": "integer", - "description": "Sum of all order-level discounts applied to the order." + "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00)." }, "items_discount_amount": { "type": "integer", - "description": "Sum of all product-specific discounts applied to the order." + "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00)." }, "total_discount_amount": { "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied to the order." + "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00)." }, "total_amount": { "type": "integer", - "description": "Order amount after undoing all the discounts through the rollback redemption." + "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00)." }, "applied_discount_amount": { "type": "integer", - "description": "This field shows the order-level discount applied." + "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00)." }, "items_applied_discount_amount": { "type": "integer", - "description": "Sum of all product-specific discounts applied in a particular request. \n`sum(items, i => i.applied_discount_amount)`" + "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`" }, "total_applied_discount_amount": { "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`" + "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`" }, "items": { "type": "array", @@ -3877,7 +3877,8 @@ "description": "Number of units to be granted a full value discount." }, "unit_off_formula": { - "type": "string" + "type": "string", + "description": "Formula used to calculate the number of units." }, "effect": { "description": "Defines how the unit is added to the customer's order.", @@ -3953,7 +3954,8 @@ "description": "Number of units to be granted a full value discount." }, "unit_off_formula": { - "type": "string" + "type": "string", + "description": "Formula used to calculate the number of units." }, "effect": { "type": "string", diff --git a/reference/readonly-sdks/java/OpenAPI.json b/reference/readonly-sdks/java/OpenAPI.json index 24503eb6..e99e2585 100644 --- a/reference/readonly-sdks/java/OpenAPI.json +++ b/reference/readonly-sdks/java/OpenAPI.json @@ -2834,6 +2834,7 @@ }, "unit_off_formula": { "type": "string", + "description": "Formula used to calculate the number of units.", "nullable": true }, "unit_type": { @@ -15682,7 +15683,7 @@ }, "discount_amount": { "type": "integer", - "description": "Sum of all order-level discounts applied to the order.", + "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "items": { @@ -15749,47 +15750,47 @@ }, "amount": { "type": "integer", - "description": "A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.", + "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "initial_amount": { "type": "integer", - "description": "A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.", + "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "discount_amount": { "type": "integer", - "description": "Sum of all order-level discounts applied to the order.", + "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "items_discount_amount": { "type": "integer", - "description": "Sum of all product-specific discounts applied to the order.", + "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "total_discount_amount": { "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied to the order.", + "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "total_amount": { "type": "integer", - "description": "Order amount after undoing all the discounts through the rollback redemption.", + "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "applied_discount_amount": { "type": "integer", - "description": "This field shows the order-level discount applied.", + "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "items_applied_discount_amount": { "type": "integer", - "description": "Sum of all product-specific discounts applied in a particular request. \n`sum(items, i => i.applied_discount_amount)`", + "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", "nullable": true }, "total_applied_discount_amount": { "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", + "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", "nullable": true }, "items": { @@ -16000,47 +16001,47 @@ }, "amount": { "type": "integer", - "description": "A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.", + "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "initial_amount": { "type": "integer", - "description": "A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.", + "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "discount_amount": { "type": "integer", - "description": "Sum of all order-level discounts applied to the order.", + "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "items_discount_amount": { "type": "integer", - "description": "Sum of all product-specific discounts applied to the order.", + "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "total_discount_amount": { "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied to the order.", + "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "total_amount": { "type": "integer", - "description": "Order amount after undoing all the discounts through the rollback redemption.", + "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "applied_discount_amount": { "type": "integer", - "description": "This field shows the order-level discount applied.", + "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "items_applied_discount_amount": { "type": "integer", - "description": "Sum of all product-specific discounts applied in a particular request. \n`sum(items, i => i.applied_discount_amount)`", + "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", "nullable": true }, "total_applied_discount_amount": { "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", + "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", "nullable": true }, "items": { @@ -16234,7 +16235,7 @@ }, "discount_amount": { "type": "integer", - "description": "Sum of all order-level discounts applied to the order.", + "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "items": { @@ -16301,47 +16302,47 @@ }, "amount": { "type": "integer", - "description": "A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.", + "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "initial_amount": { "type": "integer", - "description": "A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.", + "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "discount_amount": { "type": "integer", - "description": "Sum of all order-level discounts applied to the order.", + "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "items_discount_amount": { "type": "integer", - "description": "Sum of all product-specific discounts applied to the order.", + "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "total_discount_amount": { "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied to the order.", + "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "total_amount": { "type": "integer", - "description": "Order amount after undoing all the discounts through the rollback redemption.", + "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "applied_discount_amount": { "type": "integer", - "description": "This field shows the order-level discount applied.", + "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "items_applied_discount_amount": { "type": "integer", - "description": "Sum of all product-specific discounts applied in a particular request. \n`sum(items, i => i.applied_discount_amount)`", + "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", "nullable": true }, "total_applied_discount_amount": { "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", + "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", "nullable": true }, "items": { @@ -21289,47 +21290,47 @@ }, "amount": { "type": "integer", - "description": "A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.", + "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "initial_amount": { "type": "integer", - "description": "A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.", + "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "discount_amount": { "type": "integer", - "description": "Sum of all order-level discounts applied to the order.", + "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "items_discount_amount": { "type": "integer", - "description": "Sum of all product-specific discounts applied to the order.", + "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "total_discount_amount": { "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied to the order.", + "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "total_amount": { "type": "integer", - "description": "Order amount after undoing all the discounts through the rollback redemption.", + "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "applied_discount_amount": { "type": "integer", - "description": "This field shows the order-level discount applied.", + "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "items_applied_discount_amount": { "type": "integer", - "description": "Sum of all product-specific discounts applied in a particular request. \n`sum(items, i => i.applied_discount_amount)`", + "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", "nullable": true }, "total_applied_discount_amount": { "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", + "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", "nullable": true }, "items": { @@ -22191,47 +22192,47 @@ }, "amount": { "type": "integer", - "description": "A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.", + "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "initial_amount": { "type": "integer", - "description": "A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.", + "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "discount_amount": { "type": "integer", - "description": "Sum of all order-level discounts applied to the order.", + "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "items_discount_amount": { "type": "integer", - "description": "Sum of all product-specific discounts applied to the order.", + "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "total_discount_amount": { "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied to the order.", + "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "total_amount": { "type": "integer", - "description": "Order amount after undoing all the discounts through the rollback redemption.", + "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "applied_discount_amount": { "type": "integer", - "description": "This field shows the order-level discount applied.", + "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "items_applied_discount_amount": { "type": "integer", - "description": "Sum of all product-specific discounts applied in a particular request. \n`sum(items, i => i.applied_discount_amount)`", + "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", "nullable": true }, "total_applied_discount_amount": { "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", + "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", "nullable": true }, "items": { @@ -26316,6 +26317,7 @@ }, "unit_off_formula": { "type": "string", + "description": "Formula used to calculate the number of units.", "nullable": true }, "unit_type": { @@ -30251,6 +30253,7 @@ }, "unit_off_formula": { "type": "string", + "description": "Formula used to calculate the number of units.", "nullable": true }, "unit_type": { @@ -30328,6 +30331,7 @@ }, "unit_off_formula": { "type": "string", + "description": "Formula used to calculate the number of units.", "nullable": true }, "effect": { @@ -33941,7 +33945,7 @@ }, "discount_amount": { "type": "integer", - "description": "Sum of all order-level discounts applied to the order.", + "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "items": { @@ -33990,47 +33994,47 @@ }, "amount": { "type": "integer", - "description": "A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.", + "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "initial_amount": { "type": "integer", - "description": "A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.", + "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "discount_amount": { "type": "integer", - "description": "Sum of all order-level discounts applied to the order.", + "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "items_discount_amount": { "type": "integer", - "description": "Sum of all product-specific discounts applied to the order.", + "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "total_discount_amount": { "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied to the order.", + "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "total_amount": { "type": "integer", - "description": "Order amount after undoing all the discounts through the rollback redemption.", + "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "applied_discount_amount": { "type": "integer", - "description": "This field shows the order-level discount applied.", + "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "items_applied_discount_amount": { "type": "integer", - "description": "Sum of all product-specific discounts applied in a particular request. \n`sum(items, i => i.applied_discount_amount)`", + "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", "nullable": true }, "total_applied_discount_amount": { "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", + "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", "nullable": true }, "items": { @@ -36241,47 +36245,47 @@ }, "amount": { "type": "integer", - "description": "A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.", + "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "initial_amount": { "type": "integer", - "description": "A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.", + "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "discount_amount": { "type": "integer", - "description": "Sum of all order-level discounts applied to the order.", + "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "items_discount_amount": { "type": "integer", - "description": "Sum of all product-specific discounts applied to the order.", + "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "total_discount_amount": { "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied to the order.", + "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "total_amount": { "type": "integer", - "description": "Order amount after undoing all the discounts through the rollback redemption.", + "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "applied_discount_amount": { "type": "integer", - "description": "This field shows the order-level discount applied.", + "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "items_applied_discount_amount": { "type": "integer", - "description": "Sum of all product-specific discounts applied in a particular request. \n`sum(items, i => i.applied_discount_amount)`", + "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", "nullable": true }, "total_applied_discount_amount": { "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", + "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", "nullable": true }, "items": { diff --git a/reference/readonly-sdks/php/OpenAPI.json b/reference/readonly-sdks/php/OpenAPI.json index be98fa22..679ee60c 100644 --- a/reference/readonly-sdks/php/OpenAPI.json +++ b/reference/readonly-sdks/php/OpenAPI.json @@ -2946,6 +2946,7 @@ }, "unit_off_formula": { "type": "string", + "description": "Formula used to calculate the number of units.", "nullable": true }, "unit_type": { @@ -16105,7 +16106,7 @@ }, "discount_amount": { "type": "integer", - "description": "Sum of all order-level discounts applied to the order.", + "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "items": { @@ -16172,47 +16173,47 @@ }, "amount": { "type": "integer", - "description": "A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.", + "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "initial_amount": { "type": "integer", - "description": "A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.", + "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "discount_amount": { "type": "integer", - "description": "Sum of all order-level discounts applied to the order.", + "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "items_discount_amount": { "type": "integer", - "description": "Sum of all product-specific discounts applied to the order.", + "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "total_discount_amount": { "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied to the order.", + "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "total_amount": { "type": "integer", - "description": "Order amount after undoing all the discounts through the rollback redemption.", + "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "applied_discount_amount": { "type": "integer", - "description": "This field shows the order-level discount applied.", + "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "items_applied_discount_amount": { "type": "integer", - "description": "Sum of all product-specific discounts applied in a particular request. \n`sum(items, i => i.applied_discount_amount)`", + "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", "nullable": true }, "total_applied_discount_amount": { "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", + "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", "nullable": true }, "items": { @@ -16473,47 +16474,47 @@ }, "amount": { "type": "integer", - "description": "A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.", + "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "initial_amount": { "type": "integer", - "description": "A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.", + "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "discount_amount": { "type": "integer", - "description": "Sum of all order-level discounts applied to the order.", + "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "items_discount_amount": { "type": "integer", - "description": "Sum of all product-specific discounts applied to the order.", + "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "total_discount_amount": { "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied to the order.", + "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "total_amount": { "type": "integer", - "description": "Order amount after undoing all the discounts through the rollback redemption.", + "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "applied_discount_amount": { "type": "integer", - "description": "This field shows the order-level discount applied.", + "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "items_applied_discount_amount": { "type": "integer", - "description": "Sum of all product-specific discounts applied in a particular request. \n`sum(items, i => i.applied_discount_amount)`", + "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", "nullable": true }, "total_applied_discount_amount": { "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", + "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", "nullable": true }, "items": { @@ -16707,7 +16708,7 @@ }, "discount_amount": { "type": "integer", - "description": "Sum of all order-level discounts applied to the order.", + "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "items": { @@ -16774,47 +16775,47 @@ }, "amount": { "type": "integer", - "description": "A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.", + "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "initial_amount": { "type": "integer", - "description": "A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.", + "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "discount_amount": { "type": "integer", - "description": "Sum of all order-level discounts applied to the order.", + "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "items_discount_amount": { "type": "integer", - "description": "Sum of all product-specific discounts applied to the order.", + "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "total_discount_amount": { "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied to the order.", + "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "total_amount": { "type": "integer", - "description": "Order amount after undoing all the discounts through the rollback redemption.", + "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "applied_discount_amount": { "type": "integer", - "description": "This field shows the order-level discount applied.", + "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "items_applied_discount_amount": { "type": "integer", - "description": "Sum of all product-specific discounts applied in a particular request. \n`sum(items, i => i.applied_discount_amount)`", + "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", "nullable": true }, "total_applied_discount_amount": { "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", + "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", "nullable": true }, "items": { @@ -21996,47 +21997,47 @@ }, "amount": { "type": "integer", - "description": "A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.", + "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "initial_amount": { "type": "integer", - "description": "A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.", + "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "discount_amount": { "type": "integer", - "description": "Sum of all order-level discounts applied to the order.", + "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "items_discount_amount": { "type": "integer", - "description": "Sum of all product-specific discounts applied to the order.", + "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "total_discount_amount": { "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied to the order.", + "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "total_amount": { "type": "integer", - "description": "Order amount after undoing all the discounts through the rollback redemption.", + "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "applied_discount_amount": { "type": "integer", - "description": "This field shows the order-level discount applied.", + "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "items_applied_discount_amount": { "type": "integer", - "description": "Sum of all product-specific discounts applied in a particular request. \n`sum(items, i => i.applied_discount_amount)`", + "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", "nullable": true }, "total_applied_discount_amount": { "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", + "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", "nullable": true }, "items": { @@ -22946,47 +22947,47 @@ }, "amount": { "type": "integer", - "description": "A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.", + "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "initial_amount": { "type": "integer", - "description": "A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.", + "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "discount_amount": { "type": "integer", - "description": "Sum of all order-level discounts applied to the order.", + "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "items_discount_amount": { "type": "integer", - "description": "Sum of all product-specific discounts applied to the order.", + "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "total_discount_amount": { "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied to the order.", + "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "total_amount": { "type": "integer", - "description": "Order amount after undoing all the discounts through the rollback redemption.", + "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "applied_discount_amount": { "type": "integer", - "description": "This field shows the order-level discount applied.", + "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "items_applied_discount_amount": { "type": "integer", - "description": "Sum of all product-specific discounts applied in a particular request. \n`sum(items, i => i.applied_discount_amount)`", + "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", "nullable": true }, "total_applied_discount_amount": { "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", + "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", "nullable": true }, "items": { @@ -27151,6 +27152,7 @@ }, "unit_off_formula": { "type": "string", + "description": "Formula used to calculate the number of units.", "nullable": true }, "unit_type": { @@ -31284,6 +31286,7 @@ }, "unit_off_formula": { "type": "string", + "description": "Formula used to calculate the number of units.", "nullable": true }, "unit_type": { @@ -31361,6 +31364,7 @@ }, "unit_off_formula": { "type": "string", + "description": "Formula used to calculate the number of units.", "nullable": true }, "effect": { @@ -34987,7 +34991,7 @@ }, "discount_amount": { "type": "integer", - "description": "Sum of all order-level discounts applied to the order.", + "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "items": { @@ -35036,47 +35040,47 @@ }, "amount": { "type": "integer", - "description": "A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.", + "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "initial_amount": { "type": "integer", - "description": "A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.", + "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "discount_amount": { "type": "integer", - "description": "Sum of all order-level discounts applied to the order.", + "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "items_discount_amount": { "type": "integer", - "description": "Sum of all product-specific discounts applied to the order.", + "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "total_discount_amount": { "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied to the order.", + "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "total_amount": { "type": "integer", - "description": "Order amount after undoing all the discounts through the rollback redemption.", + "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "applied_discount_amount": { "type": "integer", - "description": "This field shows the order-level discount applied.", + "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "items_applied_discount_amount": { "type": "integer", - "description": "Sum of all product-specific discounts applied in a particular request. \n`sum(items, i => i.applied_discount_amount)`", + "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", "nullable": true }, "total_applied_discount_amount": { "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", + "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", "nullable": true }, "items": { @@ -37408,47 +37412,47 @@ }, "amount": { "type": "integer", - "description": "A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.", + "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "initial_amount": { "type": "integer", - "description": "A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.", + "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "discount_amount": { "type": "integer", - "description": "Sum of all order-level discounts applied to the order.", + "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "items_discount_amount": { "type": "integer", - "description": "Sum of all product-specific discounts applied to the order.", + "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "total_discount_amount": { "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied to the order.", + "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "total_amount": { "type": "integer", - "description": "Order amount after undoing all the discounts through the rollback redemption.", + "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "applied_discount_amount": { "type": "integer", - "description": "This field shows the order-level discount applied.", + "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "items_applied_discount_amount": { "type": "integer", - "description": "Sum of all product-specific discounts applied in a particular request. \n`sum(items, i => i.applied_discount_amount)`", + "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", "nullable": true }, "total_applied_discount_amount": { "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", + "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", "nullable": true }, "items": { diff --git a/reference/readonly-sdks/python/OpenAPI.json b/reference/readonly-sdks/python/OpenAPI.json index 9c1e22de..7401691a 100644 --- a/reference/readonly-sdks/python/OpenAPI.json +++ b/reference/readonly-sdks/python/OpenAPI.json @@ -2834,6 +2834,7 @@ }, "unit_off_formula": { "type": "string", + "description": "Formula used to calculate the number of units.", "nullable": true }, "unit_type": { @@ -15497,7 +15498,7 @@ }, "discount_amount": { "type": "integer", - "description": "Sum of all order-level discounts applied to the order.", + "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "items": { @@ -15564,47 +15565,47 @@ }, "amount": { "type": "integer", - "description": "A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.", + "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "initial_amount": { "type": "integer", - "description": "A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.", + "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "discount_amount": { "type": "integer", - "description": "Sum of all order-level discounts applied to the order.", + "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "items_discount_amount": { "type": "integer", - "description": "Sum of all product-specific discounts applied to the order.", + "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "total_discount_amount": { "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied to the order.", + "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "total_amount": { "type": "integer", - "description": "Order amount after undoing all the discounts through the rollback redemption.", + "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "applied_discount_amount": { "type": "integer", - "description": "This field shows the order-level discount applied.", + "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "items_applied_discount_amount": { "type": "integer", - "description": "Sum of all product-specific discounts applied in a particular request. \n`sum(items, i => i.applied_discount_amount)`", + "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", "nullable": true }, "total_applied_discount_amount": { "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", + "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", "nullable": true }, "items": { @@ -15812,47 +15813,47 @@ }, "amount": { "type": "integer", - "description": "A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.", + "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "initial_amount": { "type": "integer", - "description": "A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.", + "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "discount_amount": { "type": "integer", - "description": "Sum of all order-level discounts applied to the order.", + "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "items_discount_amount": { "type": "integer", - "description": "Sum of all product-specific discounts applied to the order.", + "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "total_discount_amount": { "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied to the order.", + "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "total_amount": { "type": "integer", - "description": "Order amount after undoing all the discounts through the rollback redemption.", + "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "applied_discount_amount": { "type": "integer", - "description": "This field shows the order-level discount applied.", + "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "items_applied_discount_amount": { "type": "integer", - "description": "Sum of all product-specific discounts applied in a particular request. \n`sum(items, i => i.applied_discount_amount)`", + "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", "nullable": true }, "total_applied_discount_amount": { "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", + "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", "nullable": true }, "items": { @@ -16043,7 +16044,7 @@ }, "discount_amount": { "type": "integer", - "description": "Sum of all order-level discounts applied to the order.", + "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "items": { @@ -16110,47 +16111,47 @@ }, "amount": { "type": "integer", - "description": "A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.", + "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "initial_amount": { "type": "integer", - "description": "A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.", + "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "discount_amount": { "type": "integer", - "description": "Sum of all order-level discounts applied to the order.", + "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "items_discount_amount": { "type": "integer", - "description": "Sum of all product-specific discounts applied to the order.", + "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "total_discount_amount": { "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied to the order.", + "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "total_amount": { "type": "integer", - "description": "Order amount after undoing all the discounts through the rollback redemption.", + "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "applied_discount_amount": { "type": "integer", - "description": "This field shows the order-level discount applied.", + "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "items_applied_discount_amount": { "type": "integer", - "description": "Sum of all product-specific discounts applied in a particular request. \n`sum(items, i => i.applied_discount_amount)`", + "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", "nullable": true }, "total_applied_discount_amount": { "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", + "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", "nullable": true }, "items": { @@ -21095,47 +21096,47 @@ }, "amount": { "type": "integer", - "description": "A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.", + "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "initial_amount": { "type": "integer", - "description": "A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.", + "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "discount_amount": { "type": "integer", - "description": "Sum of all order-level discounts applied to the order.", + "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "items_discount_amount": { "type": "integer", - "description": "Sum of all product-specific discounts applied to the order.", + "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "total_discount_amount": { "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied to the order.", + "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "total_amount": { "type": "integer", - "description": "Order amount after undoing all the discounts through the rollback redemption.", + "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "applied_discount_amount": { "type": "integer", - "description": "This field shows the order-level discount applied.", + "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "items_applied_discount_amount": { "type": "integer", - "description": "Sum of all product-specific discounts applied in a particular request. \n`sum(items, i => i.applied_discount_amount)`", + "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", "nullable": true }, "total_applied_discount_amount": { "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", + "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", "nullable": true }, "items": { @@ -21994,47 +21995,47 @@ }, "amount": { "type": "integer", - "description": "A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.", + "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "initial_amount": { "type": "integer", - "description": "A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.", + "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "discount_amount": { "type": "integer", - "description": "Sum of all order-level discounts applied to the order.", + "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "items_discount_amount": { "type": "integer", - "description": "Sum of all product-specific discounts applied to the order.", + "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "total_discount_amount": { "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied to the order.", + "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "total_amount": { "type": "integer", - "description": "Order amount after undoing all the discounts through the rollback redemption.", + "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "applied_discount_amount": { "type": "integer", - "description": "This field shows the order-level discount applied.", + "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "items_applied_discount_amount": { "type": "integer", - "description": "Sum of all product-specific discounts applied in a particular request. \n`sum(items, i => i.applied_discount_amount)`", + "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", "nullable": true }, "total_applied_discount_amount": { "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", + "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", "nullable": true }, "items": { @@ -26116,6 +26117,7 @@ }, "unit_off_formula": { "type": "string", + "description": "Formula used to calculate the number of units.", "nullable": true }, "unit_type": { @@ -30032,6 +30034,7 @@ }, "unit_off_formula": { "type": "string", + "description": "Formula used to calculate the number of units.", "nullable": true }, "unit_type": { @@ -30109,6 +30112,7 @@ }, "unit_off_formula": { "type": "string", + "description": "Formula used to calculate the number of units.", "nullable": true }, "effect": { @@ -33459,7 +33463,7 @@ }, "discount_amount": { "type": "integer", - "description": "Sum of all order-level discounts applied to the order.", + "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "items": { @@ -33508,47 +33512,47 @@ }, "amount": { "type": "integer", - "description": "A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.", + "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "initial_amount": { "type": "integer", - "description": "A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.", + "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "discount_amount": { "type": "integer", - "description": "Sum of all order-level discounts applied to the order.", + "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "items_discount_amount": { "type": "integer", - "description": "Sum of all product-specific discounts applied to the order.", + "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "total_discount_amount": { "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied to the order.", + "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "total_amount": { "type": "integer", - "description": "Order amount after undoing all the discounts through the rollback redemption.", + "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "applied_discount_amount": { "type": "integer", - "description": "This field shows the order-level discount applied.", + "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "items_applied_discount_amount": { "type": "integer", - "description": "Sum of all product-specific discounts applied in a particular request. \n`sum(items, i => i.applied_discount_amount)`", + "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", "nullable": true }, "total_applied_discount_amount": { "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", + "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", "nullable": true }, "items": { @@ -35693,47 +35697,47 @@ }, "amount": { "type": "integer", - "description": "A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.", + "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "initial_amount": { "type": "integer", - "description": "A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.", + "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "discount_amount": { "type": "integer", - "description": "Sum of all order-level discounts applied to the order.", + "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "items_discount_amount": { "type": "integer", - "description": "Sum of all product-specific discounts applied to the order.", + "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "total_discount_amount": { "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied to the order.", + "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "total_amount": { "type": "integer", - "description": "Order amount after undoing all the discounts through the rollback redemption.", + "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "applied_discount_amount": { "type": "integer", - "description": "This field shows the order-level discount applied.", + "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "items_applied_discount_amount": { "type": "integer", - "description": "Sum of all product-specific discounts applied in a particular request. \n`sum(items, i => i.applied_discount_amount)`", + "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", "nullable": true }, "total_applied_discount_amount": { "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", + "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", "nullable": true }, "items": { diff --git a/reference/readonly-sdks/ruby/OpenAPI.json b/reference/readonly-sdks/ruby/OpenAPI.json index c24dfabc..4b824e42 100644 --- a/reference/readonly-sdks/ruby/OpenAPI.json +++ b/reference/readonly-sdks/ruby/OpenAPI.json @@ -2834,6 +2834,7 @@ }, "unit_off_formula": { "type": "string", + "description": "Formula used to calculate the number of units.", "nullable": true }, "unit_type": { @@ -15716,7 +15717,7 @@ }, "discount_amount": { "type": "integer", - "description": "Sum of all order-level discounts applied to the order.", + "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "items": { @@ -15783,47 +15784,47 @@ }, "amount": { "type": "integer", - "description": "A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.", + "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "initial_amount": { "type": "integer", - "description": "A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.", + "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "discount_amount": { "type": "integer", - "description": "Sum of all order-level discounts applied to the order.", + "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "items_discount_amount": { "type": "integer", - "description": "Sum of all product-specific discounts applied to the order.", + "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "total_discount_amount": { "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied to the order.", + "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "total_amount": { "type": "integer", - "description": "Order amount after undoing all the discounts through the rollback redemption.", + "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "applied_discount_amount": { "type": "integer", - "description": "This field shows the order-level discount applied.", + "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "items_applied_discount_amount": { "type": "integer", - "description": "Sum of all product-specific discounts applied in a particular request. \n`sum(items, i => i.applied_discount_amount)`", + "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", "nullable": true }, "total_applied_discount_amount": { "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", + "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", "nullable": true }, "items": { @@ -16034,47 +16035,47 @@ }, "amount": { "type": "integer", - "description": "A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.", + "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "initial_amount": { "type": "integer", - "description": "A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.", + "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "discount_amount": { "type": "integer", - "description": "Sum of all order-level discounts applied to the order.", + "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "items_discount_amount": { "type": "integer", - "description": "Sum of all product-specific discounts applied to the order.", + "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "total_discount_amount": { "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied to the order.", + "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "total_amount": { "type": "integer", - "description": "Order amount after undoing all the discounts through the rollback redemption.", + "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "applied_discount_amount": { "type": "integer", - "description": "This field shows the order-level discount applied.", + "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "items_applied_discount_amount": { "type": "integer", - "description": "Sum of all product-specific discounts applied in a particular request. \n`sum(items, i => i.applied_discount_amount)`", + "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", "nullable": true }, "total_applied_discount_amount": { "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", + "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", "nullable": true }, "items": { @@ -16268,7 +16269,7 @@ }, "discount_amount": { "type": "integer", - "description": "Sum of all order-level discounts applied to the order.", + "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "items": { @@ -16335,47 +16336,47 @@ }, "amount": { "type": "integer", - "description": "A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.", + "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "initial_amount": { "type": "integer", - "description": "A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.", + "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "discount_amount": { "type": "integer", - "description": "Sum of all order-level discounts applied to the order.", + "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "items_discount_amount": { "type": "integer", - "description": "Sum of all product-specific discounts applied to the order.", + "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "total_discount_amount": { "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied to the order.", + "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "total_amount": { "type": "integer", - "description": "Order amount after undoing all the discounts through the rollback redemption.", + "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "applied_discount_amount": { "type": "integer", - "description": "This field shows the order-level discount applied.", + "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "items_applied_discount_amount": { "type": "integer", - "description": "Sum of all product-specific discounts applied in a particular request. \n`sum(items, i => i.applied_discount_amount)`", + "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", "nullable": true }, "total_applied_discount_amount": { "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", + "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", "nullable": true }, "items": { @@ -21323,47 +21324,47 @@ }, "amount": { "type": "integer", - "description": "A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.", + "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "initial_amount": { "type": "integer", - "description": "A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.", + "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "discount_amount": { "type": "integer", - "description": "Sum of all order-level discounts applied to the order.", + "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "items_discount_amount": { "type": "integer", - "description": "Sum of all product-specific discounts applied to the order.", + "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "total_discount_amount": { "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied to the order.", + "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "total_amount": { "type": "integer", - "description": "Order amount after undoing all the discounts through the rollback redemption.", + "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "applied_discount_amount": { "type": "integer", - "description": "This field shows the order-level discount applied.", + "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "items_applied_discount_amount": { "type": "integer", - "description": "Sum of all product-specific discounts applied in a particular request. \n`sum(items, i => i.applied_discount_amount)`", + "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", "nullable": true }, "total_applied_discount_amount": { "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", + "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", "nullable": true }, "items": { @@ -22225,47 +22226,47 @@ }, "amount": { "type": "integer", - "description": "A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.", + "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "initial_amount": { "type": "integer", - "description": "A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.", + "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "discount_amount": { "type": "integer", - "description": "Sum of all order-level discounts applied to the order.", + "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "items_discount_amount": { "type": "integer", - "description": "Sum of all product-specific discounts applied to the order.", + "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "total_discount_amount": { "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied to the order.", + "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "total_amount": { "type": "integer", - "description": "Order amount after undoing all the discounts through the rollback redemption.", + "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "applied_discount_amount": { "type": "integer", - "description": "This field shows the order-level discount applied.", + "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "items_applied_discount_amount": { "type": "integer", - "description": "Sum of all product-specific discounts applied in a particular request. \n`sum(items, i => i.applied_discount_amount)`", + "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", "nullable": true }, "total_applied_discount_amount": { "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", + "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", "nullable": true }, "items": { @@ -26350,6 +26351,7 @@ }, "unit_off_formula": { "type": "string", + "description": "Formula used to calculate the number of units.", "nullable": true }, "unit_type": { @@ -30285,6 +30287,7 @@ }, "unit_off_formula": { "type": "string", + "description": "Formula used to calculate the number of units.", "nullable": true }, "unit_type": { @@ -30362,6 +30365,7 @@ }, "unit_off_formula": { "type": "string", + "description": "Formula used to calculate the number of units.", "nullable": true }, "effect": { @@ -33975,7 +33979,7 @@ }, "discount_amount": { "type": "integer", - "description": "Sum of all order-level discounts applied to the order.", + "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "items": { @@ -34024,47 +34028,47 @@ }, "amount": { "type": "integer", - "description": "A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.", + "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "initial_amount": { "type": "integer", - "description": "A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.", + "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "discount_amount": { "type": "integer", - "description": "Sum of all order-level discounts applied to the order.", + "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "items_discount_amount": { "type": "integer", - "description": "Sum of all product-specific discounts applied to the order.", + "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "total_discount_amount": { "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied to the order.", + "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "total_amount": { "type": "integer", - "description": "Order amount after undoing all the discounts through the rollback redemption.", + "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "applied_discount_amount": { "type": "integer", - "description": "This field shows the order-level discount applied.", + "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "items_applied_discount_amount": { "type": "integer", - "description": "Sum of all product-specific discounts applied in a particular request. \n`sum(items, i => i.applied_discount_amount)`", + "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", "nullable": true }, "total_applied_discount_amount": { "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", + "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", "nullable": true }, "items": { @@ -36275,47 +36279,47 @@ }, "amount": { "type": "integer", - "description": "A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.", + "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "initial_amount": { "type": "integer", - "description": "A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.", + "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "discount_amount": { "type": "integer", - "description": "Sum of all order-level discounts applied to the order.", + "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "items_discount_amount": { "type": "integer", - "description": "Sum of all product-specific discounts applied to the order.", + "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "total_discount_amount": { "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied to the order.", + "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "total_amount": { "type": "integer", - "description": "Order amount after undoing all the discounts through the rollback redemption.", + "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "applied_discount_amount": { "type": "integer", - "description": "This field shows the order-level discount applied.", + "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", "nullable": true }, "items_applied_discount_amount": { "type": "integer", - "description": "Sum of all product-specific discounts applied in a particular request. \n`sum(items, i => i.applied_discount_amount)`", + "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", "nullable": true }, "total_applied_discount_amount": { "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", + "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", "nullable": true }, "items": { From bd10f0df59444b21b7e641b8e705231ff02ae646 Mon Sep 17 00:00:00 2001 From: p-woznikowski Date: Thu, 12 Dec 2024 13:35:11 +0100 Subject: [PATCH 11/23] remove bundle_rules --- ...VALIDATION-RULES-Validation-Rule-Object.md | 7 ------ production/readOnly-openAPI.json | 8 ------- reference/OpenAPI.json | 3 --- reference/readonly-sdks/java/OpenAPI.json | 23 ------------------- reference/readonly-sdks/php/OpenAPI.json | 23 ------------------- reference/readonly-sdks/python/OpenAPI.json | 23 ------------------- reference/readonly-sdks/ruby/OpenAPI.json | 23 ------------------- 7 files changed, 110 deletions(-) diff --git a/docs/reference-docs/VALIDATION-RULES-Validation-Rule-Object.md b/docs/reference-docs/VALIDATION-RULES-Validation-Rule-Object.md index 8ae47be2..127df158 100644 --- a/docs/reference-docs/VALIDATION-RULES-Validation-Rule-Object.md +++ b/docs/reference-docs/VALIDATION-RULES-Validation-Rule-Object.md @@ -19,7 +19,6 @@ All of: |:-----|:--------| | name
`string` |

Custom, unique name for set of validation rules.

**Example:**

Business Validation Rule

| | rules | See: [Validation Rule Rules](#validation-rule-rules) | -| bundle_rules | See: [Validation Rule Bundle Rules](#validation-rule-bundle-rules) | | error
`object` |

Contains the error message returned from API when validation / redemption fails to meet requirements of defined rules.

AttributesDescription
message
string

The error message returned from API when validation / redemption fails to meet requirements of defined rules.

| | applicable_to
`object` |
AttributesDescription
excluded
array

Defines which items are excluded from a discount.

Array of Applicable To
included
array

Defines which items are included in a discount.

Array of Applicable To
included_all
boolean

Indicates whether all items are included in the discount.

| | type
`string` |

Type of validation rule.

Available values: `expression`, `basic`, `advanced`, `complex` | @@ -31,12 +30,6 @@ All of: | logic
`string` |

Defines the logic between the rules.

**Example:**

(1 and 2) and (3)

| | [propertyName]
`object` |

Contains the name of the validation rule.

AttributesDescription
name
string

Voucherify's specific rule name. The list of available names is provided below.

TypeName
Customercustomer.segment
customer.metadata*
Orderorder.amount
order.initial_amount
order.items.count
order.items.price_any
order.items.price_each
order.items.metadata_any
order.items.metadata_each
order.metadata*
Campaigncampaign.orders.amount_discounted
campaign.orders.amount
campaign.redemptions.count
campaign.redemptions.count.daily
campaign.redemptions.count.monthly
campaign.redemptions.customers_count
campaign.redemptions.customers_count.daily
campaign.redemptions.customers_count.monthly
Redemptionredemption.gift.amount
redemption.count.daily
redemption.count.monthly
redemption.count.per_customer
redemption.count.per_customer.daily
redemption.count.per_customer.monthly
redemption.api_key
redemption.count.per_api_key
redemption.user.login
redemption.count.per_user
redemption.metadata
redemption.reward.pay_with_points.points_used
Productproduct.id
product.price
product.quantity
product.discount_applicable
product.metadata*
product.metadata.aggregated_quantity
product.metadata.aggregated_amount
product.metadata.discount_applicable
product.metadata.match_all
SKUsku.id
sku.price
sku.quantity
sku.discount_applicable
Publicationpublication.redeemable_by_linked_customer
Custom Eventcustom_event.metadata*
Order itemsorder.items.every
order.items.any
order.items.none
order.items.cheapest
order.items.most_expensive

*Requires the property field to be defined.

property
string, null

Custom name for a metadata property associated with the condition to be satisfied. Required if the property name is any of the following:
customer_metadata
custom_event_metadata
order_items_metadata
order_metadata
product_metadata
redemption_metadata

conditionsSee: Validation Rule Conditions
rulesSee: Validation Rule Rules
error
object

Contains the error message returned from API when validation / redemption fails to meet requirements of defined rule.

AttributesDescription
message
string

The error message returned from API when validation / redemption fails to meet requirements of defined rule.

| -## Validation Rule Bundle Rules -| Attributes | Description | -|:-----|:--------| -| logic
`string` |

Defines the logic between the rules.

**Example:**

(1 and 2) and (3)

| -| [propertyName]
`object` |

Contains the name of the bundle rule.

AttributesDescription
name
string

Voucherify's specific bundle rule name. Currently, it is only order.items.any.

Available values: order.items.any
conditions
object

Defines the conditions of the bundle rule. The order items in the customer's cart must meet the conditions. Because the rule concerns order items, the only permissible condition is $is.

AttributesDescription
$is
array
Array of:
AttributesDescription
id
string

Unique identifier of the product, SKU, or collection assigned by Voucherify.

type
string

Type of the order item. It can be a product_or_sku or products_collection

Available values: product_or_sku, products_collection
object
string

Object used in the bundle rule. It can be a products_collection, product, or sku.

Available values: products_collection, product, sku
rules
error
object

CURRENTLY UNSUPPORTED. Contains the error message returned from API when validation / redemption fails to meet requirements of defined rule.

AttributesDescription
message
string

The error message returned from API when validation / redemption fails to meet requirements of defined rule.

| - ## Applicable To | Attributes | Description | |:-----|:--------| diff --git a/production/readOnly-openAPI.json b/production/readOnly-openAPI.json index 1891a810..9aa7c10d 100644 --- a/production/readOnly-openAPI.json +++ b/production/readOnly-openAPI.json @@ -26860,9 +26860,6 @@ "rules": { "$ref": "#/components/schemas/ValidationRuleRules" }, - "bundle_rules": { - "$ref": "#/components/schemas/ValidationRuleBundleRules" - }, "error": { "type": "object", "description": "Contains the error message returned from API when validation / redemption fails to meet requirements of defined rules.", @@ -26979,11 +26976,6 @@ } } }, - "ValidationRuleBundleRules": { - "title": "Validation Rule Bundle Rules", - "type": "object", - "description": "Contains all the definitions for the bundle rules. It is a set of key value pairs representing the rules and logic between them. The keys are numbered consecutively beginning from `1`. The values are objects containing the rule conditions.\n\nWhile updating with the PUT method, you can pass `\"bundle_rules\": null` to delete the configuration; in the response, an empty object is then returned." - }, "ValidationRuleRules": { "title": "Validation Rule Rules", "type": "object", diff --git a/reference/OpenAPI.json b/reference/OpenAPI.json index 27e136f8..301c3bda 100644 --- a/reference/OpenAPI.json +++ b/reference/OpenAPI.json @@ -29991,9 +29991,6 @@ "rules": { "$ref": "#/components/schemas/ValidationRuleRules" }, - "bundle_rules": { - "$ref": "#/components/schemas/ValidationRuleBundleRules" - }, "error": { "type": "object", "description": "Contains the error message returned from API when validation / redemption fails to meet requirements of defined rules.", diff --git a/reference/readonly-sdks/java/OpenAPI.json b/reference/readonly-sdks/java/OpenAPI.json index e99e2585..5a1bf4d6 100644 --- a/reference/readonly-sdks/java/OpenAPI.json +++ b/reference/readonly-sdks/java/OpenAPI.json @@ -25309,9 +25309,6 @@ "rules": { "$ref": "#/components/schemas/ValidationRuleRules" }, - "bundle_rules": { - "$ref": "#/components/schemas/ValidationRuleBundleRules" - }, "error": { "title": "ValidationRulesCreateRequestBodyError", "type": "object", @@ -25446,9 +25443,6 @@ "rules": { "$ref": "#/components/schemas/ValidationRuleRules" }, - "bundle_rules": { - "$ref": "#/components/schemas/ValidationRuleBundleRules" - }, "error": { "title": "ValidationRulesCreateResponseBodyError", "type": "object", @@ -25614,9 +25608,6 @@ "rules": { "$ref": "#/components/schemas/ValidationRuleRules" }, - "bundle_rules": { - "$ref": "#/components/schemas/ValidationRuleBundleRules" - }, "error": { "title": "ValidationRulesGetResponseBodyError", "type": "object", @@ -25816,9 +25807,6 @@ "rules": { "$ref": "#/components/schemas/ValidationRuleRules" }, - "bundle_rules": { - "$ref": "#/components/schemas/ValidationRuleBundleRules" - }, "error": { "title": "ValidationRulesUpdateRequestBodyError", "type": "object", @@ -25953,9 +25941,6 @@ "rules": { "$ref": "#/components/schemas/ValidationRuleRules" }, - "bundle_rules": { - "$ref": "#/components/schemas/ValidationRuleBundleRules" - }, "error": { "title": "ValidationRulesUpdateResponseBodyError", "type": "object", @@ -38297,9 +38282,6 @@ "rules": { "$ref": "#/components/schemas/ValidationRuleRules" }, - "bundle_rules": { - "$ref": "#/components/schemas/ValidationRuleBundleRules" - }, "error": { "title": "ValidationRuleError", "type": "object", @@ -38540,11 +38522,6 @@ }, "required": [] }, - "ValidationRuleBundleRules": { - "title": "ValidationRuleBundleRules", - "type": "object", - "description": "Contains all the definitions for the bundle rules. It is a set of key value pairs representing the rules and logic between them. The keys are numbered consecutively beginning from `1`. The values are objects containing the rule conditions.\n\nWhile updating with the PUT method, you can pass `\"bundle_rules\": null` to delete the configuration; in the response, an empty object is then returned." - }, "ValidationRuleRules": { "title": "ValidationRuleRules", "type": "object", diff --git a/reference/readonly-sdks/php/OpenAPI.json b/reference/readonly-sdks/php/OpenAPI.json index 679ee60c..fbfb0d6f 100644 --- a/reference/readonly-sdks/php/OpenAPI.json +++ b/reference/readonly-sdks/php/OpenAPI.json @@ -26144,9 +26144,6 @@ "rules": { "$ref": "#/components/schemas/ValidationRuleRules" }, - "bundle_rules": { - "$ref": "#/components/schemas/ValidationRuleBundleRules" - }, "error": { "title": "ValidationRulesCreateRequestBodyError", "type": "object", @@ -26281,9 +26278,6 @@ "rules": { "$ref": "#/components/schemas/ValidationRuleRules" }, - "bundle_rules": { - "$ref": "#/components/schemas/ValidationRuleBundleRules" - }, "error": { "title": "ValidationRulesCreateResponseBodyError", "type": "object", @@ -26449,9 +26443,6 @@ "rules": { "$ref": "#/components/schemas/ValidationRuleRules" }, - "bundle_rules": { - "$ref": "#/components/schemas/ValidationRuleBundleRules" - }, "error": { "title": "ValidationRulesGetResponseBodyError", "type": "object", @@ -26651,9 +26642,6 @@ "rules": { "$ref": "#/components/schemas/ValidationRuleRules" }, - "bundle_rules": { - "$ref": "#/components/schemas/ValidationRuleBundleRules" - }, "error": { "title": "ValidationRulesUpdateRequestBodyError", "type": "object", @@ -26788,9 +26776,6 @@ "rules": { "$ref": "#/components/schemas/ValidationRuleRules" }, - "bundle_rules": { - "$ref": "#/components/schemas/ValidationRuleBundleRules" - }, "error": { "title": "ValidationRulesUpdateResponseBodyError", "type": "object", @@ -39512,9 +39497,6 @@ "rules": { "$ref": "#/components/schemas/ValidationRuleRules" }, - "bundle_rules": { - "$ref": "#/components/schemas/ValidationRuleBundleRules" - }, "error": { "title": "ValidationRuleError", "type": "object", @@ -39755,11 +39737,6 @@ }, "required": [] }, - "ValidationRuleBundleRules": { - "title": "ValidationRuleBundleRules", - "type": "object", - "description": "Contains all the definitions for the bundle rules. It is a set of key value pairs representing the rules and logic between them. The keys are numbered consecutively beginning from `1`. The values are objects containing the rule conditions.\n\nWhile updating with the PUT method, you can pass `\"bundle_rules\": null` to delete the configuration; in the response, an empty object is then returned." - }, "ValidationRuleRules": { "title": "ValidationRuleRules", "type": "object", diff --git a/reference/readonly-sdks/python/OpenAPI.json b/reference/readonly-sdks/python/OpenAPI.json index 7401691a..fa2f5599 100644 --- a/reference/readonly-sdks/python/OpenAPI.json +++ b/reference/readonly-sdks/python/OpenAPI.json @@ -25109,9 +25109,6 @@ "rules": { "$ref": "#/components/schemas/ValidationRuleRules" }, - "bundle_rules": { - "$ref": "#/components/schemas/ValidationRuleBundleRules" - }, "error": { "title": "ValidationRulesCreateRequestBodyError", "type": "object", @@ -25246,9 +25243,6 @@ "rules": { "$ref": "#/components/schemas/ValidationRuleRules" }, - "bundle_rules": { - "$ref": "#/components/schemas/ValidationRuleBundleRules" - }, "error": { "title": "ValidationRulesCreateResponseBodyError", "type": "object", @@ -25414,9 +25408,6 @@ "rules": { "$ref": "#/components/schemas/ValidationRuleRules" }, - "bundle_rules": { - "$ref": "#/components/schemas/ValidationRuleBundleRules" - }, "error": { "title": "ValidationRulesGetResponseBodyError", "type": "object", @@ -25616,9 +25607,6 @@ "rules": { "$ref": "#/components/schemas/ValidationRuleRules" }, - "bundle_rules": { - "$ref": "#/components/schemas/ValidationRuleBundleRules" - }, "error": { "title": "ValidationRulesUpdateRequestBodyError", "type": "object", @@ -25753,9 +25741,6 @@ "rules": { "$ref": "#/components/schemas/ValidationRuleRules" }, - "bundle_rules": { - "$ref": "#/components/schemas/ValidationRuleBundleRules" - }, "error": { "title": "ValidationRulesUpdateResponseBodyError", "type": "object", @@ -37742,9 +37727,6 @@ "rules": { "$ref": "#/components/schemas/ValidationRuleRules" }, - "bundle_rules": { - "$ref": "#/components/schemas/ValidationRuleBundleRules" - }, "error": { "title": "ValidationRuleError", "type": "object", @@ -37985,11 +37967,6 @@ }, "required": [] }, - "ValidationRuleBundleRules": { - "title": "ValidationRuleBundleRules", - "type": "object", - "description": "Contains all the definitions for the bundle rules. It is a set of key value pairs representing the rules and logic between them. The keys are numbered consecutively beginning from `1`. The values are objects containing the rule conditions.\n\nWhile updating with the PUT method, you can pass `\"bundle_rules\": null` to delete the configuration; in the response, an empty object is then returned." - }, "ValidationRuleRules": { "title": "ValidationRuleRules", "type": "object", diff --git a/reference/readonly-sdks/ruby/OpenAPI.json b/reference/readonly-sdks/ruby/OpenAPI.json index 4b824e42..04906e01 100644 --- a/reference/readonly-sdks/ruby/OpenAPI.json +++ b/reference/readonly-sdks/ruby/OpenAPI.json @@ -25343,9 +25343,6 @@ "rules": { "$ref": "#/components/schemas/ValidationRuleRules" }, - "bundle_rules": { - "$ref": "#/components/schemas/ValidationRuleBundleRules" - }, "error": { "title": "ValidationRulesCreateRequestBodyError", "type": "object", @@ -25480,9 +25477,6 @@ "rules": { "$ref": "#/components/schemas/ValidationRuleRules" }, - "bundle_rules": { - "$ref": "#/components/schemas/ValidationRuleBundleRules" - }, "error": { "title": "ValidationRulesCreateResponseBodyError", "type": "object", @@ -25648,9 +25642,6 @@ "rules": { "$ref": "#/components/schemas/ValidationRuleRules" }, - "bundle_rules": { - "$ref": "#/components/schemas/ValidationRuleBundleRules" - }, "error": { "title": "ValidationRulesGetResponseBodyError", "type": "object", @@ -25850,9 +25841,6 @@ "rules": { "$ref": "#/components/schemas/ValidationRuleRules" }, - "bundle_rules": { - "$ref": "#/components/schemas/ValidationRuleBundleRules" - }, "error": { "title": "ValidationRulesUpdateRequestBodyError", "type": "object", @@ -25987,9 +25975,6 @@ "rules": { "$ref": "#/components/schemas/ValidationRuleRules" }, - "bundle_rules": { - "$ref": "#/components/schemas/ValidationRuleBundleRules" - }, "error": { "title": "ValidationRulesUpdateResponseBodyError", "type": "object", @@ -38331,9 +38316,6 @@ "rules": { "$ref": "#/components/schemas/ValidationRuleRules" }, - "bundle_rules": { - "$ref": "#/components/schemas/ValidationRuleBundleRules" - }, "error": { "title": "ValidationRuleError", "type": "object", @@ -38574,11 +38556,6 @@ }, "required": [] }, - "ValidationRuleBundleRules": { - "title": "ValidationRuleBundleRules", - "type": "object", - "description": "Contains all the definitions for the bundle rules. It is a set of key value pairs representing the rules and logic between them. The keys are numbered consecutively beginning from `1`. The values are objects containing the rule conditions.\n\nWhile updating with the PUT method, you can pass `\"bundle_rules\": null` to delete the configuration; in the response, an empty object is then returned." - }, "ValidationRuleRules": { "title": "ValidationRuleRules", "type": "object", From 08f2accfb517cbdc26ed493cc19fbddd5b224b45 Mon Sep 17 00:00:00 2001 From: p-woznikowski Date: Thu, 12 Dec 2024 18:09:42 +0100 Subject: [PATCH 12/23] =?UTF-8?q?EVENTS=20=E2=80=93=20unit=20discount,=20v?= =?UTF-8?q?alrulebundlerules=20schema?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- changelog/OPEN-API.md | 4 + reference/OpenAPIWebhooks.json | 504 +++++++++++++++++++++++++++------ 2 files changed, 419 insertions(+), 89 deletions(-) diff --git a/changelog/OPEN-API.md b/changelog/OPEN-API.md index 376a8ae7..5389272a 100644 --- a/changelog/OPEN-API.md +++ b/changelog/OPEN-API.md @@ -4,6 +4,10 @@ Older changes in [DEPRECATED.md](deprecated/DEPRECATED.md) +## 2024-12-12 + +Remvoed `bundle_rules` from the `ValidationRuleBase` schema – the feature is not released yet + ## 2024-12-05 - Added the `order_item_units` array to the `ApplicableTo` schema diff --git a/reference/OpenAPIWebhooks.json b/reference/OpenAPIWebhooks.json index 1748c9fa..670cf08c 100644 --- a/reference/OpenAPIWebhooks.json +++ b/reference/OpenAPIWebhooks.json @@ -7621,6 +7621,72 @@ ], "title": "Any" }, + "AnyOne": { + "title": "Any", + "type": "array", + "items": { + "oneOf": [ + { + "title": "string", + "type": "string" + }, + { + "title": "string - date", + "type": "string", + "format": "date" + }, + { + "title": "string - date-time", + "type": "string", + "format": "date-time" + }, + { + "title": "number", + "type": "number" + }, + { + "title": "object", + "type": "object" + } + ] + }, + "maxItems": 1 + }, + "AnyNumber": { + "title": "Any Number", + "type": "array", + "items": { + "type": "number", + "minimum": 0 + }, + "maxItems": 1 + }, + "AnyString": { + "title": "Any String", + "type": "array", + "items": { + "type": "string" + } + }, + "AnyDateDateTime": { + "title": "Any Date and Date-Time", + "type": "array", + "items": { + "oneOf": [ + { + "type": "string", + "title": "Date", + "format": "date" + }, + { + "type": "string", + "title": "Date-time", + "format": "date-time" + } + ] + }, + "maxItems": 1 + }, "ApplicableTo": { "title": "Applicable To", "type": "object", @@ -7687,11 +7753,31 @@ }, "order_item_indices": { "type": "array", - "description": "Determines the order in which the discount is applied to the products or SKUs sent in the `order` object in the request. The counting begins from `0`.", + "description": "Lists which order lines are (not) covered by the discount. The order in the array is determined by the sequence of applied discounts, while the numbers correspond to the order lines sent in the `order` object in the request. The first order line is assigned `0`, the second order line is assigned `1`, and so on.", "items": { "type": "integer" } }, + "order_item_units": { + "type": "array", + "description": "Lists which units within order lines are covered by the discount. The order line items are listed according to sequence of applied discounts while the `index` corresponds to the order line sent in the `order` object in the request.", + "items": { + "type": "object", + "properties": { + "index": { + "type": "integer", + "description": "Number assigned to the order line item in accordance with the order sent in the request." + }, + "units": { + "type": "array", + "description": "Numbers of units in the order line covered by the discount; e.g. `2, 5, 8` for 10 units with the setting `\"skip_initially\": 1`, `\"repeat\": 3`. The counting of units starts from `1`.", + "items": { + "type": "integer" + } + } + } + } + }, "repeat": { "type": "integer", "description": "Determines the recurrence of the discount, e.g. `\"repeat\": 3` means that the discount is applied to every third item." @@ -7702,9 +7788,10 @@ }, "target": { "type": "string", - "description": "Determines to which kinds of objects the discount is applicable. `\"ITEM\"` includes products and SKUs.", + "description": "Determines to which kinds of objects the discount is applicable. `ITEM` includes products and SKUs. `UNIT` means particular units within an order line.", "enum": [ - "ITEM" + "ITEM", + "UNIT" ] } }, @@ -17314,23 +17401,23 @@ { "title": "Validation Rule", "type": "object", - "description": "Object representing a validation rule.", + "description": "This is an object representing a response validation rule.", "properties": { "id": { "type": "string", "example": "val_eR1c41hu0vUU", - "description": "Unique identifier of the validation rule." + "description": "Unique validation rule ID." }, "created_at": { "type": "string", "example": "2022-03-23T07:44:00.444Z", - "description": "Timestamp representing the date and time when the validation rule was created in the ISO 8601 format.", + "description": "Timestamp representing the date and time when the validation rule was created. The value is shown in the ISO 8601 format.", "format": "date-time" }, "updated_at": { "type": "string", "example": "2022-04-26T08:35:54.960Z", - "description": "Timestamp representing the date and time when the validation rule was updated in the ISO 8601 format.", + "description": "Timestamp representing the date and time when the validation rule was updated. The value is shown in the ISO 8601 format.", "format": "date-time" }, "assignments_count": { @@ -17490,11 +17577,11 @@ "ValidationRuleBase": { "title": "Validation Rule Base", "type": "object", - "description": "Object representing a validation rule.", + "description": "This is an object representing a request validation rule.", "properties": { "name": { "type": "string", - "description": "Custom name for the validation rule.", + "description": "Custom, unique name for set of validation rules.", "example": "Business Validation Rule" }, "rules": { @@ -17502,11 +17589,11 @@ }, "error": { "type": "object", - "description": "Contains the error message returned from the API when validation / redemption fails to meet requirements of defined rules.", + "description": "Contains the error message returned from API when validation / redemption fails to meet requirements of defined rules.", "properties": { "message": { "type": "string", - "description": "The error message returned from the API when validation / redemption fails to meet requirements of defined rules." + "description": "The error message returned from API when validation / redemption fails to meet requirements of defined rules." } } }, @@ -17604,7 +17691,136 @@ "reward_assignment.pay_with_points", "global" ], - "description": "Validation rule context type." + "description": "Validation rule context type. \n\n| **Context Type** | **Definition** |\n|:---|:---|\n| earning_rule.order.paid | |\n| earning_rule.custom_event | |\n| earning_rule.customer.segment.entered | |\n| campaign.discount_coupons | |\n| campaign.discount_coupons.discount.apply_to_order | |\n| campaign.discount_coupons.discount.apply_to_items | |\n| campaign.discount_coupons.discount.apply_to_items_proportionally | |\n| campaign.discount_coupons.discount.apply_to_items_proportionally_by_quantity | |\n| campaign.discount_coupons.discount.fixed.apply_to_items | |\n| campaign.gift_vouchers | |\n| campaign.gift_vouchers.gift.apply_to_order | |\n| campaign.gift_vouchers.gift.apply_to_items | |\n| campaign.referral_program | |\n| campaign.referral_program.discount.apply_to_order | |\n| campaign.referral_program.discount.apply_to_items | |\n| campaign.referral_program.discount.apply_to_items_proportionally | |\n| campaign.referral_program.discount.apply_to_items_proportionally_by_quantity | |\n| campaign.referral_program.discount.fixed.apply_to_items | |\n| campaign.promotion | |\n| campaign.promotion.discount.apply_to_order | |\n| campaign.promotion.discount.apply_to_items | |\n| campaign.promotion.discount.apply_to_items_proportionally | |\n| campaign.promotion.discount.apply_to_items_proportionally_by_quantity | |\n| campaign.promotion.discount.fixed.apply_to_items | |\n| campaign.loyalty_program | |\n| voucher.discount_voucher | |\n| voucher.discount_voucher.discount.apply_to_order | |\n| voucher.discount_voucher.discount.apply_to_items | |\n| voucher.discount_voucher.discount.apply_to_items_proportionally | |\n| voucher.discount_voucher.discount.apply_to_items_proportionally_by_quantity | |\n| voucher.discount_voucher.discount.fixed.apply_to_items | |\n| voucher.gift_voucher | |\n| voucher.gift_voucher.gift.apply_to_order | |\n| voucher.gift_voucher.gift.apply_to_items | |\n| voucher.loyalty_card | |\n| distribution.custom_event | |\n| reward_assignment.pay_with_points | |\n| global | |" + } + } + }, + "ValidationRuleBundleRules": { + "title": "Validation Rule Bundle Rules", + "type": "object", + "description": "Contains all the definitions for the bundle rules. It is a set of key value pairs representing the rules and logic between them. The keys are numbered consecutively beginning from `1`. The values are objects containing the rule conditions.\n\nWhile updating with the PUT method, you can pass `\"bundle_rules\": null` to delete the configuration; in the response, an empty object is then returned.", + "properties": { + "logic": { + "type": "string", + "example": "(1 and 2) and (3)", + "description": "Defines the logic between the rules." + } + }, + "additionalProperties": { + "type": "object", + "description": "Contains the name of the bundle rule.", + "properties": { + "name": { + "type": "string", + "description": "Voucherify's specific bundle rule name. Currently, it is only `order.items.any`.", + "enum": [ + "order.items.any" + ] + }, + "conditions": { + "type": "object", + "description": "Defines the conditions of the bundle rule. The order items in the customer's cart must meet the conditions. Because the rule concerns order items, the only permissible condition is `$is`.", + "properties": { + "$is": { + "type": "array", + "maxItems": 1, + "items": { + "type": "object", + "description": "", + "properties": { + "id": { + "type": "string", + "description": "Unique identifier of the product, SKU, or collection assigned by Voucherify." + }, + "type": { + "type": "string", + "description": "Type of the order item. It can be a `product_or_sku` or `products_collection`", + "enum": [ + "product_or_sku", + "products_collection" + ] + }, + "object": { + "type": "string", + "description": "Object used in the bundle rule. It can be a `products_collection`, `product`, or `sku`.", + "enum": [ + "products_collection", + "product", + "sku" + ] + } + }, + "required": [ + "id", + "type", + "object" + ] + } + } + } + }, + "rules": { + "properties": { + "logic": { + "type": "string", + "example": "(1 and 2) and (3)", + "description": "Defines the logic between the sub-rules." + } + }, + "additionalProperties": { + "type": "object", + "description": "Contains the name of the validation sub-rule.", + "maxProperties": 1, + "properties": { + "name": { + "type": "string", + "description": "Voucherify's specific sub-rule name. Currently, it is only `order.items.aggregated_quantity`.", + "enum": [ + "order.items.aggregated_quantity" + ] + }, + "conditions": { + "type": "object", + "description": "Defines the conditions of the bundle rule. The quantity of order items in the customer's cart must meet the conditions.", + "properties": { + "$more_than_or_equal": { + "type": "array", + "maxItems": 1, + "items": { + "type": "number", + "minimum": 1, + "description": "The number of units in the customer's cart must be equal or higher than the defined number." + } + } + } + }, + "rules": { + "type": "object", + "description": "An empty object." + }, + "error": { + "type": "object", + "description": "**CURRENTLY UNSUPPORTED**. Contains the error message returned from API when validation / redemption fails to meet requirements of defined rule.", + "properties": { + "message": { + "type": "string", + "description": "The error message returned from API when validation / redemption fails to meet requirements of defined rule." + } + } + } + } + } + }, + "error": { + "type": "object", + "description": "**CURRENTLY UNSUPPORTED**. Contains the error message returned from API when validation / redemption fails to meet requirements of defined rule.", + "properties": { + "message": { + "type": "string", + "description": "The error message returned from API when validation / redemption fails to meet requirements of defined rule." + } + } + } } } }, @@ -17621,68 +17837,54 @@ }, "additionalProperties": { "type": "object", - "description": "Contains the details about the point balances left on loyalty cards and the number of referred customers in each campaign.", + "description": "Contains the name of the validation rule.", "properties": { "name": { "type": "string", - "description": "Voucherify specific rule name.", - "enum": [ - "customer.segment", - "customer.metadata", - "order.amount", - "order.initial_amount", - "order.items.count", - "order.items.price_any", - "order.items.price_each", - "order.items.metadata_any", - "order.items.metadata_each", - "order.metadata", - "campaign.orders.amount_discounted", - "campaign.orders.amount", - "campaign.redemptions.count", - "campaign.redemptions.count.daily", - "campaign.redemptions.count.monthly", - "campaign.redemptions.customers_count", - "campaign.redemptions.customers_count.daily", - "campaign.redemptions.customers_count.monthly", - "redemption.gift.amount", - "redemption.count.daily", - "redemption.count.monthly", - "redemption.count.per_customer", - "redemption.count.per_customer.daily", - "redemption.count.per_customer.monthly", - "redemption.api_key", - "redemption.count.per_api_key", - "redemption.user.login", - "redemption.count.per_user", - "redemption.metadata*", - "redemption.reward.pay_with_points.points_used", - "product.id", - "product.price", - "product.quantity", - "product.discount_applicable", - "product.metadata*", - "product.metadata.aggregated_quantity", - "product.metadata.aggregated_amount", - "product.metadata.discount_applicable", - "product.metadata.match_all", - "sku.id", - "sku.price", - "sku.quantity", - "sku.discount_applicable", - "publication.redeemable_by_linked_customer", - "custom_event.metadata", - "order.items.every", - "order.items.any", - "order.items.none", - "order.items.cheapest", - "order.items.most_expensive", - "order.items.quantity", - "order.items.aggregated_quantity", - "order.items.price", - "order.items.aggregated_amount", - "order.items.metadata" - ] + "description": "Voucherify's specific rule name. The list of available names is provided below. \n\n|**Type**|**Name** |\n---- | -----------|\n|**Customer** | customer.segment
customer.metadata* |\n|**Order** |order.amount
order.initial_amount
order.items.count
order.items.price_any
order.items.price_each
order.items.metadata_any
order.items.metadata_each
order.metadata* |\n| **Campaign** | campaign.orders.amount_discounted
campaign.orders.amount
campaign.redemptions.count
campaign.redemptions.count.daily
campaign.redemptions.count.monthly
campaign.redemptions.customers_count
campaign.redemptions.customers_count.daily
campaign.redemptions.customers_count.monthly |\n| **Redemption** |redemption.gift.amount
redemption.count.daily
redemption.count.monthly
redemption.count.per_customer
redemption.count.per_customer.daily
redemption.count.per_customer.monthly
redemption.api_key
redemption.count.per_api_key
redemption.user.login
redemption.count.per_user
redemption.metadata
redemption.reward.pay_with_points.points_used |\n| **Product** | product.id
product.price
product.quantity
product.discount_applicable
product.metadata*
product.metadata.aggregated_quantity
product.metadata.aggregated_amount
product.metadata.discount_applicable
product.metadata.match_all |\n| **SKU** | sku.id
sku.price
sku.quantity
sku.discount_applicable |\n| **Publication** | publication.redeemable_by_linked_customer |\n| **Custom Event** | custom_event.metadata* |\n| **Order items** | order.items.every
order.items.any
order.items.none
order.items.cheapest
order.items.most_expensive | order.items.quantity
order.items.aggregated_quantity
order.items.price
order.items.aggregated_amount
order.items.metadata* | \n\n\n\n*Requires the `property` field to be defined." + }, + "property": { + "type": "string", + "nullable": true, + "description": "Custom name for a metadata property associated with the condition to be satisfied. **Required** if the property `name` is any of the following: \n customer_metadata
custom_event_metadata
order_items_metadata
order_metadata
product_metadata
redemption_metadata" + }, + "conditions": { + "$ref": "#/components/schemas/ValidationRuleConditions" + }, + "rules": { + "$ref": "#/components/schemas/ValidationRuleRules01" + }, + "error": { + "type": "object", + "description": "Contains the error message returned from API when validation / redemption fails to meet requirements of defined rule.", + "properties": { + "message": { + "type": "string", + "description": "The error message returned from API when validation / redemption fails to meet requirements of defined rule." + } + } + } + } + } + }, + "ValidationRuleRules01": { + "title": "Validation Rule Rules", + "type": "object", + "description": "Contains all the rule definitions for the validation rule. It is a set of key value pairs representing the rules and logic between the rules. The keys are numbered consecutively beginning from `1`. The values are objects containing the rule conditions.", + "properties": { + "logic": { + "type": "string", + "example": "(1 and 2) and (3)", + "description": "Defines the logic between the rules." + } + }, + "additionalProperties": { + "type": "object", + "description": "Contains the name of the validation rule.", + "properties": { + "name": { + "type": "string", + "description": "Voucherify's specific rule name. The list of available names is provided below. \n\n|**Type**|**Name** |\n---- | -----------|\n|**Customer** | customer.segment
customer.metadata* |\n|**Order** |order.amount
order.initial_amount
order.items.count
order.items.price_any
order.items.price_each
order.items.metadata_any
order.items.metadata_each
order.metadata* |\n| **Campaign** | campaign.orders.amount_discounted
campaign.orders.amount
campaign.redemptions.count
campaign.redemptions.count.daily
campaign.redemptions.count.monthly
campaign.redemptions.customers_count
campaign.redemptions.customers_count.daily
campaign.redemptions.customers_count.monthly |\n| **Redemption** |redemption.gift.amount
redemption.count.daily
redemption.count.monthly
redemption.count.per_customer
redemption.count.per_customer.daily
redemption.count.per_customer.monthly
redemption.api_key
redemption.count.per_api_key
redemption.user.login
redemption.count.per_user
redemption.metadata
redemption.reward.pay_with_points.points_used |\n| **Product** | product.id
product.price
product.quantity
product.discount_applicable
product.metadata*
product.metadata.aggregated_quantity
product.metadata.aggregated_amount
product.metadata.discount_applicable
product.metadata.match_all |\n| **SKU** | sku.id
sku.price
sku.quantity
sku.discount_applicable |\n| **Publication** | publication.redeemable_by_linked_customer |\n| **Custom Event** | custom_event.metadata* |\n| **Order items** | order.items.every
order.items.any
order.items.none
order.items.cheapest
order.items.most_expensive | order.items.quantity
order.items.aggregated_quantity
order.items.price
order.items.aggregated_amount
order.items.metadata* | \n\n\n\n*Requires the `property` field to be defined." }, "property": { "type": "string", @@ -17693,16 +17895,102 @@ "$ref": "#/components/schemas/ValidationRuleConditions" }, "rules": { + "$ref": "#/components/schemas/ValidationRuleRules02" + }, + "error": { "type": "object", - "description": "Validation rule object nested within the current validation rule." + "description": "Contains the error message returned from API when validation / redemption fails to meet requirements of defined rule.", + "properties": { + "message": { + "type": "string", + "description": "The error message returned from API when validation / redemption fails to meet requirements of defined rule." + } + } + } + } + } + }, + "ValidationRuleRules02": { + "title": "Validation Rule Rules", + "type": "object", + "description": "Contains all the rule definitions for the validation rule. It is a set of key value pairs representing the rules and logic between the rules. The keys are numbered consecutively beginning from `1`. The values are objects containing the rule conditions.", + "properties": { + "logic": { + "type": "string", + "example": "(1 and 2) and (3)", + "description": "Defines the logic between the rules." + } + }, + "additionalProperties": { + "type": "object", + "description": "Contains the name of the validation rule.", + "properties": { + "name": { + "type": "string", + "description": "Voucherify's specific rule name. The list of available names is provided below. \n\n|**Type**|**Name** |\n---- | -----------|\n|**Customer** | customer.segment
customer.metadata* |\n|**Order** |order.amount
order.initial_amount
order.items.count
order.items.price_any
order.items.price_each
order.items.metadata_any
order.items.metadata_each
order.metadata* |\n| **Campaign** | campaign.orders.amount_discounted
campaign.orders.amount
campaign.redemptions.count
campaign.redemptions.count.daily
campaign.redemptions.count.monthly
campaign.redemptions.customers_count
campaign.redemptions.customers_count.daily
campaign.redemptions.customers_count.monthly |\n| **Redemption** |redemption.gift.amount
redemption.count.daily
redemption.count.monthly
redemption.count.per_customer
redemption.count.per_customer.daily
redemption.count.per_customer.monthly
redemption.api_key
redemption.count.per_api_key
redemption.user.login
redemption.count.per_user
redemption.metadata
redemption.reward.pay_with_points.points_used |\n| **Product** | product.id
product.price
product.quantity
product.discount_applicable
product.metadata*
product.metadata.aggregated_quantity
product.metadata.aggregated_amount
product.metadata.discount_applicable
product.metadata.match_all |\n| **SKU** | sku.id
sku.price
sku.quantity
sku.discount_applicable |\n| **Publication** | publication.redeemable_by_linked_customer |\n| **Custom Event** | custom_event.metadata* |\n| **Order items** | order.items.every
order.items.any
order.items.none
order.items.cheapest
order.items.most_expensive | order.items.quantity
order.items.aggregated_quantity
order.items.price
order.items.aggregated_amount
order.items.metadata* | \n\n\n\n*Requires the `property` field to be defined." + }, + "property": { + "type": "string", + "nullable": true, + "description": "Custom name for a metadata property associated with the condition to be satisfied. **Required** if the property `name` is any of the following: \n customer_metadata
custom_event_metadata
order_items_metadata
order_metadata
product_metadata
redemption_metadata" + }, + "conditions": { + "$ref": "#/components/schemas/ValidationRuleConditions" + }, + "rules": { + "$ref": "#/components/schemas/ValidationRuleRules03" }, "error": { "type": "object", - "description": "Contains the error message returned from the API when validation / redemption fails to meet requirements of defined rule.", + "description": "Contains the error message returned from API when validation / redemption fails to meet requirements of defined rule.", "properties": { "message": { "type": "string", - "description": "The error message returned from the API when validation / redemption fails to meet requirements of defined rule." + "description": "The error message returned from API when validation / redemption fails to meet requirements of defined rule." + } + } + } + } + } + }, + "ValidationRuleRules03": { + "title": "Validation Rule Rules", + "type": "object", + "description": "Contains all the rule definitions for the validation rule. It is a set of key value pairs representing the rules and logic between the rules. The keys are numbered consecutively beginning from `1`. The values are objects containing the rule conditions.", + "properties": { + "logic": { + "type": "string", + "example": "(1 and 2) and (3)", + "description": "Defines the logic between the rules." + } + }, + "additionalProperties": { + "type": "object", + "description": "Contains the name of the validation rule.", + "properties": { + "name": { + "type": "string", + "description": "Voucherify's specific rule name. The list of available names is provided below. \n\n|**Type**|**Name** |\n---- | -----------|\n|**Customer** | customer.segment
customer.metadata* |\n|**Order** |order.amount
order.initial_amount
order.items.count
order.items.price_any
order.items.price_each
order.items.metadata_any
order.items.metadata_each
order.metadata* |\n| **Campaign** | campaign.orders.amount_discounted
campaign.orders.amount
campaign.redemptions.count
campaign.redemptions.count.daily
campaign.redemptions.count.monthly
campaign.redemptions.customers_count
campaign.redemptions.customers_count.daily
campaign.redemptions.customers_count.monthly |\n| **Redemption** |redemption.gift.amount
redemption.count.daily
redemption.count.monthly
redemption.count.per_customer
redemption.count.per_customer.daily
redemption.count.per_customer.monthly
redemption.api_key
redemption.count.per_api_key
redemption.user.login
redemption.count.per_user
redemption.metadata
redemption.reward.pay_with_points.points_used |\n| **Product** | product.id
product.price
product.quantity
product.discount_applicable
product.metadata*
product.metadata.aggregated_quantity
product.metadata.aggregated_amount
product.metadata.discount_applicable
product.metadata.match_all |\n| **SKU** | sku.id
sku.price
sku.quantity
sku.discount_applicable |\n| **Publication** | publication.redeemable_by_linked_customer |\n| **Custom Event** | custom_event.metadata* |\n| **Order items** | order.items.every
order.items.any
order.items.none
order.items.cheapest
order.items.most_expensive | order.items.quantity
order.items.aggregated_quantity
order.items.price
order.items.aggregated_amount
order.items.metadata* | \n\n\n\n*Requires the `property` field to be defined." + }, + "property": { + "type": "string", + "nullable": true, + "description": "Custom name for a metadata property associated with the condition to be satisfied. **Required** if the property `name` is any of the following: \n customer_metadata
custom_event_metadata
order_items_metadata
order_metadata
product_metadata
redemption_metadata" + }, + "conditions": { + "$ref": "#/components/schemas/ValidationRuleConditions" + }, + "rules": { + "type": "object", + "description": "Another set of validation rules. If you need to create complex rules with more nested rules, use the validation rule builder in the dashboard." + }, + "error": { + "type": "object", + "description": "Contains the error message returned from API when validation / redemption fails to meet requirements of defined rule.", + "properties": { + "message": { + "type": "string", + "description": "The error message returned from API when validation / redemption fails to meet requirements of defined rule." } } } @@ -17712,13 +18000,13 @@ "ValidationRuleConditions": { "title": "Validation Rule Conditions", "type": "object", - "description": "A set of key value pairs representing the condition name and value. The list of available conditions is provided below: \n\n| **Condition (key)** | **Definition** | \n|---------------------|---------------------------------------------------------------|\n| $is | A property is a predefined value. | \n| $is_not | A property is not a predefined value. | \n| $in | A property either one value in a predefined list of values. | \n| $less_than | A property is less than a predefined value. | \n| $less_than_or_equal | A property is less than or equal to a predefined value. | \n| $more_than | A property is more than a predefined value. | \n| $more_than_or_equal | A property is more than or equal to a predefined value. | \n| $starts_with | A property starts with the predefined sequence of characters. | \n| $ends_with | A property ends with the predefined sequence of characters. | \n| $contains | A property contains the predefined sequence of characters. | \n| $timeframe |   | \n| $timeframe_absolute |   | \n| $dow |   | \n| $count |   | \n| $count_more |   | \n| $count_less |   | \n| $from |   | \n", + "description": "A set of key value pairs representing the condition name and value. The list of available conditions is provided below: \n\n| **Condition (key)** | **Definition** | \n|---------------------|---------------------------------------------------------------|\n| `$is` | A property is a predefined value. | \n| `$is_not` | A property is not a predefined value. | \n| `$in` | A property is one value of the values in a predefined list of values. | \n|`$not_in` | A property is not one of the values in a predefined list of values. | \n| `$less_than` | A property is less than a predefined value. Can be also used with datetime. | \n| `$less_than_or_equal` | A property is less than or equal to a predefined value. Can be also used with datetime. | \n| `$more_than` | A property is more than a predefined value. Can be also used with datetime. | \n| `$more_than_or_equal` | A property is more than or equal to a predefined value. Can be also used with datetime. | \n| `$starts_with` | A property starts with the predefined sequence of characters. | \n| `$ends_with ` | A property ends with the predefined sequence of characters. | \n| `$contains` | A property contains the predefined sequence of characters. | \n| `$timeframe` | A property occurs within the time frame, i.e. every 1 day for 1 hour, e.g. `$timeframe: [\"2024-11-12T14:59:23.019Z;P1D;PT1H\"]` | \n| `$timeframe_absolute` | A property occurs between two dates and times, e.g. `2024-11-14T16:02:00.000Z;2024-11-28T16:02:00.000Z` | \n| `$timeframe_daily_hours` | A property occurs between selected hours on selected days of the week, e.g. `18:00;20:01;2,3`, where `0` equals Sunday, `1` equals Monday, `2` equals Tuesday, `3` equals Wednesday, `4` equals Thursday, `5` equals Friday, and `6` equals Saturday. | \n| `$dow` | A property occurs within given days of the week, where `0` equals Sunday, `1` equals Monday, `2` equals Tuesday, `3` equals Wednesday, `4` equals Thursday, `5` equals Friday, and `6` equals Saturday. | \n| `$count` | For array metadata; the property must have exactly the defined number of elements. | \n| `$count_more` | For array metadata; the property must have more elements than the defined number. | \n| `$count_less` | For array metadata; the property must have less elements than the defined number. | \n| `$from` | The property must belong to the predefined value. Related to product collections and best used together with the `$is` condition. | \n | `$after` | The value is after the date. | \n| `$before` | The value is before the date. | \n| `$more_than_ago` | The date is more than the defined value ago expressed in number of days, relative to today, e.g. more than 3 days ago. | \n| `$less_than_ago` | The date is less than the defined value ago expressed in number of days, relative to today, less than 3 days ago. | \n| `is_days_ago` | The date is exactly the defined value ago expressed in number of days, relative to today, e.g. exactly 3 days ago. | \n| `$more_than_future` | The date is more than the defined value in the future expressed in number of days, relative to today, e.g. more than 3 days in the future. | \n| `$less_than_ago` | The date is less than the defined value in the future expressed in number of days, relative to today, e.g. less than 3 days in the future. | \n| `$is_days_in_future` | The date is exactly the defined value in the future expressed in number of days, relative to today, e.g. exactly 3 days in the future. | \n", "properties": { "$is": { - "$ref": "#/components/schemas/Any" + "$ref": "#/components/schemas/AnyOne" }, "$is_not": { - "$ref": "#/components/schemas/Any" + "$ref": "#/components/schemas/AnyOne" }, "$in": { "$ref": "#/components/schemas/Any" @@ -17727,46 +18015,84 @@ "$ref": "#/components/schemas/Any" }, "$less_than": { - "$ref": "#/components/schemas/Any" + "$ref": "#/components/schemas/AnyOne" }, "$less_than_or_equal": { - "$ref": "#/components/schemas/Any" + "$ref": "#/components/schemas/AnyOne" }, "$more_than": { - "$ref": "#/components/schemas/Any" + "$ref": "#/components/schemas/AnyOne" }, "$more_than_or_equal": { - "$ref": "#/components/schemas/Any" + "$ref": "#/components/schemas/AnyOne" }, "$starts_with": { - "$ref": "#/components/schemas/Any" + "$ref": "#/components/schemas/AnyString" }, "$ends_with": { - "$ref": "#/components/schemas/Any" + "$ref": "#/components/schemas/AnyString" }, "$contains": { - "$ref": "#/components/schemas/Any" + "$ref": "#/components/schemas/AnyString" }, "$timeframe": { - "$ref": "#/components/schemas/Any" + "$ref": "#/components/schemas/AnyString" }, "$timeframe_absolute": { - "$ref": "#/components/schemas/Any" + "$ref": "#/components/schemas/AnyString" + }, + "$timeframe_daily_hours": { + "$ref": "#/components/schemas/AnyString" }, "$dow": { - "$ref": "#/components/schemas/Any" + "type": "array", + "items": { + "type": "integer", + "minimum": 0, + "maximum": 6 + } }, "$count": { - "$ref": "#/components/schemas/Any" + "$ref": "#/components/schemas/AnyNumber" }, "$count_more": { - "$ref": "#/components/schemas/Any" + "$ref": "#/components/schemas/AnyNumber" }, "$count_less": { + "$ref": "#/components/schemas/AnyNumber" + }, + "$not_differ": { + "$ref": "#/components/schemas/Any" + }, + "$not_intersect": { "$ref": "#/components/schemas/Any" }, "$from": { "$ref": "#/components/schemas/Any" + }, + "$after": { + "$ref": "#/components/schemas/AnyDateDateTime" + }, + "$before": { + "$ref": "#/components/schemas/AnyDateDateTime" + }, + "$more_than_ago": { + "$ref": "#/components/schemas/AnyNumber" + }, + "$less_than_ago": { + "$ref": "#/components/schemas/AnyNumber" + }, + "$is_days_ago": { + "$ref": "#/components/schemas/AnyNumber" + }, + "$more_than_future": { + "$ref": "#/components/schemas/AnyNumber" + }, + "$less_than_future": { + "$ref": "#/components/schemas/AnyNumber" + }, + "$is_days_in_future": { + "$ref": "#/components/schemas/AnyNumber" } } }, From 2e84771c61bf09321a6267088d2592ddc0731c74 Mon Sep 17 00:00:00 2001 From: p-woznikowski Date: Thu, 12 Dec 2024 19:14:09 +0100 Subject: [PATCH 13/23] Add holder_loyalty_tier --- .../CUSTOMERS-Customer-Activity-Object.md | 6 +- production/readOnly-openAPI.json | 90 +++++++++++++++++++ reference/OpenAPI.json | 90 +++++++++++++++++++ reference/OpenAPIWebhooks.json | 18 ++++ reference/readonly-sdks/java/OpenAPI.json | 38 ++++++++ reference/readonly-sdks/php/OpenAPI.json | 38 ++++++++ reference/readonly-sdks/python/OpenAPI.json | 38 ++++++++ reference/readonly-sdks/ruby/OpenAPI.json | 38 ++++++++ 8 files changed, 353 insertions(+), 3 deletions(-) diff --git a/docs/reference-docs/CUSTOMERS-Customer-Activity-Object.md b/docs/reference-docs/CUSTOMERS-Customer-Activity-Object.md index 6e267f75..5b7d4cc3 100644 --- a/docs/reference-docs/CUSTOMERS-Customer-Activity-Object.md +++ b/docs/reference-docs/CUSTOMERS-Customer-Activity-Object.md @@ -256,7 +256,7 @@ One of: | voucher | See: [Simple Voucher](#simple-voucher) | | balance | See: [Voucher Balance](#voucher-balance) | | transaction | All of: 1. [Voucher Transaction Base](#voucher-transaction-base) -2.
AttributesDescription
details
object

Contains the detailed information about the transaction.

AttributesDescription
balanceSee: Voucher Balance
order
object

Contains information about the original order.

AttributesDescription
id
string

Unique order ID.

source_id
string

The merchant's order ID if it is different from the Voucherify order ID. It is really useful in case of integration between multiple systems. It can be an order ID from CRM, database or 3rd party service.

event
object

Contains information about the event that triggers the point accrual.

AttributesDescription
id
string

Unique event ID.

type
string

Type of event.

earning_rule
object

Contains information about the earning rule.

AttributesDescription
id
string

Unique earning rule ID.

source
object

Contains the custom earning rule name.

AttributesDescription
banner
string

Name of the earning rule. This is displayed as a header for the earning rule in the Dashboard.

segment
object

Contains information about the segment.

AttributesDescription
id
string
name
string
loyalty_tier
object

Contains information about the loyalty tier.

AttributesDescription
id
string
name
string
redemption
object

Contains information about the original redemption.

AttributesDescription
id
string

Unique redemption ID.

rollback
object

Contains information about the redemption rollback.

AttributesDescription
id
string

Unique redemption rollback ID.

custom_event
object

Contains information about the custom event that triggers the point accrual.

AttributesDescription
id
string

Unique event ID.

type
string

Type of custom event.

event_schema
object

Contains information about the custom event metadata schema.

AttributesDescription
id
string

Unique metadata schema ID.

name
string

Type of custom event.

reward
object

Contains information about the pay with points reward.

AttributesDescription
id
string

Unique reward ID.

name
string

Reward name.

source_voucher

Contains information on how the balance on the donor loyalty card was affected by the transaction.

Simple Voucher
destination_voucher

Contains information on how the balance on the receiving loyalty card was affected by the transaction.

Simple Voucher
type
string

Transaction type concerning loyalty card points.

Available values: POINTS_ACCRUAL
| +2.
AttributesDescription
details
object

Contains the detailed information about the transaction.

AttributesDescription
balanceSee: Voucher Balance
order
object

Contains information about the original order.

AttributesDescription
id
string

Unique order ID.

source_id
string

The merchant's order ID if it is different from the Voucherify order ID. It is really useful in case of integration between multiple systems. It can be an order ID from CRM, database or 3rd party service.

event
object

Contains information about the event that triggers the point accrual.

AttributesDescription
id
string

Unique event ID.

type
string

Type of event.

earning_rule
object

Contains information about the earning rule.

AttributesDescription
id
string

Unique earning rule ID.

source
object

Contains the custom earning rule name.

AttributesDescription
banner
string

Name of the earning rule. This is displayed as a header for the earning rule in the Dashboard.

segment
object

Contains information about the segment.

AttributesDescription
id
string
name
string
loyalty_tier
object

Contains information about the loyalty tier.

AttributesDescription
id
string
name
string
redemption
object

Contains information about the original redemption.

AttributesDescription
id
string

Unique redemption ID.

rollback
object

Contains information about the redemption rollback.

AttributesDescription
id
string

Unique redemption rollback ID.

custom_event
object

Contains information about the custom event that triggers the point accrual.

AttributesDescription
id
string

Unique event ID.

type
string

Type of custom event.

holder_loyalty_tier
object

Loyalty tier of the loyalty card holder at the moment when the transaction occurred. The loyalty tier is the tier in which the holder was before the loyalty point balance changed.

AttributesDescription
id
string

Unique identifier of the loyalty tier, assigned by Voucherify.

name
string

User-defined name of the loyalty tier.

event_schema
object

Contains information about the custom event metadata schema.

AttributesDescription
id
string

Unique metadata schema ID.

name
string

Type of custom event.

reward
object

Contains information about the pay with points reward.

AttributesDescription
id
string

Unique reward ID.

name
string

Reward name.

source_voucher

Contains information on how the balance on the donor loyalty card was affected by the transaction.

Simple Voucher
destination_voucher

Contains information on how the balance on the receiving loyalty card was affected by the transaction.

Simple Voucher
type
string

Transaction type concerning loyalty card points.

Available values: POINTS_ACCRUAL
| ## Event Customer Loyalty Card Points Transferred | Attributes | Description | @@ -268,7 +268,7 @@ One of: | destination_voucher | See: [Simple Voucher](#simple-voucher) | | balance | See: [Voucher Balance](#voucher-balance) | | transaction | All of: 1. [Voucher Transaction Base](#voucher-transaction-base) -2.
AttributesDescription
details
object

Contains the detailed information about the transaction.

AttributesDescription
balanceSee: Voucher Balance
order
object

Contains information about the original order.

AttributesDescription
id
string

Unique order ID.

source_id
string

The merchant's order ID if it is different from the Voucherify order ID. It is really useful in case of integration between multiple systems. It can be an order ID from CRM, database or 3rd party service.

event
object

Contains information about the event that triggers the point accrual.

AttributesDescription
id
string

Unique event ID.

type
string

Type of event.

earning_rule
object

Contains information about the earning rule.

AttributesDescription
id
string

Unique earning rule ID.

source
object

Contains the custom earning rule name.

AttributesDescription
banner
string

Name of the earning rule. This is displayed as a header for the earning rule in the Dashboard.

segment
object

Contains information about the segment.

AttributesDescription
id
string
name
string
loyalty_tier
object

Contains information about the loyalty tier.

AttributesDescription
id
string
name
string
redemption
object

Contains information about the original redemption.

AttributesDescription
id
string

Unique redemption ID.

rollback
object

Contains information about the redemption rollback.

AttributesDescription
id
string

Unique redemption rollback ID.

custom_event
object

Contains information about the custom event that triggers the point accrual.

AttributesDescription
id
string

Unique event ID.

type
string

Type of custom event.

event_schema
object

Contains information about the custom event metadata schema.

AttributesDescription
id
string

Unique metadata schema ID.

name
string

Type of custom event.

reward
object

Contains information about the pay with points reward.

AttributesDescription
id
string

Unique reward ID.

name
string

Reward name.

source_voucher

Contains information on how the balance on the donor loyalty card was affected by the transaction.

Simple Voucher
destination_voucher

Contains information on how the balance on the receiving loyalty card was affected by the transaction.

Simple Voucher
type
string

Transaction type concerning loyalty card points.

Available values: POINTS_TRANSFER_IN, POINTS_TRANSFER_OUT
| +2.
AttributesDescription
details
object

Contains the detailed information about the transaction.

AttributesDescription
balanceSee: Voucher Balance
order
object

Contains information about the original order.

AttributesDescription
id
string

Unique order ID.

source_id
string

The merchant's order ID if it is different from the Voucherify order ID. It is really useful in case of integration between multiple systems. It can be an order ID from CRM, database or 3rd party service.

event
object

Contains information about the event that triggers the point accrual.

AttributesDescription
id
string

Unique event ID.

type
string

Type of event.

earning_rule
object

Contains information about the earning rule.

AttributesDescription
id
string

Unique earning rule ID.

source
object

Contains the custom earning rule name.

AttributesDescription
banner
string

Name of the earning rule. This is displayed as a header for the earning rule in the Dashboard.

segment
object

Contains information about the segment.

AttributesDescription
id
string
name
string
loyalty_tier
object

Contains information about the loyalty tier.

AttributesDescription
id
string
name
string
redemption
object

Contains information about the original redemption.

AttributesDescription
id
string

Unique redemption ID.

rollback
object

Contains information about the redemption rollback.

AttributesDescription
id
string

Unique redemption rollback ID.

custom_event
object

Contains information about the custom event that triggers the point accrual.

AttributesDescription
id
string

Unique event ID.

type
string

Type of custom event.

event_schema
object

Contains information about the custom event metadata schema.

AttributesDescription
id
string

Unique metadata schema ID.

name
string

Type of custom event.

holder_loyalty_tier
object

Loyalty tier of the loyalty card holder at the moment when the transaction occurred. The loyalty tier is the tier in which the holder was before the loyalty point balance changed.

AttributesDescription
id
string

Unique identifier of the loyalty tier, assigned by Voucherify.

name
string

User-defined name of the loyalty tier.

reward
object

Contains information about the pay with points reward.

AttributesDescription
id
string

Unique reward ID.

name
string

Reward name.

source_voucher

Contains information on how the balance on the donor loyalty card was affected by the transaction.

Simple Voucher
destination_voucher

Contains information on how the balance on the receiving loyalty card was affected by the transaction.

Simple Voucher
type
string

Transaction type concerning loyalty card points.

Available values: POINTS_TRANSFER_IN, POINTS_TRANSFER_OUT
| ## Event Customer Loyalty Card Points Expired | Attributes | Description | @@ -279,7 +279,7 @@ One of: | points
`integer` |

The number of expired points.

| | buckets
`array` | Array of [Loyalty Point Bucket](#loyalty-point-bucket) | | transaction | All of: 1. [Voucher Transaction Base](#voucher-transaction-base) -2.
AttributesDescription
details
object

Contains the detailed information about the transaction.

AttributesDescription
balanceSee: Voucher Balance
order
object

Contains information about the original order.

AttributesDescription
id
string

Unique order ID.

source_id
string

The merchant's order ID if it is different from the Voucherify order ID. It is really useful in case of integration between multiple systems. It can be an order ID from CRM, database or 3rd party service.

event
object

Contains information about the event that triggers the point accrual.

AttributesDescription
id
string

Unique event ID.

type
string

Type of event.

earning_rule
object

Contains information about the earning rule.

AttributesDescription
id
string

Unique earning rule ID.

source
object

Contains the custom earning rule name.

AttributesDescription
banner
string

Name of the earning rule. This is displayed as a header for the earning rule in the Dashboard.

segment
object

Contains information about the segment.

AttributesDescription
id
string
name
string
loyalty_tier
object

Contains information about the loyalty tier.

AttributesDescription
id
string
name
string
redemption
object

Contains information about the original redemption.

AttributesDescription
id
string

Unique redemption ID.

rollback
object

Contains information about the redemption rollback.

AttributesDescription
id
string

Unique redemption rollback ID.

custom_event
object

Contains information about the custom event that triggers the point accrual.

AttributesDescription
id
string

Unique event ID.

type
string

Type of custom event.

event_schema
object

Contains information about the custom event metadata schema.

AttributesDescription
id
string

Unique metadata schema ID.

name
string

Type of custom event.

reward
object

Contains information about the pay with points reward.

AttributesDescription
id
string

Unique reward ID.

name
string

Reward name.

source_voucher

Contains information on how the balance on the donor loyalty card was affected by the transaction.

Simple Voucher
destination_voucher

Contains information on how the balance on the receiving loyalty card was affected by the transaction.

Simple Voucher
type
string

Transaction type concerning loyalty card points.

Available values: POINTS_EXPIRATION
| +2.
AttributesDescription
details
object

Contains the detailed information about the transaction.

AttributesDescription
balanceSee: Voucher Balance
order
object

Contains information about the original order.

AttributesDescription
id
string

Unique order ID.

source_id
string

The merchant's order ID if it is different from the Voucherify order ID. It is really useful in case of integration between multiple systems. It can be an order ID from CRM, database or 3rd party service.

event
object

Contains information about the event that triggers the point accrual.

AttributesDescription
id
string

Unique event ID.

type
string

Type of event.

earning_rule
object

Contains information about the earning rule.

AttributesDescription
id
string

Unique earning rule ID.

source
object

Contains the custom earning rule name.

AttributesDescription
banner
string

Name of the earning rule. This is displayed as a header for the earning rule in the Dashboard.

segment
object

Contains information about the segment.

AttributesDescription
id
string
name
string
loyalty_tier
object

Contains information about the loyalty tier.

AttributesDescription
id
string
name
string
redemption
object

Contains information about the original redemption.

AttributesDescription
id
string

Unique redemption ID.

rollback
object

Contains information about the redemption rollback.

AttributesDescription
id
string

Unique redemption rollback ID.

custom_event
object

Contains information about the custom event that triggers the point accrual.

AttributesDescription
id
string

Unique event ID.

type
string

Type of custom event.

event_schema
object

Contains information about the custom event metadata schema.

AttributesDescription
id
string

Unique metadata schema ID.

name
string

Type of custom event.

holder_loyalty_tier
object

Loyalty tier of the loyalty card holder at the moment when the transaction occurred. The loyalty tier is the tier in which the holder was before the loyalty point balance changed.

AttributesDescription
id
string

Unique identifier of the loyalty tier, assigned by Voucherify.

name
string

User-defined name of the loyalty tier.

reward
object

Contains information about the pay with points reward.

AttributesDescription
id
string

Unique reward ID.

name
string

Reward name.

source_voucher

Contains information on how the balance on the donor loyalty card was affected by the transaction.

Simple Voucher
destination_voucher

Contains information on how the balance on the receiving loyalty card was affected by the transaction.

Simple Voucher
type
string

Transaction type concerning loyalty card points.

Available values: POINTS_EXPIRATION
| ## Event Customer Voucher Deleted | Attributes | Description | diff --git a/production/readOnly-openAPI.json b/production/readOnly-openAPI.json index 9aa7c10d..74be1a7d 100644 --- a/production/readOnly-openAPI.json +++ b/production/readOnly-openAPI.json @@ -6980,6 +6980,24 @@ "required": [], "nullable": true }, + "holder_loyalty_tier": { + "type": "object", + "description": "Loyalty tier of the loyalty card holder at the moment when the transaction occurred. The loyalty tier is the tier in which the holder was before the loyalty point balance changed.", + "properties": { + "id": { + "type": "string", + "description": "Unique identifier of the loyalty tier, assigned by Voucherify.", + "nullable": true + }, + "name": { + "type": "string", + "description": "User-defined name of the loyalty tier.", + "nullable": true + } + }, + "required": [], + "nullable": true + }, "event_schema": { "type": "object", "description": "Contains information about the custom event metadata schema.", @@ -7243,6 +7261,24 @@ "required": [], "nullable": true }, + "holder_loyalty_tier": { + "type": "object", + "description": "Loyalty tier of the loyalty card holder at the moment when the transaction occurred. The loyalty tier is the tier in which the holder was before the loyalty point balance changed.", + "properties": { + "id": { + "type": "string", + "description": "Unique identifier of the loyalty tier, assigned by Voucherify.", + "nullable": true + }, + "name": { + "type": "string", + "description": "User-defined name of the loyalty tier.", + "nullable": true + } + }, + "required": [], + "nullable": true + }, "reward": { "type": "object", "description": "Contains information about the pay with points reward.", @@ -8298,6 +8334,24 @@ "required": [], "nullable": true }, + "holder_loyalty_tier": { + "type": "object", + "description": "Loyalty tier of the loyalty card holder at the moment when the transaction occurred. The loyalty tier is the tier in which the holder was before the loyalty point balance changed.", + "properties": { + "id": { + "type": "string", + "description": "Unique identifier of the loyalty tier, assigned by Voucherify.", + "nullable": true + }, + "name": { + "type": "string", + "description": "User-defined name of the loyalty tier.", + "nullable": true + } + }, + "required": [], + "nullable": true + }, "reward": { "type": "object", "description": "Contains information about the pay with points reward.", @@ -12911,6 +12965,24 @@ "required": [], "nullable": true }, + "holder_loyalty_tier": { + "type": "object", + "description": "Loyalty tier of the loyalty card holder at the moment when the transaction occurred. The loyalty tier is the tier in which the holder was before the loyalty point balance changed.", + "properties": { + "id": { + "type": "string", + "description": "Unique identifier of the loyalty tier, assigned by Voucherify.", + "nullable": true + }, + "name": { + "type": "string", + "description": "User-defined name of the loyalty tier.", + "nullable": true + } + }, + "required": [], + "nullable": true + }, "reward": { "type": "object", "description": "Contains information about the pay with points reward.", @@ -29270,6 +29342,24 @@ "required": [], "nullable": true }, + "holder_loyalty_tier": { + "type": "object", + "description": "Loyalty tier of the loyalty card holder at the moment when the transaction occurred. The loyalty tier is the tier in which the holder was before the loyalty point balance changed.", + "properties": { + "id": { + "type": "string", + "description": "Unique identifier of the loyalty tier, assigned by Voucherify.", + "nullable": true + }, + "name": { + "type": "string", + "description": "User-defined name of the loyalty tier.", + "nullable": true + } + }, + "required": [], + "nullable": true + }, "reward": { "type": "object", "description": "Contains information about the pay with points reward.", diff --git a/reference/OpenAPI.json b/reference/OpenAPI.json index 301c3bda..7d211576 100644 --- a/reference/OpenAPI.json +++ b/reference/OpenAPI.json @@ -27302,6 +27302,24 @@ "type" ] }, + "holder_loyalty_tier": { + "type": "object", + "description": "Loyalty tier of the loyalty card holder at the moment when the transaction occurred. The loyalty tier is the tier in which the holder was before the loyalty point balance changed.", + "properties": { + "id": { + "type": "string", + "description": "Unique identifier of the loyalty tier, assigned by Voucherify." + }, + "name": { + "type": "string", + "description": "User-defined name of the loyalty tier." + } + }, + "required": [ + "id", + "name" + ] + }, "event_schema": { "type": "object", "description": "Contains information about the custom event metadata schema.", @@ -27564,6 +27582,24 @@ "name" ] }, + "holder_loyalty_tier": { + "type": "object", + "description": "Loyalty tier of the loyalty card holder at the moment when the transaction occurred. The loyalty tier is the tier in which the holder was before the loyalty point balance changed.", + "properties": { + "id": { + "type": "string", + "description": "Unique identifier of the loyalty tier, assigned by Voucherify." + }, + "name": { + "type": "string", + "description": "User-defined name of the loyalty tier." + } + }, + "required": [ + "id", + "name" + ] + }, "reward": { "type": "object", "description": "Contains information about the pay with points reward.", @@ -27810,6 +27846,24 @@ "name" ] }, + "holder_loyalty_tier": { + "type": "object", + "description": "Loyalty tier of the loyalty card holder at the moment when the transaction occurred. The loyalty tier is the tier in which the holder was before the loyalty point balance changed.", + "properties": { + "id": { + "type": "string", + "description": "Unique identifier of the loyalty tier, assigned by Voucherify." + }, + "name": { + "type": "string", + "description": "User-defined name of the loyalty tier." + } + }, + "required": [ + "id", + "name" + ] + }, "reward": { "type": "object", "description": "Contains information about the pay with points reward.", @@ -35834,6 +35888,24 @@ "name" ] }, + "holder_loyalty_tier": { + "type": "object", + "description": "Loyalty tier of the loyalty card holder at the moment when the transaction occurred. The loyalty tier is the tier in which the holder was before the loyalty point balance changed.", + "properties": { + "id": { + "type": "string", + "description": "Unique identifier of the loyalty tier, assigned by Voucherify." + }, + "name": { + "type": "string", + "description": "User-defined name of the loyalty tier." + } + }, + "required": [ + "id", + "name" + ] + }, "reward": { "type": "object", "description": "Contains information about the pay with points reward.", @@ -36273,6 +36345,24 @@ "name" ] }, + "holder_loyalty_tier": { + "type": "object", + "description": "Loyalty tier of the loyalty card holder at the moment when the transaction occurred. The loyalty tier is the tier in which the holder was before the loyalty point balance changed.", + "properties": { + "id": { + "type": "string", + "description": "Unique identifier of the loyalty tier, assigned by Voucherify." + }, + "name": { + "type": "string", + "description": "User-defined name of the loyalty tier." + } + }, + "required": [ + "id", + "name" + ] + }, "reward": { "type": "object", "description": "Contains information about the pay with points reward.", diff --git a/reference/OpenAPIWebhooks.json b/reference/OpenAPIWebhooks.json index 670cf08c..38f74849 100644 --- a/reference/OpenAPIWebhooks.json +++ b/reference/OpenAPIWebhooks.json @@ -18789,6 +18789,24 @@ "name" ] }, + "holder_loyalty_tier": { + "type": "object", + "description": "Loyalty tier of the loyalty card holder at the moment when the transaction occurred. The loyalty tier is the tier in which the holder was before the loyalty point balance changed.", + "properties": { + "id": { + "type": "string", + "description": "Unique identifier of the loyalty tier, assigned by Voucherify." + }, + "name": { + "type": "string", + "description": "User-defined name of the loyalty tier." + } + }, + "required": [ + "id", + "name" + ] + }, "reward": { "type": "object", "description": "Contains information about the pay with points reward.", diff --git a/reference/readonly-sdks/java/OpenAPI.json b/reference/readonly-sdks/java/OpenAPI.json index 5a1bf4d6..a0ca3ce4 100644 --- a/reference/readonly-sdks/java/OpenAPI.json +++ b/reference/readonly-sdks/java/OpenAPI.json @@ -32163,6 +32163,25 @@ "required": [], "nullable": true }, + "holder_loyalty_tier": { + "title": "LoyaltyCardTransactionDetailsHolderLoyaltyTier", + "type": "object", + "description": "Loyalty tier of the loyalty card holder at the moment when the transaction occurred. The loyalty tier is the tier in which the holder was before the loyalty point balance changed.", + "properties": { + "id": { + "type": "string", + "description": "Unique identifier of the loyalty tier, assigned by Voucherify.", + "nullable": true + }, + "name": { + "type": "string", + "description": "User-defined name of the loyalty tier.", + "nullable": true + } + }, + "required": [], + "nullable": true + }, "reward": { "title": "LoyaltyCardTransactionDetailsReward", "type": "object", @@ -39441,6 +39460,25 @@ "required": [], "nullable": true }, + "holder_loyalty_tier": { + "title": "VoucherTransactionDetailsHolderLoyaltyTier", + "type": "object", + "description": "Loyalty tier of the loyalty card holder at the moment when the transaction occurred. The loyalty tier is the tier in which the holder was before the loyalty point balance changed.", + "properties": { + "id": { + "type": "string", + "description": "Unique identifier of the loyalty tier, assigned by Voucherify.", + "nullable": true + }, + "name": { + "type": "string", + "description": "User-defined name of the loyalty tier.", + "nullable": true + } + }, + "required": [], + "nullable": true + }, "reward": { "title": "VoucherTransactionDetailsReward", "type": "object", diff --git a/reference/readonly-sdks/php/OpenAPI.json b/reference/readonly-sdks/php/OpenAPI.json index fbfb0d6f..84ebb023 100644 --- a/reference/readonly-sdks/php/OpenAPI.json +++ b/reference/readonly-sdks/php/OpenAPI.json @@ -33181,6 +33181,25 @@ "required": [], "nullable": true }, + "holder_loyalty_tier": { + "title": "LoyaltyCardTransactionDetailsHolderLoyaltyTier", + "type": "object", + "description": "Loyalty tier of the loyalty card holder at the moment when the transaction occurred. The loyalty tier is the tier in which the holder was before the loyalty point balance changed.", + "properties": { + "id": { + "type": "string", + "description": "Unique identifier of the loyalty tier, assigned by Voucherify.", + "nullable": true + }, + "name": { + "type": "string", + "description": "User-defined name of the loyalty tier.", + "nullable": true + } + }, + "required": [], + "nullable": true + }, "reward": { "title": "LoyaltyCardTransactionDetailsReward", "type": "object", @@ -40654,6 +40673,25 @@ "required": [], "nullable": true }, + "holder_loyalty_tier": { + "title": "VoucherTransactionDetailsHolderLoyaltyTier", + "type": "object", + "description": "Loyalty tier of the loyalty card holder at the moment when the transaction occurred. The loyalty tier is the tier in which the holder was before the loyalty point balance changed.", + "properties": { + "id": { + "type": "string", + "description": "Unique identifier of the loyalty tier, assigned by Voucherify.", + "nullable": true + }, + "name": { + "type": "string", + "description": "User-defined name of the loyalty tier.", + "nullable": true + } + }, + "required": [], + "nullable": true + }, "reward": { "title": "VoucherTransactionDetailsReward", "type": "object", diff --git a/reference/readonly-sdks/python/OpenAPI.json b/reference/readonly-sdks/python/OpenAPI.json index fa2f5599..05c5d518 100644 --- a/reference/readonly-sdks/python/OpenAPI.json +++ b/reference/readonly-sdks/python/OpenAPI.json @@ -31944,6 +31944,25 @@ "required": [], "nullable": true }, + "holder_loyalty_tier": { + "title": "LoyaltyCardTransactionDetailsHolderLoyaltyTier", + "type": "object", + "description": "Loyalty tier of the loyalty card holder at the moment when the transaction occurred. The loyalty tier is the tier in which the holder was before the loyalty point balance changed.", + "properties": { + "id": { + "type": "string", + "description": "Unique identifier of the loyalty tier, assigned by Voucherify.", + "nullable": true + }, + "name": { + "type": "string", + "description": "User-defined name of the loyalty tier.", + "nullable": true + } + }, + "required": [], + "nullable": true + }, "reward": { "title": "LoyaltyCardTransactionDetailsReward", "type": "object", @@ -38886,6 +38905,25 @@ "required": [], "nullable": true }, + "holder_loyalty_tier": { + "title": "VoucherTransactionDetailsHolderLoyaltyTier", + "type": "object", + "description": "Loyalty tier of the loyalty card holder at the moment when the transaction occurred. The loyalty tier is the tier in which the holder was before the loyalty point balance changed.", + "properties": { + "id": { + "type": "string", + "description": "Unique identifier of the loyalty tier, assigned by Voucherify.", + "nullable": true + }, + "name": { + "type": "string", + "description": "User-defined name of the loyalty tier.", + "nullable": true + } + }, + "required": [], + "nullable": true + }, "reward": { "title": "VoucherTransactionDetailsReward", "type": "object", diff --git a/reference/readonly-sdks/ruby/OpenAPI.json b/reference/readonly-sdks/ruby/OpenAPI.json index 04906e01..10461e52 100644 --- a/reference/readonly-sdks/ruby/OpenAPI.json +++ b/reference/readonly-sdks/ruby/OpenAPI.json @@ -32197,6 +32197,25 @@ "required": [], "nullable": true }, + "holder_loyalty_tier": { + "title": "LoyaltyCardTransactionDetailsHolderLoyaltyTier", + "type": "object", + "description": "Loyalty tier of the loyalty card holder at the moment when the transaction occurred. The loyalty tier is the tier in which the holder was before the loyalty point balance changed.", + "properties": { + "id": { + "type": "string", + "description": "Unique identifier of the loyalty tier, assigned by Voucherify.", + "nullable": true + }, + "name": { + "type": "string", + "description": "User-defined name of the loyalty tier.", + "nullable": true + } + }, + "required": [], + "nullable": true + }, "reward": { "title": "LoyaltyCardTransactionDetailsReward", "type": "object", @@ -39475,6 +39494,25 @@ "required": [], "nullable": true }, + "holder_loyalty_tier": { + "title": "VoucherTransactionDetailsHolderLoyaltyTier", + "type": "object", + "description": "Loyalty tier of the loyalty card holder at the moment when the transaction occurred. The loyalty tier is the tier in which the holder was before the loyalty point balance changed.", + "properties": { + "id": { + "type": "string", + "description": "Unique identifier of the loyalty tier, assigned by Voucherify.", + "nullable": true + }, + "name": { + "type": "string", + "description": "User-defined name of the loyalty tier.", + "nullable": true + } + }, + "required": [], + "nullable": true + }, "reward": { "title": "VoucherTransactionDetailsReward", "type": "object", From 218ee9495347a8b065fff22d5bac2227add9e364 Mon Sep 17 00:00:00 2001 From: p-woznikowski Date: Thu, 12 Dec 2024 19:16:54 +0100 Subject: [PATCH 14/23] Update OPEN-API.md --- changelog/OPEN-API.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/changelog/OPEN-API.md b/changelog/OPEN-API.md index 5389272a..b5a72f40 100644 --- a/changelog/OPEN-API.md +++ b/changelog/OPEN-API.md @@ -6,7 +6,14 @@ Older changes in [DEPRECATED.md](deprecated/DEPRECATED.md) ## 2024-12-12 -Remvoed `bundle_rules` from the `ValidationRuleBase` schema – the feature is not released yet +- Removed `bundle_rules` from the `ValidationRuleBase` schema – the feature is not released yet +- Added `holder_loyalty_tier` to OpenAPIWebhooks.json and OpenAPI.json with the following schemas: + - `EventCustomerLoyaltyCardPointsAdded` + - `EventCustomerVouchersLoyaltyPointsExpired` + - `EventCustomerLoyaltyCardPointsTransferred` + - `LoyaltyCardTransaction` + - `VoucherTransaction` + ## 2024-12-05 From 8b64d94f469c720bc1b3df39b001a04a3df526cf Mon Sep 17 00:00:00 2001 From: p-woznikowski Date: Thu, 12 Dec 2024 20:01:44 +0100 Subject: [PATCH 15/23] Update OrderItemCalculated in webhooks --- reference/OpenAPIWebhooks.json | 64 ++++++++++++++++++++-------------- 1 file changed, 37 insertions(+), 27 deletions(-) diff --git a/reference/OpenAPIWebhooks.json b/reference/OpenAPIWebhooks.json index 38f74849..d06fa180 100644 --- a/reference/OpenAPIWebhooks.json +++ b/reference/OpenAPIWebhooks.json @@ -14481,17 +14481,17 @@ "type": "object", "title": "Order Item Calculated", "properties": { - "object": { + "id": { "type": "string", - "default": "order_item", - "enum": [ - "order_item" - ], - "description": "The type of the object represented by JSON." + "description": "Unique identifier of the order line item." }, - "source_id": { + "sku_id": { + "type": "string", + "description": "Unique identifier of the SKU. It is assigned by Voucherify." + }, + "product_id": { "type": "string", - "description": "The merchant's product/SKU ID (if it is different from the Voucherify product/SKU ID)." + "description": "Unique identifier of the product. It is assigned by Voucherify." }, "related_object": { "type": "string", @@ -14499,15 +14499,11 @@ "product", "sku" ], - "description": "Used along with the `source_id` property, can be set to either SKU or product." - }, - "product_id": { - "type": "string", - "description": "Unique product ID assigned by Voucherify." + "description": "Used along with the source_id property, can be set to either sku or product." }, - "sku_id": { + "source_id": { "type": "string", - "description": "Unique SKU ID assigned by Voucherify." + "description": "The merchant's product/SKU ID (if it is different from the Voucherify product/SKU ID). It is useful in the integration between multiple systems. It can be an ID from an eCommerce site, a database, or a third-party service." }, "quantity": { "type": "integer", @@ -14519,7 +14515,7 @@ }, "initial_quantity": { "type": "integer", - "description": "The original number of the item in the cart." + "description": "A positive integer in the smallest unit quantity representing the total amount of the order; this is the sum of the order items' quantity." }, "amount": { "type": "integer", @@ -14529,31 +14525,45 @@ "type": "integer", "description": "Sum of all order-item-level discounts applied to the order." }, - "initial_amount": { + "applied_discount_amount": { + "type": "integer", + "description": "This field shows the order-level discount applied." + }, + "applied_discount_quantity": { "type": "integer", - "description": "The original amount of the order total amount." + "description": "Number of the discounted items applied in the transaction." }, - "total_applied_discount_amount": { + "applied_quantity": { "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`" + "description": "Quantity of items changed by the application of a new quantity items. It can be positive when an item is added or negative if an item is replaced." + }, + "applied_quantity_amount": { + "type": "integer", + "description": "Amount for the items changed by the application of a new quantity items. It can be positive when an item is added or negative if an item is replaced." + }, + "initial_amount": { + "type": "integer", + "description": "A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts." }, "price": { "type": "integer", - "description": "Unit price of an item. The value is multiplied by 100 to precisely represent 2 decimal places. For example `10000 cents` for `$100.00`." + "description": "Unit price of an item. Value is multiplied by 100 to precisely represent 2 decimal places. For example `10000 cents` for `$100.00`." }, "subtotal_amount": { "type": "integer", "description": "Final order item amount after the applied item-level discount. If there are no item-level discounts applied, this item is equal to the `amount`. \n`subtotal_amount`=`amount`-`applied_discount_amount`" }, - "product": { - "$ref": "#/components/schemas/OrderItemProduct" - }, - "sku": { - "$ref": "#/components/schemas/OrderItemSku" + "object": { + "type": "string", + "default": "order_item", + "enum": [ + "order_item" + ], + "description": "The type of the object represented by JSON." }, "metadata": { "type": "object", - "description": "A set of custom key/value pairs that you can attach to an SKU. It can be useful for storing additional information about the SKU in a structured format." + "description": "A set of custom key/value pairs that you can attach to an item object. It can be useful for storing additional information about the item in a structured format. It can be used to define business validation rules or discount formulas." } }, "required": [ From ef1f8dbbbfefde19d4d8e0a6d5c51f91e827a56f Mon Sep 17 00:00:00 2001 From: p-woznikowski Date: Thu, 12 Dec 2024 20:14:12 +0100 Subject: [PATCH 16/23] application_details p.1 --- .../CUSTOMERS-Customer-Activity-Object.md | 1 + docs/reference-docs/ORDERS-Order-Object.md | 1 + .../QUALIFICATIONS-Qualification-Object.md | 1 + .../REDEMPTIONS-Redemption-Object.md | 1 + .../REDEMPTIONS-Rollback-Redemption-Object.md | 1 + .../VALIDATIONS-Validation-Object.md | 1 + production/readOnly-openAPI.json | 41 ++++++++++++++++++ reference/OpenAPI.json | 40 +++++++++++++++++ reference/readonly-sdks/java/OpenAPI.json | 43 +++++++++++++++++++ reference/readonly-sdks/php/OpenAPI.json | 43 +++++++++++++++++++ reference/readonly-sdks/python/OpenAPI.json | 43 +++++++++++++++++++ reference/readonly-sdks/ruby/OpenAPI.json | 43 +++++++++++++++++++ 12 files changed, 259 insertions(+) diff --git a/docs/reference-docs/CUSTOMERS-Customer-Activity-Object.md b/docs/reference-docs/CUSTOMERS-Customer-Activity-Object.md index 5b7d4cc3..62bf4ca7 100644 --- a/docs/reference-docs/CUSTOMERS-Customer-Activity-Object.md +++ b/docs/reference-docs/CUSTOMERS-Customer-Activity-Object.md @@ -1027,6 +1027,7 @@ One of: | applied_discount_quantity
`integer` |

Number of the discounted items applied in the transaction.

| | applied_quantity
`integer` |

Quantity of items changed by the application of a new quantity items. It can be positive when an item is added or negative if an item is replaced.

| | applied_quantity_amount
`integer` |

Amount for the items changed by the application of a new quantity items. It can be positive when an item is added or negative if an item is replaced.

| +| application_details
`array` | Array of:
AttributesDescription
source_index
integer
source_applied_quantity
integer
source_applied_quantity_amount
integer
target_index
integer
target_applied_quantity
integer
target_applied_quantity_amount
integer
target_applied_discount_amount
integer
| | initial_amount
`integer` |

A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.

| | price
`integer` |

Unit price of an item. Value is multiplied by 100 to precisely represent 2 decimal places. For example 10000 cents for $100.00.

| | subtotal_amount
`integer` |

Final order item amount after the applied item-level discount. If there are no item-level discounts applied, this item is equal to the amount.
subtotal_amount=amount-applied_discount_amount

| diff --git a/docs/reference-docs/ORDERS-Order-Object.md b/docs/reference-docs/ORDERS-Order-Object.md index 6e14c5b3..178fb55b 100644 --- a/docs/reference-docs/ORDERS-Order-Object.md +++ b/docs/reference-docs/ORDERS-Order-Object.md @@ -51,6 +51,7 @@ order: 1 | applied_discount_quantity
`integer` |

Number of the discounted items applied in the transaction.

| | applied_quantity
`integer` |

Quantity of items changed by the application of a new quantity items. It can be positive when an item is added or negative if an item is replaced.

| | applied_quantity_amount
`integer` |

Amount for the items changed by the application of a new quantity items. It can be positive when an item is added or negative if an item is replaced.

| +| application_details
`array` | Array of:
AttributesDescription
source_index
integer
source_applied_quantity
integer
source_applied_quantity_amount
integer
target_index
integer
target_applied_quantity
integer
target_applied_quantity_amount
integer
target_applied_discount_amount
integer
| | initial_amount
`integer` |

A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.

| | price
`integer` |

Unit price of an item. Value is multiplied by 100 to precisely represent 2 decimal places. For example 10000 cents for $100.00.

| | subtotal_amount
`integer` |

Final order item amount after the applied item-level discount. If there are no item-level discounts applied, this item is equal to the amount.
subtotal_amount=amount-applied_discount_amount

| diff --git a/docs/reference-docs/QUALIFICATIONS-Qualification-Object.md b/docs/reference-docs/QUALIFICATIONS-Qualification-Object.md index 5a1a2097..a1b73c05 100644 --- a/docs/reference-docs/QUALIFICATIONS-Qualification-Object.md +++ b/docs/reference-docs/QUALIFICATIONS-Qualification-Object.md @@ -94,6 +94,7 @@ All of: | applied_discount_quantity
`integer` |

Number of the discounted items applied in the transaction.

| | applied_quantity
`integer` |

Quantity of items changed by the application of a new quantity items. It can be positive when an item is added or negative if an item is replaced.

| | applied_quantity_amount
`integer` |

Amount for the items changed by the application of a new quantity items. It can be positive when an item is added or negative if an item is replaced.

| +| application_details
`array` | Array of:
AttributesDescription
source_index
integer
source_applied_quantity
integer
source_applied_quantity_amount
integer
target_index
integer
target_applied_quantity
integer
target_applied_quantity_amount
integer
target_applied_discount_amount
integer
| | initial_amount
`integer` |

A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.

| | price
`integer` |

Unit price of an item. Value is multiplied by 100 to precisely represent 2 decimal places. For example 10000 cents for $100.00.

| | subtotal_amount
`integer` |

Final order item amount after the applied item-level discount. If there are no item-level discounts applied, this item is equal to the amount.
subtotal_amount=amount-applied_discount_amount

| diff --git a/docs/reference-docs/REDEMPTIONS-Redemption-Object.md b/docs/reference-docs/REDEMPTIONS-Redemption-Object.md index 9d001ad1..0f1aac37 100644 --- a/docs/reference-docs/REDEMPTIONS-Redemption-Object.md +++ b/docs/reference-docs/REDEMPTIONS-Redemption-Object.md @@ -133,6 +133,7 @@ All of: | applied_discount_quantity
`integer` |

Number of the discounted items applied in the transaction.

| | applied_quantity
`integer` |

Quantity of items changed by the application of a new quantity items. It can be positive when an item is added or negative if an item is replaced.

| | applied_quantity_amount
`integer` |

Amount for the items changed by the application of a new quantity items. It can be positive when an item is added or negative if an item is replaced.

| +| application_details
`array` | Array of:
AttributesDescription
source_index
integer
source_applied_quantity
integer
source_applied_quantity_amount
integer
target_index
integer
target_applied_quantity
integer
target_applied_quantity_amount
integer
target_applied_discount_amount
integer
| | initial_amount
`integer` |

A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.

| | price
`integer` |

Unit price of an item. Value is multiplied by 100 to precisely represent 2 decimal places. For example 10000 cents for $100.00.

| | subtotal_amount
`integer` |

Final order item amount after the applied item-level discount. If there are no item-level discounts applied, this item is equal to the amount.
subtotal_amount=amount-applied_discount_amount

| diff --git a/docs/reference-docs/REDEMPTIONS-Rollback-Redemption-Object.md b/docs/reference-docs/REDEMPTIONS-Rollback-Redemption-Object.md index 80e75873..4089de93 100644 --- a/docs/reference-docs/REDEMPTIONS-Rollback-Redemption-Object.md +++ b/docs/reference-docs/REDEMPTIONS-Rollback-Redemption-Object.md @@ -141,6 +141,7 @@ All of: | applied_discount_quantity
`integer` |

Number of the discounted items applied in the transaction.

| | applied_quantity
`integer` |

Quantity of items changed by the application of a new quantity items. It can be positive when an item is added or negative if an item is replaced.

| | applied_quantity_amount
`integer` |

Amount for the items changed by the application of a new quantity items. It can be positive when an item is added or negative if an item is replaced.

| +| application_details
`array` | Array of:
AttributesDescription
source_index
integer
source_applied_quantity
integer
source_applied_quantity_amount
integer
target_index
integer
target_applied_quantity
integer
target_applied_quantity_amount
integer
target_applied_discount_amount
integer
| | initial_amount
`integer` |

A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.

| | price
`integer` |

Unit price of an item. Value is multiplied by 100 to precisely represent 2 decimal places. For example 10000 cents for $100.00.

| | subtotal_amount
`integer` |

Final order item amount after the applied item-level discount. If there are no item-level discounts applied, this item is equal to the amount.
subtotal_amount=amount-applied_discount_amount

| diff --git a/docs/reference-docs/VALIDATIONS-Validation-Object.md b/docs/reference-docs/VALIDATIONS-Validation-Object.md index f21d48d4..449eb615 100644 --- a/docs/reference-docs/VALIDATIONS-Validation-Object.md +++ b/docs/reference-docs/VALIDATIONS-Validation-Object.md @@ -201,6 +201,7 @@ One of: | applied_discount_quantity
`integer` |

Number of the discounted items applied in the transaction.

| | applied_quantity
`integer` |

Quantity of items changed by the application of a new quantity items. It can be positive when an item is added or negative if an item is replaced.

| | applied_quantity_amount
`integer` |

Amount for the items changed by the application of a new quantity items. It can be positive when an item is added or negative if an item is replaced.

| +| application_details
`array` | Array of:
AttributesDescription
source_index
integer
source_applied_quantity
integer
source_applied_quantity_amount
integer
target_index
integer
target_applied_quantity
integer
target_applied_quantity_amount
integer
target_applied_discount_amount
integer
| | initial_amount
`integer` |

A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.

| | price
`integer` |

Unit price of an item. Value is multiplied by 100 to precisely represent 2 decimal places. For example 10000 cents for $100.00.

| | subtotal_amount
`integer` |

Final order item amount after the applied item-level discount. If there are no item-level discounts applied, this item is equal to the amount.
subtotal_amount=amount-applied_discount_amount

| diff --git a/production/readOnly-openAPI.json b/production/readOnly-openAPI.json index 74be1a7d..d224b837 100644 --- a/production/readOnly-openAPI.json +++ b/production/readOnly-openAPI.json @@ -16795,6 +16795,47 @@ "description": "Amount for the items changed by the application of a new quantity items. It can be positive when an item is added or negative if an item is replaced.", "nullable": true }, + "application_details": { + "type": "array", + "description": "", + "items": { + "type": "object", + "description": "", + "properties": { + "source_index": { + "type": "integer", + "description": "", + "minimum": 0 + }, + "source_applied_quantity": { + "type": "integer", + "description": "", + "maximum": -1 + }, + "source_applied_quantity_amount": { + "type": "integer", + "description": "" + }, + "target_index": { + "type": "integer", + "description": "" + }, + "target_applied_quantity": { + "type": "integer", + "description": "" + }, + "target_applied_quantity_amount": { + "type": "integer", + "description": "" + }, + "target_applied_discount_amount": { + "type": "integer", + "description": "" + } + } + }, + "nullable": true + }, "initial_amount": { "type": "integer", "description": "A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.", diff --git a/reference/OpenAPI.json b/reference/OpenAPI.json index 7d211576..ae6b585a 100644 --- a/reference/OpenAPI.json +++ b/reference/OpenAPI.json @@ -3500,6 +3500,46 @@ "type": "integer", "description": "Amount for the items changed by the application of a new quantity items. It can be positive when an item is added or negative if an item is replaced." }, + "application_details": { + "type": "array", + "description": "", + "items": { + "type": "object", + "description": "", + "properties": { + "source_index": { + "type": "integer", + "description": "", + "minimum": 0 + }, + "source_applied_quantity": { + "type": "integer", + "description": "", + "maximum": -1 + }, + "source_applied_quantity_amount": { + "type": "integer", + "description": "" + }, + "target_index": { + "type": "integer", + "description": "" + }, + "target_applied_quantity": { + "type": "integer", + "description": "" + }, + "target_applied_quantity_amount": { + "type": "integer", + "description": "" + }, + "target_applied_discount_amount": { + "type": "integer", + "description": "" + } + } + } + }, "initial_amount": { "type": "integer", "description": "A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts." diff --git a/reference/readonly-sdks/java/OpenAPI.json b/reference/readonly-sdks/java/OpenAPI.json index a0ca3ce4..3c26b42b 100644 --- a/reference/readonly-sdks/java/OpenAPI.json +++ b/reference/readonly-sdks/java/OpenAPI.json @@ -34185,6 +34185,49 @@ "description": "Amount for the items changed by the application of a new quantity items. It can be positive when an item is added or negative if an item is replaced.", "nullable": true }, + "application_details": { + "title": "OrderCalculatedItemApplicationDetails", + "type": "array", + "description": "", + "items": { + "title": "OrderCalculatedItemApplicationDetailsItem", + "type": "object", + "description": "", + "properties": { + "source_index": { + "type": "integer", + "description": "", + "minimum": 0 + }, + "source_applied_quantity": { + "type": "integer", + "description": "", + "maximum": -1 + }, + "source_applied_quantity_amount": { + "type": "integer", + "description": "" + }, + "target_index": { + "type": "integer", + "description": "" + }, + "target_applied_quantity": { + "type": "integer", + "description": "" + }, + "target_applied_quantity_amount": { + "type": "integer", + "description": "" + }, + "target_applied_discount_amount": { + "type": "integer", + "description": "" + } + } + }, + "nullable": true + }, "initial_amount": { "type": "integer", "description": "A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.", diff --git a/reference/readonly-sdks/php/OpenAPI.json b/reference/readonly-sdks/php/OpenAPI.json index 84ebb023..bb4d23b4 100644 --- a/reference/readonly-sdks/php/OpenAPI.json +++ b/reference/readonly-sdks/php/OpenAPI.json @@ -35231,6 +35231,49 @@ "description": "Amount for the items changed by the application of a new quantity items. It can be positive when an item is added or negative if an item is replaced.", "nullable": true }, + "application_details": { + "title": "OrderCalculatedItemApplicationDetails", + "type": "array", + "description": "", + "items": { + "title": "OrderCalculatedItemApplicationDetailsItem", + "type": "object", + "description": "", + "properties": { + "source_index": { + "type": "integer", + "description": "", + "minimum": 0 + }, + "source_applied_quantity": { + "type": "integer", + "description": "", + "maximum": -1 + }, + "source_applied_quantity_amount": { + "type": "integer", + "description": "" + }, + "target_index": { + "type": "integer", + "description": "" + }, + "target_applied_quantity": { + "type": "integer", + "description": "" + }, + "target_applied_quantity_amount": { + "type": "integer", + "description": "" + }, + "target_applied_discount_amount": { + "type": "integer", + "description": "" + } + } + }, + "nullable": true + }, "initial_amount": { "type": "integer", "description": "A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.", diff --git a/reference/readonly-sdks/python/OpenAPI.json b/reference/readonly-sdks/python/OpenAPI.json index 05c5d518..bd2b5830 100644 --- a/reference/readonly-sdks/python/OpenAPI.json +++ b/reference/readonly-sdks/python/OpenAPI.json @@ -33700,6 +33700,49 @@ "description": "Amount for the items changed by the application of a new quantity items. It can be positive when an item is added or negative if an item is replaced.", "nullable": true }, + "application_details": { + "title": "OrderCalculatedItemApplicationDetails", + "type": "array", + "description": "", + "items": { + "title": "OrderCalculatedItemApplicationDetailsItem", + "type": "object", + "description": "", + "properties": { + "source_index": { + "type": "integer", + "description": "", + "minimum": 0 + }, + "source_applied_quantity": { + "type": "integer", + "description": "", + "maximum": -1 + }, + "source_applied_quantity_amount": { + "type": "integer", + "description": "" + }, + "target_index": { + "type": "integer", + "description": "" + }, + "target_applied_quantity": { + "type": "integer", + "description": "" + }, + "target_applied_quantity_amount": { + "type": "integer", + "description": "" + }, + "target_applied_discount_amount": { + "type": "integer", + "description": "" + } + } + }, + "nullable": true + }, "initial_amount": { "type": "integer", "description": "A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.", diff --git a/reference/readonly-sdks/ruby/OpenAPI.json b/reference/readonly-sdks/ruby/OpenAPI.json index 10461e52..d6066867 100644 --- a/reference/readonly-sdks/ruby/OpenAPI.json +++ b/reference/readonly-sdks/ruby/OpenAPI.json @@ -34219,6 +34219,49 @@ "description": "Amount for the items changed by the application of a new quantity items. It can be positive when an item is added or negative if an item is replaced.", "nullable": true }, + "application_details": { + "title": "OrderCalculatedItemApplicationDetails", + "type": "array", + "description": "", + "items": { + "title": "OrderCalculatedItemApplicationDetailsItem", + "type": "object", + "description": "", + "properties": { + "source_index": { + "type": "integer", + "description": "", + "minimum": 0 + }, + "source_applied_quantity": { + "type": "integer", + "description": "", + "maximum": -1 + }, + "source_applied_quantity_amount": { + "type": "integer", + "description": "" + }, + "target_index": { + "type": "integer", + "description": "" + }, + "target_applied_quantity": { + "type": "integer", + "description": "" + }, + "target_applied_quantity_amount": { + "type": "integer", + "description": "" + }, + "target_applied_discount_amount": { + "type": "integer", + "description": "" + } + } + }, + "nullable": true + }, "initial_amount": { "type": "integer", "description": "A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.", From 841f9bc5da14675d0b88af53799e317ef208f989 Mon Sep 17 00:00:00 2001 From: p-woznikowski Date: Fri, 13 Dec 2024 17:36:35 +0100 Subject: [PATCH 17/23] application_details p.2 --- .../CUSTOMERS-Customer-Activity-Object.md | 1 - docs/reference-docs/ORDERS-Order-Object.md | 1 - .../QUALIFICATIONS-Qualification-Object.md | 1 - .../REDEMPTIONS-Redemption-Object.md | 1 - .../REDEMPTIONS-Rollback-Redemption-Object.md | 1 - .../VALIDATIONS-Validation-Object.md | 1 - production/readOnly-openAPI.json | 41 ---------- reference/OpenAPI.json | 81 ++++++++++--------- reference/readonly-sdks/java/OpenAPI.json | 43 ---------- reference/readonly-sdks/php/OpenAPI.json | 43 ---------- reference/readonly-sdks/python/OpenAPI.json | 43 ---------- reference/readonly-sdks/ruby/OpenAPI.json | 43 ---------- 12 files changed, 41 insertions(+), 259 deletions(-) diff --git a/docs/reference-docs/CUSTOMERS-Customer-Activity-Object.md b/docs/reference-docs/CUSTOMERS-Customer-Activity-Object.md index 62bf4ca7..5b7d4cc3 100644 --- a/docs/reference-docs/CUSTOMERS-Customer-Activity-Object.md +++ b/docs/reference-docs/CUSTOMERS-Customer-Activity-Object.md @@ -1027,7 +1027,6 @@ One of: | applied_discount_quantity
`integer` |

Number of the discounted items applied in the transaction.

| | applied_quantity
`integer` |

Quantity of items changed by the application of a new quantity items. It can be positive when an item is added or negative if an item is replaced.

| | applied_quantity_amount
`integer` |

Amount for the items changed by the application of a new quantity items. It can be positive when an item is added or negative if an item is replaced.

| -| application_details
`array` | Array of:
AttributesDescription
source_index
integer
source_applied_quantity
integer
source_applied_quantity_amount
integer
target_index
integer
target_applied_quantity
integer
target_applied_quantity_amount
integer
target_applied_discount_amount
integer
| | initial_amount
`integer` |

A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.

| | price
`integer` |

Unit price of an item. Value is multiplied by 100 to precisely represent 2 decimal places. For example 10000 cents for $100.00.

| | subtotal_amount
`integer` |

Final order item amount after the applied item-level discount. If there are no item-level discounts applied, this item is equal to the amount.
subtotal_amount=amount-applied_discount_amount

| diff --git a/docs/reference-docs/ORDERS-Order-Object.md b/docs/reference-docs/ORDERS-Order-Object.md index 178fb55b..6e14c5b3 100644 --- a/docs/reference-docs/ORDERS-Order-Object.md +++ b/docs/reference-docs/ORDERS-Order-Object.md @@ -51,7 +51,6 @@ order: 1 | applied_discount_quantity
`integer` |

Number of the discounted items applied in the transaction.

| | applied_quantity
`integer` |

Quantity of items changed by the application of a new quantity items. It can be positive when an item is added or negative if an item is replaced.

| | applied_quantity_amount
`integer` |

Amount for the items changed by the application of a new quantity items. It can be positive when an item is added or negative if an item is replaced.

| -| application_details
`array` | Array of:
AttributesDescription
source_index
integer
source_applied_quantity
integer
source_applied_quantity_amount
integer
target_index
integer
target_applied_quantity
integer
target_applied_quantity_amount
integer
target_applied_discount_amount
integer
| | initial_amount
`integer` |

A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.

| | price
`integer` |

Unit price of an item. Value is multiplied by 100 to precisely represent 2 decimal places. For example 10000 cents for $100.00.

| | subtotal_amount
`integer` |

Final order item amount after the applied item-level discount. If there are no item-level discounts applied, this item is equal to the amount.
subtotal_amount=amount-applied_discount_amount

| diff --git a/docs/reference-docs/QUALIFICATIONS-Qualification-Object.md b/docs/reference-docs/QUALIFICATIONS-Qualification-Object.md index a1b73c05..5a1a2097 100644 --- a/docs/reference-docs/QUALIFICATIONS-Qualification-Object.md +++ b/docs/reference-docs/QUALIFICATIONS-Qualification-Object.md @@ -94,7 +94,6 @@ All of: | applied_discount_quantity
`integer` |

Number of the discounted items applied in the transaction.

| | applied_quantity
`integer` |

Quantity of items changed by the application of a new quantity items. It can be positive when an item is added or negative if an item is replaced.

| | applied_quantity_amount
`integer` |

Amount for the items changed by the application of a new quantity items. It can be positive when an item is added or negative if an item is replaced.

| -| application_details
`array` | Array of:
AttributesDescription
source_index
integer
source_applied_quantity
integer
source_applied_quantity_amount
integer
target_index
integer
target_applied_quantity
integer
target_applied_quantity_amount
integer
target_applied_discount_amount
integer
| | initial_amount
`integer` |

A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.

| | price
`integer` |

Unit price of an item. Value is multiplied by 100 to precisely represent 2 decimal places. For example 10000 cents for $100.00.

| | subtotal_amount
`integer` |

Final order item amount after the applied item-level discount. If there are no item-level discounts applied, this item is equal to the amount.
subtotal_amount=amount-applied_discount_amount

| diff --git a/docs/reference-docs/REDEMPTIONS-Redemption-Object.md b/docs/reference-docs/REDEMPTIONS-Redemption-Object.md index 0f1aac37..9d001ad1 100644 --- a/docs/reference-docs/REDEMPTIONS-Redemption-Object.md +++ b/docs/reference-docs/REDEMPTIONS-Redemption-Object.md @@ -133,7 +133,6 @@ All of: | applied_discount_quantity
`integer` |

Number of the discounted items applied in the transaction.

| | applied_quantity
`integer` |

Quantity of items changed by the application of a new quantity items. It can be positive when an item is added or negative if an item is replaced.

| | applied_quantity_amount
`integer` |

Amount for the items changed by the application of a new quantity items. It can be positive when an item is added or negative if an item is replaced.

| -| application_details
`array` | Array of:
AttributesDescription
source_index
integer
source_applied_quantity
integer
source_applied_quantity_amount
integer
target_index
integer
target_applied_quantity
integer
target_applied_quantity_amount
integer
target_applied_discount_amount
integer
| | initial_amount
`integer` |

A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.

| | price
`integer` |

Unit price of an item. Value is multiplied by 100 to precisely represent 2 decimal places. For example 10000 cents for $100.00.

| | subtotal_amount
`integer` |

Final order item amount after the applied item-level discount. If there are no item-level discounts applied, this item is equal to the amount.
subtotal_amount=amount-applied_discount_amount

| diff --git a/docs/reference-docs/REDEMPTIONS-Rollback-Redemption-Object.md b/docs/reference-docs/REDEMPTIONS-Rollback-Redemption-Object.md index 4089de93..80e75873 100644 --- a/docs/reference-docs/REDEMPTIONS-Rollback-Redemption-Object.md +++ b/docs/reference-docs/REDEMPTIONS-Rollback-Redemption-Object.md @@ -141,7 +141,6 @@ All of: | applied_discount_quantity
`integer` |

Number of the discounted items applied in the transaction.

| | applied_quantity
`integer` |

Quantity of items changed by the application of a new quantity items. It can be positive when an item is added or negative if an item is replaced.

| | applied_quantity_amount
`integer` |

Amount for the items changed by the application of a new quantity items. It can be positive when an item is added or negative if an item is replaced.

| -| application_details
`array` | Array of:
AttributesDescription
source_index
integer
source_applied_quantity
integer
source_applied_quantity_amount
integer
target_index
integer
target_applied_quantity
integer
target_applied_quantity_amount
integer
target_applied_discount_amount
integer
| | initial_amount
`integer` |

A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.

| | price
`integer` |

Unit price of an item. Value is multiplied by 100 to precisely represent 2 decimal places. For example 10000 cents for $100.00.

| | subtotal_amount
`integer` |

Final order item amount after the applied item-level discount. If there are no item-level discounts applied, this item is equal to the amount.
subtotal_amount=amount-applied_discount_amount

| diff --git a/docs/reference-docs/VALIDATIONS-Validation-Object.md b/docs/reference-docs/VALIDATIONS-Validation-Object.md index 449eb615..f21d48d4 100644 --- a/docs/reference-docs/VALIDATIONS-Validation-Object.md +++ b/docs/reference-docs/VALIDATIONS-Validation-Object.md @@ -201,7 +201,6 @@ One of: | applied_discount_quantity
`integer` |

Number of the discounted items applied in the transaction.

| | applied_quantity
`integer` |

Quantity of items changed by the application of a new quantity items. It can be positive when an item is added or negative if an item is replaced.

| | applied_quantity_amount
`integer` |

Amount for the items changed by the application of a new quantity items. It can be positive when an item is added or negative if an item is replaced.

| -| application_details
`array` | Array of:
AttributesDescription
source_index
integer
source_applied_quantity
integer
source_applied_quantity_amount
integer
target_index
integer
target_applied_quantity
integer
target_applied_quantity_amount
integer
target_applied_discount_amount
integer
| | initial_amount
`integer` |

A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.

| | price
`integer` |

Unit price of an item. Value is multiplied by 100 to precisely represent 2 decimal places. For example 10000 cents for $100.00.

| | subtotal_amount
`integer` |

Final order item amount after the applied item-level discount. If there are no item-level discounts applied, this item is equal to the amount.
subtotal_amount=amount-applied_discount_amount

| diff --git a/production/readOnly-openAPI.json b/production/readOnly-openAPI.json index d224b837..74be1a7d 100644 --- a/production/readOnly-openAPI.json +++ b/production/readOnly-openAPI.json @@ -16795,47 +16795,6 @@ "description": "Amount for the items changed by the application of a new quantity items. It can be positive when an item is added or negative if an item is replaced.", "nullable": true }, - "application_details": { - "type": "array", - "description": "", - "items": { - "type": "object", - "description": "", - "properties": { - "source_index": { - "type": "integer", - "description": "", - "minimum": 0 - }, - "source_applied_quantity": { - "type": "integer", - "description": "", - "maximum": -1 - }, - "source_applied_quantity_amount": { - "type": "integer", - "description": "" - }, - "target_index": { - "type": "integer", - "description": "" - }, - "target_applied_quantity": { - "type": "integer", - "description": "" - }, - "target_applied_quantity_amount": { - "type": "integer", - "description": "" - }, - "target_applied_discount_amount": { - "type": "integer", - "description": "" - } - } - }, - "nullable": true - }, "initial_amount": { "type": "integer", "description": "A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.", diff --git a/reference/OpenAPI.json b/reference/OpenAPI.json index ae6b585a..b75646a9 100644 --- a/reference/OpenAPI.json +++ b/reference/OpenAPI.json @@ -3500,46 +3500,6 @@ "type": "integer", "description": "Amount for the items changed by the application of a new quantity items. It can be positive when an item is added or negative if an item is replaced." }, - "application_details": { - "type": "array", - "description": "", - "items": { - "type": "object", - "description": "", - "properties": { - "source_index": { - "type": "integer", - "description": "", - "minimum": 0 - }, - "source_applied_quantity": { - "type": "integer", - "description": "", - "maximum": -1 - }, - "source_applied_quantity_amount": { - "type": "integer", - "description": "" - }, - "target_index": { - "type": "integer", - "description": "" - }, - "target_applied_quantity": { - "type": "integer", - "description": "" - }, - "target_applied_quantity_amount": { - "type": "integer", - "description": "" - }, - "target_applied_discount_amount": { - "type": "integer", - "description": "" - } - } - } - }, "initial_amount": { "type": "integer", "description": "A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts." @@ -3629,6 +3589,47 @@ "object" ] }, + "ApplicationDetails": { + "type": "array", + "description": "Array containing details about the items that are replaced and the items that are replacements for discounts with the `REPLACE_ITEMS` effect.", + "items": { + "type": "object", + "description": "Object representing item replacement.", + "properties": { + "source_index": { + "type": "integer", + "description": "Index number of the source item that is replaced. The enumeration starts from `0`, which represents the first item in the request, e.g., if the replaced item is passed as the second in the request, `source_index` equals `3`.", + "minimum": 0 + }, + "source_applied_quantity": { + "type": "integer", + "description": "Number of source units that are replaced.", + "maximum": -1 + }, + "source_applied_quantity_amount": { + "type": "integer", + "description": "Amount equal to the price of the units that are replaced. Determines the change of the amount of the source item quantity.", + "maximum": 0 + }, + "target_index": { + "type": "integer", + "description": "Index number of the target item that is a replacement of the source item. The enumeration continues the values for the order items, e.g. if there are three items in the request, `target_index` equals `3`, as enumeration starts from `0`." + }, + "target_applied_quantity": { + "type": "integer", + "description": "Number of added target units that are replacements." + }, + "target_applied_quantity_amount": { + "type": "integer", + "description": "Amount equal to the price of the units that are replacements. Determines the change in the amount of the target item quantity." + }, + "target_applied_discount_amount": { + "type": "integer", + "description": "Discount amount applied to the target item with regard to the replacement. Equals the `target_applied_quantity_amount` minus `source_applied_quantity_amount`." + } + } + } + }, "Session": { "type": "object", "title": "Session", diff --git a/reference/readonly-sdks/java/OpenAPI.json b/reference/readonly-sdks/java/OpenAPI.json index 3c26b42b..a0ca3ce4 100644 --- a/reference/readonly-sdks/java/OpenAPI.json +++ b/reference/readonly-sdks/java/OpenAPI.json @@ -34185,49 +34185,6 @@ "description": "Amount for the items changed by the application of a new quantity items. It can be positive when an item is added or negative if an item is replaced.", "nullable": true }, - "application_details": { - "title": "OrderCalculatedItemApplicationDetails", - "type": "array", - "description": "", - "items": { - "title": "OrderCalculatedItemApplicationDetailsItem", - "type": "object", - "description": "", - "properties": { - "source_index": { - "type": "integer", - "description": "", - "minimum": 0 - }, - "source_applied_quantity": { - "type": "integer", - "description": "", - "maximum": -1 - }, - "source_applied_quantity_amount": { - "type": "integer", - "description": "" - }, - "target_index": { - "type": "integer", - "description": "" - }, - "target_applied_quantity": { - "type": "integer", - "description": "" - }, - "target_applied_quantity_amount": { - "type": "integer", - "description": "" - }, - "target_applied_discount_amount": { - "type": "integer", - "description": "" - } - } - }, - "nullable": true - }, "initial_amount": { "type": "integer", "description": "A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.", diff --git a/reference/readonly-sdks/php/OpenAPI.json b/reference/readonly-sdks/php/OpenAPI.json index bb4d23b4..84ebb023 100644 --- a/reference/readonly-sdks/php/OpenAPI.json +++ b/reference/readonly-sdks/php/OpenAPI.json @@ -35231,49 +35231,6 @@ "description": "Amount for the items changed by the application of a new quantity items. It can be positive when an item is added or negative if an item is replaced.", "nullable": true }, - "application_details": { - "title": "OrderCalculatedItemApplicationDetails", - "type": "array", - "description": "", - "items": { - "title": "OrderCalculatedItemApplicationDetailsItem", - "type": "object", - "description": "", - "properties": { - "source_index": { - "type": "integer", - "description": "", - "minimum": 0 - }, - "source_applied_quantity": { - "type": "integer", - "description": "", - "maximum": -1 - }, - "source_applied_quantity_amount": { - "type": "integer", - "description": "" - }, - "target_index": { - "type": "integer", - "description": "" - }, - "target_applied_quantity": { - "type": "integer", - "description": "" - }, - "target_applied_quantity_amount": { - "type": "integer", - "description": "" - }, - "target_applied_discount_amount": { - "type": "integer", - "description": "" - } - } - }, - "nullable": true - }, "initial_amount": { "type": "integer", "description": "A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.", diff --git a/reference/readonly-sdks/python/OpenAPI.json b/reference/readonly-sdks/python/OpenAPI.json index bd2b5830..05c5d518 100644 --- a/reference/readonly-sdks/python/OpenAPI.json +++ b/reference/readonly-sdks/python/OpenAPI.json @@ -33700,49 +33700,6 @@ "description": "Amount for the items changed by the application of a new quantity items. It can be positive when an item is added or negative if an item is replaced.", "nullable": true }, - "application_details": { - "title": "OrderCalculatedItemApplicationDetails", - "type": "array", - "description": "", - "items": { - "title": "OrderCalculatedItemApplicationDetailsItem", - "type": "object", - "description": "", - "properties": { - "source_index": { - "type": "integer", - "description": "", - "minimum": 0 - }, - "source_applied_quantity": { - "type": "integer", - "description": "", - "maximum": -1 - }, - "source_applied_quantity_amount": { - "type": "integer", - "description": "" - }, - "target_index": { - "type": "integer", - "description": "" - }, - "target_applied_quantity": { - "type": "integer", - "description": "" - }, - "target_applied_quantity_amount": { - "type": "integer", - "description": "" - }, - "target_applied_discount_amount": { - "type": "integer", - "description": "" - } - } - }, - "nullable": true - }, "initial_amount": { "type": "integer", "description": "A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.", diff --git a/reference/readonly-sdks/ruby/OpenAPI.json b/reference/readonly-sdks/ruby/OpenAPI.json index d6066867..10461e52 100644 --- a/reference/readonly-sdks/ruby/OpenAPI.json +++ b/reference/readonly-sdks/ruby/OpenAPI.json @@ -34219,49 +34219,6 @@ "description": "Amount for the items changed by the application of a new quantity items. It can be positive when an item is added or negative if an item is replaced.", "nullable": true }, - "application_details": { - "title": "OrderCalculatedItemApplicationDetails", - "type": "array", - "description": "", - "items": { - "title": "OrderCalculatedItemApplicationDetailsItem", - "type": "object", - "description": "", - "properties": { - "source_index": { - "type": "integer", - "description": "", - "minimum": 0 - }, - "source_applied_quantity": { - "type": "integer", - "description": "", - "maximum": -1 - }, - "source_applied_quantity_amount": { - "type": "integer", - "description": "" - }, - "target_index": { - "type": "integer", - "description": "" - }, - "target_applied_quantity": { - "type": "integer", - "description": "" - }, - "target_applied_quantity_amount": { - "type": "integer", - "description": "" - }, - "target_applied_discount_amount": { - "type": "integer", - "description": "" - } - } - }, - "nullable": true - }, "initial_amount": { "type": "integer", "description": "A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.", From 4d775df7b13cc183da61110bc5f9d96a77222a22 Mon Sep 17 00:00:00 2001 From: p-woznikowski Date: Tue, 17 Dec 2024 16:55:41 +0100 Subject: [PATCH 18/23] application_details p.3 --- .../CUSTOMERS-Customer-Activity-Object.md | 65 +- docs/reference-docs/ORDERS-Order-Object.md | 26 - .../QUALIFICATIONS-Qualification-Object.md | 32 +- .../REDEMPTIONS-Redemption-Object.md | 57 +- .../REDEMPTIONS-Rollback-Redemption-Object.md | 54 +- .../VALIDATIONS-Validation-Object.md | 54 +- production/readOnly-openAPI.json | 405 ++- reference/OpenAPI.json | 365 ++- reference/readonly-sdks/java/OpenAPI.json | 2607 +++++++++++++-- reference/readonly-sdks/php/OpenAPI.json | 2844 +++++++++++++++-- reference/readonly-sdks/python/OpenAPI.json | 2565 +++++++++++++-- reference/readonly-sdks/ruby/OpenAPI.json | 2607 +++++++++++++-- 12 files changed, 10620 insertions(+), 1061 deletions(-) diff --git a/docs/reference-docs/CUSTOMERS-Customer-Activity-Object.md b/docs/reference-docs/CUSTOMERS-Customer-Activity-Object.md index 5b7d4cc3..a050983e 100644 --- a/docs/reference-docs/CUSTOMERS-Customer-Activity-Object.md +++ b/docs/reference-docs/CUSTOMERS-Customer-Activity-Object.md @@ -235,7 +235,8 @@ One of: | loyalty_tier | See: [Loyalty Tier](#loyalty-tier) | | earning_rule | See: [Earning Rule](#earning-rule) | | balance | See: [Voucher Balance](#voucher-balance) | -| order | See: [Order Calculated No Customer Data](#order-calculated-no-customer-data) | +| order | All of: 1. [Order Calculated No Customer Data](#order-calculated-no-customer-data) +2.
AttributesDescription
items
array

Array of items applied to the order. It can include up to 500 items.

Array of Order Item Calculated
| | event | See: [Simple Event](#simple-event) | ## Event Customer Gift Voucher Balance Added @@ -551,8 +552,10 @@ All of: | channel_id
`string` |

Unique channel ID of the user performing the redemption. This is either a user ID from a user using the Voucherify Dashboard or an X-APP-Id of a user using the API.

**Example:**

user_g24UoRO3Caxu7FCT4n5tpYEa3zUG0FrH

| | failure_code
`string` |

If the result is FAILURE, this parameter will provide a generic reason as to why the redemption failed.

**Example:**

customer_rules_violated

| | failure_message
`string` |

If the result is FAILURE, this parameter will provide a more expanded reason as to why the redemption failed.

| -| order | See: [Order Calculated No Customer Data](#order-calculated-no-customer-data) | -| previous_order | See: [Order Calculated No Customer Data](#order-calculated-no-customer-data) | +| order | All of: 1. [Order Calculated No Customer Data](#order-calculated-no-customer-data) +2.
AttributesDescription
items
array

Array of items applied to the order. It can include up to 500 items.

Array of Order Item Calculated
| +| previous_order | All of: 1. [Order Calculated No Customer Data](#order-calculated-no-customer-data) +2.
AttributesDescription
items
array

Array of items applied to the order. It can include up to 500 items.

Array of Order Item Calculated
| | reward | See: [Redemption Reward Result](#redemption-reward-result) | | amount
`integer` |

For gift cards, this is a positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the number of redeemed credits.
For loyalty cards, this is the number of loyalty points used in the transaction.

**Example:**

10000

| | reason
`string` |

System generated cause for the redemption being invalid in the context of the provided parameters.

| @@ -669,7 +672,6 @@ All of: | applied_discount_amount
`integer` |

This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).

| | items_applied_discount_amount
`integer` |

Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).
sum(items, i => i.applied_discount_amount)

| | total_applied_discount_amount
`integer` |

Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).
total_applied_discount_amount = applied_discount_amount + items_applied_discount_amount

| -| items
`array` |

Array of items applied to the order. It can include up 500 items.

Array of [Order Item Calculated](#order-item-calculated) | | metadata
`object` |

A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.

| | object
`string` |

The type of the object represented by JSON.

Available values: `order` | | created_at
`string` |

Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.

**Example:**

2021-12-22T10:13:06.487Z

| @@ -680,6 +682,31 @@ All of: | referrer | [Referrer Id](#referrer-id) | | redemptions
`object` |
AttributesDescription
[propertyName]See: Order Redemptions
| +## Order Item Calculated +| Attributes | Description | +|:-----|:--------| +| id
`string` |

Unique identifier of the order line item.

| +| sku_id
`string` |

Unique identifier of the SKU. It is assigned by Voucherify.

| +| product_id
`string` |

Unique identifier of the product. It is assigned by Voucherify.

| +| related_object
`string` |

Used along with the source_id property, can be set to either sku or product.

Available values: `product`, `sku` | +| source_id
`string` |

The merchant's product/SKU ID (if it is different from the Voucherify product/SKU ID). It is useful in the integration between multiple systems. It can be an ID from an eCommerce site, a database, or a third-party service.

| +| quantity
`integer` |

The quantity of the particular item in the cart.

| +| discount_quantity
`integer` |

Number of dicounted items.

| +| initial_quantity
`integer` |

A positive integer in the smallest unit quantity representing the total amount of the order; this is the sum of the order items' quantity.

| +| amount
`integer` |

The total amount of the order item (price * quantity).

| +| discount_amount
`integer` |

Sum of all order-item-level discounts applied to the order.

| +| applied_discount_amount
`integer` |

This field shows the order-level discount applied.

| +| applied_discount_quantity
`integer` |

Number of the discounted items applied in the transaction.

| +| applied_quantity
`integer` |

Quantity of items changed by the application of a new quantity items. It can be positive when an item is added or negative if an item is replaced.

| +| applied_quantity_amount
`integer` |

Amount for the items changed by the application of a new quantity items. It can be positive when an item is added or negative if an item is replaced.

| +| initial_amount
`integer` |

A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.

| +| price
`integer` |

Unit price of an item. Value is multiplied by 100 to precisely represent 2 decimal places. For example 10000 cents for $100.00.

| +| subtotal_amount
`integer` |

Final order item amount after the applied item-level discount. If there are no item-level discounts applied, this item is equal to the amount.
subtotal_amount=amount-applied_discount_amount

| +| product
`object` |

An object containing details of the related product.

AttributesDescription
id
string

A unique identifier that represents the product and is assigned by Voucherify.

source_id
string

The merchant's product ID (if it is different than Voucherify's product ID). It is really useful in case of integration between multiple systems. It can be an ID from an eCommerce site, a database or a 3rd party service.

override
boolean

The override set to true is used to store the product information in the system. If the product does not exist, it will be created with a source_id; if it does exist, the provided values for the name, price, and metadata will replace those already stored in the system.

name
string

Product name.

metadata
object

A set of custom key/value pairs that you can attach to a product. It can be useful for storing additional information about the product in a structured format. It can be used to create product collections.

price
number

Product price. A positive integer in the smallest currency unit (e.g. 100 cents for $1.00).

| +| sku
`object` |

An object containing details of the related SKU.

AttributesDescription
id
string

A unique identifier that represents the SKU and is assigned by Voucherify.

source_id
string

The merchant's SKU ID (if it is different than Voucherify's SKU ID). It is really useful in case of integration between multiple systems. It can be an ID from an eCommerce site, a database or a 3rd party service.

override
boolean

The override set to true is used to store the product information in the system. If the product does not exist, it will be created with a source_id; if it does exist, the provided values for the name, price, and metadata will replace those already stored in the system.

sku
string

The SKU name.

price
number

SKU price. A positive integer in the smallest currency unit (e.g. 100 cents for $1.00).

metadata
object

A set of custom key/value pairs that you can attach to an SKU. It can be useful for storing additional information about the SKU in a structured format. It can be used to create product collections.

| +| object
`string` |

The type of the object represented by JSON.

Available values: `order_item` | +| metadata
`object` |

A set of custom key/value pairs that you can attach to an item object. It can be useful for storing additional information about the item in a structured format. It can be used to define business validation rules or discount formulas.

| + ## Simple Event | Attributes | Description | |:-----|:--------| @@ -768,7 +795,8 @@ All of: |:-----|:--------| | customer | See: [Simple Customer](#simple-customer) | | referrer | See: [Simple Customer](#simple-customer) | -| order | See: [Order Calculated No Customer Data](#order-calculated-no-customer-data) | +| order | All of: 1. [Order Calculated No Customer Data](#order-calculated-no-customer-data) +2.
AttributesDescription
items
array

Array of items applied to the order. It can include up to 500 items.

Array of Order Item Calculated
| | redemption | See: [Redemption Internal](#redemption-internal) | ## Event Customer Reward Redemptions @@ -1010,31 +1038,6 @@ One of: | validity_hours | See: [Validity Hours](#validity-hours) | | metadata
`object` |

The metadata object stores all custom attributes assigned to the earning rule. A set of key/value pairs that you can attach to an earning rule object. It can be useful for storing additional information about the earning rule in a structured format.

| -## Order Item Calculated -| Attributes | Description | -|:-----|:--------| -| id
`string` |

Unique identifier of the order line item.

| -| sku_id
`string` |

Unique identifier of the SKU. It is assigned by Voucherify.

| -| product_id
`string` |

Unique identifier of the product. It is assigned by Voucherify.

| -| related_object
`string` |

Used along with the source_id property, can be set to either sku or product.

Available values: `product`, `sku` | -| source_id
`string` |

The merchant's product/SKU ID (if it is different from the Voucherify product/SKU ID). It is useful in the integration between multiple systems. It can be an ID from an eCommerce site, a database, or a third-party service.

| -| quantity
`integer` |

The quantity of the particular item in the cart.

| -| discount_quantity
`integer` |

Number of dicounted items.

| -| initial_quantity
`integer` |

A positive integer in the smallest unit quantity representing the total amount of the order; this is the sum of the order items' quantity.

| -| amount
`integer` |

The total amount of the order item (price * quantity).

| -| discount_amount
`integer` |

Sum of all order-item-level discounts applied to the order.

| -| applied_discount_amount
`integer` |

This field shows the order-level discount applied.

| -| applied_discount_quantity
`integer` |

Number of the discounted items applied in the transaction.

| -| applied_quantity
`integer` |

Quantity of items changed by the application of a new quantity items. It can be positive when an item is added or negative if an item is replaced.

| -| applied_quantity_amount
`integer` |

Amount for the items changed by the application of a new quantity items. It can be positive when an item is added or negative if an item is replaced.

| -| initial_amount
`integer` |

A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.

| -| price
`integer` |

Unit price of an item. Value is multiplied by 100 to precisely represent 2 decimal places. For example 10000 cents for $100.00.

| -| subtotal_amount
`integer` |

Final order item amount after the applied item-level discount. If there are no item-level discounts applied, this item is equal to the amount.
subtotal_amount=amount-applied_discount_amount

| -| product
`object` |

An object containing details of the related product.

AttributesDescription
id
string

A unique identifier that represents the product and is assigned by Voucherify.

source_id
string

The merchant's product ID (if it is different than Voucherify's product ID). It is really useful in case of integration between multiple systems. It can be an ID from an eCommerce site, a database or a 3rd party service.

override
boolean

The override set to true is used to store the product information in the system. If the product does not exist, it will be created with a source_id; if it does exist, the provided values for the name, price, and metadata will replace those already stored in the system.

name
string

Product name.

metadata
object

A set of custom key/value pairs that you can attach to a product. It can be useful for storing additional information about the product in a structured format. It can be used to create product collections.

price
number

Product price. A positive integer in the smallest currency unit (e.g. 100 cents for $1.00).

| -| sku
`object` |

An object containing details of the related SKU.

AttributesDescription
id
string

A unique identifier that represents the SKU and is assigned by Voucherify.

source_id
string

The merchant's SKU ID (if it is different than Voucherify's SKU ID). It is really useful in case of integration between multiple systems. It can be an ID from an eCommerce site, a database or a 3rd party service.

override
boolean

The override set to true is used to store the product information in the system. If the product does not exist, it will be created with a source_id; if it does exist, the provided values for the name, price, and metadata will replace those already stored in the system.

sku
string

The SKU name.

price
number

SKU price. A positive integer in the smallest currency unit (e.g. 100 cents for $1.00).

metadata
object

A set of custom key/value pairs that you can attach to an SKU. It can be useful for storing additional information about the SKU in a structured format. It can be used to create product collections.

| -| object
`string` |

The type of the object represented by JSON.

Available values: `order_item` | -| metadata
`object` |

A set of custom key/value pairs that you can attach to an item object. It can be useful for storing additional information about the item in a structured format. It can be used to define business validation rules or discount formulas.

| - ## Customer Id | Attributes | Description | |:-----|:--------| @@ -1098,7 +1101,7 @@ One of: | total_discount_amount
`integer` |

Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).

| | total_applied_discount_amount
`integer` |

Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).
total_applied_discount_amount = applied_discount_amount + items_applied_discount_amount

| | total_amount
`integer` |

Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).

| -| items
`array` |

Array of items applied to the order. It can include up 500 items.

Array of [Simple Order Item](#simple-order-item) | +| items
`array` |

Array of items applied to the order. It can include up to 500 items.

Array of [Simple Order Item](#simple-order-item) | | metadata
`object` |

A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.

| | object
`string` |

The type of the object represented by JSON.

Available values: `order` | diff --git a/docs/reference-docs/ORDERS-Order-Object.md b/docs/reference-docs/ORDERS-Order-Object.md index 6e14c5b3..dff79d84 100644 --- a/docs/reference-docs/ORDERS-Order-Object.md +++ b/docs/reference-docs/ORDERS-Order-Object.md @@ -23,7 +23,6 @@ order: 1 | applied_discount_amount
`integer` |

This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).

| | items_applied_discount_amount
`integer` |

Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).
sum(items, i => i.applied_discount_amount)

| | total_applied_discount_amount
`integer` |

Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).
total_applied_discount_amount = applied_discount_amount + items_applied_discount_amount

| -| items
`array` |

Array of items applied to the order. It can include up 500 items.

Array of [Order Item Calculated](#order-item-calculated) | | metadata
`object` |

A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.

| | object
`string` |

The type of the object represented by JSON.

Available values: `order` | | created_at
`string` |

Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.

**Example:**

2021-12-22T10:13:06.487Z

| @@ -34,31 +33,6 @@ order: 1 | referrer | [Referrer Id](#referrer-id) | | redemptions
`object` |
AttributesDescription
[propertyName]See: Order Redemptions
| -## Order Item Calculated -| Attributes | Description | -|:-----|:--------| -| id
`string` |

Unique identifier of the order line item.

| -| sku_id
`string` |

Unique identifier of the SKU. It is assigned by Voucherify.

| -| product_id
`string` |

Unique identifier of the product. It is assigned by Voucherify.

| -| related_object
`string` |

Used along with the source_id property, can be set to either sku or product.

Available values: `product`, `sku` | -| source_id
`string` |

The merchant's product/SKU ID (if it is different from the Voucherify product/SKU ID). It is useful in the integration between multiple systems. It can be an ID from an eCommerce site, a database, or a third-party service.

| -| quantity
`integer` |

The quantity of the particular item in the cart.

| -| discount_quantity
`integer` |

Number of dicounted items.

| -| initial_quantity
`integer` |

A positive integer in the smallest unit quantity representing the total amount of the order; this is the sum of the order items' quantity.

| -| amount
`integer` |

The total amount of the order item (price * quantity).

| -| discount_amount
`integer` |

Sum of all order-item-level discounts applied to the order.

| -| applied_discount_amount
`integer` |

This field shows the order-level discount applied.

| -| applied_discount_quantity
`integer` |

Number of the discounted items applied in the transaction.

| -| applied_quantity
`integer` |

Quantity of items changed by the application of a new quantity items. It can be positive when an item is added or negative if an item is replaced.

| -| applied_quantity_amount
`integer` |

Amount for the items changed by the application of a new quantity items. It can be positive when an item is added or negative if an item is replaced.

| -| initial_amount
`integer` |

A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.

| -| price
`integer` |

Unit price of an item. Value is multiplied by 100 to precisely represent 2 decimal places. For example 10000 cents for $100.00.

| -| subtotal_amount
`integer` |

Final order item amount after the applied item-level discount. If there are no item-level discounts applied, this item is equal to the amount.
subtotal_amount=amount-applied_discount_amount

| -| product
`object` |

An object containing details of the related product.

AttributesDescription
id
string

A unique identifier that represents the product and is assigned by Voucherify.

source_id
string

The merchant's product ID (if it is different than Voucherify's product ID). It is really useful in case of integration between multiple systems. It can be an ID from an eCommerce site, a database or a 3rd party service.

override
boolean

The override set to true is used to store the product information in the system. If the product does not exist, it will be created with a source_id; if it does exist, the provided values for the name, price, and metadata will replace those already stored in the system.

name
string

Product name.

metadata
object

A set of custom key/value pairs that you can attach to a product. It can be useful for storing additional information about the product in a structured format. It can be used to create product collections.

price
number

Product price. A positive integer in the smallest currency unit (e.g. 100 cents for $1.00).

| -| sku
`object` |

An object containing details of the related SKU.

AttributesDescription
id
string

A unique identifier that represents the SKU and is assigned by Voucherify.

source_id
string

The merchant's SKU ID (if it is different than Voucherify's SKU ID). It is really useful in case of integration between multiple systems. It can be an ID from an eCommerce site, a database or a 3rd party service.

override
boolean

The override set to true is used to store the product information in the system. If the product does not exist, it will be created with a source_id; if it does exist, the provided values for the name, price, and metadata will replace those already stored in the system.

sku
string

The SKU name.

price
number

SKU price. A positive integer in the smallest currency unit (e.g. 100 cents for $1.00).

metadata
object

A set of custom key/value pairs that you can attach to an SKU. It can be useful for storing additional information about the SKU in a structured format. It can be used to create product collections.

| -| object
`string` |

The type of the object represented by JSON.

Available values: `order_item` | -| metadata
`object` |

A set of custom key/value pairs that you can attach to an item object. It can be useful for storing additional information about the item in a structured format. It can be used to define business validation rules or discount formulas.

| - ## Customer Id | Attributes | Description | |:-----|:--------| diff --git a/docs/reference-docs/QUALIFICATIONS-Qualification-Object.md b/docs/reference-docs/QUALIFICATIONS-Qualification-Object.md index 5a1a2097..86718021 100644 --- a/docs/reference-docs/QUALIFICATIONS-Qualification-Object.md +++ b/docs/reference-docs/QUALIFICATIONS-Qualification-Object.md @@ -17,7 +17,8 @@ order: 1 |:-----|:--------| | redeemables | See: [Redeemables](#redeemables) | | tracking_id
`string` |

This identifier is generated during voucher qualification based on your internal id (e.g., email, database ID). This is a hashed customer source ID.

| -| order
`object` | [Order Calculated No Customer Data](#order-calculated-no-customer-data) | +| order
`object` | All of: 1. [Order Calculated No Customer Data](#order-calculated-no-customer-data) +2.
AttributesDescription
items
array

Array of items applied to the order. It can include up to 500 items.

| | stacking_rules | See: [Stacking Rules](#stacking-rules) | ## Redeemables @@ -45,7 +46,6 @@ order: 1 | applied_discount_amount
`integer` |

This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).

| | items_applied_discount_amount
`integer` |

Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).
sum(items, i => i.applied_discount_amount)

| | total_applied_discount_amount
`integer` |

Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).
total_applied_discount_amount = applied_discount_amount + items_applied_discount_amount

| -| items
`array` |

Array of items applied to the order. It can include up 500 items.

Array of [Order Item Calculated](#order-item-calculated) | | metadata
`object` |

A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.

| | object
`string` |

The type of the object represented by JSON.

Available values: `order` | | created_at
`string` |

Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.

**Example:**

2021-12-22T10:13:06.487Z

| @@ -77,31 +77,6 @@ All of: 1. [Single redeemable](#single-redeemable) 2.
AttributesDescription
redeemables
array
Array of Single redeemable
-## Order Item Calculated -| Attributes | Description | -|:-----|:--------| -| id
`string` |

Unique identifier of the order line item.

| -| sku_id
`string` |

Unique identifier of the SKU. It is assigned by Voucherify.

| -| product_id
`string` |

Unique identifier of the product. It is assigned by Voucherify.

| -| related_object
`string` |

Used along with the source_id property, can be set to either sku or product.

Available values: `product`, `sku` | -| source_id
`string` |

The merchant's product/SKU ID (if it is different from the Voucherify product/SKU ID). It is useful in the integration between multiple systems. It can be an ID from an eCommerce site, a database, or a third-party service.

| -| quantity
`integer` |

The quantity of the particular item in the cart.

| -| discount_quantity
`integer` |

Number of dicounted items.

| -| initial_quantity
`integer` |

A positive integer in the smallest unit quantity representing the total amount of the order; this is the sum of the order items' quantity.

| -| amount
`integer` |

The total amount of the order item (price * quantity).

| -| discount_amount
`integer` |

Sum of all order-item-level discounts applied to the order.

| -| applied_discount_amount
`integer` |

This field shows the order-level discount applied.

| -| applied_discount_quantity
`integer` |

Number of the discounted items applied in the transaction.

| -| applied_quantity
`integer` |

Quantity of items changed by the application of a new quantity items. It can be positive when an item is added or negative if an item is replaced.

| -| applied_quantity_amount
`integer` |

Amount for the items changed by the application of a new quantity items. It can be positive when an item is added or negative if an item is replaced.

| -| initial_amount
`integer` |

A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.

| -| price
`integer` |

Unit price of an item. Value is multiplied by 100 to precisely represent 2 decimal places. For example 10000 cents for $100.00.

| -| subtotal_amount
`integer` |

Final order item amount after the applied item-level discount. If there are no item-level discounts applied, this item is equal to the amount.
subtotal_amount=amount-applied_discount_amount

| -| product
`object` |

An object containing details of the related product.

AttributesDescription
id
string

A unique identifier that represents the product and is assigned by Voucherify.

source_id
string

The merchant's product ID (if it is different than Voucherify's product ID). It is really useful in case of integration between multiple systems. It can be an ID from an eCommerce site, a database or a 3rd party service.

override
boolean

The override set to true is used to store the product information in the system. If the product does not exist, it will be created with a source_id; if it does exist, the provided values for the name, price, and metadata will replace those already stored in the system.

name
string

Product name.

metadata
object

A set of custom key/value pairs that you can attach to a product. It can be useful for storing additional information about the product in a structured format. It can be used to create product collections.

price
number

Product price. A positive integer in the smallest currency unit (e.g. 100 cents for $1.00).

| -| sku
`object` |

An object containing details of the related SKU.

AttributesDescription
id
string

A unique identifier that represents the SKU and is assigned by Voucherify.

source_id
string

The merchant's SKU ID (if it is different than Voucherify's SKU ID). It is really useful in case of integration between multiple systems. It can be an ID from an eCommerce site, a database or a 3rd party service.

override
boolean

The override set to true is used to store the product information in the system. If the product does not exist, it will be created with a source_id; if it does exist, the provided values for the name, price, and metadata will replace those already stored in the system.

sku
string

The SKU name.

price
number

SKU price. A positive integer in the smallest currency unit (e.g. 100 cents for $1.00).

metadata
object

A set of custom key/value pairs that you can attach to an SKU. It can be useful for storing additional information about the SKU in a structured format. It can be used to create product collections.

| -| object
`string` |

The type of the object represented by JSON.

Available values: `order_item` | -| metadata
`object` |

A set of custom key/value pairs that you can attach to an item object. It can be useful for storing additional information about the item in a structured format. It can be used to define business validation rules or discount formulas.

| - ## Customer Id | Attributes | Description | |:-----|:--------| @@ -130,7 +105,8 @@ All of: | object
`string` |

Object type of the redeemable.

Available values: `campaign`, `promotion_tier`, `promotion_stack`, `voucher` | | created_at
`string` |

Timestamp representing the date and time when the object was created. The value is shown in the ISO 8601 format.

**Example:**

2022-03-09T11:19:04.819Z

| | result | See: [Redeemable Result](#redeemable-result) | -| order | See: [Order Calculated No Customer Data](#order-calculated-no-customer-data) | +| order | All of: 1. [Order Calculated No Customer Data](#order-calculated-no-customer-data) +2.
AttributesDescription
items
array

Array of items applied to the order. It can include up to 500 items.

| | validation_rule_id
`string` |

A unique validation rule identifier assigned by the Voucherify API. The validation rule is verified before points are added to the balance.

| | applicable_to |

Contains list of items that qualify in the scope of the discount. These are definitions of included products, SKUs, and product collections. These can be discounted.

[Applicable To Result List](#applicable-to-result-list) | | inapplicable_to |

Contains list of items that do not qualify in the scope of the discount. These are definitions of excluded products, SKUs, and product collections. These CANNOT be discounted.

[Inapplicable To Result List](#inapplicable-to-result-list) | diff --git a/docs/reference-docs/REDEMPTIONS-Redemption-Object.md b/docs/reference-docs/REDEMPTIONS-Redemption-Object.md index 9d001ad1..0ebbd3fb 100644 --- a/docs/reference-docs/REDEMPTIONS-Redemption-Object.md +++ b/docs/reference-docs/REDEMPTIONS-Redemption-Object.md @@ -13,7 +13,8 @@ order: 1 |:-----|:--------| | redemptions
`array` | Array of [Redemption](#redemption) | | parent_redemption | See: [Redemption](#redemption) | -| order |

Contains the order details associated with the redemption.

[Order Calculated No Customer Data](#order-calculated-no-customer-data) | +| order |

Contains the order details associated with the redemption.

All of: 1. [Order Calculated No Customer Data](#order-calculated-no-customer-data) +2.
AttributesDescription
items
array

Array of items applied to the order. It can include up to 500 items.

| | inapplicable_redeemables
`array` |

Lists validation results of each inapplicable redeemable.

Array of [Inapplicable Redeemable](#inapplicable-redeemable) | | skipped_redeemables
`array` |

Lists validation results of each redeemable. If a redeemable can be applied, the API returns "status": "APPLICABLE".

Array of [Skipped Redeemable](#skipped-redeemable) | @@ -40,7 +41,6 @@ All of: | applied_discount_amount
`integer` |

This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).

| | items_applied_discount_amount
`integer` |

Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).
sum(items, i => i.applied_discount_amount)

| | total_applied_discount_amount
`integer` |

Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).
total_applied_discount_amount = applied_discount_amount + items_applied_discount_amount

| -| items
`array` |

Array of items applied to the order. It can include up 500 items.

Array of [Order Item Calculated](#order-item-calculated) | | metadata
`object` |

A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.

| | object
`string` |

The type of the object represented by JSON.

Available values: `order` | | created_at
`string` |

Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.

**Example:**

2021-12-22T10:13:06.487Z

| @@ -93,7 +93,8 @@ All of: | related_redemptions
`object` |
AttributesDescription
rollbacks
array
Array of:

Redemption Related Redemptions Rollbacks Item

AttributesDescription
id
string

Unique rollback redemption ID.

Example:

rr_0bc92f81a6801f9bca

date
string

Timestamp representing the date and time when the object was created. The value is shown in the ISO 8601 format.

Example:

2021-12-22T10:13:06.487Z

redemptions
array
Array of:

Redemption Related Redemptions Item

AttributesDescription
id
string

Unique redemption ID.

Example:

r_0bc92f81a6801f9bca

date
string

Timestamp representing the date and time when the object was created. The value is shown in the ISO 8601 format.

Example:

2021-12-22T10:13:06.487Z

| | failure_code
`string` |

If the result is FAILURE, this parameter will provide a generic reason as to why the redemption failed.

**Example:**

customer_rules_violated

| | failure_message
`string` |

If the result is FAILURE, this parameter will provide a more expanded reason as to why the redemption failed.

| -| order | [Order Calculated No Customer Data](#order-calculated-no-customer-data) | +| order | All of: 1. [Order Calculated No Customer Data](#order-calculated-no-customer-data) +2.
AttributesDescription
items
array

Array of items applied to the order. It can include up to 500 items.

Array of Order Item Calculated
| | channel
`object` |

Defines the details of the channel through which the redemption was issued.

AttributesDescription
channel_id
string

Unique channel ID of the user performing the redemption. This is either a user ID from a user using the Voucherify Dashboard or an X-APP-Id of a user using the API. For AUTO_REDEEM, it is the reward assignment ID.

Example:

user_g24UoRO3Caxu7FCT4n5tpYEa3zUG0FrH

channel_type
string

The source of the channel for the redemption. A USER corresponds to the Voucherify Dashboard, API corresponds to the API, and AUTO_REDEEM corresponds to a loyalty campaign reward that has been redeemed automatically.

Available values: USER, API, AUTO_REDEEM
| | customer | [Simple Customer](#simple-customer) | | related_object_type
`string` |

Defines the related object.

Available values: `voucher`, `promotion_tier`, `redemption` | @@ -116,31 +117,6 @@ All of: |:-----|:--------| | holder | See: [Simple Customer](#simple-customer) | -## Order Item Calculated -| Attributes | Description | -|:-----|:--------| -| id
`string` |

Unique identifier of the order line item.

| -| sku_id
`string` |

Unique identifier of the SKU. It is assigned by Voucherify.

| -| product_id
`string` |

Unique identifier of the product. It is assigned by Voucherify.

| -| related_object
`string` |

Used along with the source_id property, can be set to either sku or product.

Available values: `product`, `sku` | -| source_id
`string` |

The merchant's product/SKU ID (if it is different from the Voucherify product/SKU ID). It is useful in the integration between multiple systems. It can be an ID from an eCommerce site, a database, or a third-party service.

| -| quantity
`integer` |

The quantity of the particular item in the cart.

| -| discount_quantity
`integer` |

Number of dicounted items.

| -| initial_quantity
`integer` |

A positive integer in the smallest unit quantity representing the total amount of the order; this is the sum of the order items' quantity.

| -| amount
`integer` |

The total amount of the order item (price * quantity).

| -| discount_amount
`integer` |

Sum of all order-item-level discounts applied to the order.

| -| applied_discount_amount
`integer` |

This field shows the order-level discount applied.

| -| applied_discount_quantity
`integer` |

Number of the discounted items applied in the transaction.

| -| applied_quantity
`integer` |

Quantity of items changed by the application of a new quantity items. It can be positive when an item is added or negative if an item is replaced.

| -| applied_quantity_amount
`integer` |

Amount for the items changed by the application of a new quantity items. It can be positive when an item is added or negative if an item is replaced.

| -| initial_amount
`integer` |

A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.

| -| price
`integer` |

Unit price of an item. Value is multiplied by 100 to precisely represent 2 decimal places. For example 10000 cents for $100.00.

| -| subtotal_amount
`integer` |

Final order item amount after the applied item-level discount. If there are no item-level discounts applied, this item is equal to the amount.
subtotal_amount=amount-applied_discount_amount

| -| product
`object` |

An object containing details of the related product.

AttributesDescription
id
string

A unique identifier that represents the product and is assigned by Voucherify.

source_id
string

The merchant's product ID (if it is different than Voucherify's product ID). It is really useful in case of integration between multiple systems. It can be an ID from an eCommerce site, a database or a 3rd party service.

override
boolean

The override set to true is used to store the product information in the system. If the product does not exist, it will be created with a source_id; if it does exist, the provided values for the name, price, and metadata will replace those already stored in the system.

name
string

Product name.

metadata
object

A set of custom key/value pairs that you can attach to a product. It can be useful for storing additional information about the product in a structured format. It can be used to create product collections.

price
number

Product price. A positive integer in the smallest currency unit (e.g. 100 cents for $1.00).

| -| sku
`object` |

An object containing details of the related SKU.

AttributesDescription
id
string

A unique identifier that represents the SKU and is assigned by Voucherify.

source_id
string

The merchant's SKU ID (if it is different than Voucherify's SKU ID). It is really useful in case of integration between multiple systems. It can be an ID from an eCommerce site, a database or a 3rd party service.

override
boolean

The override set to true is used to store the product information in the system. If the product does not exist, it will be created with a source_id; if it does exist, the provided values for the name, price, and metadata will replace those already stored in the system.

sku
string

The SKU name.

price
number

SKU price. A positive integer in the smallest currency unit (e.g. 100 cents for $1.00).

metadata
object

A set of custom key/value pairs that you can attach to an SKU. It can be useful for storing additional information about the SKU in a structured format. It can be used to create product collections.

| -| object
`string` |

The type of the object represented by JSON.

Available values: `order_item` | -| metadata
`object` |

A set of custom key/value pairs that you can attach to an item object. It can be useful for storing additional information about the item in a structured format. It can be used to define business validation rules or discount formulas.

| - ## Customer Id | Attributes | Description | |:-----|:--------| @@ -218,6 +194,31 @@ All of: | key
`string` | Available values: `preceding_validation_failed` | | message
`string` | **Example:**

Redeemable cannot be applied due to preceding validation failure

| +## Order Item Calculated +| Attributes | Description | +|:-----|:--------| +| id
`string` |

Unique identifier of the order line item.

| +| sku_id
`string` |

Unique identifier of the SKU. It is assigned by Voucherify.

| +| product_id
`string` |

Unique identifier of the product. It is assigned by Voucherify.

| +| related_object
`string` |

Used along with the source_id property, can be set to either sku or product.

Available values: `product`, `sku` | +| source_id
`string` |

The merchant's product/SKU ID (if it is different from the Voucherify product/SKU ID). It is useful in the integration between multiple systems. It can be an ID from an eCommerce site, a database, or a third-party service.

| +| quantity
`integer` |

The quantity of the particular item in the cart.

| +| discount_quantity
`integer` |

Number of dicounted items.

| +| initial_quantity
`integer` |

A positive integer in the smallest unit quantity representing the total amount of the order; this is the sum of the order items' quantity.

| +| amount
`integer` |

The total amount of the order item (price * quantity).

| +| discount_amount
`integer` |

Sum of all order-item-level discounts applied to the order.

| +| applied_discount_amount
`integer` |

This field shows the order-level discount applied.

| +| applied_discount_quantity
`integer` |

Number of the discounted items applied in the transaction.

| +| applied_quantity
`integer` |

Quantity of items changed by the application of a new quantity items. It can be positive when an item is added or negative if an item is replaced.

| +| applied_quantity_amount
`integer` |

Amount for the items changed by the application of a new quantity items. It can be positive when an item is added or negative if an item is replaced.

| +| initial_amount
`integer` |

A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.

| +| price
`integer` |

Unit price of an item. Value is multiplied by 100 to precisely represent 2 decimal places. For example 10000 cents for $100.00.

| +| subtotal_amount
`integer` |

Final order item amount after the applied item-level discount. If there are no item-level discounts applied, this item is equal to the amount.
subtotal_amount=amount-applied_discount_amount

| +| product
`object` |

An object containing details of the related product.

AttributesDescription
id
string

A unique identifier that represents the product and is assigned by Voucherify.

source_id
string

The merchant's product ID (if it is different than Voucherify's product ID). It is really useful in case of integration between multiple systems. It can be an ID from an eCommerce site, a database or a 3rd party service.

override
boolean

The override set to true is used to store the product information in the system. If the product does not exist, it will be created with a source_id; if it does exist, the provided values for the name, price, and metadata will replace those already stored in the system.

name
string

Product name.

metadata
object

A set of custom key/value pairs that you can attach to a product. It can be useful for storing additional information about the product in a structured format. It can be used to create product collections.

price
number

Product price. A positive integer in the smallest currency unit (e.g. 100 cents for $1.00).

| +| sku
`object` |

An object containing details of the related SKU.

AttributesDescription
id
string

A unique identifier that represents the SKU and is assigned by Voucherify.

source_id
string

The merchant's SKU ID (if it is different than Voucherify's SKU ID). It is really useful in case of integration between multiple systems. It can be an ID from an eCommerce site, a database or a 3rd party service.

override
boolean

The override set to true is used to store the product information in the system. If the product does not exist, it will be created with a source_id; if it does exist, the provided values for the name, price, and metadata will replace those already stored in the system.

sku
string

The SKU name.

price
number

SKU price. A positive integer in the smallest currency unit (e.g. 100 cents for $1.00).

metadata
object

A set of custom key/value pairs that you can attach to an SKU. It can be useful for storing additional information about the SKU in a structured format. It can be used to create product collections.

| +| object
`string` |

The type of the object represented by JSON.

Available values: `order_item` | +| metadata
`object` |

A set of custom key/value pairs that you can attach to an item object. It can be useful for storing additional information about the item in a structured format. It can be used to define business validation rules or discount formulas.

| + ## Simple Customer | Attributes | Description | |:-----|:--------| diff --git a/docs/reference-docs/REDEMPTIONS-Rollback-Redemption-Object.md b/docs/reference-docs/REDEMPTIONS-Rollback-Redemption-Object.md index 80e75873..99574ea5 100644 --- a/docs/reference-docs/REDEMPTIONS-Rollback-Redemption-Object.md +++ b/docs/reference-docs/REDEMPTIONS-Rollback-Redemption-Object.md @@ -25,7 +25,8 @@ order: 2 | related_redemptions
`object` |
AttributesDescription
rollbacks
array
Array of:

Redemption Rollback Related Redemptions Rollbacks Item

AttributesDescription
id
string

Unique identifier of the redemption rollback.

Example:

rr_0bc92f81a6801f9bca

date
string

Timestamp representing the date and time when the object was created. The value is shown in the ISO 8601 format.

Example:

2021-12-22T10:13:06.487Z

redemptions
array
Array of:

Redemption Rollback Related Redemptions Item

AttributesDescription
id
string

Unique redemption ID.

Example:

r_0bc92f81a6801f9bca

date
string

Timestamp representing the date and time when the object was created. The value is shown in the ISO 8601 format.

Example:

2021-12-22T10:13:06.487Z

| | failure_code
`string` |

If the result is FAILURE, this parameter will provide a generic reason as to why the redemption failed.

**Example:**

customer_rules_violated

| | failure_message
`string` |

If the result is FAILURE, this parameter will provide a more expanded reason as to why the redemption failed.

| -| order | [Order Calculated No Customer Data](#order-calculated-no-customer-data) | +| order | All of: 1. [Order Calculated No Customer Data](#order-calculated-no-customer-data) +2.
AttributesDescription
items
array

Array of items applied to the order. It can include up to 500 items.

Array of Order Item Calculated
| | channel
`object` |

Defines the details of the channel through which the redemption was issued.

AttributesDescription
channel_id
string

Unique identifier of the channel which was used by the user performing the redemption rollback. This is either a user ID from the user using the Voucherify Dashboard or an X-APP-Id of a user using the API.

Example:

user_g24UoRO3Caxu7FCT4n5tpYEa3zUG0FrH

channel_type
string

The source of the channel for the redemption. A USER corresponds to the Voucherify Dashboard and an API corresponds to the API.

Available values: USER, API
| | customer | [Simple Customer](#simple-customer) | | related_object_type
`string` |

Defines the related object.

Available values: `voucher`, `promotion_tier`, `redemption` | @@ -51,7 +52,6 @@ order: 2 | applied_discount_amount
`integer` |

This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).

| | items_applied_discount_amount
`integer` |

Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).
sum(items, i => i.applied_discount_amount)

| | total_applied_discount_amount
`integer` |

Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).
total_applied_discount_amount = applied_discount_amount + items_applied_discount_amount

| -| items
`array` |

Array of items applied to the order. It can include up 500 items.

Array of [Order Item Calculated](#order-item-calculated) | | metadata
`object` |

A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.

| | object
`string` |

The type of the object represented by JSON.

Available values: `order` | | created_at
`string` |

Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.

**Example:**

2021-12-22T10:13:06.487Z

| @@ -62,6 +62,31 @@ order: 2 | referrer | [Referrer Id](#referrer-id) | | redemptions
`object` |
AttributesDescription
[propertyName]See: Order Redemptions
| +## Order Item Calculated +| Attributes | Description | +|:-----|:--------| +| id
`string` |

Unique identifier of the order line item.

| +| sku_id
`string` |

Unique identifier of the SKU. It is assigned by Voucherify.

| +| product_id
`string` |

Unique identifier of the product. It is assigned by Voucherify.

| +| related_object
`string` |

Used along with the source_id property, can be set to either sku or product.

Available values: `product`, `sku` | +| source_id
`string` |

The merchant's product/SKU ID (if it is different from the Voucherify product/SKU ID). It is useful in the integration between multiple systems. It can be an ID from an eCommerce site, a database, or a third-party service.

| +| quantity
`integer` |

The quantity of the particular item in the cart.

| +| discount_quantity
`integer` |

Number of dicounted items.

| +| initial_quantity
`integer` |

A positive integer in the smallest unit quantity representing the total amount of the order; this is the sum of the order items' quantity.

| +| amount
`integer` |

The total amount of the order item (price * quantity).

| +| discount_amount
`integer` |

Sum of all order-item-level discounts applied to the order.

| +| applied_discount_amount
`integer` |

This field shows the order-level discount applied.

| +| applied_discount_quantity
`integer` |

Number of the discounted items applied in the transaction.

| +| applied_quantity
`integer` |

Quantity of items changed by the application of a new quantity items. It can be positive when an item is added or negative if an item is replaced.

| +| applied_quantity_amount
`integer` |

Amount for the items changed by the application of a new quantity items. It can be positive when an item is added or negative if an item is replaced.

| +| initial_amount
`integer` |

A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.

| +| price
`integer` |

Unit price of an item. Value is multiplied by 100 to precisely represent 2 decimal places. For example 10000 cents for $100.00.

| +| subtotal_amount
`integer` |

Final order item amount after the applied item-level discount. If there are no item-level discounts applied, this item is equal to the amount.
subtotal_amount=amount-applied_discount_amount

| +| product
`object` |

An object containing details of the related product.

AttributesDescription
id
string

A unique identifier that represents the product and is assigned by Voucherify.

source_id
string

The merchant's product ID (if it is different than Voucherify's product ID). It is really useful in case of integration between multiple systems. It can be an ID from an eCommerce site, a database or a 3rd party service.

override
boolean

The override set to true is used to store the product information in the system. If the product does not exist, it will be created with a source_id; if it does exist, the provided values for the name, price, and metadata will replace those already stored in the system.

name
string

Product name.

metadata
object

A set of custom key/value pairs that you can attach to a product. It can be useful for storing additional information about the product in a structured format. It can be used to create product collections.

price
number

Product price. A positive integer in the smallest currency unit (e.g. 100 cents for $1.00).

| +| sku
`object` |

An object containing details of the related SKU.

AttributesDescription
id
string

A unique identifier that represents the SKU and is assigned by Voucherify.

source_id
string

The merchant's SKU ID (if it is different than Voucherify's SKU ID). It is really useful in case of integration between multiple systems. It can be an ID from an eCommerce site, a database or a 3rd party service.

override
boolean

The override set to true is used to store the product information in the system. If the product does not exist, it will be created with a source_id; if it does exist, the provided values for the name, price, and metadata will replace those already stored in the system.

sku
string

The SKU name.

price
number

SKU price. A positive integer in the smallest currency unit (e.g. 100 cents for $1.00).

metadata
object

A set of custom key/value pairs that you can attach to an SKU. It can be useful for storing additional information about the SKU in a structured format. It can be used to create product collections.

| +| object
`string` |

The type of the object represented by JSON.

Available values: `order_item` | +| metadata
`object` |

A set of custom key/value pairs that you can attach to an item object. It can be useful for storing additional information about the item in a structured format. It can be used to define business validation rules or discount formulas.

| + ## Simple Customer | Attributes | Description | |:-----|:--------| @@ -124,31 +149,6 @@ All of: | metadata
`object` |

A set of custom key/value pairs that you can attach to a reward. The metadata object stores all custom attributes assigned to the reward.

| | type
`string` |

Reward type.

Available values: `CAMPAIGN`, `COIN`, `MATERIAL` | -## Order Item Calculated -| Attributes | Description | -|:-----|:--------| -| id
`string` |

Unique identifier of the order line item.

| -| sku_id
`string` |

Unique identifier of the SKU. It is assigned by Voucherify.

| -| product_id
`string` |

Unique identifier of the product. It is assigned by Voucherify.

| -| related_object
`string` |

Used along with the source_id property, can be set to either sku or product.

Available values: `product`, `sku` | -| source_id
`string` |

The merchant's product/SKU ID (if it is different from the Voucherify product/SKU ID). It is useful in the integration between multiple systems. It can be an ID from an eCommerce site, a database, or a third-party service.

| -| quantity
`integer` |

The quantity of the particular item in the cart.

| -| discount_quantity
`integer` |

Number of dicounted items.

| -| initial_quantity
`integer` |

A positive integer in the smallest unit quantity representing the total amount of the order; this is the sum of the order items' quantity.

| -| amount
`integer` |

The total amount of the order item (price * quantity).

| -| discount_amount
`integer` |

Sum of all order-item-level discounts applied to the order.

| -| applied_discount_amount
`integer` |

This field shows the order-level discount applied.

| -| applied_discount_quantity
`integer` |

Number of the discounted items applied in the transaction.

| -| applied_quantity
`integer` |

Quantity of items changed by the application of a new quantity items. It can be positive when an item is added or negative if an item is replaced.

| -| applied_quantity_amount
`integer` |

Amount for the items changed by the application of a new quantity items. It can be positive when an item is added or negative if an item is replaced.

| -| initial_amount
`integer` |

A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.

| -| price
`integer` |

Unit price of an item. Value is multiplied by 100 to precisely represent 2 decimal places. For example 10000 cents for $100.00.

| -| subtotal_amount
`integer` |

Final order item amount after the applied item-level discount. If there are no item-level discounts applied, this item is equal to the amount.
subtotal_amount=amount-applied_discount_amount

| -| product
`object` |

An object containing details of the related product.

AttributesDescription
id
string

A unique identifier that represents the product and is assigned by Voucherify.

source_id
string

The merchant's product ID (if it is different than Voucherify's product ID). It is really useful in case of integration between multiple systems. It can be an ID from an eCommerce site, a database or a 3rd party service.

override
boolean

The override set to true is used to store the product information in the system. If the product does not exist, it will be created with a source_id; if it does exist, the provided values for the name, price, and metadata will replace those already stored in the system.

name
string

Product name.

metadata
object

A set of custom key/value pairs that you can attach to a product. It can be useful for storing additional information about the product in a structured format. It can be used to create product collections.

price
number

Product price. A positive integer in the smallest currency unit (e.g. 100 cents for $1.00).

| -| sku
`object` |

An object containing details of the related SKU.

AttributesDescription
id
string

A unique identifier that represents the SKU and is assigned by Voucherify.

source_id
string

The merchant's SKU ID (if it is different than Voucherify's SKU ID). It is really useful in case of integration between multiple systems. It can be an ID from an eCommerce site, a database or a 3rd party service.

override
boolean

The override set to true is used to store the product information in the system. If the product does not exist, it will be created with a source_id; if it does exist, the provided values for the name, price, and metadata will replace those already stored in the system.

sku
string

The SKU name.

price
number

SKU price. A positive integer in the smallest currency unit (e.g. 100 cents for $1.00).

metadata
object

A set of custom key/value pairs that you can attach to an SKU. It can be useful for storing additional information about the SKU in a structured format. It can be used to create product collections.

| -| object
`string` |

The type of the object represented by JSON.

Available values: `order_item` | -| metadata
`object` |

A set of custom key/value pairs that you can attach to an item object. It can be useful for storing additional information about the item in a structured format. It can be used to define business validation rules or discount formulas.

| - ## Customer Id | Attributes | Description | |:-----|:--------| diff --git a/docs/reference-docs/VALIDATIONS-Validation-Object.md b/docs/reference-docs/VALIDATIONS-Validation-Object.md index f21d48d4..ac0e00ab 100644 --- a/docs/reference-docs/VALIDATIONS-Validation-Object.md +++ b/docs/reference-docs/VALIDATIONS-Validation-Object.md @@ -29,7 +29,8 @@ One of: | gift |

Gift object response

[Gift](#gift) | | loyalty
`object` |

Contains the cost of reward in points.

AttributesDescription
points_cost
number

Number of points that wlil be deducted from loyaty card for the associated reward.

| | reward
`object` |

Contains information about the reward that is being validated.

AttributesDescription
id
string

Unique reward ID assigned by Voucherify.

assignment_id
string

Unique reward assignment ID assigned by Voucherify.

points
number

Number of points applied to the reward.

| -| order | See: [Order Calculated No Customer Data](#order-calculated-no-customer-data) | +| order | All of: 1. [Order Calculated No Customer Data](#order-calculated-no-customer-data) +2.
AttributesDescription
items
array

Array of items applied to the order. It can include up to 500 items.

Array of Order Item Calculated
| | session |

Schema model for session lock object. The session object contains information about the session key that was used to establish a session between multiple parallel validation and redemption requests.

[Session](#session) | | start_date
`string` |

Activation timestamp defines when the voucher starts to be active in ISO 8601 format. Voucher is inactive before this date.

| | expiration_date
`string` |

Expiration timestamp defines when the voucher expires in ISO 8601 format. Voucher is inactive after this date.

| @@ -91,7 +92,6 @@ One of: | applied_discount_amount
`integer` |

This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).

| | items_applied_discount_amount
`integer` |

Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).
sum(items, i => i.applied_discount_amount)

| | total_applied_discount_amount
`integer` |

Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).
total_applied_discount_amount = applied_discount_amount + items_applied_discount_amount

| -| items
`array` |

Array of items applied to the order. It can include up 500 items.

Array of [Order Item Calculated](#order-item-calculated) | | metadata
`object` |

A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.

| | object
`string` |

The type of the object represented by JSON.

Available values: `order` | | created_at
`string` |

Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.

**Example:**

2021-12-22T10:13:06.487Z

| @@ -102,6 +102,31 @@ One of: | referrer | [Referrer Id](#referrer-id) | | redemptions
`object` |
AttributesDescription
[propertyName]See: Order Redemptions
| +## Order Item Calculated +| Attributes | Description | +|:-----|:--------| +| id
`string` |

Unique identifier of the order line item.

| +| sku_id
`string` |

Unique identifier of the SKU. It is assigned by Voucherify.

| +| product_id
`string` |

Unique identifier of the product. It is assigned by Voucherify.

| +| related_object
`string` |

Used along with the source_id property, can be set to either sku or product.

Available values: `product`, `sku` | +| source_id
`string` |

The merchant's product/SKU ID (if it is different from the Voucherify product/SKU ID). It is useful in the integration between multiple systems. It can be an ID from an eCommerce site, a database, or a third-party service.

| +| quantity
`integer` |

The quantity of the particular item in the cart.

| +| discount_quantity
`integer` |

Number of dicounted items.

| +| initial_quantity
`integer` |

A positive integer in the smallest unit quantity representing the total amount of the order; this is the sum of the order items' quantity.

| +| amount
`integer` |

The total amount of the order item (price * quantity).

| +| discount_amount
`integer` |

Sum of all order-item-level discounts applied to the order.

| +| applied_discount_amount
`integer` |

This field shows the order-level discount applied.

| +| applied_discount_quantity
`integer` |

Number of the discounted items applied in the transaction.

| +| applied_quantity
`integer` |

Quantity of items changed by the application of a new quantity items. It can be positive when an item is added or negative if an item is replaced.

| +| applied_quantity_amount
`integer` |

Amount for the items changed by the application of a new quantity items. It can be positive when an item is added or negative if an item is replaced.

| +| initial_amount
`integer` |

A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.

| +| price
`integer` |

Unit price of an item. Value is multiplied by 100 to precisely represent 2 decimal places. For example 10000 cents for $100.00.

| +| subtotal_amount
`integer` |

Final order item amount after the applied item-level discount. If there are no item-level discounts applied, this item is equal to the amount.
subtotal_amount=amount-applied_discount_amount

| +| product
`object` |

An object containing details of the related product.

AttributesDescription
id
string

A unique identifier that represents the product and is assigned by Voucherify.

source_id
string

The merchant's product ID (if it is different than Voucherify's product ID). It is really useful in case of integration between multiple systems. It can be an ID from an eCommerce site, a database or a 3rd party service.

override
boolean

The override set to true is used to store the product information in the system. If the product does not exist, it will be created with a source_id; if it does exist, the provided values for the name, price, and metadata will replace those already stored in the system.

name
string

Product name.

metadata
object

A set of custom key/value pairs that you can attach to a product. It can be useful for storing additional information about the product in a structured format. It can be used to create product collections.

price
number

Product price. A positive integer in the smallest currency unit (e.g. 100 cents for $1.00).

| +| sku
`object` |

An object containing details of the related SKU.

AttributesDescription
id
string

A unique identifier that represents the SKU and is assigned by Voucherify.

source_id
string

The merchant's SKU ID (if it is different than Voucherify's SKU ID). It is really useful in case of integration between multiple systems. It can be an ID from an eCommerce site, a database or a 3rd party service.

override
boolean

The override set to true is used to store the product information in the system. If the product does not exist, it will be created with a source_id; if it does exist, the provided values for the name, price, and metadata will replace those already stored in the system.

sku
string

The SKU name.

price
number

SKU price. A positive integer in the smallest currency unit (e.g. 100 cents for $1.00).

metadata
object

A set of custom key/value pairs that you can attach to an SKU. It can be useful for storing additional information about the SKU in a structured format. It can be used to create product collections.

| +| object
`string` |

The type of the object represented by JSON.

Available values: `order_item` | +| metadata
`object` |

A set of custom key/value pairs that you can attach to an item object. It can be useful for storing additional information about the item in a structured format. It can be used to define business validation rules or discount formulas.

| + ## Session | Attributes | Description | |:-----|:--------| @@ -184,31 +209,6 @@ One of: | effect |

Defines how the discount is applied to the customer's order.

[Discount Fixed Vouchers Effect Types](#discount-fixed-vouchers-effect-types) | | is_dynamic
`boolean` |

Flag indicating whether the discount was calculated using a formula.

| -## Order Item Calculated -| Attributes | Description | -|:-----|:--------| -| id
`string` |

Unique identifier of the order line item.

| -| sku_id
`string` |

Unique identifier of the SKU. It is assigned by Voucherify.

| -| product_id
`string` |

Unique identifier of the product. It is assigned by Voucherify.

| -| related_object
`string` |

Used along with the source_id property, can be set to either sku or product.

Available values: `product`, `sku` | -| source_id
`string` |

The merchant's product/SKU ID (if it is different from the Voucherify product/SKU ID). It is useful in the integration between multiple systems. It can be an ID from an eCommerce site, a database, or a third-party service.

| -| quantity
`integer` |

The quantity of the particular item in the cart.

| -| discount_quantity
`integer` |

Number of dicounted items.

| -| initial_quantity
`integer` |

A positive integer in the smallest unit quantity representing the total amount of the order; this is the sum of the order items' quantity.

| -| amount
`integer` |

The total amount of the order item (price * quantity).

| -| discount_amount
`integer` |

Sum of all order-item-level discounts applied to the order.

| -| applied_discount_amount
`integer` |

This field shows the order-level discount applied.

| -| applied_discount_quantity
`integer` |

Number of the discounted items applied in the transaction.

| -| applied_quantity
`integer` |

Quantity of items changed by the application of a new quantity items. It can be positive when an item is added or negative if an item is replaced.

| -| applied_quantity_amount
`integer` |

Amount for the items changed by the application of a new quantity items. It can be positive when an item is added or negative if an item is replaced.

| -| initial_amount
`integer` |

A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.

| -| price
`integer` |

Unit price of an item. Value is multiplied by 100 to precisely represent 2 decimal places. For example 10000 cents for $100.00.

| -| subtotal_amount
`integer` |

Final order item amount after the applied item-level discount. If there are no item-level discounts applied, this item is equal to the amount.
subtotal_amount=amount-applied_discount_amount

| -| product
`object` |

An object containing details of the related product.

AttributesDescription
id
string

A unique identifier that represents the product and is assigned by Voucherify.

source_id
string

The merchant's product ID (if it is different than Voucherify's product ID). It is really useful in case of integration between multiple systems. It can be an ID from an eCommerce site, a database or a 3rd party service.

override
boolean

The override set to true is used to store the product information in the system. If the product does not exist, it will be created with a source_id; if it does exist, the provided values for the name, price, and metadata will replace those already stored in the system.

name
string

Product name.

metadata
object

A set of custom key/value pairs that you can attach to a product. It can be useful for storing additional information about the product in a structured format. It can be used to create product collections.

price
number

Product price. A positive integer in the smallest currency unit (e.g. 100 cents for $1.00).

| -| sku
`object` |

An object containing details of the related SKU.

AttributesDescription
id
string

A unique identifier that represents the SKU and is assigned by Voucherify.

source_id
string

The merchant's SKU ID (if it is different than Voucherify's SKU ID). It is really useful in case of integration between multiple systems. It can be an ID from an eCommerce site, a database or a 3rd party service.

override
boolean

The override set to true is used to store the product information in the system. If the product does not exist, it will be created with a source_id; if it does exist, the provided values for the name, price, and metadata will replace those already stored in the system.

sku
string

The SKU name.

price
number

SKU price. A positive integer in the smallest currency unit (e.g. 100 cents for $1.00).

metadata
object

A set of custom key/value pairs that you can attach to an SKU. It can be useful for storing additional information about the SKU in a structured format. It can be used to create product collections.

| -| object
`string` |

The type of the object represented by JSON.

Available values: `order_item` | -| metadata
`object` |

A set of custom key/value pairs that you can attach to an item object. It can be useful for storing additional information about the item in a structured format. It can be used to define business validation rules or discount formulas.

| - ## Customer Id | Attributes | Description | |:-----|:--------| diff --git a/production/readOnly-openAPI.json b/production/readOnly-openAPI.json index 74be1a7d..a8d3f389 100644 --- a/production/readOnly-openAPI.json +++ b/production/readOnly-openAPI.json @@ -1053,6 +1053,47 @@ }, "required": [] }, + "ApplicationDetails": { + "type": "array", + "description": "Array containing details about the items that are replaced and the items that are replacements for discounts with the `REPLACE_ITEMS` effect.", + "items": { + "type": "object", + "description": "Object representing item replacement.", + "properties": { + "source_index": { + "type": "integer", + "description": "Index number of the source item that is replaced. The enumeration starts from `0`, which represents the first item in the request, e.g., if the replaced item is passed as the second in the request, `source_index` equals `3`.", + "minimum": 0 + }, + "source_applied_quantity": { + "type": "integer", + "description": "Number of source units that are replaced.", + "maximum": -1 + }, + "source_applied_quantity_amount": { + "type": "integer", + "description": "Amount equal to the price of the units that are replaced. Determines the change of the amount of the source item quantity.", + "maximum": 0 + }, + "target_index": { + "type": "integer", + "description": "Index number of the target item that is a replacement of the source item. The enumeration continues the values for the order items, e.g. if there are three items in the request, `target_index` equals `3`, as enumeration starts from `0`." + }, + "target_applied_quantity": { + "type": "integer", + "description": "Number of added target units that are replacements." + }, + "target_applied_quantity_amount": { + "type": "integer", + "description": "Amount equal to the price of the units that are replacements. Determines the change in the amount of the target item quantity." + }, + "target_applied_discount_amount": { + "type": "integer", + "description": "Discount amount applied to the target item with regard to the replacement. Equals the `target_applied_quantity_amount` minus `source_applied_quantity_amount`." + } + } + } + }, "AreaStoreCampaignAssignment": { "title": "Areas and Stores Campain Assignment", "type": "object", @@ -3409,6 +3450,31 @@ "allOf": [ { "$ref": "#/components/schemas/OrderCalculated" + }, + { + "type": "object", + "properties": { + "items": { + "type": "array", + "description": "Array of items applied to the order. It can include up to 500 items.", + "items": { + "allOf": [ + { + "$ref": "#/components/schemas/OrderCalculatedItem" + }, + { + "type": "object", + "properties": { + "application_details": { + "$ref": "#/components/schemas/ApplicationDetails" + } + } + } + ] + }, + "nullable": true + } + } } ], "nullable": true @@ -3474,6 +3540,31 @@ "allOf": [ { "$ref": "#/components/schemas/OrderCalculated" + }, + { + "type": "object", + "properties": { + "items": { + "type": "array", + "description": "Array of items applied to the order. It can include up to 500 items.", + "items": { + "allOf": [ + { + "$ref": "#/components/schemas/OrderCalculatedItem" + }, + { + "type": "object", + "properties": { + "application_details": { + "$ref": "#/components/schemas/ApplicationDetails" + } + } + } + ] + }, + "nullable": true + } + } } ] }, @@ -7583,7 +7674,24 @@ "$ref": "#/components/schemas/SimpleCustomer" }, "order": { - "$ref": "#/components/schemas/OrderCalculated" + "allOf": [ + { + "$ref": "#/components/schemas/OrderCalculated" + }, + { + "type": "object", + "properties": { + "items": { + "type": "array", + "description": "Array of items applied to the order. It can include up to 500 items.", + "items": { + "$ref": "#/components/schemas/OrderCalculatedItem" + }, + "nullable": true + } + } + } + ] }, "redemption": { "$ref": "#/components/schemas/RedemptionInternal" @@ -7897,7 +8005,24 @@ "$ref": "#/components/schemas/VoucherBalance" }, "order": { - "$ref": "#/components/schemas/OrderCalculated" + "allOf": [ + { + "$ref": "#/components/schemas/OrderCalculated" + }, + { + "type": "object", + "properties": { + "items": { + "type": "array", + "description": "Array of items applied to the order. It can include up to 500 items.", + "items": { + "$ref": "#/components/schemas/OrderCalculatedItem" + }, + "nullable": true + } + } + } + ] }, "event": { "$ref": "#/components/schemas/SimpleEvent" @@ -16562,7 +16687,7 @@ }, "items": { "type": "array", - "description": "Array of items applied to the order. It can include up 500 items.", + "description": "Array of items applied to the order. It can include up to 500 items.", "items": { "$ref": "#/components/schemas/OrderItem" }, @@ -16646,14 +16771,6 @@ "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", "nullable": true }, - "items": { - "type": "array", - "description": "Array of items applied to the order. It can include up 500 items.", - "items": { - "$ref": "#/components/schemas/OrderCalculatedItem" - }, - "nullable": true - }, "metadata": { "type": "object", "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", @@ -17158,6 +17275,19 @@ "allOf": [ { "$ref": "#/components/schemas/OrderCalculated" + }, + { + "type": "object", + "properties": { + "items": { + "type": "array", + "description": "Array of items applied to the order. It can include up to 500 items.", + "items": { + "$ref": "#/components/schemas/OrderCalculatedItem" + }, + "nullable": true + } + } } ] }, @@ -17217,6 +17347,19 @@ "allOf": [ { "$ref": "#/components/schemas/OrderCalculated" + }, + { + "type": "object", + "properties": { + "items": { + "type": "array", + "description": "Array of items applied to the order. It can include up to 500 items.", + "items": { + "$ref": "#/components/schemas/OrderCalculatedItem" + }, + "nullable": true + } + } } ] }, @@ -17304,7 +17447,23 @@ "type": "array", "description": "Contains array of order objects.", "items": { - "$ref": "#/components/schemas/OrderCalculated" + "allOf": [ + { + "$ref": "#/components/schemas/OrderCalculated" + }, + { + "type": "object", + "properties": { + "items": { + "type": "array", + "description": "Array of items applied to the order. It can include up to 500 items.", + "items": { + "$ref": "#/components/schemas/OrderCalculatedItem" + } + } + } + } + ] }, "nullable": true }, @@ -17367,6 +17526,19 @@ "allOf": [ { "$ref": "#/components/schemas/OrderCalculated" + }, + { + "type": "object", + "properties": { + "items": { + "type": "array", + "description": "Array of items applied to the order. It can include up to 500 items.", + "items": { + "$ref": "#/components/schemas/OrderCalculatedItem" + }, + "nullable": true + } + } } ] }, @@ -20929,6 +21101,23 @@ "allOf": [ { "$ref": "#/components/schemas/OrderCalculated" + }, + { + "type": "object", + "properties": { + "items": { + "type": "array", + "description": "Array of items applied to the order. It can include up to 500 items.", + "items": { + "allOf": [ + { + "$ref": "#/components/schemas/OrderCalculatedItem" + } + ] + }, + "nullable": true + } + } } ], "nullable": true @@ -21259,7 +21448,36 @@ "$ref": "#/components/schemas/RedeemableResult" }, "order": { - "$ref": "#/components/schemas/OrderCalculated" + "allOf": [ + { + "$ref": "#/components/schemas/OrderCalculated" + }, + { + "type": "object", + "properties": { + "items": { + "type": "array", + "description": "Array of items applied to the order. It can include up to 500 items.", + "items": { + "allOf": [ + { + "$ref": "#/components/schemas/OrderCalculatedItem" + }, + { + "type": "object", + "properties": { + "application_details": { + "$ref": "#/components/schemas/ApplicationDetails" + } + } + } + ] + }, + "nullable": true + } + } + } + ] }, "validation_rule_id": { "type": "string", @@ -22251,6 +22469,19 @@ "allOf": [ { "$ref": "#/components/schemas/OrderCalculated" + }, + { + "type": "object", + "properties": { + "items": { + "type": "array", + "description": "Array of items applied to the order. It can include up to 500 items.", + "items": { + "$ref": "#/components/schemas/OrderCalculatedItem" + }, + "nullable": true + } + } } ] }, @@ -22410,10 +22641,44 @@ "nullable": true }, "order": { - "$ref": "#/components/schemas/OrderCalculated" + "allOf": [ + { + "$ref": "#/components/schemas/OrderCalculated" + }, + { + "type": "object", + "properties": { + "items": { + "type": "array", + "description": "Array of items applied to the order. It can include up to 500 items.", + "items": { + "$ref": "#/components/schemas/OrderCalculatedItem" + }, + "nullable": true + } + } + } + ] }, "previous_order": { - "$ref": "#/components/schemas/OrderCalculated" + "allOf": [ + { + "$ref": "#/components/schemas/OrderCalculated" + }, + { + "type": "object", + "properties": { + "items": { + "type": "array", + "description": "Array of items applied to the order. It can include up to 500 items.", + "items": { + "$ref": "#/components/schemas/OrderCalculatedItem" + }, + "nullable": true + } + } + } + ] }, "reward": { "$ref": "#/components/schemas/RedemptionRewardResult" @@ -22870,6 +23135,19 @@ "allOf": [ { "$ref": "#/components/schemas/OrderCalculated" + }, + { + "type": "object", + "properties": { + "items": { + "type": "array", + "description": "Array of items applied to the order. It can include up to 500 items.", + "items": { + "$ref": "#/components/schemas/OrderCalculatedItem" + }, + "nullable": true + } + } } ] }, @@ -23072,6 +23350,31 @@ "allOf": [ { "$ref": "#/components/schemas/OrderCalculated" + }, + { + "type": "object", + "properties": { + "items": { + "type": "array", + "description": "Array of items applied to the order. It can include up to 500 items.", + "items": { + "allOf": [ + { + "$ref": "#/components/schemas/OrderCalculatedItem" + }, + { + "type": "object", + "properties": { + "application_details": { + "$ref": "#/components/schemas/ApplicationDetails" + } + } + } + ] + }, + "nullable": true + } + } } ] }, @@ -23174,9 +23477,23 @@ "parent_rollback": { "$ref": "#/components/schemas/RedemptionRollback" }, - "order": { - "$ref": "#/components/schemas/OrderCalculated" - } + "allOf": [ + { + "$ref": "#/components/schemas/OrderCalculated" + }, + { + "type": "object", + "properties": { + "items": { + "type": "array", + "description": "Array of items applied to the order. It can include up to 500 items.", + "items": { + "$ref": "#/components/schemas/OrderCalculatedItem" + } + } + } + } + ] } }, "RedemptionWithVoucherWithoutStackingRulesTypeCategories": { @@ -25005,7 +25322,7 @@ }, "items": { "type": "array", - "description": "Array of items applied to the order. It can include up 500 items.", + "description": "Array of items applied to the order. It can include up to 500 items.", "items": { "$ref": "#/components/schemas/SimpleOrderItem" }, @@ -27254,7 +27571,24 @@ "nullable": true }, "order": { - "$ref": "#/components/schemas/OrderCalculated" + "allOf": [ + { + "$ref": "#/components/schemas/OrderCalculated" + }, + { + "type": "object", + "properties": { + "items": { + "type": "array", + "description": "Array of items applied to the order. It can include up to 500 items.", + "items": { + "$ref": "#/components/schemas/OrderCalculatedItem" + }, + "nullable": true + } + } + } + ] }, "applicable_to": { "$ref": "#/components/schemas/ApplicableToResultList" @@ -27696,7 +28030,36 @@ "nullable": true }, "order": { - "$ref": "#/components/schemas/OrderCalculated" + "allOf": [ + { + "$ref": "#/components/schemas/OrderCalculated" + }, + { + "type": "object", + "properties": { + "items": { + "type": "array", + "description": "Array of items applied to the order. It can include up to 500 items.", + "items": { + "allOf": [ + { + "$ref": "#/components/schemas/OrderCalculatedItem" + }, + { + "type": "object", + "properties": { + "application_details": { + "$ref": "#/components/schemas/ApplicationDetails" + } + } + } + ] + }, + "nullable": true + } + } + } + ] }, "tracking_id": { "type": "string", diff --git a/reference/OpenAPI.json b/reference/OpenAPI.json index b75646a9..5123a90e 100644 --- a/reference/OpenAPI.json +++ b/reference/OpenAPI.json @@ -2129,7 +2129,7 @@ }, "items": { "type": "array", - "description": "Array of items applied to the order. It can include up 500 items.", + "description": "Array of items applied to the order. It can include up to 500 items.", "items": { "$ref": "#/components/schemas/SimpleOrderItem" } @@ -2185,7 +2185,7 @@ }, "items": { "type": "array", - "description": "Array of items applied to the order. It can include up 500 items.", + "description": "Array of items applied to the order. It can include up to 500 items.", "items": { "$ref": "#/components/schemas/OrderItem" } @@ -2275,13 +2275,6 @@ "type": "integer", "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`" }, - "items": { - "type": "array", - "description": "Array of items applied to the order. It can include up 500 items.", - "items": { - "$ref": "#/components/schemas/OrderCalculatedItem" - } - }, "metadata": { "type": "object", "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas." @@ -2347,6 +2340,18 @@ "allOf": [ { "$ref": "#/components/schemas/OrderCalculated" + }, + { + "type": "object", + "properties": { + "items": { + "type": "array", + "description": "Array of items applied to the order. It can include up to 500 items.", + "items": { + "$ref": "#/components/schemas/OrderCalculatedItem" + } + } + } } ] }, @@ -3755,7 +3760,23 @@ ] }, "order": { - "$ref": "#/components/schemas/OrderCalculated" + "allOf": [ + { + "$ref": "#/components/schemas/OrderCalculated" + }, + { + "type": "object", + "properties": { + "items": { + "type": "array", + "description": "Array of items applied to the order. It can include up to 500 items.", + "items": { + "$ref": "#/components/schemas/OrderCalculatedItem" + } + } + } + } + ] }, "session": { "description": "Schema model for session lock object. The session object contains information about the session key that was used to establish a session between multiple parallel validation and redemption requests.\n\n\n", @@ -15628,7 +15649,35 @@ } }, "order": { - "$ref": "#/components/schemas/OrderCalculated" + "allOf": [ + { + "$ref": "#/components/schemas/OrderCalculated" + }, + { + "type": "object", + "properties": { + "items": { + "type": "array", + "description": "Array of items applied to the order. It can include up to 500 items.", + "items": { + "allOf": [ + { + "$ref": "#/components/schemas/OrderCalculatedItem" + }, + { + "type": "object", + "properties": { + "application_details": { + "$ref": "#/components/schemas/ApplicationDetails" + } + } + } + ] + } + } + } + } + ] }, "tracking_id": { "type": "string", @@ -15673,7 +15722,23 @@ ] }, "order": { - "$ref": "#/components/schemas/OrderCalculated" + "allOf": [ + { + "$ref": "#/components/schemas/OrderCalculated" + }, + { + "type": "object", + "properties": { + "items": { + "type": "array", + "description": "Array of items applied to the order. It can include up to 500 items.", + "items": { + "$ref": "#/components/schemas/OrderCalculatedItem" + } + } + } + } + ] }, "applicable_to": { "$ref": "#/components/schemas/ApplicableToResultList" @@ -16680,6 +16745,30 @@ "allOf": [ { "$ref": "#/components/schemas/OrderCalculated" + }, + { + "type": "object", + "properties": { + "items": { + "type": "array", + "description": "Array of items applied to the order. It can include up to 500 items.", + "items": { + "allOf": [ + { + "$ref": "#/components/schemas/OrderCalculatedItem" + }, + { + "type": "object", + "properties": { + "application_details": { + "$ref": "#/components/schemas/ApplicationDetails" + } + } + } + ] + } + } + } } ] }, @@ -17864,6 +17953,18 @@ "allOf": [ { "$ref": "#/components/schemas/OrderCalculated" + }, + { + "type": "object", + "properties": { + "items": { + "type": "array", + "description": "Array of items applied to the order. It can include up to 500 items.", + "items": { + "$ref": "#/components/schemas/OrderCalculatedItem" + } + } + } } ] }, @@ -18168,6 +18269,18 @@ "allOf": [ { "$ref": "#/components/schemas/OrderCalculated" + }, + { + "type": "object", + "properties": { + "items": { + "type": "array", + "description": "Array of items applied to the order. It can include up to 500 items.", + "items": { + "$ref": "#/components/schemas/OrderCalculatedItem" + } + } + } } ] }, @@ -18313,10 +18426,42 @@ "description": "If the result is `FAILURE`, this parameter will provide a more expanded reason as to why the redemption failed." }, "order": { - "$ref": "#/components/schemas/OrderCalculated" + "allOf": [ + { + "$ref": "#/components/schemas/OrderCalculated" + }, + { + "type": "object", + "properties": { + "items": { + "type": "array", + "description": "Array of items applied to the order. It can include up to 500 items.", + "items": { + "$ref": "#/components/schemas/OrderCalculatedItem" + } + } + } + } + ] }, "previous_order": { - "$ref": "#/components/schemas/OrderCalculated" + "allOf": [ + { + "$ref": "#/components/schemas/OrderCalculated" + }, + { + "type": "object", + "properties": { + "items": { + "type": "array", + "description": "Array of items applied to the order. It can include up to 500 items.", + "items": { + "$ref": "#/components/schemas/OrderCalculatedItem" + } + } + } + } + ] }, "reward": { "$ref": "#/components/schemas/RedemptionRewardResult" @@ -26927,7 +27072,23 @@ "$ref": "#/components/schemas/VoucherBalance" }, "order": { - "$ref": "#/components/schemas/OrderCalculated" + "allOf": [ + { + "$ref": "#/components/schemas/OrderCalculated" + }, + { + "type": "object", + "properties": { + "items": { + "type": "array", + "description": "Array of items applied to the order. It can include up to 500 items.", + "items": { + "$ref": "#/components/schemas/OrderCalculatedItem" + } + } + } + } + ] }, "event": { "$ref": "#/components/schemas/SimpleEvent" @@ -28121,7 +28282,23 @@ "$ref": "#/components/schemas/SimpleCustomer" }, "order": { - "$ref": "#/components/schemas/OrderCalculated" + "allOf": [ + { + "$ref": "#/components/schemas/OrderCalculated" + }, + { + "type": "object", + "properties": { + "items": { + "type": "array", + "description": "Array of items applied to the order. It can include up to 500 items.", + "items": { + "$ref": "#/components/schemas/OrderCalculatedItem" + } + } + } + } + ] }, "redemption": { "$ref": "#/components/schemas/RedemptionInternal" @@ -28564,6 +28741,18 @@ "allOf": [ { "$ref": "#/components/schemas/OrderCalculated" + }, + { + "type": "object", + "properties": { + "items": { + "type": "array", + "description": "Array of items applied to the order. It can include up to 500 items.", + "items": { + "$ref": "#/components/schemas/OrderCalculatedItem" + } + } + } } ] }, @@ -28574,6 +28763,18 @@ "allOf": [ { "$ref": "#/components/schemas/OrderCalculated" + }, + { + "type": "object", + "properties": { + "items": { + "type": "array", + "description": "Array of items applied to the order. It can include up to 500 items.", + "items": { + "$ref": "#/components/schemas/OrderCalculatedItem" + } + } + } } ] }, @@ -28673,7 +28874,23 @@ "type": "array", "description": "Contains array of order objects.", "items": { - "$ref": "#/components/schemas/OrderCalculated" + "allOf": [ + { + "$ref": "#/components/schemas/OrderCalculated" + }, + { + "type": "object", + "properties": { + "items": { + "type": "array", + "description": "Array of items applied to the order. It can include up to 500 items.", + "items": { + "$ref": "#/components/schemas/OrderCalculatedItem" + } + } + } + } + ] } }, "total": { @@ -33944,6 +34161,22 @@ "allOf": [ { "$ref": "#/components/schemas/OrderCalculated" + }, + { + "type": "object", + "properties": { + "items": { + "type": "array", + "description": "Array of items applied to the order. It can include up to 500 items.", + "items": { + "allOf": [ + { + "$ref": "#/components/schemas/OrderCalculatedItem" + } + ] + } + } + } } ] }, @@ -34427,7 +34660,35 @@ "$ref": "#/components/schemas/RedeemableResult" }, "order": { - "$ref": "#/components/schemas/OrderCalculated" + "allOf": [ + { + "$ref": "#/components/schemas/OrderCalculated" + }, + { + "type": "object", + "properties": { + "items": { + "type": "array", + "description": "Array of items applied to the order. It can include up to 500 items.", + "items": { + "allOf": [ + { + "$ref": "#/components/schemas/OrderCalculatedItem" + }, + { + "type": "object", + "properties": { + "application_details": { + "$ref": "#/components/schemas/ApplicationDetails" + } + } + } + ] + } + } + } + } + ] }, "validation_rule_id": { "type": "string", @@ -41298,6 +41559,30 @@ "allOf": [ { "$ref": "#/components/schemas/OrderCalculated" + }, + { + "type": "object", + "properties": { + "items": { + "type": "array", + "description": "Array of items applied to the order. It can include up to 500 items.", + "items": { + "allOf": [ + { + "$ref": "#/components/schemas/OrderCalculatedItem" + }, + { + "type": "object", + "properties": { + "application_details": { + "$ref": "#/components/schemas/ApplicationDetails" + } + } + } + ] + } + } + } } ] }, @@ -41341,9 +41626,23 @@ "parent_rollback": { "$ref": "#/components/schemas/RedemptionRollback" }, - "order": { - "$ref": "#/components/schemas/OrderCalculated" - } + "allOf": [ + { + "$ref": "#/components/schemas/OrderCalculated" + }, + { + "type": "object", + "properties": { + "items": { + "type": "array", + "description": "Array of items applied to the order. It can include up to 500 items.", + "items": { + "$ref": "#/components/schemas/OrderCalculatedItem" + } + } + } + } + ] } }, "LoyaltiesMembersBalanceUpdateResponseBody": { @@ -42253,6 +42552,30 @@ "allOf": [ { "$ref": "#/components/schemas/OrderCalculated" + }, + { + "type": "object", + "properties": { + "items": { + "type": "array", + "description": "Array of items applied to the order. It can include up to 500 items.", + "items": { + "allOf": [ + { + "$ref": "#/components/schemas/OrderCalculatedItem" + }, + { + "type": "object", + "properties": { + "application_details": { + "$ref": "#/components/schemas/ApplicationDetails" + } + } + } + ] + } + } + } } ] }, diff --git a/reference/readonly-sdks/java/OpenAPI.json b/reference/readonly-sdks/java/OpenAPI.json index a0ca3ce4..bd1d3359 100644 --- a/reference/readonly-sdks/java/OpenAPI.json +++ b/reference/readonly-sdks/java/OpenAPI.json @@ -2475,7 +2475,154 @@ "nullable": true }, "order": { - "$ref": "#/components/schemas/OrderCalculated" + "title": "ClientQualificationsCheckEligibilityResponseBodyOrder", + "type": "object", + "nullable": true, + "properties": { + "id": { + "type": "string", + "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", + "nullable": true + }, + "source_id": { + "type": "string", + "nullable": true, + "description": "Unique source ID of an existing order that will be linked to the redemption of this request." + }, + "status": { + "type": "string", + "description": "The order status.", + "enum": [ + "CREATED", + "PAID", + "CANCELED", + "FULFILLED" + ], + "nullable": true + }, + "amount": { + "type": "integer", + "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "initial_amount": { + "type": "integer", + "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "discount_amount": { + "type": "integer", + "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "items_discount_amount": { + "type": "integer", + "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "total_discount_amount": { + "type": "integer", + "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "total_amount": { + "type": "integer", + "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "applied_discount_amount": { + "type": "integer", + "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "items_applied_discount_amount": { + "type": "integer", + "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", + "nullable": true + }, + "total_applied_discount_amount": { + "type": "integer", + "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", + "nullable": true + }, + "metadata": { + "title": "ClientQualificationsCheckEligibilityResponseBodyOrderMetadata", + "type": "object", + "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", + "nullable": true + }, + "object": { + "type": "string", + "description": "The type of the object represented by JSON.", + "default": "order", + "enum": [ + "order" + ], + "nullable": true + }, + "created_at": { + "type": "string", + "example": "2021-12-22T10:13:06.487Z", + "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", + "format": "date-time", + "nullable": true + }, + "updated_at": { + "type": "string", + "nullable": true, + "example": "2021-12-22T10:14:45.316Z", + "format": "date-time", + "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." + }, + "customer_id": { + "type": "string", + "nullable": true, + "description": "Unique customer ID of the customer making the purchase.", + "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" + }, + "referrer_id": { + "type": "string", + "nullable": true, + "description": "Unique referrer ID.", + "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" + }, + "customer": { + "$ref": "#/components/schemas/CustomerId" + }, + "referrer": { + "$ref": "#/components/schemas/ReferrerId" + }, + "redemptions": { + "title": "ClientQualificationsCheckEligibilityResponseBodyOrderRedemptionsEntry", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/OrderRedemptionsEntry" + }, + "nullable": true + }, + "items": { + "title": "ClientQualificationsCheckEligibilityResponseBodyOrderItems", + "type": "array", + "description": "Array of items applied to the order. It can include up to 500 items.", + "items": { + "title": "ClientQualificationsCheckEligibilityResponseBodyOrderItemsItem", + "allOf": [ + { + "$ref": "#/components/schemas/OrderCalculatedItem" + }, + { + "type": "object", + "properties": { + "application_details": { + "$ref": "#/components/schemas/ApplicationDetails" + } + } + } + ] + }, + "nullable": true + } + } }, "stacking_rules": { "$ref": "#/components/schemas/StackingRules" @@ -2604,7 +2751,155 @@ "$ref": "#/components/schemas/Redemption" }, "order": { - "$ref": "#/components/schemas/OrderCalculated" + "title": "ClientRedemptionsRedeemResponseBodyOrder", + "description": "Contains the order details associated with the redemption.", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", + "nullable": true + }, + "source_id": { + "type": "string", + "nullable": true, + "description": "Unique source ID of an existing order that will be linked to the redemption of this request." + }, + "status": { + "type": "string", + "description": "The order status.", + "enum": [ + "CREATED", + "PAID", + "CANCELED", + "FULFILLED" + ], + "nullable": true + }, + "amount": { + "type": "integer", + "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "initial_amount": { + "type": "integer", + "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "discount_amount": { + "type": "integer", + "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "items_discount_amount": { + "type": "integer", + "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "total_discount_amount": { + "type": "integer", + "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "total_amount": { + "type": "integer", + "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "applied_discount_amount": { + "type": "integer", + "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "items_applied_discount_amount": { + "type": "integer", + "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", + "nullable": true + }, + "total_applied_discount_amount": { + "type": "integer", + "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", + "nullable": true + }, + "metadata": { + "title": "ClientRedemptionsRedeemResponseBodyOrderMetadata", + "type": "object", + "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", + "nullable": true + }, + "object": { + "type": "string", + "description": "The type of the object represented by JSON.", + "default": "order", + "enum": [ + "order" + ], + "nullable": true + }, + "created_at": { + "type": "string", + "example": "2021-12-22T10:13:06.487Z", + "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", + "format": "date-time", + "nullable": true + }, + "updated_at": { + "type": "string", + "nullable": true, + "example": "2021-12-22T10:14:45.316Z", + "format": "date-time", + "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." + }, + "customer_id": { + "type": "string", + "nullable": true, + "description": "Unique customer ID of the customer making the purchase.", + "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" + }, + "referrer_id": { + "type": "string", + "nullable": true, + "description": "Unique referrer ID.", + "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" + }, + "customer": { + "$ref": "#/components/schemas/CustomerId" + }, + "referrer": { + "$ref": "#/components/schemas/ReferrerId" + }, + "redemptions": { + "title": "ClientRedemptionsRedeemResponseBodyOrderRedemptionsEntry", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/OrderRedemptionsEntry" + }, + "nullable": true + }, + "items": { + "title": "ClientRedemptionsRedeemResponseBodyOrderItems", + "type": "array", + "description": "Array of items applied to the order. It can include up to 500 items.", + "items": { + "title": "ClientRedemptionsRedeemResponseBodyOrderItemsItem", + "allOf": [ + { + "$ref": "#/components/schemas/OrderCalculatedItem" + }, + { + "type": "object", + "properties": { + "application_details": { + "$ref": "#/components/schemas/ApplicationDetails" + } + } + } + ] + }, + "nullable": true + } + }, + "nullable": true }, "inapplicable_redeemables": { "title": "ClientRedemptionsRedeemResponseBodyInapplicableRedeemables", @@ -2770,7 +3065,176 @@ "nullable": true }, "order": { - "$ref": "#/components/schemas/OrderCalculated" + "title": "ClientValidationsValidateResponseBodyRedeemablesItemOrder", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", + "nullable": true + }, + "source_id": { + "type": "string", + "nullable": true, + "description": "Unique source ID of an existing order that will be linked to the redemption of this request." + }, + "status": { + "type": "string", + "description": "The order status.", + "enum": [ + "CREATED", + "PAID", + "CANCELED", + "FULFILLED" + ], + "nullable": true + }, + "amount": { + "type": "integer", + "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "initial_amount": { + "type": "integer", + "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "discount_amount": { + "type": "integer", + "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "items_discount_amount": { + "type": "integer", + "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "total_discount_amount": { + "type": "integer", + "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "total_amount": { + "type": "integer", + "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "applied_discount_amount": { + "type": "integer", + "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "items_applied_discount_amount": { + "type": "integer", + "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", + "nullable": true + }, + "total_applied_discount_amount": { + "type": "integer", + "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", + "nullable": true + }, + "metadata": { + "title": "ClientValidationsValidateResponseBodyRedeemablesItemOrderMetadata", + "type": "object", + "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", + "nullable": true + }, + "object": { + "type": "string", + "description": "The type of the object represented by JSON.", + "default": "order", + "enum": [ + "order" + ], + "nullable": true + }, + "created_at": { + "type": "string", + "example": "2021-12-22T10:13:06.487Z", + "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", + "format": "date-time", + "nullable": true + }, + "updated_at": { + "type": "string", + "nullable": true, + "example": "2021-12-22T10:14:45.316Z", + "format": "date-time", + "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." + }, + "customer_id": { + "type": "string", + "nullable": true, + "description": "Unique customer ID of the customer making the purchase.", + "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" + }, + "referrer_id": { + "type": "string", + "nullable": true, + "description": "Unique referrer ID.", + "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" + }, + "customer": { + "title": "ClientValidationsValidateResponseBodyRedeemablesItemOrderCustomer", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "A unique identifier of an existing customer.", + "nullable": true + }, + "object": { + "type": "string", + "description": "The type of the object represented by JSON.", + "default": "customer", + "enum": [ + "customer" + ], + "nullable": true + } + }, + "required": [] + }, + "referrer": { + "title": "ClientValidationsValidateResponseBodyRedeemablesItemOrderReferrer", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "A unique identifier of an existing customer.", + "nullable": true + }, + "object": { + "type": "string", + "description": "The type of the object represented by JSON.", + "default": "customer", + "enum": [ + "customer" + ], + "nullable": true + } + }, + "required": [] + }, + "redemptions": { + "title": "ClientValidationsValidateResponseBodyRedeemablesItemOrderRedemptionsEntry", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/OrderRedemptionsEntry" + }, + "nullable": true + }, + "items": { + "title": "ClientValidationsValidateResponseBodyRedeemablesItemOrderItems", + "type": "array", + "description": "Array of items applied to the order. It can include up to 500 items.", + "items": { + "$ref": "#/components/schemas/OrderCalculatedItem" + }, + "nullable": true + } + } }, "applicable_to": { "$ref": "#/components/schemas/ApplicableToResultList" @@ -2993,7 +3457,154 @@ "nullable": true }, "order": { - "$ref": "#/components/schemas/OrderCalculated" + "title": "ClientValidationsValidateResponseBodyOrder", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", + "nullable": true + }, + "source_id": { + "type": "string", + "nullable": true, + "description": "Unique source ID of an existing order that will be linked to the redemption of this request." + }, + "status": { + "type": "string", + "description": "The order status.", + "enum": [ + "CREATED", + "PAID", + "CANCELED", + "FULFILLED" + ], + "nullable": true + }, + "amount": { + "type": "integer", + "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "initial_amount": { + "type": "integer", + "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "discount_amount": { + "type": "integer", + "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "items_discount_amount": { + "type": "integer", + "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "total_discount_amount": { + "type": "integer", + "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "total_amount": { + "type": "integer", + "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "applied_discount_amount": { + "type": "integer", + "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "items_applied_discount_amount": { + "type": "integer", + "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", + "nullable": true + }, + "total_applied_discount_amount": { + "type": "integer", + "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", + "nullable": true + }, + "metadata": { + "title": "ClientValidationsValidateResponseBodyOrderMetadata", + "type": "object", + "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", + "nullable": true + }, + "object": { + "type": "string", + "description": "The type of the object represented by JSON.", + "default": "order", + "enum": [ + "order" + ], + "nullable": true + }, + "created_at": { + "type": "string", + "example": "2021-12-22T10:13:06.487Z", + "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", + "format": "date-time", + "nullable": true + }, + "updated_at": { + "type": "string", + "nullable": true, + "example": "2021-12-22T10:14:45.316Z", + "format": "date-time", + "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." + }, + "customer_id": { + "type": "string", + "nullable": true, + "description": "Unique customer ID of the customer making the purchase.", + "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" + }, + "referrer_id": { + "type": "string", + "nullable": true, + "description": "Unique referrer ID.", + "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" + }, + "customer": { + "$ref": "#/components/schemas/CustomerId" + }, + "referrer": { + "$ref": "#/components/schemas/ReferrerId" + }, + "redemptions": { + "title": "ClientValidationsValidateResponseBodyOrderRedemptionsEntry", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/OrderRedemptionsEntry" + }, + "nullable": true + }, + "items": { + "title": "ClientValidationsValidateResponseBodyOrderItems", + "type": "array", + "description": "Array of items applied to the order. It can include up to 500 items.", + "items": { + "title": "ClientValidationsValidateResponseBodyOrderItemsItem", + "allOf": [ + { + "$ref": "#/components/schemas/OrderCalculatedItem" + }, + { + "type": "object", + "properties": { + "application_details": { + "$ref": "#/components/schemas/ApplicationDetails" + } + } + } + ] + }, + "nullable": true + } + }, + "nullable": true }, "tracking_id": { "type": "string", @@ -9382,7 +9993,179 @@ "nullable": true }, "order": { - "$ref": "#/components/schemas/OrderCalculated" + "title": "LoyaltiesMembersRedemptionRedeemResponseBodyOrder", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", + "nullable": true + }, + "source_id": { + "type": "string", + "nullable": true, + "description": "Unique source ID of an existing order that will be linked to the redemption of this request." + }, + "status": { + "type": "string", + "description": "The order status.", + "enum": [ + "CREATED", + "PAID", + "CANCELED", + "FULFILLED" + ], + "nullable": true + }, + "amount": { + "type": "integer", + "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "initial_amount": { + "type": "integer", + "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "discount_amount": { + "type": "integer", + "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "items_discount_amount": { + "type": "integer", + "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "total_discount_amount": { + "type": "integer", + "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "total_amount": { + "type": "integer", + "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "applied_discount_amount": { + "type": "integer", + "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "items_applied_discount_amount": { + "type": "integer", + "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", + "nullable": true + }, + "total_applied_discount_amount": { + "type": "integer", + "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", + "nullable": true + }, + "metadata": { + "title": "LoyaltiesMembersRedemptionRedeemResponseBodyOrderMetadata", + "type": "object", + "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", + "nullable": true + }, + "object": { + "type": "string", + "description": "The type of the object represented by JSON.", + "default": "order", + "enum": [ + "order" + ], + "nullable": true + }, + "created_at": { + "type": "string", + "example": "2021-12-22T10:13:06.487Z", + "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", + "format": "date-time", + "nullable": true + }, + "updated_at": { + "type": "string", + "nullable": true, + "example": "2021-12-22T10:14:45.316Z", + "format": "date-time", + "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." + }, + "customer_id": { + "type": "string", + "nullable": true, + "description": "Unique customer ID of the customer making the purchase.", + "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" + }, + "referrer_id": { + "type": "string", + "nullable": true, + "description": "Unique referrer ID.", + "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" + }, + "customer": { + "title": "LoyaltiesMembersRedemptionRedeemResponseBodyOrderCustomer", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "A unique identifier of an existing customer.", + "nullable": true + }, + "object": { + "type": "string", + "description": "The type of the object represented by JSON.", + "default": "customer", + "enum": [ + "customer" + ], + "nullable": true + } + }, + "required": [], + "nullable": true + }, + "referrer": { + "title": "LoyaltiesMembersRedemptionRedeemResponseBodyOrderReferrer", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "A unique identifier of an existing customer.", + "nullable": true + }, + "object": { + "type": "string", + "description": "The type of the object represented by JSON.", + "default": "customer", + "enum": [ + "customer" + ], + "nullable": true + } + }, + "required": [], + "nullable": true + }, + "redemptions": { + "title": "LoyaltiesMembersRedemptionRedeemResponseBodyOrderRedemptionsEntry", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/OrderRedemptionsEntry" + }, + "nullable": true + }, + "items": { + "title": "LoyaltiesMembersRedemptionRedeemResponseBodyOrderItems", + "type": "array", + "description": "Array of items applied to the order. It can include up to 500 items.", + "items": { + "$ref": "#/components/schemas/OrderCalculatedItem" + }, + "nullable": true + } + }, + "nullable": true }, "channel": { "title": "LoyaltiesMembersRedemptionRedeemResponseBodyChannel", @@ -15689,7 +16472,7 @@ "items": { "title": "OrdersCreateRequestBodyItems", "type": "array", - "description": "Array of items applied to the order. It can include up 500 items.", + "description": "Array of items applied to the order. It can include up to 500 items.", "items": { "$ref": "#/components/schemas/OrderItem" }, @@ -15793,15 +16576,6 @@ "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", "nullable": true }, - "items": { - "title": "OrdersCreateResponseBodyItems", - "type": "array", - "description": "Array of items applied to the order. It can include up 500 items.", - "items": { - "$ref": "#/components/schemas/OrderCalculatedItem" - }, - "nullable": true - }, "metadata": { "title": "OrdersCreateResponseBodyMetadata", "type": "object", @@ -15856,6 +16630,15 @@ "$ref": "#/components/schemas/OrderRedemptionsEntry" }, "nullable": true + }, + "items": { + "title": "OrdersCreateResponseBodyItems", + "type": "array", + "description": "Array of items applied to the order. It can include up to 500 items.", + "items": { + "$ref": "#/components/schemas/OrderCalculatedItem" + }, + "nullable": true } }, "description": "Response body schema for **POST** `v1/orders`." @@ -16044,15 +16827,6 @@ "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", "nullable": true }, - "items": { - "title": "OrdersGetResponseBodyItems", - "type": "array", - "description": "Array of items applied to the order. It can include up 500 items.", - "items": { - "$ref": "#/components/schemas/OrderCalculatedItem" - }, - "nullable": true - }, "metadata": { "title": "OrdersGetResponseBodyMetadata", "type": "object", @@ -16107,6 +16881,15 @@ "$ref": "#/components/schemas/OrderRedemptionsEntry" }, "nullable": true + }, + "items": { + "title": "OrdersGetResponseBodyItems", + "type": "array", + "description": "Array of items applied to the order. It can include up to 500 items.", + "items": { + "$ref": "#/components/schemas/OrderCalculatedItem" + }, + "nullable": true } }, "description": "Response body schema for **GET** `v1/orders/{orderId}`." @@ -16191,7 +16974,25 @@ "type": "array", "description": "Contains array of order objects.", "items": { - "$ref": "#/components/schemas/OrderCalculated" + "title": "OrdersListResponseBodyOrdersItem", + "allOf": [ + { + "$ref": "#/components/schemas/OrderCalculated" + }, + { + "type": "object", + "properties": { + "items": { + "title": "OrdersListResponseBodyOrdersItemItems", + "type": "array", + "description": "Array of items applied to the order. It can include up to 500 items.", + "items": { + "$ref": "#/components/schemas/OrderCalculatedItem" + } + } + } + } + ] }, "nullable": true }, @@ -16241,7 +17042,7 @@ "items": { "title": "OrdersUpdateRequestBodyItems", "type": "array", - "description": "Array of items applied to the order. It can include up 500 items.", + "description": "Array of items applied to the order. It can include up to 500 items.", "items": { "$ref": "#/components/schemas/OrderItem" }, @@ -16345,15 +17146,6 @@ "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", "nullable": true }, - "items": { - "title": "OrdersUpdateResponseBodyItems", - "type": "array", - "description": "Array of items applied to the order. It can include up 500 items.", - "items": { - "$ref": "#/components/schemas/OrderCalculatedItem" - }, - "nullable": true - }, "metadata": { "title": "OrdersUpdateResponseBodyMetadata", "type": "object", @@ -16408,6 +17200,15 @@ "$ref": "#/components/schemas/OrderRedemptionsEntry" }, "nullable": true + }, + "items": { + "title": "OrdersUpdateResponseBodyItems", + "type": "array", + "description": "Array of items applied to the order. It can include up to 500 items.", + "items": { + "$ref": "#/components/schemas/OrderCalculatedItem" + }, + "nullable": true } }, "description": "Response body schema for **PUT** `v1/orders/{orderId}`." @@ -21127,145 +21928,9 @@ "nullable": true }, "order": { - "$ref": "#/components/schemas/OrderCalculated" - }, - "stacking_rules": { - "$ref": "#/components/schemas/StackingRules" - } - } - }, - "RedemptionsGetResponseBody": { - "title": "RedemptionsGetResponseBody", - "type": "object", - "properties": { - "id": { - "type": "string", - "nullable": true - }, - "object": { - "type": "string", - "enum": [ - "redemption", - "redemption_rollback" - ], - "nullable": true - }, - "date": { - "type": "string", - "example": "2021-12-22T10:13:06.487Z", - "description": "Timestamp representing the date and time when the object was created. The value is shown in the ISO 8601 format.", - "format": "date-time", - "nullable": true - }, - "customer_id": { - "type": "string", - "nullable": true, - "example": "cust_i8t5Tt6eiKG5K79KQlJ0Vs64", - "description": "Unique customer ID of the redeeming customer." - }, - "tracking_id": { - "type": "string", - "nullable": true, - "description": "Hashed customer source ID." - }, - "metadata": { - "title": "RedemptionsGetResponseBodyMetadata", + "title": "QualificationsCheckEligibilityResponseBodyOrder", "type": "object", "nullable": true, - "description": "The metadata object stores all custom attributes assigned to the redemption." - }, - "amount": { - "type": "integer", - "nullable": true, - "description": "For gift cards, this is a positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the number of redeemed credits.\nFor loyalty cards, this is the number of loyalty points used in the transaction. and For gift cards, this represents the number of the credits restored to the card in the rolledback redemption. The number is a negative integer in the smallest currency unit, e.g. -100 cents for $1.00 added back to the card.\nFor loyalty cards, this represents the number of loyalty points restored to the card in the rolledback redemption. The number is a negative integer." - }, - "redemption": { - "nullable": true, - "type": "string", - "description": "Unique redemption ID of the parent redemption.", - "example": "r_0c656311b5878a2031" - }, - "result": { - "type": "string", - "enum": [ - "SUCCESS", - "FAILURE" - ], - "description": "Redemption result.", - "nullable": true - }, - "status": { - "type": "string", - "enum": [ - "SUCCEEDED", - "FAILED", - "ROLLED_BACK" - ], - "nullable": true - }, - "related_redemptions": { - "title": "RedemptionsGetResponseBodyRelatedRedemptions", - "type": "object", - "properties": { - "rollbacks": { - "title": "RedemptionsGetResponseBodyRelatedRedemptionsRollbacks", - "type": "array", - "items": { - "title": "RedemptionsGetResponseBodyRelatedRedemptionsRollbacksItem", - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "date": { - "type": "string", - "example": "2021-12-22T10:13:06.487Z", - "description": "Timestamp representing the date and time when the object was created. The value is shown in the ISO 8601 format.", - "format": "date-time" - } - } - }, - "nullable": true - }, - "redemptions": { - "title": "RedemptionsGetResponseBodyRelatedRedemptionsRedemptions", - "type": "array", - "items": { - "title": "RedemptionsGetResponseBodyRelatedRedemptionsRedemptionsItem", - "type": "object", - "properties": { - "id": { - "type": "string", - "example": "r_0bc92f81a6801f9bca", - "description": "Unique redemption ID." - }, - "date": { - "type": "string", - "example": "2021-12-22T10:13:06.487Z", - "description": "Timestamp representing the date and time when the object was created. The value is shown in the ISO 8601 format.", - "format": "date-time" - } - } - }, - "nullable": true - } - }, - "nullable": true - }, - "failure_code": { - "type": "string", - "example": "customer_rules_violated", - "description": "If the result is `FAILURE`, this parameter will provide a generic reason as to why the redemption failed.", - "nullable": true - }, - "failure_message": { - "type": "string", - "description": "If the result is `FAILURE`, this parameter will provide a more expanded reason as to why the redemption failed.", - "nullable": true - }, - "order": { - "title": "RedemptionsGetResponseBodyOrder", - "type": "object", "properties": { "id": { "type": "string", @@ -21333,14 +21998,275 @@ "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", "nullable": true }, + "metadata": { + "title": "QualificationsCheckEligibilityResponseBodyOrderMetadata", + "type": "object", + "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", + "nullable": true + }, + "object": { + "type": "string", + "description": "The type of the object represented by JSON.", + "default": "order", + "enum": [ + "order" + ], + "nullable": true + }, + "created_at": { + "type": "string", + "example": "2021-12-22T10:13:06.487Z", + "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", + "format": "date-time", + "nullable": true + }, + "updated_at": { + "type": "string", + "nullable": true, + "example": "2021-12-22T10:14:45.316Z", + "format": "date-time", + "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." + }, + "customer_id": { + "type": "string", + "nullable": true, + "description": "Unique customer ID of the customer making the purchase.", + "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" + }, + "referrer_id": { + "type": "string", + "nullable": true, + "description": "Unique referrer ID.", + "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" + }, + "customer": { + "$ref": "#/components/schemas/CustomerId" + }, + "referrer": { + "$ref": "#/components/schemas/ReferrerId" + }, + "redemptions": { + "title": "QualificationsCheckEligibilityResponseBodyOrderRedemptionsEntry", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/OrderRedemptionsEntry" + }, + "nullable": true + }, "items": { - "title": "RedemptionsGetResponseBodyOrderItems", + "title": "QualificationsCheckEligibilityResponseBodyOrderItems", "type": "array", - "description": "Array of items applied to the order. It can include up 500 items.", + "description": "Array of items applied to the order. It can include up to 500 items.", "items": { "$ref": "#/components/schemas/OrderCalculatedItem" }, "nullable": true + } + } + }, + "stacking_rules": { + "$ref": "#/components/schemas/StackingRules" + } + } + }, + "RedemptionsGetResponseBody": { + "title": "RedemptionsGetResponseBody", + "type": "object", + "properties": { + "id": { + "type": "string", + "nullable": true + }, + "object": { + "type": "string", + "enum": [ + "redemption", + "redemption_rollback" + ], + "nullable": true + }, + "date": { + "type": "string", + "example": "2021-12-22T10:13:06.487Z", + "description": "Timestamp representing the date and time when the object was created. The value is shown in the ISO 8601 format.", + "format": "date-time", + "nullable": true + }, + "customer_id": { + "type": "string", + "nullable": true, + "example": "cust_i8t5Tt6eiKG5K79KQlJ0Vs64", + "description": "Unique customer ID of the redeeming customer." + }, + "tracking_id": { + "type": "string", + "nullable": true, + "description": "Hashed customer source ID." + }, + "metadata": { + "title": "RedemptionsGetResponseBodyMetadata", + "type": "object", + "nullable": true, + "description": "The metadata object stores all custom attributes assigned to the redemption." + }, + "amount": { + "type": "integer", + "nullable": true, + "description": "For gift cards, this is a positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the number of redeemed credits.\nFor loyalty cards, this is the number of loyalty points used in the transaction. and For gift cards, this represents the number of the credits restored to the card in the rolledback redemption. The number is a negative integer in the smallest currency unit, e.g. -100 cents for $1.00 added back to the card.\nFor loyalty cards, this represents the number of loyalty points restored to the card in the rolledback redemption. The number is a negative integer." + }, + "redemption": { + "nullable": true, + "type": "string", + "description": "Unique redemption ID of the parent redemption.", + "example": "r_0c656311b5878a2031" + }, + "result": { + "type": "string", + "enum": [ + "SUCCESS", + "FAILURE" + ], + "description": "Redemption result.", + "nullable": true + }, + "status": { + "type": "string", + "enum": [ + "SUCCEEDED", + "FAILED", + "ROLLED_BACK" + ], + "nullable": true + }, + "related_redemptions": { + "title": "RedemptionsGetResponseBodyRelatedRedemptions", + "type": "object", + "properties": { + "rollbacks": { + "title": "RedemptionsGetResponseBodyRelatedRedemptionsRollbacks", + "type": "array", + "items": { + "title": "RedemptionsGetResponseBodyRelatedRedemptionsRollbacksItem", + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "date": { + "type": "string", + "example": "2021-12-22T10:13:06.487Z", + "description": "Timestamp representing the date and time when the object was created. The value is shown in the ISO 8601 format.", + "format": "date-time" + } + } + }, + "nullable": true + }, + "redemptions": { + "title": "RedemptionsGetResponseBodyRelatedRedemptionsRedemptions", + "type": "array", + "items": { + "title": "RedemptionsGetResponseBodyRelatedRedemptionsRedemptionsItem", + "type": "object", + "properties": { + "id": { + "type": "string", + "example": "r_0bc92f81a6801f9bca", + "description": "Unique redemption ID." + }, + "date": { + "type": "string", + "example": "2021-12-22T10:13:06.487Z", + "description": "Timestamp representing the date and time when the object was created. The value is shown in the ISO 8601 format.", + "format": "date-time" + } + } + }, + "nullable": true + } + }, + "nullable": true + }, + "failure_code": { + "type": "string", + "example": "customer_rules_violated", + "description": "If the result is `FAILURE`, this parameter will provide a generic reason as to why the redemption failed.", + "nullable": true + }, + "failure_message": { + "type": "string", + "description": "If the result is `FAILURE`, this parameter will provide a more expanded reason as to why the redemption failed.", + "nullable": true + }, + "order": { + "title": "RedemptionsGetResponseBodyOrder", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", + "nullable": true + }, + "source_id": { + "type": "string", + "nullable": true, + "description": "Unique source ID of an existing order that will be linked to the redemption of this request." + }, + "status": { + "type": "string", + "description": "The order status.", + "enum": [ + "CREATED", + "PAID", + "CANCELED", + "FULFILLED" + ], + "nullable": true + }, + "amount": { + "type": "integer", + "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "initial_amount": { + "type": "integer", + "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "discount_amount": { + "type": "integer", + "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "items_discount_amount": { + "type": "integer", + "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "total_discount_amount": { + "type": "integer", + "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "total_amount": { + "type": "integer", + "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "applied_discount_amount": { + "type": "integer", + "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "items_applied_discount_amount": { + "type": "integer", + "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", + "nullable": true + }, + "total_applied_discount_amount": { + "type": "integer", + "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", + "nullable": true }, "metadata": { "title": "RedemptionsGetResponseBodyOrderMetadata", @@ -21432,6 +22358,15 @@ "$ref": "#/components/schemas/OrderRedemptionsEntry" }, "nullable": true + }, + "items": { + "title": "RedemptionsGetResponseBodyOrderItems", + "type": "array", + "description": "Array of items applied to the order. It can include up to 500 items.", + "items": { + "$ref": "#/components/schemas/OrderCalculatedItem" + }, + "nullable": true } }, "nullable": true @@ -22235,15 +23170,6 @@ "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", "nullable": true }, - "items": { - "title": "RedemptionsListResponseBodyRedemptionsItemOrderItems", - "type": "array", - "description": "Array of items applied to the order. It can include up 500 items.", - "items": { - "$ref": "#/components/schemas/OrderCalculatedItem" - }, - "nullable": true - }, "metadata": { "title": "RedemptionsListResponseBodyRedemptionsItemOrderMetadata", "type": "object", @@ -22332,6 +23258,15 @@ "$ref": "#/components/schemas/OrderRedemptionsEntry" }, "nullable": true + }, + "items": { + "title": "RedemptionsListResponseBodyRedemptionsItemOrderItems", + "type": "array", + "description": "Array of items applied to the order. It can include up to 500 items.", + "items": { + "$ref": "#/components/schemas/OrderCalculatedItem" + }, + "nullable": true } } }, @@ -23033,7 +23968,155 @@ "$ref": "#/components/schemas/Redemption" }, "order": { - "$ref": "#/components/schemas/OrderCalculated" + "title": "RedemptionsRedeemResponseBodyOrder", + "description": "Contains the order details associated with the redemption.", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", + "nullable": true + }, + "source_id": { + "type": "string", + "nullable": true, + "description": "Unique source ID of an existing order that will be linked to the redemption of this request." + }, + "status": { + "type": "string", + "description": "The order status.", + "enum": [ + "CREATED", + "PAID", + "CANCELED", + "FULFILLED" + ], + "nullable": true + }, + "amount": { + "type": "integer", + "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "initial_amount": { + "type": "integer", + "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "discount_amount": { + "type": "integer", + "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "items_discount_amount": { + "type": "integer", + "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "total_discount_amount": { + "type": "integer", + "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "total_amount": { + "type": "integer", + "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "applied_discount_amount": { + "type": "integer", + "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "items_applied_discount_amount": { + "type": "integer", + "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", + "nullable": true + }, + "total_applied_discount_amount": { + "type": "integer", + "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", + "nullable": true + }, + "metadata": { + "title": "RedemptionsRedeemResponseBodyOrderMetadata", + "type": "object", + "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", + "nullable": true + }, + "object": { + "type": "string", + "description": "The type of the object represented by JSON.", + "default": "order", + "enum": [ + "order" + ], + "nullable": true + }, + "created_at": { + "type": "string", + "example": "2021-12-22T10:13:06.487Z", + "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", + "format": "date-time", + "nullable": true + }, + "updated_at": { + "type": "string", + "nullable": true, + "example": "2021-12-22T10:14:45.316Z", + "format": "date-time", + "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." + }, + "customer_id": { + "type": "string", + "nullable": true, + "description": "Unique customer ID of the customer making the purchase.", + "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" + }, + "referrer_id": { + "type": "string", + "nullable": true, + "description": "Unique referrer ID.", + "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" + }, + "customer": { + "$ref": "#/components/schemas/CustomerId" + }, + "referrer": { + "$ref": "#/components/schemas/ReferrerId" + }, + "redemptions": { + "title": "RedemptionsRedeemResponseBodyOrderRedemptionsEntry", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/OrderRedemptionsEntry" + }, + "nullable": true + }, + "items": { + "title": "RedemptionsRedeemResponseBodyOrderItems", + "type": "array", + "description": "Array of items applied to the order. It can include up to 500 items.", + "items": { + "title": "RedemptionsRedeemResponseBodyOrderItemsItem", + "allOf": [ + { + "$ref": "#/components/schemas/OrderCalculatedItem" + }, + { + "type": "object", + "properties": { + "application_details": { + "$ref": "#/components/schemas/ApplicationDetails" + } + } + } + ] + }, + "nullable": true + } + }, + "nullable": true }, "inapplicable_redeemables": { "title": "RedemptionsRedeemResponseBodyInapplicableRedeemables", @@ -23225,7 +24308,141 @@ "nullable": true }, "order": { - "$ref": "#/components/schemas/OrderCalculated" + "title": "RedemptionsRollbackCreateResponseBodyOrder", + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", + "nullable": true + }, + "source_id": { + "type": "string", + "nullable": true, + "description": "Unique source ID of an existing order that will be linked to the redemption of this request." + }, + "status": { + "type": "string", + "description": "The order status.", + "enum": [ + "CREATED", + "PAID", + "CANCELED", + "FULFILLED" + ], + "nullable": true + }, + "amount": { + "type": "integer", + "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "initial_amount": { + "type": "integer", + "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "discount_amount": { + "type": "integer", + "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "items_discount_amount": { + "type": "integer", + "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "total_discount_amount": { + "type": "integer", + "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "total_amount": { + "type": "integer", + "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "applied_discount_amount": { + "type": "integer", + "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "items_applied_discount_amount": { + "type": "integer", + "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", + "nullable": true + }, + "total_applied_discount_amount": { + "type": "integer", + "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", + "nullable": true + }, + "metadata": { + "title": "RedemptionsRollbackCreateResponseBodyOrderMetadata", + "type": "object", + "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", + "nullable": true + }, + "object": { + "type": "string", + "description": "The type of the object represented by JSON.", + "default": "order", + "enum": [ + "order" + ], + "nullable": true + }, + "created_at": { + "type": "string", + "example": "2021-12-22T10:13:06.487Z", + "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", + "format": "date-time", + "nullable": true + }, + "updated_at": { + "type": "string", + "nullable": true, + "example": "2021-12-22T10:14:45.316Z", + "format": "date-time", + "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." + }, + "customer_id": { + "type": "string", + "nullable": true, + "description": "Unique customer ID of the customer making the purchase.", + "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" + }, + "referrer_id": { + "type": "string", + "nullable": true, + "description": "Unique referrer ID.", + "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" + }, + "customer": { + "$ref": "#/components/schemas/CustomerId" + }, + "referrer": { + "$ref": "#/components/schemas/ReferrerId" + }, + "redemptions": { + "title": "RedemptionsRollbackCreateResponseBodyOrderRedemptionsEntry", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/OrderRedemptionsEntry" + }, + "nullable": true + }, + "items": { + "title": "RedemptionsRollbackCreateResponseBodyOrderItems", + "type": "array", + "description": "Array of items applied to the order. It can include up to 500 items.", + "items": { + "$ref": "#/components/schemas/OrderCalculatedItem" + }, + "nullable": true + } + } }, "channel": { "title": "RedemptionsRollbackCreateResponseBodyChannel", @@ -23353,9 +24570,23 @@ "parent_rollback": { "$ref": "#/components/schemas/RedemptionRollback" }, - "order": { - "$ref": "#/components/schemas/OrderCalculated" - } + "allOf": [ + { + "$ref": "#/components/schemas/OrderCalculated" + }, + { + "type": "object", + "properties": { + "items": { + "type": "array", + "description": "Array of items applied to the order. It can include up to 500 items.", + "items": { + "$ref": "#/components/schemas/OrderCalculatedItem" + } + } + } + } + ] } }, "ReferralsMembersHoldersCreateInBulkRequestBody": { @@ -26238,7 +27469,176 @@ "nullable": true }, "order": { - "$ref": "#/components/schemas/OrderCalculated" + "title": "ValidationsValidateResponseBodyRedeemablesItemOrder", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", + "nullable": true + }, + "source_id": { + "type": "string", + "nullable": true, + "description": "Unique source ID of an existing order that will be linked to the redemption of this request." + }, + "status": { + "type": "string", + "description": "The order status.", + "enum": [ + "CREATED", + "PAID", + "CANCELED", + "FULFILLED" + ], + "nullable": true + }, + "amount": { + "type": "integer", + "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "initial_amount": { + "type": "integer", + "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "discount_amount": { + "type": "integer", + "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "items_discount_amount": { + "type": "integer", + "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "total_discount_amount": { + "type": "integer", + "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "total_amount": { + "type": "integer", + "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "applied_discount_amount": { + "type": "integer", + "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "items_applied_discount_amount": { + "type": "integer", + "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", + "nullable": true + }, + "total_applied_discount_amount": { + "type": "integer", + "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", + "nullable": true + }, + "metadata": { + "title": "ValidationsValidateResponseBodyRedeemablesItemOrderMetadata", + "type": "object", + "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", + "nullable": true + }, + "object": { + "type": "string", + "description": "The type of the object represented by JSON.", + "default": "order", + "enum": [ + "order" + ], + "nullable": true + }, + "created_at": { + "type": "string", + "example": "2021-12-22T10:13:06.487Z", + "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", + "format": "date-time", + "nullable": true + }, + "updated_at": { + "type": "string", + "nullable": true, + "example": "2021-12-22T10:14:45.316Z", + "format": "date-time", + "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." + }, + "customer_id": { + "type": "string", + "nullable": true, + "description": "Unique customer ID of the customer making the purchase.", + "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" + }, + "referrer_id": { + "type": "string", + "nullable": true, + "description": "Unique referrer ID.", + "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" + }, + "customer": { + "title": "ValidationsValidateResponseBodyRedeemablesItemOrderCustomer", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "A unique identifier of an existing customer.", + "nullable": true + }, + "object": { + "type": "string", + "description": "The type of the object represented by JSON.", + "default": "customer", + "enum": [ + "customer" + ], + "nullable": true + } + }, + "required": [] + }, + "referrer": { + "title": "ValidationsValidateResponseBodyRedeemablesItemOrderReferrer", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "A unique identifier of an existing customer.", + "nullable": true + }, + "object": { + "type": "string", + "description": "The type of the object represented by JSON.", + "default": "customer", + "enum": [ + "customer" + ], + "nullable": true + } + }, + "required": [] + }, + "redemptions": { + "title": "ValidationsValidateResponseBodyRedeemablesItemOrderRedemptionsEntry", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/OrderRedemptionsEntry" + }, + "nullable": true + }, + "items": { + "title": "ValidationsValidateResponseBodyRedeemablesItemOrderItems", + "type": "array", + "description": "Array of items applied to the order. It can include up to 500 items.", + "items": { + "$ref": "#/components/schemas/OrderCalculatedItem" + }, + "nullable": true + } + } }, "applicable_to": { "$ref": "#/components/schemas/ApplicableToResultList" @@ -26461,7 +27861,154 @@ "nullable": true }, "order": { - "$ref": "#/components/schemas/OrderCalculated" + "title": "ValidationsValidateResponseBodyOrder", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", + "nullable": true + }, + "source_id": { + "type": "string", + "nullable": true, + "description": "Unique source ID of an existing order that will be linked to the redemption of this request." + }, + "status": { + "type": "string", + "description": "The order status.", + "enum": [ + "CREATED", + "PAID", + "CANCELED", + "FULFILLED" + ], + "nullable": true + }, + "amount": { + "type": "integer", + "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "initial_amount": { + "type": "integer", + "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "discount_amount": { + "type": "integer", + "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "items_discount_amount": { + "type": "integer", + "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "total_discount_amount": { + "type": "integer", + "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "total_amount": { + "type": "integer", + "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "applied_discount_amount": { + "type": "integer", + "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "items_applied_discount_amount": { + "type": "integer", + "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", + "nullable": true + }, + "total_applied_discount_amount": { + "type": "integer", + "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", + "nullable": true + }, + "metadata": { + "title": "ValidationsValidateResponseBodyOrderMetadata", + "type": "object", + "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", + "nullable": true + }, + "object": { + "type": "string", + "description": "The type of the object represented by JSON.", + "default": "order", + "enum": [ + "order" + ], + "nullable": true + }, + "created_at": { + "type": "string", + "example": "2021-12-22T10:13:06.487Z", + "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", + "format": "date-time", + "nullable": true + }, + "updated_at": { + "type": "string", + "nullable": true, + "example": "2021-12-22T10:14:45.316Z", + "format": "date-time", + "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." + }, + "customer_id": { + "type": "string", + "nullable": true, + "description": "Unique customer ID of the customer making the purchase.", + "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" + }, + "referrer_id": { + "type": "string", + "nullable": true, + "description": "Unique referrer ID.", + "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" + }, + "customer": { + "$ref": "#/components/schemas/CustomerId" + }, + "referrer": { + "$ref": "#/components/schemas/ReferrerId" + }, + "redemptions": { + "title": "ValidationsValidateResponseBodyOrderRedemptionsEntry", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/OrderRedemptionsEntry" + }, + "nullable": true + }, + "items": { + "title": "ValidationsValidateResponseBodyOrderItems", + "type": "array", + "description": "Array of items applied to the order. It can include up to 500 items.", + "items": { + "title": "ValidationsValidateResponseBodyOrderItemsItem", + "allOf": [ + { + "$ref": "#/components/schemas/OrderCalculatedItem" + }, + { + "type": "object", + "properties": { + "application_details": { + "$ref": "#/components/schemas/ApplicationDetails" + } + } + } + ] + }, + "nullable": true + } + }, + "nullable": true }, "tracking_id": { "type": "string", @@ -28852,6 +30399,49 @@ }, "required": [] }, + "ApplicationDetails": { + "title": "ApplicationDetails", + "type": "array", + "description": "Array containing details about the items that are replaced and the items that are replacements for discounts with the `REPLACE_ITEMS` effect.", + "items": { + "title": "ApplicationDetailsItem", + "type": "object", + "description": "Object representing item replacement.", + "properties": { + "source_index": { + "type": "integer", + "description": "Index number of the source item that is replaced. The enumeration starts from `0`, which represents the first item in the request, e.g., if the replaced item is passed as the second in the request, `source_index` equals `3`.", + "minimum": 0 + }, + "source_applied_quantity": { + "type": "integer", + "description": "Number of source units that are replaced.", + "maximum": -1 + }, + "source_applied_quantity_amount": { + "type": "integer", + "description": "Amount equal to the price of the units that are replaced. Determines the change of the amount of the source item quantity.", + "maximum": 0 + }, + "target_index": { + "type": "integer", + "description": "Index number of the target item that is a replacement of the source item. The enumeration continues the values for the order items, e.g. if there are three items in the request, `target_index` equals `3`, as enumeration starts from `0`." + }, + "target_applied_quantity": { + "type": "integer", + "description": "Number of added target units that are replacements." + }, + "target_applied_quantity_amount": { + "type": "integer", + "description": "Amount equal to the price of the units that are replacements. Determines the change in the amount of the target item quantity." + }, + "target_applied_discount_amount": { + "type": "integer", + "description": "Discount amount applied to the target item with regard to the replacement. Equals the `target_applied_quantity_amount` minus `source_applied_quantity_amount`." + } + } + } + }, "AsyncActionBase": { "title": "AsyncActionBase", "type": "object", @@ -33955,7 +35545,7 @@ "items": { "title": "OrderItems", "type": "array", - "description": "Array of items applied to the order. It can include up 500 items.", + "description": "Array of items applied to the order. It can include up to 500 items.", "items": { "$ref": "#/components/schemas/OrderItem" }, @@ -34041,15 +35631,6 @@ "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", "nullable": true }, - "items": { - "title": "OrderCalculatedItems", - "type": "array", - "description": "Array of items applied to the order. It can include up 500 items.", - "items": { - "$ref": "#/components/schemas/OrderCalculatedItem" - }, - "nullable": true - }, "metadata": { "title": "OrderCalculatedMetadata", "type": "object", @@ -35740,7 +37321,179 @@ "nullable": true }, "order": { - "$ref": "#/components/schemas/OrderCalculated" + "title": "RedemptionOrder", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", + "nullable": true + }, + "source_id": { + "type": "string", + "nullable": true, + "description": "Unique source ID of an existing order that will be linked to the redemption of this request." + }, + "status": { + "type": "string", + "description": "The order status.", + "enum": [ + "CREATED", + "PAID", + "CANCELED", + "FULFILLED" + ], + "nullable": true + }, + "amount": { + "type": "integer", + "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "initial_amount": { + "type": "integer", + "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "discount_amount": { + "type": "integer", + "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "items_discount_amount": { + "type": "integer", + "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "total_discount_amount": { + "type": "integer", + "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "total_amount": { + "type": "integer", + "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "applied_discount_amount": { + "type": "integer", + "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "items_applied_discount_amount": { + "type": "integer", + "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", + "nullable": true + }, + "total_applied_discount_amount": { + "type": "integer", + "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", + "nullable": true + }, + "metadata": { + "title": "RedemptionOrderMetadata", + "type": "object", + "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", + "nullable": true + }, + "object": { + "type": "string", + "description": "The type of the object represented by JSON.", + "default": "order", + "enum": [ + "order" + ], + "nullable": true + }, + "created_at": { + "type": "string", + "example": "2021-12-22T10:13:06.487Z", + "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", + "format": "date-time", + "nullable": true + }, + "updated_at": { + "type": "string", + "nullable": true, + "example": "2021-12-22T10:14:45.316Z", + "format": "date-time", + "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." + }, + "customer_id": { + "type": "string", + "nullable": true, + "description": "Unique customer ID of the customer making the purchase.", + "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" + }, + "referrer_id": { + "type": "string", + "nullable": true, + "description": "Unique referrer ID.", + "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" + }, + "customer": { + "title": "RedemptionOrderCustomer", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "A unique identifier of an existing customer.", + "nullable": true + }, + "object": { + "type": "string", + "description": "The type of the object represented by JSON.", + "default": "customer", + "enum": [ + "customer" + ], + "nullable": true + } + }, + "required": [], + "nullable": true + }, + "referrer": { + "title": "RedemptionOrderReferrer", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "A unique identifier of an existing customer.", + "nullable": true + }, + "object": { + "type": "string", + "description": "The type of the object represented by JSON.", + "default": "customer", + "enum": [ + "customer" + ], + "nullable": true + } + }, + "required": [], + "nullable": true + }, + "redemptions": { + "title": "RedemptionOrderRedemptionsEntry", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/OrderRedemptionsEntry" + }, + "nullable": true + }, + "items": { + "title": "RedemptionOrderItems", + "type": "array", + "description": "Array of items applied to the order. It can include up to 500 items.", + "items": { + "$ref": "#/components/schemas/OrderCalculatedItem" + }, + "nullable": true + } + }, + "nullable": true }, "channel": { "title": "RedemptionChannel", @@ -36292,15 +38045,6 @@ "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", "nullable": true }, - "items": { - "title": "RedemptionEntryOrderItems", - "type": "array", - "description": "Array of items applied to the order. It can include up 500 items.", - "items": { - "$ref": "#/components/schemas/OrderCalculatedItem" - }, - "nullable": true - }, "metadata": { "title": "RedemptionEntryOrderMetadata", "type": "object", @@ -36391,6 +38135,15 @@ "$ref": "#/components/schemas/OrderRedemptionsEntry" }, "nullable": true + }, + "items": { + "title": "RedemptionEntryOrderItems", + "type": "array", + "description": "Array of items applied to the order. It can include up to 500 items.", + "items": { + "$ref": "#/components/schemas/OrderCalculatedItem" + }, + "nullable": true } }, "nullable": true @@ -37275,7 +39028,141 @@ "nullable": true }, "order": { - "$ref": "#/components/schemas/OrderCalculated" + "title": "RedemptionRollbackOrder", + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", + "nullable": true + }, + "source_id": { + "type": "string", + "nullable": true, + "description": "Unique source ID of an existing order that will be linked to the redemption of this request." + }, + "status": { + "type": "string", + "description": "The order status.", + "enum": [ + "CREATED", + "PAID", + "CANCELED", + "FULFILLED" + ], + "nullable": true + }, + "amount": { + "type": "integer", + "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "initial_amount": { + "type": "integer", + "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "discount_amount": { + "type": "integer", + "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "items_discount_amount": { + "type": "integer", + "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "total_discount_amount": { + "type": "integer", + "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "total_amount": { + "type": "integer", + "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "applied_discount_amount": { + "type": "integer", + "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "items_applied_discount_amount": { + "type": "integer", + "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", + "nullable": true + }, + "total_applied_discount_amount": { + "type": "integer", + "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", + "nullable": true + }, + "metadata": { + "title": "RedemptionRollbackOrderMetadata", + "type": "object", + "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", + "nullable": true + }, + "object": { + "type": "string", + "description": "The type of the object represented by JSON.", + "default": "order", + "enum": [ + "order" + ], + "nullable": true + }, + "created_at": { + "type": "string", + "example": "2021-12-22T10:13:06.487Z", + "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", + "format": "date-time", + "nullable": true + }, + "updated_at": { + "type": "string", + "nullable": true, + "example": "2021-12-22T10:14:45.316Z", + "format": "date-time", + "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." + }, + "customer_id": { + "type": "string", + "nullable": true, + "description": "Unique customer ID of the customer making the purchase.", + "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" + }, + "referrer_id": { + "type": "string", + "nullable": true, + "description": "Unique referrer ID.", + "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" + }, + "customer": { + "$ref": "#/components/schemas/CustomerId" + }, + "referrer": { + "$ref": "#/components/schemas/ReferrerId" + }, + "redemptions": { + "title": "RedemptionRollbackOrderRedemptionsEntry", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/OrderRedemptionsEntry" + }, + "nullable": true + }, + "items": { + "title": "RedemptionRollbackOrderItems", + "type": "array", + "description": "Array of items applied to the order. It can include up to 500 items.", + "items": { + "$ref": "#/components/schemas/OrderCalculatedItem" + }, + "nullable": true + } + } }, "channel": { "title": "RedemptionRollbackChannel", @@ -40616,7 +42503,154 @@ "$ref": "#/components/schemas/RedeemableResult" }, "order": { - "$ref": "#/components/schemas/OrderCalculated" + "title": "QualificationsRedeemableOrder", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", + "nullable": true + }, + "source_id": { + "type": "string", + "nullable": true, + "description": "Unique source ID of an existing order that will be linked to the redemption of this request." + }, + "status": { + "type": "string", + "description": "The order status.", + "enum": [ + "CREATED", + "PAID", + "CANCELED", + "FULFILLED" + ], + "nullable": true + }, + "amount": { + "type": "integer", + "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "initial_amount": { + "type": "integer", + "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "discount_amount": { + "type": "integer", + "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "items_discount_amount": { + "type": "integer", + "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "total_discount_amount": { + "type": "integer", + "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "total_amount": { + "type": "integer", + "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "applied_discount_amount": { + "type": "integer", + "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "items_applied_discount_amount": { + "type": "integer", + "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", + "nullable": true + }, + "total_applied_discount_amount": { + "type": "integer", + "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", + "nullable": true + }, + "metadata": { + "title": "QualificationsRedeemableOrderMetadata", + "type": "object", + "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", + "nullable": true + }, + "object": { + "type": "string", + "description": "The type of the object represented by JSON.", + "default": "order", + "enum": [ + "order" + ], + "nullable": true + }, + "created_at": { + "type": "string", + "example": "2021-12-22T10:13:06.487Z", + "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", + "format": "date-time", + "nullable": true + }, + "updated_at": { + "type": "string", + "nullable": true, + "example": "2021-12-22T10:14:45.316Z", + "format": "date-time", + "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." + }, + "customer_id": { + "type": "string", + "nullable": true, + "description": "Unique customer ID of the customer making the purchase.", + "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" + }, + "referrer_id": { + "type": "string", + "nullable": true, + "description": "Unique referrer ID.", + "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" + }, + "customer": { + "$ref": "#/components/schemas/CustomerId" + }, + "referrer": { + "$ref": "#/components/schemas/ReferrerId" + }, + "redemptions": { + "title": "QualificationsRedeemableOrderRedemptionsEntry", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/OrderRedemptionsEntry" + }, + "nullable": true + }, + "items": { + "title": "QualificationsRedeemableOrderItems", + "type": "array", + "description": "Array of items applied to the order. It can include up to 500 items.", + "items": { + "title": "QualificationsRedeemableOrderItemsItem", + "allOf": [ + { + "$ref": "#/components/schemas/OrderCalculatedItem" + }, + { + "type": "object", + "properties": { + "application_details": { + "$ref": "#/components/schemas/ApplicationDetails" + } + } + } + ] + }, + "nullable": true + } + }, + "nullable": true }, "validation_rule_id": { "type": "string", @@ -41401,7 +43435,154 @@ "$ref": "#/components/schemas/RedeemableResult" }, "order": { - "$ref": "#/components/schemas/OrderCalculated" + "title": "QualificationsRedeemableBaseOrder", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", + "nullable": true + }, + "source_id": { + "type": "string", + "nullable": true, + "description": "Unique source ID of an existing order that will be linked to the redemption of this request." + }, + "status": { + "type": "string", + "description": "The order status.", + "enum": [ + "CREATED", + "PAID", + "CANCELED", + "FULFILLED" + ], + "nullable": true + }, + "amount": { + "type": "integer", + "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "initial_amount": { + "type": "integer", + "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "discount_amount": { + "type": "integer", + "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "items_discount_amount": { + "type": "integer", + "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "total_discount_amount": { + "type": "integer", + "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "total_amount": { + "type": "integer", + "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "applied_discount_amount": { + "type": "integer", + "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "items_applied_discount_amount": { + "type": "integer", + "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", + "nullable": true + }, + "total_applied_discount_amount": { + "type": "integer", + "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", + "nullable": true + }, + "metadata": { + "title": "QualificationsRedeemableBaseOrderMetadata", + "type": "object", + "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", + "nullable": true + }, + "object": { + "type": "string", + "description": "The type of the object represented by JSON.", + "default": "order", + "enum": [ + "order" + ], + "nullable": true + }, + "created_at": { + "type": "string", + "example": "2021-12-22T10:13:06.487Z", + "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", + "format": "date-time", + "nullable": true + }, + "updated_at": { + "type": "string", + "nullable": true, + "example": "2021-12-22T10:14:45.316Z", + "format": "date-time", + "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." + }, + "customer_id": { + "type": "string", + "nullable": true, + "description": "Unique customer ID of the customer making the purchase.", + "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" + }, + "referrer_id": { + "type": "string", + "nullable": true, + "description": "Unique referrer ID.", + "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" + }, + "customer": { + "$ref": "#/components/schemas/CustomerId" + }, + "referrer": { + "$ref": "#/components/schemas/ReferrerId" + }, + "redemptions": { + "title": "QualificationsRedeemableBaseOrderRedemptionsEntry", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/OrderRedemptionsEntry" + }, + "nullable": true + }, + "items": { + "title": "QualificationsRedeemableBaseOrderItems", + "type": "array", + "description": "Array of items applied to the order. It can include up to 500 items.", + "items": { + "title": "QualificationsRedeemableBaseOrderItemsItem", + "allOf": [ + { + "$ref": "#/components/schemas/OrderCalculatedItem" + }, + { + "type": "object", + "properties": { + "application_details": { + "$ref": "#/components/schemas/ApplicationDetails" + } + } + } + ] + }, + "nullable": true + } + }, + "nullable": true }, "validation_rule_id": { "type": "string", diff --git a/reference/readonly-sdks/php/OpenAPI.json b/reference/readonly-sdks/php/OpenAPI.json index 84ebb023..e67ad7a5 100644 --- a/reference/readonly-sdks/php/OpenAPI.json +++ b/reference/readonly-sdks/php/OpenAPI.json @@ -2587,7 +2587,194 @@ "nullable": true }, "order": { - "$ref": "#/components/schemas/OrderCalculated" + "title": "ClientQualificationsCheckEligibilityResponseBodyOrder", + "type": "object", + "nullable": true, + "properties": { + "id": { + "type": "string", + "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", + "nullable": true + }, + "source_id": { + "type": "string", + "nullable": true, + "description": "Unique source ID of an existing order that will be linked to the redemption of this request." + }, + "status": { + "type": "string", + "description": "The order status.", + "enum": [ + "CREATED", + "PAID", + "CANCELED", + "FULFILLED" + ], + "nullable": true + }, + "amount": { + "type": "integer", + "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "initial_amount": { + "type": "integer", + "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "discount_amount": { + "type": "integer", + "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "items_discount_amount": { + "type": "integer", + "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "total_discount_amount": { + "type": "integer", + "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "total_amount": { + "type": "integer", + "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "applied_discount_amount": { + "type": "integer", + "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "items_applied_discount_amount": { + "type": "integer", + "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", + "nullable": true + }, + "total_applied_discount_amount": { + "type": "integer", + "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", + "nullable": true + }, + "metadata": { + "title": "ClientQualificationsCheckEligibilityResponseBodyOrderMetadata", + "type": "object", + "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", + "nullable": true + }, + "object": { + "type": "string", + "description": "The type of the object represented by JSON.", + "default": "order", + "enum": [ + "order" + ], + "nullable": true + }, + "created_at": { + "type": "string", + "example": "2021-12-22T10:13:06.487Z", + "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", + "format": "date-time", + "nullable": true + }, + "updated_at": { + "type": "string", + "nullable": true, + "example": "2021-12-22T10:14:45.316Z", + "format": "date-time", + "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." + }, + "customer_id": { + "type": "string", + "nullable": true, + "description": "Unique customer ID of the customer making the purchase.", + "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" + }, + "referrer_id": { + "type": "string", + "nullable": true, + "description": "Unique referrer ID.", + "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" + }, + "customer": { + "$ref": "#/components/schemas/CustomerId" + }, + "referrer": { + "$ref": "#/components/schemas/ReferrerId" + }, + "redemptions": { + "title": "ClientQualificationsCheckEligibilityResponseBodyOrderRedemptionsEntry", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/OrderRedemptionsEntry" + }, + "nullable": true + }, + "items": { + "title": "ClientQualificationsCheckEligibilityResponseBodyOrderItems", + "type": "array", + "description": "Array of items applied to the order. It can include up to 500 items.", + "items": { + "title": "ClientQualificationsCheckEligibilityResponseBodyOrderItemsItem", + "allOf": [ + { + "$ref": "#/components/schemas/OrderCalculatedItem" + }, + { + "type": "object", + "properties": { + "application_details": { + "title": "ClientQualificationsCheckEligibilityResponseBodyOrderItemsItemApplicationDetails", + "type": "array", + "description": "Array containing details about the items that are replaced and the items that are replacements for discounts with the `REPLACE_ITEMS` effect.", + "items": { + "title": "ClientQualificationsCheckEligibilityResponseBodyOrderItemsItemApplicationDetailsItem", + "type": "object", + "description": "Object representing item replacement.", + "properties": { + "source_index": { + "type": "integer", + "description": "Index number of the source item that is replaced. The enumeration starts from `0`, which represents the first item in the request, e.g., if the replaced item is passed as the second in the request, `source_index` equals `3`.", + "minimum": 0 + }, + "source_applied_quantity": { + "type": "integer", + "description": "Number of source units that are replaced.", + "maximum": -1 + }, + "source_applied_quantity_amount": { + "type": "integer", + "description": "Amount equal to the price of the units that are replaced. Determines the change of the amount of the source item quantity.", + "maximum": 0 + }, + "target_index": { + "type": "integer", + "description": "Index number of the target item that is a replacement of the source item. The enumeration continues the values for the order items, e.g. if there are three items in the request, `target_index` equals `3`, as enumeration starts from `0`." + }, + "target_applied_quantity": { + "type": "integer", + "description": "Number of added target units that are replacements." + }, + "target_applied_quantity_amount": { + "type": "integer", + "description": "Amount equal to the price of the units that are replacements. Determines the change in the amount of the target item quantity." + }, + "target_applied_discount_amount": { + "type": "integer", + "description": "Discount amount applied to the target item with regard to the replacement. Equals the `target_applied_quantity_amount` minus `source_applied_quantity_amount`." + } + } + } + } + } + } + ] + }, + "nullable": true + } + } }, "stacking_rules": { "$ref": "#/components/schemas/StackingRules" @@ -2716,7 +2903,195 @@ "$ref": "#/components/schemas/Redemption" }, "order": { - "$ref": "#/components/schemas/OrderCalculated" + "title": "ClientRedemptionsRedeemResponseBodyOrder", + "description": "Contains the order details associated with the redemption.", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", + "nullable": true + }, + "source_id": { + "type": "string", + "nullable": true, + "description": "Unique source ID of an existing order that will be linked to the redemption of this request." + }, + "status": { + "type": "string", + "description": "The order status.", + "enum": [ + "CREATED", + "PAID", + "CANCELED", + "FULFILLED" + ], + "nullable": true + }, + "amount": { + "type": "integer", + "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "initial_amount": { + "type": "integer", + "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "discount_amount": { + "type": "integer", + "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "items_discount_amount": { + "type": "integer", + "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "total_discount_amount": { + "type": "integer", + "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "total_amount": { + "type": "integer", + "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "applied_discount_amount": { + "type": "integer", + "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "items_applied_discount_amount": { + "type": "integer", + "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", + "nullable": true + }, + "total_applied_discount_amount": { + "type": "integer", + "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", + "nullable": true + }, + "metadata": { + "title": "ClientRedemptionsRedeemResponseBodyOrderMetadata", + "type": "object", + "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", + "nullable": true + }, + "object": { + "type": "string", + "description": "The type of the object represented by JSON.", + "default": "order", + "enum": [ + "order" + ], + "nullable": true + }, + "created_at": { + "type": "string", + "example": "2021-12-22T10:13:06.487Z", + "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", + "format": "date-time", + "nullable": true + }, + "updated_at": { + "type": "string", + "nullable": true, + "example": "2021-12-22T10:14:45.316Z", + "format": "date-time", + "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." + }, + "customer_id": { + "type": "string", + "nullable": true, + "description": "Unique customer ID of the customer making the purchase.", + "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" + }, + "referrer_id": { + "type": "string", + "nullable": true, + "description": "Unique referrer ID.", + "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" + }, + "customer": { + "$ref": "#/components/schemas/CustomerId" + }, + "referrer": { + "$ref": "#/components/schemas/ReferrerId" + }, + "redemptions": { + "title": "ClientRedemptionsRedeemResponseBodyOrderRedemptionsEntry", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/OrderRedemptionsEntry" + }, + "nullable": true + }, + "items": { + "title": "ClientRedemptionsRedeemResponseBodyOrderItems", + "type": "array", + "description": "Array of items applied to the order. It can include up to 500 items.", + "items": { + "title": "ClientRedemptionsRedeemResponseBodyOrderItemsItem", + "allOf": [ + { + "$ref": "#/components/schemas/OrderCalculatedItem" + }, + { + "type": "object", + "properties": { + "application_details": { + "title": "ClientRedemptionsRedeemResponseBodyOrderItemsItemApplicationDetails", + "type": "array", + "description": "Array containing details about the items that are replaced and the items that are replacements for discounts with the `REPLACE_ITEMS` effect.", + "items": { + "title": "ClientRedemptionsRedeemResponseBodyOrderItemsItemApplicationDetailsItem", + "type": "object", + "description": "Object representing item replacement.", + "properties": { + "source_index": { + "type": "integer", + "description": "Index number of the source item that is replaced. The enumeration starts from `0`, which represents the first item in the request, e.g., if the replaced item is passed as the second in the request, `source_index` equals `3`.", + "minimum": 0 + }, + "source_applied_quantity": { + "type": "integer", + "description": "Number of source units that are replaced.", + "maximum": -1 + }, + "source_applied_quantity_amount": { + "type": "integer", + "description": "Amount equal to the price of the units that are replaced. Determines the change of the amount of the source item quantity.", + "maximum": 0 + }, + "target_index": { + "type": "integer", + "description": "Index number of the target item that is a replacement of the source item. The enumeration continues the values for the order items, e.g. if there are three items in the request, `target_index` equals `3`, as enumeration starts from `0`." + }, + "target_applied_quantity": { + "type": "integer", + "description": "Number of added target units that are replacements." + }, + "target_applied_quantity_amount": { + "type": "integer", + "description": "Amount equal to the price of the units that are replacements. Determines the change in the amount of the target item quantity." + }, + "target_applied_discount_amount": { + "type": "integer", + "description": "Discount amount applied to the target item with regard to the replacement. Equals the `target_applied_quantity_amount` minus `source_applied_quantity_amount`." + } + } + } + } + } + } + ] + }, + "nullable": true + } + }, + "nullable": true }, "inapplicable_redeemables": { "title": "ClientRedemptionsRedeemResponseBodyInapplicableRedeemables", @@ -2882,7 +3257,176 @@ "nullable": true }, "order": { - "$ref": "#/components/schemas/OrderCalculated" + "title": "ClientValidationsValidateResponseBodyRedeemablesItemOrder", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", + "nullable": true + }, + "source_id": { + "type": "string", + "nullable": true, + "description": "Unique source ID of an existing order that will be linked to the redemption of this request." + }, + "status": { + "type": "string", + "description": "The order status.", + "enum": [ + "CREATED", + "PAID", + "CANCELED", + "FULFILLED" + ], + "nullable": true + }, + "amount": { + "type": "integer", + "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "initial_amount": { + "type": "integer", + "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "discount_amount": { + "type": "integer", + "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "items_discount_amount": { + "type": "integer", + "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "total_discount_amount": { + "type": "integer", + "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "total_amount": { + "type": "integer", + "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "applied_discount_amount": { + "type": "integer", + "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "items_applied_discount_amount": { + "type": "integer", + "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", + "nullable": true + }, + "total_applied_discount_amount": { + "type": "integer", + "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", + "nullable": true + }, + "metadata": { + "title": "ClientValidationsValidateResponseBodyRedeemablesItemOrderMetadata", + "type": "object", + "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", + "nullable": true + }, + "object": { + "type": "string", + "description": "The type of the object represented by JSON.", + "default": "order", + "enum": [ + "order" + ], + "nullable": true + }, + "created_at": { + "type": "string", + "example": "2021-12-22T10:13:06.487Z", + "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", + "format": "date-time", + "nullable": true + }, + "updated_at": { + "type": "string", + "nullable": true, + "example": "2021-12-22T10:14:45.316Z", + "format": "date-time", + "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." + }, + "customer_id": { + "type": "string", + "nullable": true, + "description": "Unique customer ID of the customer making the purchase.", + "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" + }, + "referrer_id": { + "type": "string", + "nullable": true, + "description": "Unique referrer ID.", + "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" + }, + "customer": { + "title": "ClientValidationsValidateResponseBodyRedeemablesItemOrderCustomer", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "A unique identifier of an existing customer.", + "nullable": true + }, + "object": { + "type": "string", + "description": "The type of the object represented by JSON.", + "default": "customer", + "enum": [ + "customer" + ], + "nullable": true + } + }, + "required": [] + }, + "referrer": { + "title": "ClientValidationsValidateResponseBodyRedeemablesItemOrderReferrer", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "A unique identifier of an existing customer.", + "nullable": true + }, + "object": { + "type": "string", + "description": "The type of the object represented by JSON.", + "default": "customer", + "enum": [ + "customer" + ], + "nullable": true + } + }, + "required": [] + }, + "redemptions": { + "title": "ClientValidationsValidateResponseBodyRedeemablesItemOrderRedemptionsEntry", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/OrderRedemptionsEntry" + }, + "nullable": true + }, + "items": { + "title": "ClientValidationsValidateResponseBodyRedeemablesItemOrderItems", + "type": "array", + "description": "Array of items applied to the order. It can include up to 500 items.", + "items": { + "$ref": "#/components/schemas/OrderCalculatedItem" + }, + "nullable": true + } + } }, "applicable_to": { "$ref": "#/components/schemas/ApplicableToResultList" @@ -3105,7 +3649,194 @@ "nullable": true }, "order": { - "$ref": "#/components/schemas/OrderCalculated" + "title": "ClientValidationsValidateResponseBodyOrder", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", + "nullable": true + }, + "source_id": { + "type": "string", + "nullable": true, + "description": "Unique source ID of an existing order that will be linked to the redemption of this request." + }, + "status": { + "type": "string", + "description": "The order status.", + "enum": [ + "CREATED", + "PAID", + "CANCELED", + "FULFILLED" + ], + "nullable": true + }, + "amount": { + "type": "integer", + "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "initial_amount": { + "type": "integer", + "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "discount_amount": { + "type": "integer", + "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "items_discount_amount": { + "type": "integer", + "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "total_discount_amount": { + "type": "integer", + "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "total_amount": { + "type": "integer", + "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "applied_discount_amount": { + "type": "integer", + "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "items_applied_discount_amount": { + "type": "integer", + "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", + "nullable": true + }, + "total_applied_discount_amount": { + "type": "integer", + "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", + "nullable": true + }, + "metadata": { + "title": "ClientValidationsValidateResponseBodyOrderMetadata", + "type": "object", + "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", + "nullable": true + }, + "object": { + "type": "string", + "description": "The type of the object represented by JSON.", + "default": "order", + "enum": [ + "order" + ], + "nullable": true + }, + "created_at": { + "type": "string", + "example": "2021-12-22T10:13:06.487Z", + "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", + "format": "date-time", + "nullable": true + }, + "updated_at": { + "type": "string", + "nullable": true, + "example": "2021-12-22T10:14:45.316Z", + "format": "date-time", + "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." + }, + "customer_id": { + "type": "string", + "nullable": true, + "description": "Unique customer ID of the customer making the purchase.", + "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" + }, + "referrer_id": { + "type": "string", + "nullable": true, + "description": "Unique referrer ID.", + "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" + }, + "customer": { + "$ref": "#/components/schemas/CustomerId" + }, + "referrer": { + "$ref": "#/components/schemas/ReferrerId" + }, + "redemptions": { + "title": "ClientValidationsValidateResponseBodyOrderRedemptionsEntry", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/OrderRedemptionsEntry" + }, + "nullable": true + }, + "items": { + "title": "ClientValidationsValidateResponseBodyOrderItems", + "type": "array", + "description": "Array of items applied to the order. It can include up to 500 items.", + "items": { + "title": "ClientValidationsValidateResponseBodyOrderItemsItem", + "allOf": [ + { + "$ref": "#/components/schemas/OrderCalculatedItem" + }, + { + "type": "object", + "properties": { + "application_details": { + "title": "ClientValidationsValidateResponseBodyOrderItemsItemApplicationDetails", + "type": "array", + "description": "Array containing details about the items that are replaced and the items that are replacements for discounts with the `REPLACE_ITEMS` effect.", + "items": { + "title": "ClientValidationsValidateResponseBodyOrderItemsItemApplicationDetailsItem", + "type": "object", + "description": "Object representing item replacement.", + "properties": { + "source_index": { + "type": "integer", + "description": "Index number of the source item that is replaced. The enumeration starts from `0`, which represents the first item in the request, e.g., if the replaced item is passed as the second in the request, `source_index` equals `3`.", + "minimum": 0 + }, + "source_applied_quantity": { + "type": "integer", + "description": "Number of source units that are replaced.", + "maximum": -1 + }, + "source_applied_quantity_amount": { + "type": "integer", + "description": "Amount equal to the price of the units that are replaced. Determines the change of the amount of the source item quantity.", + "maximum": 0 + }, + "target_index": { + "type": "integer", + "description": "Index number of the target item that is a replacement of the source item. The enumeration continues the values for the order items, e.g. if there are three items in the request, `target_index` equals `3`, as enumeration starts from `0`." + }, + "target_applied_quantity": { + "type": "integer", + "description": "Number of added target units that are replacements." + }, + "target_applied_quantity_amount": { + "type": "integer", + "description": "Amount equal to the price of the units that are replacements. Determines the change in the amount of the target item quantity." + }, + "target_applied_discount_amount": { + "type": "integer", + "description": "Discount amount applied to the target item with regard to the replacement. Equals the `target_applied_quantity_amount` minus `source_applied_quantity_amount`." + } + } + } + } + } + } + ] + }, + "nullable": true + } + }, + "nullable": true }, "tracking_id": { "type": "string", @@ -9702,7 +10433,179 @@ "nullable": true }, "order": { - "$ref": "#/components/schemas/OrderCalculated" + "title": "LoyaltiesMembersRedemptionRedeemResponseBodyOrder", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", + "nullable": true + }, + "source_id": { + "type": "string", + "nullable": true, + "description": "Unique source ID of an existing order that will be linked to the redemption of this request." + }, + "status": { + "type": "string", + "description": "The order status.", + "enum": [ + "CREATED", + "PAID", + "CANCELED", + "FULFILLED" + ], + "nullable": true + }, + "amount": { + "type": "integer", + "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "initial_amount": { + "type": "integer", + "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "discount_amount": { + "type": "integer", + "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "items_discount_amount": { + "type": "integer", + "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "total_discount_amount": { + "type": "integer", + "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "total_amount": { + "type": "integer", + "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "applied_discount_amount": { + "type": "integer", + "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "items_applied_discount_amount": { + "type": "integer", + "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", + "nullable": true + }, + "total_applied_discount_amount": { + "type": "integer", + "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", + "nullable": true + }, + "metadata": { + "title": "LoyaltiesMembersRedemptionRedeemResponseBodyOrderMetadata", + "type": "object", + "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", + "nullable": true + }, + "object": { + "type": "string", + "description": "The type of the object represented by JSON.", + "default": "order", + "enum": [ + "order" + ], + "nullable": true + }, + "created_at": { + "type": "string", + "example": "2021-12-22T10:13:06.487Z", + "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", + "format": "date-time", + "nullable": true + }, + "updated_at": { + "type": "string", + "nullable": true, + "example": "2021-12-22T10:14:45.316Z", + "format": "date-time", + "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." + }, + "customer_id": { + "type": "string", + "nullable": true, + "description": "Unique customer ID of the customer making the purchase.", + "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" + }, + "referrer_id": { + "type": "string", + "nullable": true, + "description": "Unique referrer ID.", + "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" + }, + "customer": { + "title": "LoyaltiesMembersRedemptionRedeemResponseBodyOrderCustomer", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "A unique identifier of an existing customer.", + "nullable": true + }, + "object": { + "type": "string", + "description": "The type of the object represented by JSON.", + "default": "customer", + "enum": [ + "customer" + ], + "nullable": true + } + }, + "required": [], + "nullable": true + }, + "referrer": { + "title": "LoyaltiesMembersRedemptionRedeemResponseBodyOrderReferrer", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "A unique identifier of an existing customer.", + "nullable": true + }, + "object": { + "type": "string", + "description": "The type of the object represented by JSON.", + "default": "customer", + "enum": [ + "customer" + ], + "nullable": true + } + }, + "required": [], + "nullable": true + }, + "redemptions": { + "title": "LoyaltiesMembersRedemptionRedeemResponseBodyOrderRedemptionsEntry", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/OrderRedemptionsEntry" + }, + "nullable": true + }, + "items": { + "title": "LoyaltiesMembersRedemptionRedeemResponseBodyOrderItems", + "type": "array", + "description": "Array of items applied to the order. It can include up to 500 items.", + "items": { + "$ref": "#/components/schemas/OrderCalculatedItem" + }, + "nullable": true + } + }, + "nullable": true }, "channel": { "title": "LoyaltiesMembersRedemptionRedeemResponseBodyChannel", @@ -16112,7 +17015,7 @@ "items": { "title": "OrdersCreateRequestBodyItems", "type": "array", - "description": "Array of items applied to the order. It can include up 500 items.", + "description": "Array of items applied to the order. It can include up to 500 items.", "items": { "$ref": "#/components/schemas/OrderItem" }, @@ -16216,15 +17119,6 @@ "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", "nullable": true }, - "items": { - "title": "OrdersCreateResponseBodyItems", - "type": "array", - "description": "Array of items applied to the order. It can include up 500 items.", - "items": { - "$ref": "#/components/schemas/OrderCalculatedItem" - }, - "nullable": true - }, "metadata": { "title": "OrdersCreateResponseBodyMetadata", "type": "object", @@ -16279,6 +17173,15 @@ "$ref": "#/components/schemas/OrderRedemptionsEntry" }, "nullable": true + }, + "items": { + "title": "OrdersCreateResponseBodyItems", + "type": "array", + "description": "Array of items applied to the order. It can include up to 500 items.", + "items": { + "$ref": "#/components/schemas/OrderCalculatedItem" + }, + "nullable": true } }, "description": "Response body schema for **POST** `v1/orders`." @@ -16517,15 +17420,6 @@ "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", "nullable": true }, - "items": { - "title": "OrdersGetResponseBodyItems", - "type": "array", - "description": "Array of items applied to the order. It can include up 500 items.", - "items": { - "$ref": "#/components/schemas/OrderCalculatedItem" - }, - "nullable": true - }, "metadata": { "title": "OrdersGetResponseBodyMetadata", "type": "object", @@ -16580,6 +17474,15 @@ "$ref": "#/components/schemas/OrderRedemptionsEntry" }, "nullable": true + }, + "items": { + "title": "OrdersGetResponseBodyItems", + "type": "array", + "description": "Array of items applied to the order. It can include up to 500 items.", + "items": { + "$ref": "#/components/schemas/OrderCalculatedItem" + }, + "nullable": true } }, "description": "Response body schema for **GET** `v1/orders/{orderId}`." @@ -16664,7 +17567,25 @@ "type": "array", "description": "Contains array of order objects.", "items": { - "$ref": "#/components/schemas/OrderCalculated" + "title": "OrdersListResponseBodyOrdersItem", + "allOf": [ + { + "$ref": "#/components/schemas/OrderCalculated" + }, + { + "type": "object", + "properties": { + "items": { + "title": "OrdersListResponseBodyOrdersItemItems", + "type": "array", + "description": "Array of items applied to the order. It can include up to 500 items.", + "items": { + "$ref": "#/components/schemas/OrderCalculatedItem" + } + } + } + } + ] }, "nullable": true }, @@ -16714,7 +17635,7 @@ "items": { "title": "OrdersUpdateRequestBodyItems", "type": "array", - "description": "Array of items applied to the order. It can include up 500 items.", + "description": "Array of items applied to the order. It can include up to 500 items.", "items": { "$ref": "#/components/schemas/OrderItem" }, @@ -16818,15 +17739,6 @@ "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", "nullable": true }, - "items": { - "title": "OrdersUpdateResponseBodyItems", - "type": "array", - "description": "Array of items applied to the order. It can include up 500 items.", - "items": { - "$ref": "#/components/schemas/OrderCalculatedItem" - }, - "nullable": true - }, "metadata": { "title": "OrdersUpdateResponseBodyMetadata", "type": "object", @@ -16881,6 +17793,15 @@ "$ref": "#/components/schemas/OrderRedemptionsEntry" }, "nullable": true + }, + "items": { + "title": "OrdersUpdateResponseBodyItems", + "type": "array", + "description": "Array of items applied to the order. It can include up to 500 items.", + "items": { + "$ref": "#/components/schemas/OrderCalculatedItem" + }, + "nullable": true } }, "description": "Response body schema for **PUT** `v1/orders/{orderId}`." @@ -21834,145 +22755,9 @@ "nullable": true }, "order": { - "$ref": "#/components/schemas/OrderCalculated" - }, - "stacking_rules": { - "$ref": "#/components/schemas/StackingRules" - } - } - }, - "RedemptionsGetResponseBody": { - "title": "RedemptionsGetResponseBody", - "type": "object", - "properties": { - "id": { - "type": "string", - "nullable": true - }, - "object": { - "type": "string", - "enum": [ - "redemption", - "redemption_rollback" - ], - "nullable": true - }, - "date": { - "type": "string", - "example": "2021-12-22T10:13:06.487Z", - "description": "Timestamp representing the date and time when the object was created. The value is shown in the ISO 8601 format.", - "format": "date-time", - "nullable": true - }, - "customer_id": { - "type": "string", - "nullable": true, - "example": "cust_i8t5Tt6eiKG5K79KQlJ0Vs64", - "description": "Unique customer ID of the redeeming customer." - }, - "tracking_id": { - "type": "string", - "nullable": true, - "description": "Hashed customer source ID." - }, - "metadata": { - "title": "RedemptionsGetResponseBodyMetadata", + "title": "QualificationsCheckEligibilityResponseBodyOrder", "type": "object", "nullable": true, - "description": "The metadata object stores all custom attributes assigned to the redemption." - }, - "amount": { - "type": "integer", - "nullable": true, - "description": "For gift cards, this is a positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the number of redeemed credits.\nFor loyalty cards, this is the number of loyalty points used in the transaction. and For gift cards, this represents the number of the credits restored to the card in the rolledback redemption. The number is a negative integer in the smallest currency unit, e.g. -100 cents for $1.00 added back to the card.\nFor loyalty cards, this represents the number of loyalty points restored to the card in the rolledback redemption. The number is a negative integer." - }, - "redemption": { - "nullable": true, - "type": "string", - "description": "Unique redemption ID of the parent redemption.", - "example": "r_0c656311b5878a2031" - }, - "result": { - "type": "string", - "enum": [ - "SUCCESS", - "FAILURE" - ], - "description": "Redemption result.", - "nullable": true - }, - "status": { - "type": "string", - "enum": [ - "SUCCEEDED", - "FAILED", - "ROLLED_BACK" - ], - "nullable": true - }, - "related_redemptions": { - "title": "RedemptionsGetResponseBodyRelatedRedemptions", - "type": "object", - "properties": { - "rollbacks": { - "title": "RedemptionsGetResponseBodyRelatedRedemptionsRollbacks", - "type": "array", - "items": { - "title": "RedemptionsGetResponseBodyRelatedRedemptionsRollbacksItem", - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "date": { - "type": "string", - "example": "2021-12-22T10:13:06.487Z", - "description": "Timestamp representing the date and time when the object was created. The value is shown in the ISO 8601 format.", - "format": "date-time" - } - } - }, - "nullable": true - }, - "redemptions": { - "title": "RedemptionsGetResponseBodyRelatedRedemptionsRedemptions", - "type": "array", - "items": { - "title": "RedemptionsGetResponseBodyRelatedRedemptionsRedemptionsItem", - "type": "object", - "properties": { - "id": { - "type": "string", - "example": "r_0bc92f81a6801f9bca", - "description": "Unique redemption ID." - }, - "date": { - "type": "string", - "example": "2021-12-22T10:13:06.487Z", - "description": "Timestamp representing the date and time when the object was created. The value is shown in the ISO 8601 format.", - "format": "date-time" - } - } - }, - "nullable": true - } - }, - "nullable": true - }, - "failure_code": { - "type": "string", - "example": "customer_rules_violated", - "description": "If the result is `FAILURE`, this parameter will provide a generic reason as to why the redemption failed.", - "nullable": true - }, - "failure_message": { - "type": "string", - "description": "If the result is `FAILURE`, this parameter will provide a more expanded reason as to why the redemption failed.", - "nullable": true - }, - "order": { - "title": "RedemptionsGetResponseBodyOrder", - "type": "object", "properties": { "id": { "type": "string", @@ -22040,14 +22825,275 @@ "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", "nullable": true }, + "metadata": { + "title": "QualificationsCheckEligibilityResponseBodyOrderMetadata", + "type": "object", + "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", + "nullable": true + }, + "object": { + "type": "string", + "description": "The type of the object represented by JSON.", + "default": "order", + "enum": [ + "order" + ], + "nullable": true + }, + "created_at": { + "type": "string", + "example": "2021-12-22T10:13:06.487Z", + "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", + "format": "date-time", + "nullable": true + }, + "updated_at": { + "type": "string", + "nullable": true, + "example": "2021-12-22T10:14:45.316Z", + "format": "date-time", + "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." + }, + "customer_id": { + "type": "string", + "nullable": true, + "description": "Unique customer ID of the customer making the purchase.", + "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" + }, + "referrer_id": { + "type": "string", + "nullable": true, + "description": "Unique referrer ID.", + "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" + }, + "customer": { + "$ref": "#/components/schemas/CustomerId" + }, + "referrer": { + "$ref": "#/components/schemas/ReferrerId" + }, + "redemptions": { + "title": "QualificationsCheckEligibilityResponseBodyOrderRedemptionsEntry", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/OrderRedemptionsEntry" + }, + "nullable": true + }, "items": { - "title": "RedemptionsGetResponseBodyOrderItems", + "title": "QualificationsCheckEligibilityResponseBodyOrderItems", "type": "array", - "description": "Array of items applied to the order. It can include up 500 items.", + "description": "Array of items applied to the order. It can include up to 500 items.", "items": { "$ref": "#/components/schemas/OrderCalculatedItem" }, "nullable": true + } + } + }, + "stacking_rules": { + "$ref": "#/components/schemas/StackingRules" + } + } + }, + "RedemptionsGetResponseBody": { + "title": "RedemptionsGetResponseBody", + "type": "object", + "properties": { + "id": { + "type": "string", + "nullable": true + }, + "object": { + "type": "string", + "enum": [ + "redemption", + "redemption_rollback" + ], + "nullable": true + }, + "date": { + "type": "string", + "example": "2021-12-22T10:13:06.487Z", + "description": "Timestamp representing the date and time when the object was created. The value is shown in the ISO 8601 format.", + "format": "date-time", + "nullable": true + }, + "customer_id": { + "type": "string", + "nullable": true, + "example": "cust_i8t5Tt6eiKG5K79KQlJ0Vs64", + "description": "Unique customer ID of the redeeming customer." + }, + "tracking_id": { + "type": "string", + "nullable": true, + "description": "Hashed customer source ID." + }, + "metadata": { + "title": "RedemptionsGetResponseBodyMetadata", + "type": "object", + "nullable": true, + "description": "The metadata object stores all custom attributes assigned to the redemption." + }, + "amount": { + "type": "integer", + "nullable": true, + "description": "For gift cards, this is a positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the number of redeemed credits.\nFor loyalty cards, this is the number of loyalty points used in the transaction. and For gift cards, this represents the number of the credits restored to the card in the rolledback redemption. The number is a negative integer in the smallest currency unit, e.g. -100 cents for $1.00 added back to the card.\nFor loyalty cards, this represents the number of loyalty points restored to the card in the rolledback redemption. The number is a negative integer." + }, + "redemption": { + "nullable": true, + "type": "string", + "description": "Unique redemption ID of the parent redemption.", + "example": "r_0c656311b5878a2031" + }, + "result": { + "type": "string", + "enum": [ + "SUCCESS", + "FAILURE" + ], + "description": "Redemption result.", + "nullable": true + }, + "status": { + "type": "string", + "enum": [ + "SUCCEEDED", + "FAILED", + "ROLLED_BACK" + ], + "nullable": true + }, + "related_redemptions": { + "title": "RedemptionsGetResponseBodyRelatedRedemptions", + "type": "object", + "properties": { + "rollbacks": { + "title": "RedemptionsGetResponseBodyRelatedRedemptionsRollbacks", + "type": "array", + "items": { + "title": "RedemptionsGetResponseBodyRelatedRedemptionsRollbacksItem", + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "date": { + "type": "string", + "example": "2021-12-22T10:13:06.487Z", + "description": "Timestamp representing the date and time when the object was created. The value is shown in the ISO 8601 format.", + "format": "date-time" + } + } + }, + "nullable": true + }, + "redemptions": { + "title": "RedemptionsGetResponseBodyRelatedRedemptionsRedemptions", + "type": "array", + "items": { + "title": "RedemptionsGetResponseBodyRelatedRedemptionsRedemptionsItem", + "type": "object", + "properties": { + "id": { + "type": "string", + "example": "r_0bc92f81a6801f9bca", + "description": "Unique redemption ID." + }, + "date": { + "type": "string", + "example": "2021-12-22T10:13:06.487Z", + "description": "Timestamp representing the date and time when the object was created. The value is shown in the ISO 8601 format.", + "format": "date-time" + } + } + }, + "nullable": true + } + }, + "nullable": true + }, + "failure_code": { + "type": "string", + "example": "customer_rules_violated", + "description": "If the result is `FAILURE`, this parameter will provide a generic reason as to why the redemption failed.", + "nullable": true + }, + "failure_message": { + "type": "string", + "description": "If the result is `FAILURE`, this parameter will provide a more expanded reason as to why the redemption failed.", + "nullable": true + }, + "order": { + "title": "RedemptionsGetResponseBodyOrder", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", + "nullable": true + }, + "source_id": { + "type": "string", + "nullable": true, + "description": "Unique source ID of an existing order that will be linked to the redemption of this request." + }, + "status": { + "type": "string", + "description": "The order status.", + "enum": [ + "CREATED", + "PAID", + "CANCELED", + "FULFILLED" + ], + "nullable": true + }, + "amount": { + "type": "integer", + "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "initial_amount": { + "type": "integer", + "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "discount_amount": { + "type": "integer", + "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "items_discount_amount": { + "type": "integer", + "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "total_discount_amount": { + "type": "integer", + "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "total_amount": { + "type": "integer", + "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "applied_discount_amount": { + "type": "integer", + "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "items_applied_discount_amount": { + "type": "integer", + "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", + "nullable": true + }, + "total_applied_discount_amount": { + "type": "integer", + "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", + "nullable": true }, "metadata": { "title": "RedemptionsGetResponseBodyOrderMetadata", @@ -22139,6 +23185,15 @@ "$ref": "#/components/schemas/OrderRedemptionsEntry" }, "nullable": true + }, + "items": { + "title": "RedemptionsGetResponseBodyOrderItems", + "type": "array", + "description": "Array of items applied to the order. It can include up to 500 items.", + "items": { + "$ref": "#/components/schemas/OrderCalculatedItem" + }, + "nullable": true } }, "nullable": true @@ -22990,15 +24045,6 @@ "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", "nullable": true }, - "items": { - "title": "RedemptionsListResponseBodyRedemptionsItemOrderItems", - "type": "array", - "description": "Array of items applied to the order. It can include up 500 items.", - "items": { - "$ref": "#/components/schemas/OrderCalculatedItem" - }, - "nullable": true - }, "metadata": { "title": "RedemptionsListResponseBodyRedemptionsItemOrderMetadata", "type": "object", @@ -23087,6 +24133,15 @@ "$ref": "#/components/schemas/OrderRedemptionsEntry" }, "nullable": true + }, + "items": { + "title": "RedemptionsListResponseBodyRedemptionsItemOrderItems", + "type": "array", + "description": "Array of items applied to the order. It can include up to 500 items.", + "items": { + "$ref": "#/components/schemas/OrderCalculatedItem" + }, + "nullable": true } } }, @@ -23836,7 +24891,195 @@ "$ref": "#/components/schemas/Redemption" }, "order": { - "$ref": "#/components/schemas/OrderCalculated" + "title": "RedemptionsRedeemResponseBodyOrder", + "description": "Contains the order details associated with the redemption.", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", + "nullable": true + }, + "source_id": { + "type": "string", + "nullable": true, + "description": "Unique source ID of an existing order that will be linked to the redemption of this request." + }, + "status": { + "type": "string", + "description": "The order status.", + "enum": [ + "CREATED", + "PAID", + "CANCELED", + "FULFILLED" + ], + "nullable": true + }, + "amount": { + "type": "integer", + "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "initial_amount": { + "type": "integer", + "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "discount_amount": { + "type": "integer", + "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "items_discount_amount": { + "type": "integer", + "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "total_discount_amount": { + "type": "integer", + "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "total_amount": { + "type": "integer", + "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "applied_discount_amount": { + "type": "integer", + "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "items_applied_discount_amount": { + "type": "integer", + "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", + "nullable": true + }, + "total_applied_discount_amount": { + "type": "integer", + "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", + "nullable": true + }, + "metadata": { + "title": "RedemptionsRedeemResponseBodyOrderMetadata", + "type": "object", + "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", + "nullable": true + }, + "object": { + "type": "string", + "description": "The type of the object represented by JSON.", + "default": "order", + "enum": [ + "order" + ], + "nullable": true + }, + "created_at": { + "type": "string", + "example": "2021-12-22T10:13:06.487Z", + "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", + "format": "date-time", + "nullable": true + }, + "updated_at": { + "type": "string", + "nullable": true, + "example": "2021-12-22T10:14:45.316Z", + "format": "date-time", + "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." + }, + "customer_id": { + "type": "string", + "nullable": true, + "description": "Unique customer ID of the customer making the purchase.", + "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" + }, + "referrer_id": { + "type": "string", + "nullable": true, + "description": "Unique referrer ID.", + "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" + }, + "customer": { + "$ref": "#/components/schemas/CustomerId" + }, + "referrer": { + "$ref": "#/components/schemas/ReferrerId" + }, + "redemptions": { + "title": "RedemptionsRedeemResponseBodyOrderRedemptionsEntry", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/OrderRedemptionsEntry" + }, + "nullable": true + }, + "items": { + "title": "RedemptionsRedeemResponseBodyOrderItems", + "type": "array", + "description": "Array of items applied to the order. It can include up to 500 items.", + "items": { + "title": "RedemptionsRedeemResponseBodyOrderItemsItem", + "allOf": [ + { + "$ref": "#/components/schemas/OrderCalculatedItem" + }, + { + "type": "object", + "properties": { + "application_details": { + "title": "RedemptionsRedeemResponseBodyOrderItemsItemApplicationDetails", + "type": "array", + "description": "Array containing details about the items that are replaced and the items that are replacements for discounts with the `REPLACE_ITEMS` effect.", + "items": { + "title": "RedemptionsRedeemResponseBodyOrderItemsItemApplicationDetailsItem", + "type": "object", + "description": "Object representing item replacement.", + "properties": { + "source_index": { + "type": "integer", + "description": "Index number of the source item that is replaced. The enumeration starts from `0`, which represents the first item in the request, e.g., if the replaced item is passed as the second in the request, `source_index` equals `3`.", + "minimum": 0 + }, + "source_applied_quantity": { + "type": "integer", + "description": "Number of source units that are replaced.", + "maximum": -1 + }, + "source_applied_quantity_amount": { + "type": "integer", + "description": "Amount equal to the price of the units that are replaced. Determines the change of the amount of the source item quantity.", + "maximum": 0 + }, + "target_index": { + "type": "integer", + "description": "Index number of the target item that is a replacement of the source item. The enumeration continues the values for the order items, e.g. if there are three items in the request, `target_index` equals `3`, as enumeration starts from `0`." + }, + "target_applied_quantity": { + "type": "integer", + "description": "Number of added target units that are replacements." + }, + "target_applied_quantity_amount": { + "type": "integer", + "description": "Amount equal to the price of the units that are replacements. Determines the change in the amount of the target item quantity." + }, + "target_applied_discount_amount": { + "type": "integer", + "description": "Discount amount applied to the target item with regard to the replacement. Equals the `target_applied_quantity_amount` minus `source_applied_quantity_amount`." + } + } + } + } + } + } + ] + }, + "nullable": true + } + }, + "nullable": true }, "inapplicable_redeemables": { "title": "RedemptionsRedeemResponseBodyInapplicableRedeemables", @@ -24028,7 +25271,141 @@ "nullable": true }, "order": { - "$ref": "#/components/schemas/OrderCalculated" + "title": "RedemptionsRollbackCreateResponseBodyOrder", + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", + "nullable": true + }, + "source_id": { + "type": "string", + "nullable": true, + "description": "Unique source ID of an existing order that will be linked to the redemption of this request." + }, + "status": { + "type": "string", + "description": "The order status.", + "enum": [ + "CREATED", + "PAID", + "CANCELED", + "FULFILLED" + ], + "nullable": true + }, + "amount": { + "type": "integer", + "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "initial_amount": { + "type": "integer", + "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "discount_amount": { + "type": "integer", + "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "items_discount_amount": { + "type": "integer", + "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "total_discount_amount": { + "type": "integer", + "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "total_amount": { + "type": "integer", + "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "applied_discount_amount": { + "type": "integer", + "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "items_applied_discount_amount": { + "type": "integer", + "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", + "nullable": true + }, + "total_applied_discount_amount": { + "type": "integer", + "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", + "nullable": true + }, + "metadata": { + "title": "RedemptionsRollbackCreateResponseBodyOrderMetadata", + "type": "object", + "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", + "nullable": true + }, + "object": { + "type": "string", + "description": "The type of the object represented by JSON.", + "default": "order", + "enum": [ + "order" + ], + "nullable": true + }, + "created_at": { + "type": "string", + "example": "2021-12-22T10:13:06.487Z", + "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", + "format": "date-time", + "nullable": true + }, + "updated_at": { + "type": "string", + "nullable": true, + "example": "2021-12-22T10:14:45.316Z", + "format": "date-time", + "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." + }, + "customer_id": { + "type": "string", + "nullable": true, + "description": "Unique customer ID of the customer making the purchase.", + "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" + }, + "referrer_id": { + "type": "string", + "nullable": true, + "description": "Unique referrer ID.", + "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" + }, + "customer": { + "$ref": "#/components/schemas/CustomerId" + }, + "referrer": { + "$ref": "#/components/schemas/ReferrerId" + }, + "redemptions": { + "title": "RedemptionsRollbackCreateResponseBodyOrderRedemptionsEntry", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/OrderRedemptionsEntry" + }, + "nullable": true + }, + "items": { + "title": "RedemptionsRollbackCreateResponseBodyOrderItems", + "type": "array", + "description": "Array of items applied to the order. It can include up to 500 items.", + "items": { + "$ref": "#/components/schemas/OrderCalculatedItem" + }, + "nullable": true + } + } }, "channel": { "title": "RedemptionsRollbackCreateResponseBodyChannel", @@ -24156,9 +25533,23 @@ "parent_rollback": { "$ref": "#/components/schemas/RedemptionRollback" }, - "order": { - "$ref": "#/components/schemas/OrderCalculated" - } + "allOf": [ + { + "$ref": "#/components/schemas/OrderCalculated" + }, + { + "type": "object", + "properties": { + "items": { + "type": "array", + "description": "Array of items applied to the order. It can include up to 500 items.", + "items": { + "$ref": "#/components/schemas/OrderCalculatedItem" + } + } + } + } + ] } }, "ReferralsMembersHoldersCreateInBulkRequestBody": { @@ -27073,7 +28464,176 @@ "nullable": true }, "order": { - "$ref": "#/components/schemas/OrderCalculated" + "title": "ValidationsValidateResponseBodyRedeemablesItemOrder", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", + "nullable": true + }, + "source_id": { + "type": "string", + "nullable": true, + "description": "Unique source ID of an existing order that will be linked to the redemption of this request." + }, + "status": { + "type": "string", + "description": "The order status.", + "enum": [ + "CREATED", + "PAID", + "CANCELED", + "FULFILLED" + ], + "nullable": true + }, + "amount": { + "type": "integer", + "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "initial_amount": { + "type": "integer", + "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "discount_amount": { + "type": "integer", + "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "items_discount_amount": { + "type": "integer", + "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "total_discount_amount": { + "type": "integer", + "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "total_amount": { + "type": "integer", + "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "applied_discount_amount": { + "type": "integer", + "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "items_applied_discount_amount": { + "type": "integer", + "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", + "nullable": true + }, + "total_applied_discount_amount": { + "type": "integer", + "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", + "nullable": true + }, + "metadata": { + "title": "ValidationsValidateResponseBodyRedeemablesItemOrderMetadata", + "type": "object", + "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", + "nullable": true + }, + "object": { + "type": "string", + "description": "The type of the object represented by JSON.", + "default": "order", + "enum": [ + "order" + ], + "nullable": true + }, + "created_at": { + "type": "string", + "example": "2021-12-22T10:13:06.487Z", + "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", + "format": "date-time", + "nullable": true + }, + "updated_at": { + "type": "string", + "nullable": true, + "example": "2021-12-22T10:14:45.316Z", + "format": "date-time", + "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." + }, + "customer_id": { + "type": "string", + "nullable": true, + "description": "Unique customer ID of the customer making the purchase.", + "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" + }, + "referrer_id": { + "type": "string", + "nullable": true, + "description": "Unique referrer ID.", + "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" + }, + "customer": { + "title": "ValidationsValidateResponseBodyRedeemablesItemOrderCustomer", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "A unique identifier of an existing customer.", + "nullable": true + }, + "object": { + "type": "string", + "description": "The type of the object represented by JSON.", + "default": "customer", + "enum": [ + "customer" + ], + "nullable": true + } + }, + "required": [] + }, + "referrer": { + "title": "ValidationsValidateResponseBodyRedeemablesItemOrderReferrer", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "A unique identifier of an existing customer.", + "nullable": true + }, + "object": { + "type": "string", + "description": "The type of the object represented by JSON.", + "default": "customer", + "enum": [ + "customer" + ], + "nullable": true + } + }, + "required": [] + }, + "redemptions": { + "title": "ValidationsValidateResponseBodyRedeemablesItemOrderRedemptionsEntry", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/OrderRedemptionsEntry" + }, + "nullable": true + }, + "items": { + "title": "ValidationsValidateResponseBodyRedeemablesItemOrderItems", + "type": "array", + "description": "Array of items applied to the order. It can include up to 500 items.", + "items": { + "$ref": "#/components/schemas/OrderCalculatedItem" + }, + "nullable": true + } + } }, "applicable_to": { "$ref": "#/components/schemas/ApplicableToResultList" @@ -27296,7 +28856,194 @@ "nullable": true }, "order": { - "$ref": "#/components/schemas/OrderCalculated" + "title": "ValidationsValidateResponseBodyOrder", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", + "nullable": true + }, + "source_id": { + "type": "string", + "nullable": true, + "description": "Unique source ID of an existing order that will be linked to the redemption of this request." + }, + "status": { + "type": "string", + "description": "The order status.", + "enum": [ + "CREATED", + "PAID", + "CANCELED", + "FULFILLED" + ], + "nullable": true + }, + "amount": { + "type": "integer", + "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "initial_amount": { + "type": "integer", + "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "discount_amount": { + "type": "integer", + "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "items_discount_amount": { + "type": "integer", + "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "total_discount_amount": { + "type": "integer", + "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "total_amount": { + "type": "integer", + "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "applied_discount_amount": { + "type": "integer", + "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "items_applied_discount_amount": { + "type": "integer", + "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", + "nullable": true + }, + "total_applied_discount_amount": { + "type": "integer", + "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", + "nullable": true + }, + "metadata": { + "title": "ValidationsValidateResponseBodyOrderMetadata", + "type": "object", + "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", + "nullable": true + }, + "object": { + "type": "string", + "description": "The type of the object represented by JSON.", + "default": "order", + "enum": [ + "order" + ], + "nullable": true + }, + "created_at": { + "type": "string", + "example": "2021-12-22T10:13:06.487Z", + "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", + "format": "date-time", + "nullable": true + }, + "updated_at": { + "type": "string", + "nullable": true, + "example": "2021-12-22T10:14:45.316Z", + "format": "date-time", + "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." + }, + "customer_id": { + "type": "string", + "nullable": true, + "description": "Unique customer ID of the customer making the purchase.", + "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" + }, + "referrer_id": { + "type": "string", + "nullable": true, + "description": "Unique referrer ID.", + "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" + }, + "customer": { + "$ref": "#/components/schemas/CustomerId" + }, + "referrer": { + "$ref": "#/components/schemas/ReferrerId" + }, + "redemptions": { + "title": "ValidationsValidateResponseBodyOrderRedemptionsEntry", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/OrderRedemptionsEntry" + }, + "nullable": true + }, + "items": { + "title": "ValidationsValidateResponseBodyOrderItems", + "type": "array", + "description": "Array of items applied to the order. It can include up to 500 items.", + "items": { + "title": "ValidationsValidateResponseBodyOrderItemsItem", + "allOf": [ + { + "$ref": "#/components/schemas/OrderCalculatedItem" + }, + { + "type": "object", + "properties": { + "application_details": { + "title": "ValidationsValidateResponseBodyOrderItemsItemApplicationDetails", + "type": "array", + "description": "Array containing details about the items that are replaced and the items that are replacements for discounts with the `REPLACE_ITEMS` effect.", + "items": { + "title": "ValidationsValidateResponseBodyOrderItemsItemApplicationDetailsItem", + "type": "object", + "description": "Object representing item replacement.", + "properties": { + "source_index": { + "type": "integer", + "description": "Index number of the source item that is replaced. The enumeration starts from `0`, which represents the first item in the request, e.g., if the replaced item is passed as the second in the request, `source_index` equals `3`.", + "minimum": 0 + }, + "source_applied_quantity": { + "type": "integer", + "description": "Number of source units that are replaced.", + "maximum": -1 + }, + "source_applied_quantity_amount": { + "type": "integer", + "description": "Amount equal to the price of the units that are replaced. Determines the change of the amount of the source item quantity.", + "maximum": 0 + }, + "target_index": { + "type": "integer", + "description": "Index number of the target item that is a replacement of the source item. The enumeration continues the values for the order items, e.g. if there are three items in the request, `target_index` equals `3`, as enumeration starts from `0`." + }, + "target_applied_quantity": { + "type": "integer", + "description": "Number of added target units that are replacements." + }, + "target_applied_quantity_amount": { + "type": "integer", + "description": "Amount equal to the price of the units that are replacements. Determines the change in the amount of the target item quantity." + }, + "target_applied_discount_amount": { + "type": "integer", + "description": "Discount amount applied to the target item with regard to the replacement. Equals the `target_applied_quantity_amount` minus `source_applied_quantity_amount`." + } + } + } + } + } + } + ] + }, + "nullable": true + } + }, + "nullable": true }, "tracking_id": { "type": "string", @@ -35001,7 +36748,7 @@ "items": { "title": "OrderItems", "type": "array", - "description": "Array of items applied to the order. It can include up 500 items.", + "description": "Array of items applied to the order. It can include up to 500 items.", "items": { "$ref": "#/components/schemas/OrderItem" }, @@ -35087,15 +36834,6 @@ "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", "nullable": true }, - "items": { - "title": "OrderCalculatedItems", - "type": "array", - "description": "Array of items applied to the order. It can include up 500 items.", - "items": { - "$ref": "#/components/schemas/OrderCalculatedItem" - }, - "nullable": true - }, "metadata": { "title": "OrderCalculatedMetadata", "type": "object", @@ -36891,7 +38629,179 @@ "nullable": true }, "order": { - "$ref": "#/components/schemas/OrderCalculated" + "title": "RedemptionOrder", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", + "nullable": true + }, + "source_id": { + "type": "string", + "nullable": true, + "description": "Unique source ID of an existing order that will be linked to the redemption of this request." + }, + "status": { + "type": "string", + "description": "The order status.", + "enum": [ + "CREATED", + "PAID", + "CANCELED", + "FULFILLED" + ], + "nullable": true + }, + "amount": { + "type": "integer", + "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "initial_amount": { + "type": "integer", + "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "discount_amount": { + "type": "integer", + "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "items_discount_amount": { + "type": "integer", + "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "total_discount_amount": { + "type": "integer", + "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "total_amount": { + "type": "integer", + "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "applied_discount_amount": { + "type": "integer", + "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "items_applied_discount_amount": { + "type": "integer", + "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", + "nullable": true + }, + "total_applied_discount_amount": { + "type": "integer", + "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", + "nullable": true + }, + "metadata": { + "title": "RedemptionOrderMetadata", + "type": "object", + "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", + "nullable": true + }, + "object": { + "type": "string", + "description": "The type of the object represented by JSON.", + "default": "order", + "enum": [ + "order" + ], + "nullable": true + }, + "created_at": { + "type": "string", + "example": "2021-12-22T10:13:06.487Z", + "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", + "format": "date-time", + "nullable": true + }, + "updated_at": { + "type": "string", + "nullable": true, + "example": "2021-12-22T10:14:45.316Z", + "format": "date-time", + "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." + }, + "customer_id": { + "type": "string", + "nullable": true, + "description": "Unique customer ID of the customer making the purchase.", + "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" + }, + "referrer_id": { + "type": "string", + "nullable": true, + "description": "Unique referrer ID.", + "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" + }, + "customer": { + "title": "RedemptionOrderCustomer", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "A unique identifier of an existing customer.", + "nullable": true + }, + "object": { + "type": "string", + "description": "The type of the object represented by JSON.", + "default": "customer", + "enum": [ + "customer" + ], + "nullable": true + } + }, + "required": [], + "nullable": true + }, + "referrer": { + "title": "RedemptionOrderReferrer", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "A unique identifier of an existing customer.", + "nullable": true + }, + "object": { + "type": "string", + "description": "The type of the object represented by JSON.", + "default": "customer", + "enum": [ + "customer" + ], + "nullable": true + } + }, + "required": [], + "nullable": true + }, + "redemptions": { + "title": "RedemptionOrderRedemptionsEntry", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/OrderRedemptionsEntry" + }, + "nullable": true + }, + "items": { + "title": "RedemptionOrderItems", + "type": "array", + "description": "Array of items applied to the order. It can include up to 500 items.", + "items": { + "$ref": "#/components/schemas/OrderCalculatedItem" + }, + "nullable": true + } + }, + "nullable": true }, "channel": { "title": "RedemptionChannel", @@ -37459,15 +39369,6 @@ "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", "nullable": true }, - "items": { - "title": "RedemptionEntryOrderItems", - "type": "array", - "description": "Array of items applied to the order. It can include up 500 items.", - "items": { - "$ref": "#/components/schemas/OrderCalculatedItem" - }, - "nullable": true - }, "metadata": { "title": "RedemptionEntryOrderMetadata", "type": "object", @@ -37558,6 +39459,15 @@ "$ref": "#/components/schemas/OrderRedemptionsEntry" }, "nullable": true + }, + "items": { + "title": "RedemptionEntryOrderItems", + "type": "array", + "description": "Array of items applied to the order. It can include up to 500 items.", + "items": { + "$ref": "#/components/schemas/OrderCalculatedItem" + }, + "nullable": true } }, "nullable": true @@ -38490,7 +40400,141 @@ "nullable": true }, "order": { - "$ref": "#/components/schemas/OrderCalculated" + "title": "RedemptionRollbackOrder", + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", + "nullable": true + }, + "source_id": { + "type": "string", + "nullable": true, + "description": "Unique source ID of an existing order that will be linked to the redemption of this request." + }, + "status": { + "type": "string", + "description": "The order status.", + "enum": [ + "CREATED", + "PAID", + "CANCELED", + "FULFILLED" + ], + "nullable": true + }, + "amount": { + "type": "integer", + "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "initial_amount": { + "type": "integer", + "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "discount_amount": { + "type": "integer", + "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "items_discount_amount": { + "type": "integer", + "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "total_discount_amount": { + "type": "integer", + "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "total_amount": { + "type": "integer", + "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "applied_discount_amount": { + "type": "integer", + "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "items_applied_discount_amount": { + "type": "integer", + "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", + "nullable": true + }, + "total_applied_discount_amount": { + "type": "integer", + "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", + "nullable": true + }, + "metadata": { + "title": "RedemptionRollbackOrderMetadata", + "type": "object", + "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", + "nullable": true + }, + "object": { + "type": "string", + "description": "The type of the object represented by JSON.", + "default": "order", + "enum": [ + "order" + ], + "nullable": true + }, + "created_at": { + "type": "string", + "example": "2021-12-22T10:13:06.487Z", + "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", + "format": "date-time", + "nullable": true + }, + "updated_at": { + "type": "string", + "nullable": true, + "example": "2021-12-22T10:14:45.316Z", + "format": "date-time", + "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." + }, + "customer_id": { + "type": "string", + "nullable": true, + "description": "Unique customer ID of the customer making the purchase.", + "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" + }, + "referrer_id": { + "type": "string", + "nullable": true, + "description": "Unique referrer ID.", + "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" + }, + "customer": { + "$ref": "#/components/schemas/CustomerId" + }, + "referrer": { + "$ref": "#/components/schemas/ReferrerId" + }, + "redemptions": { + "title": "RedemptionRollbackOrderRedemptionsEntry", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/OrderRedemptionsEntry" + }, + "nullable": true + }, + "items": { + "title": "RedemptionRollbackOrderItems", + "type": "array", + "description": "Array of items applied to the order. It can include up to 500 items.", + "items": { + "$ref": "#/components/schemas/OrderCalculatedItem" + }, + "nullable": true + } + } }, "channel": { "title": "RedemptionRollbackChannel", @@ -41836,7 +43880,194 @@ "$ref": "#/components/schemas/RedeemableResult" }, "order": { - "$ref": "#/components/schemas/OrderCalculated" + "title": "QualificationsRedeemableOrder", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", + "nullable": true + }, + "source_id": { + "type": "string", + "nullable": true, + "description": "Unique source ID of an existing order that will be linked to the redemption of this request." + }, + "status": { + "type": "string", + "description": "The order status.", + "enum": [ + "CREATED", + "PAID", + "CANCELED", + "FULFILLED" + ], + "nullable": true + }, + "amount": { + "type": "integer", + "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "initial_amount": { + "type": "integer", + "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "discount_amount": { + "type": "integer", + "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "items_discount_amount": { + "type": "integer", + "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "total_discount_amount": { + "type": "integer", + "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "total_amount": { + "type": "integer", + "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "applied_discount_amount": { + "type": "integer", + "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "items_applied_discount_amount": { + "type": "integer", + "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", + "nullable": true + }, + "total_applied_discount_amount": { + "type": "integer", + "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", + "nullable": true + }, + "metadata": { + "title": "QualificationsRedeemableOrderMetadata", + "type": "object", + "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", + "nullable": true + }, + "object": { + "type": "string", + "description": "The type of the object represented by JSON.", + "default": "order", + "enum": [ + "order" + ], + "nullable": true + }, + "created_at": { + "type": "string", + "example": "2021-12-22T10:13:06.487Z", + "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", + "format": "date-time", + "nullable": true + }, + "updated_at": { + "type": "string", + "nullable": true, + "example": "2021-12-22T10:14:45.316Z", + "format": "date-time", + "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." + }, + "customer_id": { + "type": "string", + "nullable": true, + "description": "Unique customer ID of the customer making the purchase.", + "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" + }, + "referrer_id": { + "type": "string", + "nullable": true, + "description": "Unique referrer ID.", + "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" + }, + "customer": { + "$ref": "#/components/schemas/CustomerId" + }, + "referrer": { + "$ref": "#/components/schemas/ReferrerId" + }, + "redemptions": { + "title": "QualificationsRedeemableOrderRedemptionsEntry", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/OrderRedemptionsEntry" + }, + "nullable": true + }, + "items": { + "title": "QualificationsRedeemableOrderItems", + "type": "array", + "description": "Array of items applied to the order. It can include up to 500 items.", + "items": { + "title": "QualificationsRedeemableOrderItemsItem", + "allOf": [ + { + "$ref": "#/components/schemas/OrderCalculatedItem" + }, + { + "type": "object", + "properties": { + "application_details": { + "title": "QualificationsRedeemableOrderItemsItemApplicationDetails", + "type": "array", + "description": "Array containing details about the items that are replaced and the items that are replacements for discounts with the `REPLACE_ITEMS` effect.", + "items": { + "title": "QualificationsRedeemableOrderItemsItemApplicationDetailsItem", + "type": "object", + "description": "Object representing item replacement.", + "properties": { + "source_index": { + "type": "integer", + "description": "Index number of the source item that is replaced. The enumeration starts from `0`, which represents the first item in the request, e.g., if the replaced item is passed as the second in the request, `source_index` equals `3`.", + "minimum": 0 + }, + "source_applied_quantity": { + "type": "integer", + "description": "Number of source units that are replaced.", + "maximum": -1 + }, + "source_applied_quantity_amount": { + "type": "integer", + "description": "Amount equal to the price of the units that are replaced. Determines the change of the amount of the source item quantity.", + "maximum": 0 + }, + "target_index": { + "type": "integer", + "description": "Index number of the target item that is a replacement of the source item. The enumeration continues the values for the order items, e.g. if there are three items in the request, `target_index` equals `3`, as enumeration starts from `0`." + }, + "target_applied_quantity": { + "type": "integer", + "description": "Number of added target units that are replacements." + }, + "target_applied_quantity_amount": { + "type": "integer", + "description": "Amount equal to the price of the units that are replacements. Determines the change in the amount of the target item quantity." + }, + "target_applied_discount_amount": { + "type": "integer", + "description": "Discount amount applied to the target item with regard to the replacement. Equals the `target_applied_quantity_amount` minus `source_applied_quantity_amount`." + } + } + } + } + } + } + ] + }, + "nullable": true + } + }, + "nullable": true }, "validation_rule_id": { "type": "string", @@ -42627,7 +44858,194 @@ "$ref": "#/components/schemas/RedeemableResult" }, "order": { - "$ref": "#/components/schemas/OrderCalculated" + "title": "QualificationsRedeemableBaseOrder", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", + "nullable": true + }, + "source_id": { + "type": "string", + "nullable": true, + "description": "Unique source ID of an existing order that will be linked to the redemption of this request." + }, + "status": { + "type": "string", + "description": "The order status.", + "enum": [ + "CREATED", + "PAID", + "CANCELED", + "FULFILLED" + ], + "nullable": true + }, + "amount": { + "type": "integer", + "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "initial_amount": { + "type": "integer", + "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "discount_amount": { + "type": "integer", + "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "items_discount_amount": { + "type": "integer", + "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "total_discount_amount": { + "type": "integer", + "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "total_amount": { + "type": "integer", + "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "applied_discount_amount": { + "type": "integer", + "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "items_applied_discount_amount": { + "type": "integer", + "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", + "nullable": true + }, + "total_applied_discount_amount": { + "type": "integer", + "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", + "nullable": true + }, + "metadata": { + "title": "QualificationsRedeemableBaseOrderMetadata", + "type": "object", + "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", + "nullable": true + }, + "object": { + "type": "string", + "description": "The type of the object represented by JSON.", + "default": "order", + "enum": [ + "order" + ], + "nullable": true + }, + "created_at": { + "type": "string", + "example": "2021-12-22T10:13:06.487Z", + "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", + "format": "date-time", + "nullable": true + }, + "updated_at": { + "type": "string", + "nullable": true, + "example": "2021-12-22T10:14:45.316Z", + "format": "date-time", + "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." + }, + "customer_id": { + "type": "string", + "nullable": true, + "description": "Unique customer ID of the customer making the purchase.", + "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" + }, + "referrer_id": { + "type": "string", + "nullable": true, + "description": "Unique referrer ID.", + "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" + }, + "customer": { + "$ref": "#/components/schemas/CustomerId" + }, + "referrer": { + "$ref": "#/components/schemas/ReferrerId" + }, + "redemptions": { + "title": "QualificationsRedeemableBaseOrderRedemptionsEntry", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/OrderRedemptionsEntry" + }, + "nullable": true + }, + "items": { + "title": "QualificationsRedeemableBaseOrderItems", + "type": "array", + "description": "Array of items applied to the order. It can include up to 500 items.", + "items": { + "title": "QualificationsRedeemableBaseOrderItemsItem", + "allOf": [ + { + "$ref": "#/components/schemas/OrderCalculatedItem" + }, + { + "type": "object", + "properties": { + "application_details": { + "title": "QualificationsRedeemableBaseOrderItemsItemApplicationDetails", + "type": "array", + "description": "Array containing details about the items that are replaced and the items that are replacements for discounts with the `REPLACE_ITEMS` effect.", + "items": { + "title": "QualificationsRedeemableBaseOrderItemsItemApplicationDetailsItem", + "type": "object", + "description": "Object representing item replacement.", + "properties": { + "source_index": { + "type": "integer", + "description": "Index number of the source item that is replaced. The enumeration starts from `0`, which represents the first item in the request, e.g., if the replaced item is passed as the second in the request, `source_index` equals `3`.", + "minimum": 0 + }, + "source_applied_quantity": { + "type": "integer", + "description": "Number of source units that are replaced.", + "maximum": -1 + }, + "source_applied_quantity_amount": { + "type": "integer", + "description": "Amount equal to the price of the units that are replaced. Determines the change of the amount of the source item quantity.", + "maximum": 0 + }, + "target_index": { + "type": "integer", + "description": "Index number of the target item that is a replacement of the source item. The enumeration continues the values for the order items, e.g. if there are three items in the request, `target_index` equals `3`, as enumeration starts from `0`." + }, + "target_applied_quantity": { + "type": "integer", + "description": "Number of added target units that are replacements." + }, + "target_applied_quantity_amount": { + "type": "integer", + "description": "Amount equal to the price of the units that are replacements. Determines the change in the amount of the target item quantity." + }, + "target_applied_discount_amount": { + "type": "integer", + "description": "Discount amount applied to the target item with regard to the replacement. Equals the `target_applied_quantity_amount` minus `source_applied_quantity_amount`." + } + } + } + } + } + } + ] + }, + "nullable": true + } + }, + "nullable": true }, "validation_rule_id": { "type": "string", diff --git a/reference/readonly-sdks/python/OpenAPI.json b/reference/readonly-sdks/python/OpenAPI.json index 05c5d518..5a6a9655 100644 --- a/reference/readonly-sdks/python/OpenAPI.json +++ b/reference/readonly-sdks/python/OpenAPI.json @@ -2475,7 +2475,151 @@ "nullable": true }, "order": { - "$ref": "#/components/schemas/OrderCalculated" + "title": "ClientQualificationsCheckEligibilityResponseBodyOrder", + "type": "object", + "nullable": true, + "properties": { + "id": { + "type": "string", + "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", + "nullable": true + }, + "source_id": { + "type": "string", + "nullable": true, + "description": "Unique source ID of an existing order that will be linked to the redemption of this request." + }, + "status": { + "type": "string", + "description": "The order status.", + "enum": [ + "CREATED", + "PAID", + "CANCELED", + "FULFILLED" + ], + "nullable": true + }, + "amount": { + "type": "integer", + "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "initial_amount": { + "type": "integer", + "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "discount_amount": { + "type": "integer", + "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "items_discount_amount": { + "type": "integer", + "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "total_discount_amount": { + "type": "integer", + "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "total_amount": { + "type": "integer", + "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "applied_discount_amount": { + "type": "integer", + "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "items_applied_discount_amount": { + "type": "integer", + "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", + "nullable": true + }, + "total_applied_discount_amount": { + "type": "integer", + "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", + "nullable": true + }, + "metadata": { + "title": "ClientQualificationsCheckEligibilityResponseBodyOrderMetadata", + "type": "object", + "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", + "nullable": true + }, + "object": { + "type": "string", + "description": "The type of the object represented by JSON.", + "default": "order", + "enum": [ + "order" + ], + "nullable": true + }, + "created_at": { + "type": "string", + "example": "2021-12-22T10:13:06.487Z", + "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", + "format": "date-time", + "nullable": true + }, + "updated_at": { + "type": "string", + "nullable": true, + "example": "2021-12-22T10:14:45.316Z", + "format": "date-time", + "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." + }, + "customer_id": { + "type": "string", + "nullable": true, + "description": "Unique customer ID of the customer making the purchase.", + "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" + }, + "referrer_id": { + "type": "string", + "nullable": true, + "description": "Unique referrer ID.", + "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" + }, + "customer": { + "$ref": "#/components/schemas/CustomerId" + }, + "referrer": { + "$ref": "#/components/schemas/ReferrerId" + }, + "redemptions": { + "title": "ClientQualificationsCheckEligibilityResponseBodyOrderRedemptions", + "type": "object", + "nullable": true + }, + "items": { + "title": "ClientQualificationsCheckEligibilityResponseBodyOrderItems", + "type": "array", + "description": "Array of items applied to the order. It can include up to 500 items.", + "items": { + "title": "ClientQualificationsCheckEligibilityResponseBodyOrderItemsItem", + "allOf": [ + { + "$ref": "#/components/schemas/OrderCalculatedItem" + }, + { + "type": "object", + "properties": { + "application_details": { + "$ref": "#/components/schemas/ApplicationDetails" + } + } + } + ] + }, + "nullable": true + } + } }, "stacking_rules": { "$ref": "#/components/schemas/StackingRules" @@ -2604,7 +2748,152 @@ "$ref": "#/components/schemas/Redemption" }, "order": { - "$ref": "#/components/schemas/OrderCalculated" + "title": "ClientRedemptionsRedeemResponseBodyOrder", + "description": "Contains the order details associated with the redemption.", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", + "nullable": true + }, + "source_id": { + "type": "string", + "nullable": true, + "description": "Unique source ID of an existing order that will be linked to the redemption of this request." + }, + "status": { + "type": "string", + "description": "The order status.", + "enum": [ + "CREATED", + "PAID", + "CANCELED", + "FULFILLED" + ], + "nullable": true + }, + "amount": { + "type": "integer", + "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "initial_amount": { + "type": "integer", + "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "discount_amount": { + "type": "integer", + "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "items_discount_amount": { + "type": "integer", + "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "total_discount_amount": { + "type": "integer", + "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "total_amount": { + "type": "integer", + "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "applied_discount_amount": { + "type": "integer", + "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "items_applied_discount_amount": { + "type": "integer", + "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", + "nullable": true + }, + "total_applied_discount_amount": { + "type": "integer", + "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", + "nullable": true + }, + "metadata": { + "title": "ClientRedemptionsRedeemResponseBodyOrderMetadata", + "type": "object", + "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", + "nullable": true + }, + "object": { + "type": "string", + "description": "The type of the object represented by JSON.", + "default": "order", + "enum": [ + "order" + ], + "nullable": true + }, + "created_at": { + "type": "string", + "example": "2021-12-22T10:13:06.487Z", + "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", + "format": "date-time", + "nullable": true + }, + "updated_at": { + "type": "string", + "nullable": true, + "example": "2021-12-22T10:14:45.316Z", + "format": "date-time", + "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." + }, + "customer_id": { + "type": "string", + "nullable": true, + "description": "Unique customer ID of the customer making the purchase.", + "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" + }, + "referrer_id": { + "type": "string", + "nullable": true, + "description": "Unique referrer ID.", + "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" + }, + "customer": { + "$ref": "#/components/schemas/CustomerId" + }, + "referrer": { + "$ref": "#/components/schemas/ReferrerId" + }, + "redemptions": { + "title": "ClientRedemptionsRedeemResponseBodyOrderRedemptions", + "type": "object", + "nullable": true + }, + "items": { + "title": "ClientRedemptionsRedeemResponseBodyOrderItems", + "type": "array", + "description": "Array of items applied to the order. It can include up to 500 items.", + "items": { + "title": "ClientRedemptionsRedeemResponseBodyOrderItemsItem", + "allOf": [ + { + "$ref": "#/components/schemas/OrderCalculatedItem" + }, + { + "type": "object", + "properties": { + "application_details": { + "$ref": "#/components/schemas/ApplicationDetails" + } + } + } + ] + }, + "nullable": true + } + }, + "nullable": true }, "inapplicable_redeemables": { "title": "ClientRedemptionsRedeemResponseBodyInapplicableRedeemables", @@ -2770,7 +3059,173 @@ "nullable": true }, "order": { - "$ref": "#/components/schemas/OrderCalculated" + "title": "ClientValidationsValidateResponseBodyRedeemablesItemOrder", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", + "nullable": true + }, + "source_id": { + "type": "string", + "nullable": true, + "description": "Unique source ID of an existing order that will be linked to the redemption of this request." + }, + "status": { + "type": "string", + "description": "The order status.", + "enum": [ + "CREATED", + "PAID", + "CANCELED", + "FULFILLED" + ], + "nullable": true + }, + "amount": { + "type": "integer", + "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "initial_amount": { + "type": "integer", + "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "discount_amount": { + "type": "integer", + "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "items_discount_amount": { + "type": "integer", + "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "total_discount_amount": { + "type": "integer", + "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "total_amount": { + "type": "integer", + "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "applied_discount_amount": { + "type": "integer", + "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "items_applied_discount_amount": { + "type": "integer", + "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", + "nullable": true + }, + "total_applied_discount_amount": { + "type": "integer", + "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", + "nullable": true + }, + "metadata": { + "title": "ClientValidationsValidateResponseBodyRedeemablesItemOrderMetadata", + "type": "object", + "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", + "nullable": true + }, + "object": { + "type": "string", + "description": "The type of the object represented by JSON.", + "default": "order", + "enum": [ + "order" + ], + "nullable": true + }, + "created_at": { + "type": "string", + "example": "2021-12-22T10:13:06.487Z", + "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", + "format": "date-time", + "nullable": true + }, + "updated_at": { + "type": "string", + "nullable": true, + "example": "2021-12-22T10:14:45.316Z", + "format": "date-time", + "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." + }, + "customer_id": { + "type": "string", + "nullable": true, + "description": "Unique customer ID of the customer making the purchase.", + "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" + }, + "referrer_id": { + "type": "string", + "nullable": true, + "description": "Unique referrer ID.", + "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" + }, + "customer": { + "title": "ClientValidationsValidateResponseBodyRedeemablesItemOrderCustomer", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "A unique identifier of an existing customer.", + "nullable": true + }, + "object": { + "type": "string", + "description": "The type of the object represented by JSON.", + "default": "customer", + "enum": [ + "customer" + ], + "nullable": true + } + }, + "required": [] + }, + "referrer": { + "title": "ClientValidationsValidateResponseBodyRedeemablesItemOrderReferrer", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "A unique identifier of an existing customer.", + "nullable": true + }, + "object": { + "type": "string", + "description": "The type of the object represented by JSON.", + "default": "customer", + "enum": [ + "customer" + ], + "nullable": true + } + }, + "required": [] + }, + "redemptions": { + "title": "ClientValidationsValidateResponseBodyRedeemablesItemOrderRedemptions", + "type": "object", + "nullable": true + }, + "items": { + "title": "ClientValidationsValidateResponseBodyRedeemablesItemOrderItems", + "type": "array", + "description": "Array of items applied to the order. It can include up to 500 items.", + "items": { + "$ref": "#/components/schemas/OrderCalculatedItem" + }, + "nullable": true + } + } }, "applicable_to": { "$ref": "#/components/schemas/ApplicableToResultList" @@ -2993,7 +3448,151 @@ "nullable": true }, "order": { - "$ref": "#/components/schemas/OrderCalculated" + "title": "ClientValidationsValidateResponseBodyOrder", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", + "nullable": true + }, + "source_id": { + "type": "string", + "nullable": true, + "description": "Unique source ID of an existing order that will be linked to the redemption of this request." + }, + "status": { + "type": "string", + "description": "The order status.", + "enum": [ + "CREATED", + "PAID", + "CANCELED", + "FULFILLED" + ], + "nullable": true + }, + "amount": { + "type": "integer", + "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "initial_amount": { + "type": "integer", + "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "discount_amount": { + "type": "integer", + "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "items_discount_amount": { + "type": "integer", + "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "total_discount_amount": { + "type": "integer", + "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "total_amount": { + "type": "integer", + "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "applied_discount_amount": { + "type": "integer", + "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "items_applied_discount_amount": { + "type": "integer", + "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", + "nullable": true + }, + "total_applied_discount_amount": { + "type": "integer", + "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", + "nullable": true + }, + "metadata": { + "title": "ClientValidationsValidateResponseBodyOrderMetadata", + "type": "object", + "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", + "nullable": true + }, + "object": { + "type": "string", + "description": "The type of the object represented by JSON.", + "default": "order", + "enum": [ + "order" + ], + "nullable": true + }, + "created_at": { + "type": "string", + "example": "2021-12-22T10:13:06.487Z", + "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", + "format": "date-time", + "nullable": true + }, + "updated_at": { + "type": "string", + "nullable": true, + "example": "2021-12-22T10:14:45.316Z", + "format": "date-time", + "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." + }, + "customer_id": { + "type": "string", + "nullable": true, + "description": "Unique customer ID of the customer making the purchase.", + "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" + }, + "referrer_id": { + "type": "string", + "nullable": true, + "description": "Unique referrer ID.", + "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" + }, + "customer": { + "$ref": "#/components/schemas/CustomerId" + }, + "referrer": { + "$ref": "#/components/schemas/ReferrerId" + }, + "redemptions": { + "title": "ClientValidationsValidateResponseBodyOrderRedemptions", + "type": "object", + "nullable": true + }, + "items": { + "title": "ClientValidationsValidateResponseBodyOrderItems", + "type": "array", + "description": "Array of items applied to the order. It can include up to 500 items.", + "items": { + "title": "ClientValidationsValidateResponseBodyOrderItemsItem", + "allOf": [ + { + "$ref": "#/components/schemas/OrderCalculatedItem" + }, + { + "type": "object", + "properties": { + "application_details": { + "$ref": "#/components/schemas/ApplicationDetails" + } + } + } + ] + }, + "nullable": true + } + }, + "nullable": true }, "tracking_id": { "type": "string", @@ -9382,7 +9981,176 @@ "nullable": true }, "order": { - "$ref": "#/components/schemas/OrderCalculated" + "title": "LoyaltiesMembersRedemptionRedeemResponseBodyOrder", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", + "nullable": true + }, + "source_id": { + "type": "string", + "nullable": true, + "description": "Unique source ID of an existing order that will be linked to the redemption of this request." + }, + "status": { + "type": "string", + "description": "The order status.", + "enum": [ + "CREATED", + "PAID", + "CANCELED", + "FULFILLED" + ], + "nullable": true + }, + "amount": { + "type": "integer", + "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "initial_amount": { + "type": "integer", + "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "discount_amount": { + "type": "integer", + "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "items_discount_amount": { + "type": "integer", + "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "total_discount_amount": { + "type": "integer", + "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "total_amount": { + "type": "integer", + "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "applied_discount_amount": { + "type": "integer", + "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "items_applied_discount_amount": { + "type": "integer", + "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", + "nullable": true + }, + "total_applied_discount_amount": { + "type": "integer", + "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", + "nullable": true + }, + "metadata": { + "title": "LoyaltiesMembersRedemptionRedeemResponseBodyOrderMetadata", + "type": "object", + "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", + "nullable": true + }, + "object": { + "type": "string", + "description": "The type of the object represented by JSON.", + "default": "order", + "enum": [ + "order" + ], + "nullable": true + }, + "created_at": { + "type": "string", + "example": "2021-12-22T10:13:06.487Z", + "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", + "format": "date-time", + "nullable": true + }, + "updated_at": { + "type": "string", + "nullable": true, + "example": "2021-12-22T10:14:45.316Z", + "format": "date-time", + "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." + }, + "customer_id": { + "type": "string", + "nullable": true, + "description": "Unique customer ID of the customer making the purchase.", + "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" + }, + "referrer_id": { + "type": "string", + "nullable": true, + "description": "Unique referrer ID.", + "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" + }, + "customer": { + "title": "LoyaltiesMembersRedemptionRedeemResponseBodyOrderCustomer", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "A unique identifier of an existing customer.", + "nullable": true + }, + "object": { + "type": "string", + "description": "The type of the object represented by JSON.", + "default": "customer", + "enum": [ + "customer" + ], + "nullable": true + } + }, + "required": [], + "nullable": true + }, + "referrer": { + "title": "LoyaltiesMembersRedemptionRedeemResponseBodyOrderReferrer", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "A unique identifier of an existing customer.", + "nullable": true + }, + "object": { + "type": "string", + "description": "The type of the object represented by JSON.", + "default": "customer", + "enum": [ + "customer" + ], + "nullable": true + } + }, + "required": [], + "nullable": true + }, + "redemptions": { + "title": "LoyaltiesMembersRedemptionRedeemResponseBodyOrderRedemptions", + "type": "object", + "nullable": true + }, + "items": { + "title": "LoyaltiesMembersRedemptionRedeemResponseBodyOrderItems", + "type": "array", + "description": "Array of items applied to the order. It can include up to 500 items.", + "items": { + "$ref": "#/components/schemas/OrderCalculatedItem" + }, + "nullable": true + } + }, + "nullable": true }, "channel": { "title": "LoyaltiesMembersRedemptionRedeemResponseBodyChannel", @@ -15504,7 +16272,7 @@ "items": { "title": "OrdersCreateRequestBodyItems", "type": "array", - "description": "Array of items applied to the order. It can include up 500 items.", + "description": "Array of items applied to the order. It can include up to 500 items.", "items": { "$ref": "#/components/schemas/OrderItem" }, @@ -15608,15 +16376,6 @@ "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", "nullable": true }, - "items": { - "title": "OrdersCreateResponseBodyItems", - "type": "array", - "description": "Array of items applied to the order. It can include up 500 items.", - "items": { - "$ref": "#/components/schemas/OrderCalculatedItem" - }, - "nullable": true - }, "metadata": { "title": "OrdersCreateResponseBodyMetadata", "type": "object", @@ -15668,6 +16427,15 @@ "title": "OrdersCreateResponseBodyRedemptions", "type": "object", "nullable": true + }, + "items": { + "title": "OrdersCreateResponseBodyItems", + "type": "array", + "description": "Array of items applied to the order. It can include up to 500 items.", + "items": { + "$ref": "#/components/schemas/OrderCalculatedItem" + }, + "nullable": true } }, "description": "Response body schema for **POST** `v1/orders`." @@ -15856,15 +16624,6 @@ "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", "nullable": true }, - "items": { - "title": "OrdersGetResponseBodyItems", - "type": "array", - "description": "Array of items applied to the order. It can include up 500 items.", - "items": { - "$ref": "#/components/schemas/OrderCalculatedItem" - }, - "nullable": true - }, "metadata": { "title": "OrdersGetResponseBodyMetadata", "type": "object", @@ -15916,6 +16675,15 @@ "title": "OrdersGetResponseBodyRedemptions", "type": "object", "nullable": true + }, + "items": { + "title": "OrdersGetResponseBodyItems", + "type": "array", + "description": "Array of items applied to the order. It can include up to 500 items.", + "items": { + "$ref": "#/components/schemas/OrderCalculatedItem" + }, + "nullable": true } }, "description": "Response body schema for **GET** `v1/orders/{orderId}`." @@ -16000,7 +16768,25 @@ "type": "array", "description": "Contains array of order objects.", "items": { - "$ref": "#/components/schemas/OrderCalculated" + "title": "OrdersListResponseBodyOrdersItem", + "allOf": [ + { + "$ref": "#/components/schemas/OrderCalculated" + }, + { + "type": "object", + "properties": { + "items": { + "title": "OrdersListResponseBodyOrdersItemItems", + "type": "array", + "description": "Array of items applied to the order. It can include up to 500 items.", + "items": { + "$ref": "#/components/schemas/OrderCalculatedItem" + } + } + } + } + ] }, "nullable": true }, @@ -16050,7 +16836,7 @@ "items": { "title": "OrdersUpdateRequestBodyItems", "type": "array", - "description": "Array of items applied to the order. It can include up 500 items.", + "description": "Array of items applied to the order. It can include up to 500 items.", "items": { "$ref": "#/components/schemas/OrderItem" }, @@ -16154,15 +16940,6 @@ "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", "nullable": true }, - "items": { - "title": "OrdersUpdateResponseBodyItems", - "type": "array", - "description": "Array of items applied to the order. It can include up 500 items.", - "items": { - "$ref": "#/components/schemas/OrderCalculatedItem" - }, - "nullable": true - }, "metadata": { "title": "OrdersUpdateResponseBodyMetadata", "type": "object", @@ -16214,6 +16991,15 @@ "title": "OrdersUpdateResponseBodyRedemptions", "type": "object", "nullable": true + }, + "items": { + "title": "OrdersUpdateResponseBodyItems", + "type": "array", + "description": "Array of items applied to the order. It can include up to 500 items.", + "items": { + "$ref": "#/components/schemas/OrderCalculatedItem" + }, + "nullable": true } }, "description": "Response body schema for **PUT** `v1/orders/{orderId}`." @@ -20933,145 +21719,9 @@ "nullable": true }, "order": { - "$ref": "#/components/schemas/OrderCalculated" - }, - "stacking_rules": { - "$ref": "#/components/schemas/StackingRules" - } - } - }, - "RedemptionsGetResponseBody": { - "title": "RedemptionsGetResponseBody", - "type": "object", - "properties": { - "id": { - "type": "string", - "nullable": true - }, - "object": { - "type": "string", - "enum": [ - "redemption", - "redemption_rollback" - ], - "nullable": true - }, - "date": { - "type": "string", - "example": "2021-12-22T10:13:06.487Z", - "description": "Timestamp representing the date and time when the object was created. The value is shown in the ISO 8601 format.", - "format": "date-time", - "nullable": true - }, - "customer_id": { - "type": "string", - "nullable": true, - "example": "cust_i8t5Tt6eiKG5K79KQlJ0Vs64", - "description": "Unique customer ID of the redeeming customer." - }, - "tracking_id": { - "type": "string", - "nullable": true, - "description": "Hashed customer source ID." - }, - "metadata": { - "title": "RedemptionsGetResponseBodyMetadata", + "title": "QualificationsCheckEligibilityResponseBodyOrder", "type": "object", "nullable": true, - "description": "The metadata object stores all custom attributes assigned to the redemption." - }, - "amount": { - "type": "integer", - "nullable": true, - "description": "For gift cards, this is a positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the number of redeemed credits.\nFor loyalty cards, this is the number of loyalty points used in the transaction. and For gift cards, this represents the number of the credits restored to the card in the rolledback redemption. The number is a negative integer in the smallest currency unit, e.g. -100 cents for $1.00 added back to the card.\nFor loyalty cards, this represents the number of loyalty points restored to the card in the rolledback redemption. The number is a negative integer." - }, - "redemption": { - "nullable": true, - "type": "string", - "description": "Unique redemption ID of the parent redemption.", - "example": "r_0c656311b5878a2031" - }, - "result": { - "type": "string", - "enum": [ - "SUCCESS", - "FAILURE" - ], - "description": "Redemption result.", - "nullable": true - }, - "status": { - "type": "string", - "enum": [ - "SUCCEEDED", - "FAILED", - "ROLLED_BACK" - ], - "nullable": true - }, - "related_redemptions": { - "title": "RedemptionsGetResponseBodyRelatedRedemptions", - "type": "object", - "properties": { - "rollbacks": { - "title": "RedemptionsGetResponseBodyRelatedRedemptionsRollbacks", - "type": "array", - "items": { - "title": "RedemptionsGetResponseBodyRelatedRedemptionsRollbacksItem", - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "date": { - "type": "string", - "example": "2021-12-22T10:13:06.487Z", - "description": "Timestamp representing the date and time when the object was created. The value is shown in the ISO 8601 format.", - "format": "date-time" - } - } - }, - "nullable": true - }, - "redemptions": { - "title": "RedemptionsGetResponseBodyRelatedRedemptionsRedemptions", - "type": "array", - "items": { - "title": "RedemptionsGetResponseBodyRelatedRedemptionsRedemptionsItem", - "type": "object", - "properties": { - "id": { - "type": "string", - "example": "r_0bc92f81a6801f9bca", - "description": "Unique redemption ID." - }, - "date": { - "type": "string", - "example": "2021-12-22T10:13:06.487Z", - "description": "Timestamp representing the date and time when the object was created. The value is shown in the ISO 8601 format.", - "format": "date-time" - } - } - }, - "nullable": true - } - }, - "nullable": true - }, - "failure_code": { - "type": "string", - "example": "customer_rules_violated", - "description": "If the result is `FAILURE`, this parameter will provide a generic reason as to why the redemption failed.", - "nullable": true - }, - "failure_message": { - "type": "string", - "description": "If the result is `FAILURE`, this parameter will provide a more expanded reason as to why the redemption failed.", - "nullable": true - }, - "order": { - "title": "RedemptionsGetResponseBodyOrder", - "type": "object", "properties": { "id": { "type": "string", @@ -21139,14 +21789,272 @@ "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", "nullable": true }, + "metadata": { + "title": "QualificationsCheckEligibilityResponseBodyOrderMetadata", + "type": "object", + "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", + "nullable": true + }, + "object": { + "type": "string", + "description": "The type of the object represented by JSON.", + "default": "order", + "enum": [ + "order" + ], + "nullable": true + }, + "created_at": { + "type": "string", + "example": "2021-12-22T10:13:06.487Z", + "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", + "format": "date-time", + "nullable": true + }, + "updated_at": { + "type": "string", + "nullable": true, + "example": "2021-12-22T10:14:45.316Z", + "format": "date-time", + "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." + }, + "customer_id": { + "type": "string", + "nullable": true, + "description": "Unique customer ID of the customer making the purchase.", + "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" + }, + "referrer_id": { + "type": "string", + "nullable": true, + "description": "Unique referrer ID.", + "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" + }, + "customer": { + "$ref": "#/components/schemas/CustomerId" + }, + "referrer": { + "$ref": "#/components/schemas/ReferrerId" + }, + "redemptions": { + "title": "QualificationsCheckEligibilityResponseBodyOrderRedemptions", + "type": "object", + "nullable": true + }, "items": { - "title": "RedemptionsGetResponseBodyOrderItems", + "title": "QualificationsCheckEligibilityResponseBodyOrderItems", "type": "array", - "description": "Array of items applied to the order. It can include up 500 items.", + "description": "Array of items applied to the order. It can include up to 500 items.", "items": { "$ref": "#/components/schemas/OrderCalculatedItem" }, "nullable": true + } + } + }, + "stacking_rules": { + "$ref": "#/components/schemas/StackingRules" + } + } + }, + "RedemptionsGetResponseBody": { + "title": "RedemptionsGetResponseBody", + "type": "object", + "properties": { + "id": { + "type": "string", + "nullable": true + }, + "object": { + "type": "string", + "enum": [ + "redemption", + "redemption_rollback" + ], + "nullable": true + }, + "date": { + "type": "string", + "example": "2021-12-22T10:13:06.487Z", + "description": "Timestamp representing the date and time when the object was created. The value is shown in the ISO 8601 format.", + "format": "date-time", + "nullable": true + }, + "customer_id": { + "type": "string", + "nullable": true, + "example": "cust_i8t5Tt6eiKG5K79KQlJ0Vs64", + "description": "Unique customer ID of the redeeming customer." + }, + "tracking_id": { + "type": "string", + "nullable": true, + "description": "Hashed customer source ID." + }, + "metadata": { + "title": "RedemptionsGetResponseBodyMetadata", + "type": "object", + "nullable": true, + "description": "The metadata object stores all custom attributes assigned to the redemption." + }, + "amount": { + "type": "integer", + "nullable": true, + "description": "For gift cards, this is a positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the number of redeemed credits.\nFor loyalty cards, this is the number of loyalty points used in the transaction. and For gift cards, this represents the number of the credits restored to the card in the rolledback redemption. The number is a negative integer in the smallest currency unit, e.g. -100 cents for $1.00 added back to the card.\nFor loyalty cards, this represents the number of loyalty points restored to the card in the rolledback redemption. The number is a negative integer." + }, + "redemption": { + "nullable": true, + "type": "string", + "description": "Unique redemption ID of the parent redemption.", + "example": "r_0c656311b5878a2031" + }, + "result": { + "type": "string", + "enum": [ + "SUCCESS", + "FAILURE" + ], + "description": "Redemption result.", + "nullable": true + }, + "status": { + "type": "string", + "enum": [ + "SUCCEEDED", + "FAILED", + "ROLLED_BACK" + ], + "nullable": true + }, + "related_redemptions": { + "title": "RedemptionsGetResponseBodyRelatedRedemptions", + "type": "object", + "properties": { + "rollbacks": { + "title": "RedemptionsGetResponseBodyRelatedRedemptionsRollbacks", + "type": "array", + "items": { + "title": "RedemptionsGetResponseBodyRelatedRedemptionsRollbacksItem", + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "date": { + "type": "string", + "example": "2021-12-22T10:13:06.487Z", + "description": "Timestamp representing the date and time when the object was created. The value is shown in the ISO 8601 format.", + "format": "date-time" + } + } + }, + "nullable": true + }, + "redemptions": { + "title": "RedemptionsGetResponseBodyRelatedRedemptionsRedemptions", + "type": "array", + "items": { + "title": "RedemptionsGetResponseBodyRelatedRedemptionsRedemptionsItem", + "type": "object", + "properties": { + "id": { + "type": "string", + "example": "r_0bc92f81a6801f9bca", + "description": "Unique redemption ID." + }, + "date": { + "type": "string", + "example": "2021-12-22T10:13:06.487Z", + "description": "Timestamp representing the date and time when the object was created. The value is shown in the ISO 8601 format.", + "format": "date-time" + } + } + }, + "nullable": true + } + }, + "nullable": true + }, + "failure_code": { + "type": "string", + "example": "customer_rules_violated", + "description": "If the result is `FAILURE`, this parameter will provide a generic reason as to why the redemption failed.", + "nullable": true + }, + "failure_message": { + "type": "string", + "description": "If the result is `FAILURE`, this parameter will provide a more expanded reason as to why the redemption failed.", + "nullable": true + }, + "order": { + "title": "RedemptionsGetResponseBodyOrder", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", + "nullable": true + }, + "source_id": { + "type": "string", + "nullable": true, + "description": "Unique source ID of an existing order that will be linked to the redemption of this request." + }, + "status": { + "type": "string", + "description": "The order status.", + "enum": [ + "CREATED", + "PAID", + "CANCELED", + "FULFILLED" + ], + "nullable": true + }, + "amount": { + "type": "integer", + "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "initial_amount": { + "type": "integer", + "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "discount_amount": { + "type": "integer", + "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "items_discount_amount": { + "type": "integer", + "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "total_discount_amount": { + "type": "integer", + "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "total_amount": { + "type": "integer", + "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "applied_discount_amount": { + "type": "integer", + "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "items_applied_discount_amount": { + "type": "integer", + "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", + "nullable": true + }, + "total_applied_discount_amount": { + "type": "integer", + "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", + "nullable": true }, "metadata": { "title": "RedemptionsGetResponseBodyOrderMetadata", @@ -21235,6 +22143,15 @@ "title": "RedemptionsGetResponseBodyOrderRedemptions", "type": "object", "nullable": true + }, + "items": { + "title": "RedemptionsGetResponseBodyOrderItems", + "type": "array", + "description": "Array of items applied to the order. It can include up to 500 items.", + "items": { + "$ref": "#/components/schemas/OrderCalculatedItem" + }, + "nullable": true } }, "nullable": true @@ -22038,15 +22955,6 @@ "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", "nullable": true }, - "items": { - "title": "RedemptionsListResponseBodyRedemptionsItemOrderItems", - "type": "array", - "description": "Array of items applied to the order. It can include up 500 items.", - "items": { - "$ref": "#/components/schemas/OrderCalculatedItem" - }, - "nullable": true - }, "metadata": { "title": "RedemptionsListResponseBodyRedemptionsItemOrderMetadata", "type": "object", @@ -22132,6 +23040,15 @@ "title": "RedemptionsListResponseBodyRedemptionsItemOrderRedemptions", "type": "object", "nullable": true + }, + "items": { + "title": "RedemptionsListResponseBodyRedemptionsItemOrderItems", + "type": "array", + "description": "Array of items applied to the order. It can include up to 500 items.", + "items": { + "$ref": "#/components/schemas/OrderCalculatedItem" + }, + "nullable": true } } }, @@ -22833,7 +23750,152 @@ "$ref": "#/components/schemas/Redemption" }, "order": { - "$ref": "#/components/schemas/OrderCalculated" + "title": "RedemptionsRedeemResponseBodyOrder", + "description": "Contains the order details associated with the redemption.", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", + "nullable": true + }, + "source_id": { + "type": "string", + "nullable": true, + "description": "Unique source ID of an existing order that will be linked to the redemption of this request." + }, + "status": { + "type": "string", + "description": "The order status.", + "enum": [ + "CREATED", + "PAID", + "CANCELED", + "FULFILLED" + ], + "nullable": true + }, + "amount": { + "type": "integer", + "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "initial_amount": { + "type": "integer", + "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "discount_amount": { + "type": "integer", + "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "items_discount_amount": { + "type": "integer", + "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "total_discount_amount": { + "type": "integer", + "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "total_amount": { + "type": "integer", + "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "applied_discount_amount": { + "type": "integer", + "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "items_applied_discount_amount": { + "type": "integer", + "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", + "nullable": true + }, + "total_applied_discount_amount": { + "type": "integer", + "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", + "nullable": true + }, + "metadata": { + "title": "RedemptionsRedeemResponseBodyOrderMetadata", + "type": "object", + "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", + "nullable": true + }, + "object": { + "type": "string", + "description": "The type of the object represented by JSON.", + "default": "order", + "enum": [ + "order" + ], + "nullable": true + }, + "created_at": { + "type": "string", + "example": "2021-12-22T10:13:06.487Z", + "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", + "format": "date-time", + "nullable": true + }, + "updated_at": { + "type": "string", + "nullable": true, + "example": "2021-12-22T10:14:45.316Z", + "format": "date-time", + "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." + }, + "customer_id": { + "type": "string", + "nullable": true, + "description": "Unique customer ID of the customer making the purchase.", + "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" + }, + "referrer_id": { + "type": "string", + "nullable": true, + "description": "Unique referrer ID.", + "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" + }, + "customer": { + "$ref": "#/components/schemas/CustomerId" + }, + "referrer": { + "$ref": "#/components/schemas/ReferrerId" + }, + "redemptions": { + "title": "RedemptionsRedeemResponseBodyOrderRedemptions", + "type": "object", + "nullable": true + }, + "items": { + "title": "RedemptionsRedeemResponseBodyOrderItems", + "type": "array", + "description": "Array of items applied to the order. It can include up to 500 items.", + "items": { + "title": "RedemptionsRedeemResponseBodyOrderItemsItem", + "allOf": [ + { + "$ref": "#/components/schemas/OrderCalculatedItem" + }, + { + "type": "object", + "properties": { + "application_details": { + "$ref": "#/components/schemas/ApplicationDetails" + } + } + } + ] + }, + "nullable": true + } + }, + "nullable": true }, "inapplicable_redeemables": { "title": "RedemptionsRedeemResponseBodyInapplicableRedeemables", @@ -23025,7 +24087,138 @@ "nullable": true }, "order": { - "$ref": "#/components/schemas/OrderCalculated" + "title": "RedemptionsRollbackCreateResponseBodyOrder", + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", + "nullable": true + }, + "source_id": { + "type": "string", + "nullable": true, + "description": "Unique source ID of an existing order that will be linked to the redemption of this request." + }, + "status": { + "type": "string", + "description": "The order status.", + "enum": [ + "CREATED", + "PAID", + "CANCELED", + "FULFILLED" + ], + "nullable": true + }, + "amount": { + "type": "integer", + "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "initial_amount": { + "type": "integer", + "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "discount_amount": { + "type": "integer", + "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "items_discount_amount": { + "type": "integer", + "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "total_discount_amount": { + "type": "integer", + "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "total_amount": { + "type": "integer", + "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "applied_discount_amount": { + "type": "integer", + "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "items_applied_discount_amount": { + "type": "integer", + "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", + "nullable": true + }, + "total_applied_discount_amount": { + "type": "integer", + "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", + "nullable": true + }, + "metadata": { + "title": "RedemptionsRollbackCreateResponseBodyOrderMetadata", + "type": "object", + "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", + "nullable": true + }, + "object": { + "type": "string", + "description": "The type of the object represented by JSON.", + "default": "order", + "enum": [ + "order" + ], + "nullable": true + }, + "created_at": { + "type": "string", + "example": "2021-12-22T10:13:06.487Z", + "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", + "format": "date-time", + "nullable": true + }, + "updated_at": { + "type": "string", + "nullable": true, + "example": "2021-12-22T10:14:45.316Z", + "format": "date-time", + "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." + }, + "customer_id": { + "type": "string", + "nullable": true, + "description": "Unique customer ID of the customer making the purchase.", + "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" + }, + "referrer_id": { + "type": "string", + "nullable": true, + "description": "Unique referrer ID.", + "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" + }, + "customer": { + "$ref": "#/components/schemas/CustomerId" + }, + "referrer": { + "$ref": "#/components/schemas/ReferrerId" + }, + "redemptions": { + "title": "RedemptionsRollbackCreateResponseBodyOrderRedemptions", + "type": "object", + "nullable": true + }, + "items": { + "title": "RedemptionsRollbackCreateResponseBodyOrderItems", + "type": "array", + "description": "Array of items applied to the order. It can include up to 500 items.", + "items": { + "$ref": "#/components/schemas/OrderCalculatedItem" + }, + "nullable": true + } + } }, "channel": { "title": "RedemptionsRollbackCreateResponseBodyChannel", @@ -23153,9 +24346,23 @@ "parent_rollback": { "$ref": "#/components/schemas/RedemptionRollback" }, - "order": { - "$ref": "#/components/schemas/OrderCalculated" - } + "allOf": [ + { + "$ref": "#/components/schemas/OrderCalculated" + }, + { + "type": "object", + "properties": { + "items": { + "type": "array", + "description": "Array of items applied to the order. It can include up to 500 items.", + "items": { + "$ref": "#/components/schemas/OrderCalculatedItem" + } + } + } + } + ] } }, "ReferralsMembersHoldersCreateInBulkRequestBody": { @@ -26038,7 +27245,173 @@ "nullable": true }, "order": { - "$ref": "#/components/schemas/OrderCalculated" + "title": "ValidationsValidateResponseBodyRedeemablesItemOrder", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", + "nullable": true + }, + "source_id": { + "type": "string", + "nullable": true, + "description": "Unique source ID of an existing order that will be linked to the redemption of this request." + }, + "status": { + "type": "string", + "description": "The order status.", + "enum": [ + "CREATED", + "PAID", + "CANCELED", + "FULFILLED" + ], + "nullable": true + }, + "amount": { + "type": "integer", + "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "initial_amount": { + "type": "integer", + "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "discount_amount": { + "type": "integer", + "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "items_discount_amount": { + "type": "integer", + "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "total_discount_amount": { + "type": "integer", + "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "total_amount": { + "type": "integer", + "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "applied_discount_amount": { + "type": "integer", + "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "items_applied_discount_amount": { + "type": "integer", + "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", + "nullable": true + }, + "total_applied_discount_amount": { + "type": "integer", + "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", + "nullable": true + }, + "metadata": { + "title": "ValidationsValidateResponseBodyRedeemablesItemOrderMetadata", + "type": "object", + "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", + "nullable": true + }, + "object": { + "type": "string", + "description": "The type of the object represented by JSON.", + "default": "order", + "enum": [ + "order" + ], + "nullable": true + }, + "created_at": { + "type": "string", + "example": "2021-12-22T10:13:06.487Z", + "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", + "format": "date-time", + "nullable": true + }, + "updated_at": { + "type": "string", + "nullable": true, + "example": "2021-12-22T10:14:45.316Z", + "format": "date-time", + "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." + }, + "customer_id": { + "type": "string", + "nullable": true, + "description": "Unique customer ID of the customer making the purchase.", + "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" + }, + "referrer_id": { + "type": "string", + "nullable": true, + "description": "Unique referrer ID.", + "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" + }, + "customer": { + "title": "ValidationsValidateResponseBodyRedeemablesItemOrderCustomer", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "A unique identifier of an existing customer.", + "nullable": true + }, + "object": { + "type": "string", + "description": "The type of the object represented by JSON.", + "default": "customer", + "enum": [ + "customer" + ], + "nullable": true + } + }, + "required": [] + }, + "referrer": { + "title": "ValidationsValidateResponseBodyRedeemablesItemOrderReferrer", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "A unique identifier of an existing customer.", + "nullable": true + }, + "object": { + "type": "string", + "description": "The type of the object represented by JSON.", + "default": "customer", + "enum": [ + "customer" + ], + "nullable": true + } + }, + "required": [] + }, + "redemptions": { + "title": "ValidationsValidateResponseBodyRedeemablesItemOrderRedemptions", + "type": "object", + "nullable": true + }, + "items": { + "title": "ValidationsValidateResponseBodyRedeemablesItemOrderItems", + "type": "array", + "description": "Array of items applied to the order. It can include up to 500 items.", + "items": { + "$ref": "#/components/schemas/OrderCalculatedItem" + }, + "nullable": true + } + } }, "applicable_to": { "$ref": "#/components/schemas/ApplicableToResultList" @@ -26261,7 +27634,151 @@ "nullable": true }, "order": { - "$ref": "#/components/schemas/OrderCalculated" + "title": "ValidationsValidateResponseBodyOrder", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", + "nullable": true + }, + "source_id": { + "type": "string", + "nullable": true, + "description": "Unique source ID of an existing order that will be linked to the redemption of this request." + }, + "status": { + "type": "string", + "description": "The order status.", + "enum": [ + "CREATED", + "PAID", + "CANCELED", + "FULFILLED" + ], + "nullable": true + }, + "amount": { + "type": "integer", + "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "initial_amount": { + "type": "integer", + "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "discount_amount": { + "type": "integer", + "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "items_discount_amount": { + "type": "integer", + "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "total_discount_amount": { + "type": "integer", + "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "total_amount": { + "type": "integer", + "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "applied_discount_amount": { + "type": "integer", + "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "items_applied_discount_amount": { + "type": "integer", + "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", + "nullable": true + }, + "total_applied_discount_amount": { + "type": "integer", + "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", + "nullable": true + }, + "metadata": { + "title": "ValidationsValidateResponseBodyOrderMetadata", + "type": "object", + "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", + "nullable": true + }, + "object": { + "type": "string", + "description": "The type of the object represented by JSON.", + "default": "order", + "enum": [ + "order" + ], + "nullable": true + }, + "created_at": { + "type": "string", + "example": "2021-12-22T10:13:06.487Z", + "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", + "format": "date-time", + "nullable": true + }, + "updated_at": { + "type": "string", + "nullable": true, + "example": "2021-12-22T10:14:45.316Z", + "format": "date-time", + "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." + }, + "customer_id": { + "type": "string", + "nullable": true, + "description": "Unique customer ID of the customer making the purchase.", + "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" + }, + "referrer_id": { + "type": "string", + "nullable": true, + "description": "Unique referrer ID.", + "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" + }, + "customer": { + "$ref": "#/components/schemas/CustomerId" + }, + "referrer": { + "$ref": "#/components/schemas/ReferrerId" + }, + "redemptions": { + "title": "ValidationsValidateResponseBodyOrderRedemptions", + "type": "object", + "nullable": true + }, + "items": { + "title": "ValidationsValidateResponseBodyOrderItems", + "type": "array", + "description": "Array of items applied to the order. It can include up to 500 items.", + "items": { + "title": "ValidationsValidateResponseBodyOrderItemsItem", + "allOf": [ + { + "$ref": "#/components/schemas/OrderCalculatedItem" + }, + { + "type": "object", + "properties": { + "application_details": { + "$ref": "#/components/schemas/ApplicationDetails" + } + } + } + ] + }, + "nullable": true + } + }, + "nullable": true }, "tracking_id": { "type": "string", @@ -28652,6 +30169,49 @@ }, "required": [] }, + "ApplicationDetails": { + "title": "ApplicationDetails", + "type": "array", + "description": "Array containing details about the items that are replaced and the items that are replacements for discounts with the `REPLACE_ITEMS` effect.", + "items": { + "title": "ApplicationDetailsItem", + "type": "object", + "description": "Object representing item replacement.", + "properties": { + "source_index": { + "type": "integer", + "description": "Index number of the source item that is replaced. The enumeration starts from `0`, which represents the first item in the request, e.g., if the replaced item is passed as the second in the request, `source_index` equals `3`.", + "minimum": 0 + }, + "source_applied_quantity": { + "type": "integer", + "description": "Number of source units that are replaced.", + "maximum": -1 + }, + "source_applied_quantity_amount": { + "type": "integer", + "description": "Amount equal to the price of the units that are replaced. Determines the change of the amount of the source item quantity.", + "maximum": 0 + }, + "target_index": { + "type": "integer", + "description": "Index number of the target item that is a replacement of the source item. The enumeration continues the values for the order items, e.g. if there are three items in the request, `target_index` equals `3`, as enumeration starts from `0`." + }, + "target_applied_quantity": { + "type": "integer", + "description": "Number of added target units that are replacements." + }, + "target_applied_quantity_amount": { + "type": "integer", + "description": "Amount equal to the price of the units that are replacements. Determines the change in the amount of the target item quantity." + }, + "target_applied_discount_amount": { + "type": "integer", + "description": "Discount amount applied to the target item with regard to the replacement. Equals the `target_applied_quantity_amount` minus `source_applied_quantity_amount`." + } + } + } + }, "AsyncActionBase": { "title": "AsyncActionBase", "type": "object", @@ -33473,7 +35033,7 @@ "items": { "title": "OrderItems", "type": "array", - "description": "Array of items applied to the order. It can include up 500 items.", + "description": "Array of items applied to the order. It can include up to 500 items.", "items": { "$ref": "#/components/schemas/OrderItem" }, @@ -33559,15 +35119,6 @@ "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", "nullable": true }, - "items": { - "title": "OrderCalculatedItems", - "type": "array", - "description": "Array of items applied to the order. It can include up 500 items.", - "items": { - "$ref": "#/components/schemas/OrderCalculatedItem" - }, - "nullable": true - }, "metadata": { "title": "OrderCalculatedMetadata", "type": "object", @@ -35192,7 +36743,176 @@ "nullable": true }, "order": { - "$ref": "#/components/schemas/OrderCalculated" + "title": "RedemptionOrder", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", + "nullable": true + }, + "source_id": { + "type": "string", + "nullable": true, + "description": "Unique source ID of an existing order that will be linked to the redemption of this request." + }, + "status": { + "type": "string", + "description": "The order status.", + "enum": [ + "CREATED", + "PAID", + "CANCELED", + "FULFILLED" + ], + "nullable": true + }, + "amount": { + "type": "integer", + "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "initial_amount": { + "type": "integer", + "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "discount_amount": { + "type": "integer", + "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "items_discount_amount": { + "type": "integer", + "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "total_discount_amount": { + "type": "integer", + "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "total_amount": { + "type": "integer", + "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "applied_discount_amount": { + "type": "integer", + "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "items_applied_discount_amount": { + "type": "integer", + "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", + "nullable": true + }, + "total_applied_discount_amount": { + "type": "integer", + "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", + "nullable": true + }, + "metadata": { + "title": "RedemptionOrderMetadata", + "type": "object", + "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", + "nullable": true + }, + "object": { + "type": "string", + "description": "The type of the object represented by JSON.", + "default": "order", + "enum": [ + "order" + ], + "nullable": true + }, + "created_at": { + "type": "string", + "example": "2021-12-22T10:13:06.487Z", + "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", + "format": "date-time", + "nullable": true + }, + "updated_at": { + "type": "string", + "nullable": true, + "example": "2021-12-22T10:14:45.316Z", + "format": "date-time", + "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." + }, + "customer_id": { + "type": "string", + "nullable": true, + "description": "Unique customer ID of the customer making the purchase.", + "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" + }, + "referrer_id": { + "type": "string", + "nullable": true, + "description": "Unique referrer ID.", + "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" + }, + "customer": { + "title": "RedemptionOrderCustomer", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "A unique identifier of an existing customer.", + "nullable": true + }, + "object": { + "type": "string", + "description": "The type of the object represented by JSON.", + "default": "customer", + "enum": [ + "customer" + ], + "nullable": true + } + }, + "required": [], + "nullable": true + }, + "referrer": { + "title": "RedemptionOrderReferrer", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "A unique identifier of an existing customer.", + "nullable": true + }, + "object": { + "type": "string", + "description": "The type of the object represented by JSON.", + "default": "customer", + "enum": [ + "customer" + ], + "nullable": true + } + }, + "required": [], + "nullable": true + }, + "redemptions": { + "title": "RedemptionOrderRedemptions", + "type": "object", + "nullable": true + }, + "items": { + "title": "RedemptionOrderItems", + "type": "array", + "description": "Array of items applied to the order. It can include up to 500 items.", + "items": { + "$ref": "#/components/schemas/OrderCalculatedItem" + }, + "nullable": true + } + }, + "nullable": true }, "channel": { "title": "RedemptionChannel", @@ -35744,15 +37464,6 @@ "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", "nullable": true }, - "items": { - "title": "RedemptionEntryOrderItems", - "type": "array", - "description": "Array of items applied to the order. It can include up 500 items.", - "items": { - "$ref": "#/components/schemas/OrderCalculatedItem" - }, - "nullable": true - }, "metadata": { "title": "RedemptionEntryOrderMetadata", "type": "object", @@ -35840,6 +37551,15 @@ "title": "RedemptionEntryOrderRedemptions", "type": "object", "nullable": true + }, + "items": { + "title": "RedemptionEntryOrderItems", + "type": "array", + "description": "Array of items applied to the order. It can include up to 500 items.", + "items": { + "$ref": "#/components/schemas/OrderCalculatedItem" + }, + "nullable": true } }, "nullable": true @@ -36724,7 +38444,138 @@ "nullable": true }, "order": { - "$ref": "#/components/schemas/OrderCalculated" + "title": "RedemptionRollbackOrder", + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", + "nullable": true + }, + "source_id": { + "type": "string", + "nullable": true, + "description": "Unique source ID of an existing order that will be linked to the redemption of this request." + }, + "status": { + "type": "string", + "description": "The order status.", + "enum": [ + "CREATED", + "PAID", + "CANCELED", + "FULFILLED" + ], + "nullable": true + }, + "amount": { + "type": "integer", + "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "initial_amount": { + "type": "integer", + "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "discount_amount": { + "type": "integer", + "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "items_discount_amount": { + "type": "integer", + "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "total_discount_amount": { + "type": "integer", + "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "total_amount": { + "type": "integer", + "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "applied_discount_amount": { + "type": "integer", + "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "items_applied_discount_amount": { + "type": "integer", + "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", + "nullable": true + }, + "total_applied_discount_amount": { + "type": "integer", + "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", + "nullable": true + }, + "metadata": { + "title": "RedemptionRollbackOrderMetadata", + "type": "object", + "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", + "nullable": true + }, + "object": { + "type": "string", + "description": "The type of the object represented by JSON.", + "default": "order", + "enum": [ + "order" + ], + "nullable": true + }, + "created_at": { + "type": "string", + "example": "2021-12-22T10:13:06.487Z", + "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", + "format": "date-time", + "nullable": true + }, + "updated_at": { + "type": "string", + "nullable": true, + "example": "2021-12-22T10:14:45.316Z", + "format": "date-time", + "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." + }, + "customer_id": { + "type": "string", + "nullable": true, + "description": "Unique customer ID of the customer making the purchase.", + "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" + }, + "referrer_id": { + "type": "string", + "nullable": true, + "description": "Unique referrer ID.", + "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" + }, + "customer": { + "$ref": "#/components/schemas/CustomerId" + }, + "referrer": { + "$ref": "#/components/schemas/ReferrerId" + }, + "redemptions": { + "title": "RedemptionRollbackOrderRedemptions", + "type": "object", + "nullable": true + }, + "items": { + "title": "RedemptionRollbackOrderItems", + "type": "array", + "description": "Array of items applied to the order. It can include up to 500 items.", + "items": { + "$ref": "#/components/schemas/OrderCalculatedItem" + }, + "nullable": true + } + } }, "channel": { "title": "RedemptionRollbackChannel", @@ -40061,7 +41912,151 @@ "$ref": "#/components/schemas/RedeemableResult" }, "order": { - "$ref": "#/components/schemas/OrderCalculated" + "title": "QualificationsRedeemableOrder", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", + "nullable": true + }, + "source_id": { + "type": "string", + "nullable": true, + "description": "Unique source ID of an existing order that will be linked to the redemption of this request." + }, + "status": { + "type": "string", + "description": "The order status.", + "enum": [ + "CREATED", + "PAID", + "CANCELED", + "FULFILLED" + ], + "nullable": true + }, + "amount": { + "type": "integer", + "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "initial_amount": { + "type": "integer", + "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "discount_amount": { + "type": "integer", + "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "items_discount_amount": { + "type": "integer", + "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "total_discount_amount": { + "type": "integer", + "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "total_amount": { + "type": "integer", + "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "applied_discount_amount": { + "type": "integer", + "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "items_applied_discount_amount": { + "type": "integer", + "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", + "nullable": true + }, + "total_applied_discount_amount": { + "type": "integer", + "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", + "nullable": true + }, + "metadata": { + "title": "QualificationsRedeemableOrderMetadata", + "type": "object", + "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", + "nullable": true + }, + "object": { + "type": "string", + "description": "The type of the object represented by JSON.", + "default": "order", + "enum": [ + "order" + ], + "nullable": true + }, + "created_at": { + "type": "string", + "example": "2021-12-22T10:13:06.487Z", + "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", + "format": "date-time", + "nullable": true + }, + "updated_at": { + "type": "string", + "nullable": true, + "example": "2021-12-22T10:14:45.316Z", + "format": "date-time", + "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." + }, + "customer_id": { + "type": "string", + "nullable": true, + "description": "Unique customer ID of the customer making the purchase.", + "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" + }, + "referrer_id": { + "type": "string", + "nullable": true, + "description": "Unique referrer ID.", + "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" + }, + "customer": { + "$ref": "#/components/schemas/CustomerId" + }, + "referrer": { + "$ref": "#/components/schemas/ReferrerId" + }, + "redemptions": { + "title": "QualificationsRedeemableOrderRedemptions", + "type": "object", + "nullable": true + }, + "items": { + "title": "QualificationsRedeemableOrderItems", + "type": "array", + "description": "Array of items applied to the order. It can include up to 500 items.", + "items": { + "title": "QualificationsRedeemableOrderItemsItem", + "allOf": [ + { + "$ref": "#/components/schemas/OrderCalculatedItem" + }, + { + "type": "object", + "properties": { + "application_details": { + "$ref": "#/components/schemas/ApplicationDetails" + } + } + } + ] + }, + "nullable": true + } + }, + "nullable": true }, "validation_rule_id": { "type": "string", @@ -40846,7 +42841,151 @@ "$ref": "#/components/schemas/RedeemableResult" }, "order": { - "$ref": "#/components/schemas/OrderCalculated" + "title": "QualificationsRedeemableBaseOrder", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", + "nullable": true + }, + "source_id": { + "type": "string", + "nullable": true, + "description": "Unique source ID of an existing order that will be linked to the redemption of this request." + }, + "status": { + "type": "string", + "description": "The order status.", + "enum": [ + "CREATED", + "PAID", + "CANCELED", + "FULFILLED" + ], + "nullable": true + }, + "amount": { + "type": "integer", + "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "initial_amount": { + "type": "integer", + "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "discount_amount": { + "type": "integer", + "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "items_discount_amount": { + "type": "integer", + "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "total_discount_amount": { + "type": "integer", + "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "total_amount": { + "type": "integer", + "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "applied_discount_amount": { + "type": "integer", + "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "items_applied_discount_amount": { + "type": "integer", + "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", + "nullable": true + }, + "total_applied_discount_amount": { + "type": "integer", + "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", + "nullable": true + }, + "metadata": { + "title": "QualificationsRedeemableBaseOrderMetadata", + "type": "object", + "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", + "nullable": true + }, + "object": { + "type": "string", + "description": "The type of the object represented by JSON.", + "default": "order", + "enum": [ + "order" + ], + "nullable": true + }, + "created_at": { + "type": "string", + "example": "2021-12-22T10:13:06.487Z", + "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", + "format": "date-time", + "nullable": true + }, + "updated_at": { + "type": "string", + "nullable": true, + "example": "2021-12-22T10:14:45.316Z", + "format": "date-time", + "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." + }, + "customer_id": { + "type": "string", + "nullable": true, + "description": "Unique customer ID of the customer making the purchase.", + "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" + }, + "referrer_id": { + "type": "string", + "nullable": true, + "description": "Unique referrer ID.", + "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" + }, + "customer": { + "$ref": "#/components/schemas/CustomerId" + }, + "referrer": { + "$ref": "#/components/schemas/ReferrerId" + }, + "redemptions": { + "title": "QualificationsRedeemableBaseOrderRedemptions", + "type": "object", + "nullable": true + }, + "items": { + "title": "QualificationsRedeemableBaseOrderItems", + "type": "array", + "description": "Array of items applied to the order. It can include up to 500 items.", + "items": { + "title": "QualificationsRedeemableBaseOrderItemsItem", + "allOf": [ + { + "$ref": "#/components/schemas/OrderCalculatedItem" + }, + { + "type": "object", + "properties": { + "application_details": { + "$ref": "#/components/schemas/ApplicationDetails" + } + } + } + ] + }, + "nullable": true + } + }, + "nullable": true }, "validation_rule_id": { "type": "string", diff --git a/reference/readonly-sdks/ruby/OpenAPI.json b/reference/readonly-sdks/ruby/OpenAPI.json index 10461e52..3db0181a 100644 --- a/reference/readonly-sdks/ruby/OpenAPI.json +++ b/reference/readonly-sdks/ruby/OpenAPI.json @@ -2475,7 +2475,154 @@ "nullable": true }, "order": { - "$ref": "#/components/schemas/OrderCalculated" + "title": "ClientQualificationsCheckEligibilityResponseBodyOrder", + "type": "object", + "nullable": true, + "properties": { + "id": { + "type": "string", + "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", + "nullable": true + }, + "source_id": { + "type": "string", + "nullable": true, + "description": "Unique source ID of an existing order that will be linked to the redemption of this request." + }, + "status": { + "type": "string", + "description": "The order status.", + "enum": [ + "CREATED", + "PAID", + "CANCELED", + "FULFILLED" + ], + "nullable": true + }, + "amount": { + "type": "integer", + "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "initial_amount": { + "type": "integer", + "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "discount_amount": { + "type": "integer", + "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "items_discount_amount": { + "type": "integer", + "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "total_discount_amount": { + "type": "integer", + "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "total_amount": { + "type": "integer", + "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "applied_discount_amount": { + "type": "integer", + "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "items_applied_discount_amount": { + "type": "integer", + "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", + "nullable": true + }, + "total_applied_discount_amount": { + "type": "integer", + "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", + "nullable": true + }, + "metadata": { + "title": "ClientQualificationsCheckEligibilityResponseBodyOrderMetadata", + "type": "object", + "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", + "nullable": true + }, + "object": { + "type": "string", + "description": "The type of the object represented by JSON.", + "default": "order", + "enum": [ + "order" + ], + "nullable": true + }, + "created_at": { + "type": "string", + "example": "2021-12-22T10:13:06.487Z", + "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", + "format": "date-time", + "nullable": true + }, + "updated_at": { + "type": "string", + "nullable": true, + "example": "2021-12-22T10:14:45.316Z", + "format": "date-time", + "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." + }, + "customer_id": { + "type": "string", + "nullable": true, + "description": "Unique customer ID of the customer making the purchase.", + "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" + }, + "referrer_id": { + "type": "string", + "nullable": true, + "description": "Unique referrer ID.", + "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" + }, + "customer": { + "$ref": "#/components/schemas/CustomerId" + }, + "referrer": { + "$ref": "#/components/schemas/ReferrerId" + }, + "redemptions": { + "title": "ClientQualificationsCheckEligibilityResponseBodyOrderRedemptionsEntry", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/OrderRedemptionsEntry" + }, + "nullable": true + }, + "items": { + "title": "ClientQualificationsCheckEligibilityResponseBodyOrderItems", + "type": "array", + "description": "Array of items applied to the order. It can include up to 500 items.", + "items": { + "title": "ClientQualificationsCheckEligibilityResponseBodyOrderItemsItem", + "allOf": [ + { + "$ref": "#/components/schemas/OrderCalculatedItem" + }, + { + "type": "object", + "properties": { + "application_details": { + "$ref": "#/components/schemas/ApplicationDetails" + } + } + } + ] + }, + "nullable": true + } + } }, "stacking_rules": { "$ref": "#/components/schemas/StackingRules" @@ -2604,7 +2751,155 @@ "$ref": "#/components/schemas/Redemption" }, "order": { - "$ref": "#/components/schemas/OrderCalculated" + "title": "ClientRedemptionsRedeemResponseBodyOrder", + "description": "Contains the order details associated with the redemption.", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", + "nullable": true + }, + "source_id": { + "type": "string", + "nullable": true, + "description": "Unique source ID of an existing order that will be linked to the redemption of this request." + }, + "status": { + "type": "string", + "description": "The order status.", + "enum": [ + "CREATED", + "PAID", + "CANCELED", + "FULFILLED" + ], + "nullable": true + }, + "amount": { + "type": "integer", + "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "initial_amount": { + "type": "integer", + "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "discount_amount": { + "type": "integer", + "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "items_discount_amount": { + "type": "integer", + "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "total_discount_amount": { + "type": "integer", + "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "total_amount": { + "type": "integer", + "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "applied_discount_amount": { + "type": "integer", + "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "items_applied_discount_amount": { + "type": "integer", + "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", + "nullable": true + }, + "total_applied_discount_amount": { + "type": "integer", + "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", + "nullable": true + }, + "metadata": { + "title": "ClientRedemptionsRedeemResponseBodyOrderMetadata", + "type": "object", + "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", + "nullable": true + }, + "object": { + "type": "string", + "description": "The type of the object represented by JSON.", + "default": "order", + "enum": [ + "order" + ], + "nullable": true + }, + "created_at": { + "type": "string", + "example": "2021-12-22T10:13:06.487Z", + "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", + "format": "date-time", + "nullable": true + }, + "updated_at": { + "type": "string", + "nullable": true, + "example": "2021-12-22T10:14:45.316Z", + "format": "date-time", + "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." + }, + "customer_id": { + "type": "string", + "nullable": true, + "description": "Unique customer ID of the customer making the purchase.", + "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" + }, + "referrer_id": { + "type": "string", + "nullable": true, + "description": "Unique referrer ID.", + "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" + }, + "customer": { + "$ref": "#/components/schemas/CustomerId" + }, + "referrer": { + "$ref": "#/components/schemas/ReferrerId" + }, + "redemptions": { + "title": "ClientRedemptionsRedeemResponseBodyOrderRedemptionsEntry", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/OrderRedemptionsEntry" + }, + "nullable": true + }, + "items": { + "title": "ClientRedemptionsRedeemResponseBodyOrderItems", + "type": "array", + "description": "Array of items applied to the order. It can include up to 500 items.", + "items": { + "title": "ClientRedemptionsRedeemResponseBodyOrderItemsItem", + "allOf": [ + { + "$ref": "#/components/schemas/OrderCalculatedItem" + }, + { + "type": "object", + "properties": { + "application_details": { + "$ref": "#/components/schemas/ApplicationDetails" + } + } + } + ] + }, + "nullable": true + } + }, + "nullable": true }, "inapplicable_redeemables": { "title": "ClientRedemptionsRedeemResponseBodyInapplicableRedeemables", @@ -2770,7 +3065,176 @@ "nullable": true }, "order": { - "$ref": "#/components/schemas/OrderCalculated" + "title": "ClientValidationsValidateResponseBodyRedeemablesItemOrder", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", + "nullable": true + }, + "source_id": { + "type": "string", + "nullable": true, + "description": "Unique source ID of an existing order that will be linked to the redemption of this request." + }, + "status": { + "type": "string", + "description": "The order status.", + "enum": [ + "CREATED", + "PAID", + "CANCELED", + "FULFILLED" + ], + "nullable": true + }, + "amount": { + "type": "integer", + "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "initial_amount": { + "type": "integer", + "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "discount_amount": { + "type": "integer", + "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "items_discount_amount": { + "type": "integer", + "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "total_discount_amount": { + "type": "integer", + "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "total_amount": { + "type": "integer", + "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "applied_discount_amount": { + "type": "integer", + "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "items_applied_discount_amount": { + "type": "integer", + "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", + "nullable": true + }, + "total_applied_discount_amount": { + "type": "integer", + "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", + "nullable": true + }, + "metadata": { + "title": "ClientValidationsValidateResponseBodyRedeemablesItemOrderMetadata", + "type": "object", + "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", + "nullable": true + }, + "object": { + "type": "string", + "description": "The type of the object represented by JSON.", + "default": "order", + "enum": [ + "order" + ], + "nullable": true + }, + "created_at": { + "type": "string", + "example": "2021-12-22T10:13:06.487Z", + "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", + "format": "date-time", + "nullable": true + }, + "updated_at": { + "type": "string", + "nullable": true, + "example": "2021-12-22T10:14:45.316Z", + "format": "date-time", + "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." + }, + "customer_id": { + "type": "string", + "nullable": true, + "description": "Unique customer ID of the customer making the purchase.", + "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" + }, + "referrer_id": { + "type": "string", + "nullable": true, + "description": "Unique referrer ID.", + "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" + }, + "customer": { + "title": "ClientValidationsValidateResponseBodyRedeemablesItemOrderCustomer", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "A unique identifier of an existing customer.", + "nullable": true + }, + "object": { + "type": "string", + "description": "The type of the object represented by JSON.", + "default": "customer", + "enum": [ + "customer" + ], + "nullable": true + } + }, + "required": [] + }, + "referrer": { + "title": "ClientValidationsValidateResponseBodyRedeemablesItemOrderReferrer", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "A unique identifier of an existing customer.", + "nullable": true + }, + "object": { + "type": "string", + "description": "The type of the object represented by JSON.", + "default": "customer", + "enum": [ + "customer" + ], + "nullable": true + } + }, + "required": [] + }, + "redemptions": { + "title": "ClientValidationsValidateResponseBodyRedeemablesItemOrderRedemptionsEntry", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/OrderRedemptionsEntry" + }, + "nullable": true + }, + "items": { + "title": "ClientValidationsValidateResponseBodyRedeemablesItemOrderItems", + "type": "array", + "description": "Array of items applied to the order. It can include up to 500 items.", + "items": { + "$ref": "#/components/schemas/OrderCalculatedItem" + }, + "nullable": true + } + } }, "applicable_to": { "$ref": "#/components/schemas/ApplicableToResultList" @@ -2993,7 +3457,154 @@ "nullable": true }, "order": { - "$ref": "#/components/schemas/OrderCalculated" + "title": "ClientValidationsValidateResponseBodyOrder", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", + "nullable": true + }, + "source_id": { + "type": "string", + "nullable": true, + "description": "Unique source ID of an existing order that will be linked to the redemption of this request." + }, + "status": { + "type": "string", + "description": "The order status.", + "enum": [ + "CREATED", + "PAID", + "CANCELED", + "FULFILLED" + ], + "nullable": true + }, + "amount": { + "type": "integer", + "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "initial_amount": { + "type": "integer", + "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "discount_amount": { + "type": "integer", + "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "items_discount_amount": { + "type": "integer", + "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "total_discount_amount": { + "type": "integer", + "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "total_amount": { + "type": "integer", + "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "applied_discount_amount": { + "type": "integer", + "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "items_applied_discount_amount": { + "type": "integer", + "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", + "nullable": true + }, + "total_applied_discount_amount": { + "type": "integer", + "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", + "nullable": true + }, + "metadata": { + "title": "ClientValidationsValidateResponseBodyOrderMetadata", + "type": "object", + "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", + "nullable": true + }, + "object": { + "type": "string", + "description": "The type of the object represented by JSON.", + "default": "order", + "enum": [ + "order" + ], + "nullable": true + }, + "created_at": { + "type": "string", + "example": "2021-12-22T10:13:06.487Z", + "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", + "format": "date-time", + "nullable": true + }, + "updated_at": { + "type": "string", + "nullable": true, + "example": "2021-12-22T10:14:45.316Z", + "format": "date-time", + "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." + }, + "customer_id": { + "type": "string", + "nullable": true, + "description": "Unique customer ID of the customer making the purchase.", + "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" + }, + "referrer_id": { + "type": "string", + "nullable": true, + "description": "Unique referrer ID.", + "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" + }, + "customer": { + "$ref": "#/components/schemas/CustomerId" + }, + "referrer": { + "$ref": "#/components/schemas/ReferrerId" + }, + "redemptions": { + "title": "ClientValidationsValidateResponseBodyOrderRedemptionsEntry", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/OrderRedemptionsEntry" + }, + "nullable": true + }, + "items": { + "title": "ClientValidationsValidateResponseBodyOrderItems", + "type": "array", + "description": "Array of items applied to the order. It can include up to 500 items.", + "items": { + "title": "ClientValidationsValidateResponseBodyOrderItemsItem", + "allOf": [ + { + "$ref": "#/components/schemas/OrderCalculatedItem" + }, + { + "type": "object", + "properties": { + "application_details": { + "$ref": "#/components/schemas/ApplicationDetails" + } + } + } + ] + }, + "nullable": true + } + }, + "nullable": true }, "tracking_id": { "type": "string", @@ -9416,7 +10027,179 @@ "nullable": true }, "order": { - "$ref": "#/components/schemas/OrderCalculated" + "title": "LoyaltiesMembersRedemptionRedeemResponseBodyOrder", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", + "nullable": true + }, + "source_id": { + "type": "string", + "nullable": true, + "description": "Unique source ID of an existing order that will be linked to the redemption of this request." + }, + "status": { + "type": "string", + "description": "The order status.", + "enum": [ + "CREATED", + "PAID", + "CANCELED", + "FULFILLED" + ], + "nullable": true + }, + "amount": { + "type": "integer", + "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "initial_amount": { + "type": "integer", + "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "discount_amount": { + "type": "integer", + "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "items_discount_amount": { + "type": "integer", + "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "total_discount_amount": { + "type": "integer", + "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "total_amount": { + "type": "integer", + "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "applied_discount_amount": { + "type": "integer", + "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "items_applied_discount_amount": { + "type": "integer", + "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", + "nullable": true + }, + "total_applied_discount_amount": { + "type": "integer", + "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", + "nullable": true + }, + "metadata": { + "title": "LoyaltiesMembersRedemptionRedeemResponseBodyOrderMetadata", + "type": "object", + "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", + "nullable": true + }, + "object": { + "type": "string", + "description": "The type of the object represented by JSON.", + "default": "order", + "enum": [ + "order" + ], + "nullable": true + }, + "created_at": { + "type": "string", + "example": "2021-12-22T10:13:06.487Z", + "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", + "format": "date-time", + "nullable": true + }, + "updated_at": { + "type": "string", + "nullable": true, + "example": "2021-12-22T10:14:45.316Z", + "format": "date-time", + "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." + }, + "customer_id": { + "type": "string", + "nullable": true, + "description": "Unique customer ID of the customer making the purchase.", + "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" + }, + "referrer_id": { + "type": "string", + "nullable": true, + "description": "Unique referrer ID.", + "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" + }, + "customer": { + "title": "LoyaltiesMembersRedemptionRedeemResponseBodyOrderCustomer", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "A unique identifier of an existing customer.", + "nullable": true + }, + "object": { + "type": "string", + "description": "The type of the object represented by JSON.", + "default": "customer", + "enum": [ + "customer" + ], + "nullable": true + } + }, + "required": [], + "nullable": true + }, + "referrer": { + "title": "LoyaltiesMembersRedemptionRedeemResponseBodyOrderReferrer", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "A unique identifier of an existing customer.", + "nullable": true + }, + "object": { + "type": "string", + "description": "The type of the object represented by JSON.", + "default": "customer", + "enum": [ + "customer" + ], + "nullable": true + } + }, + "required": [], + "nullable": true + }, + "redemptions": { + "title": "LoyaltiesMembersRedemptionRedeemResponseBodyOrderRedemptionsEntry", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/OrderRedemptionsEntry" + }, + "nullable": true + }, + "items": { + "title": "LoyaltiesMembersRedemptionRedeemResponseBodyOrderItems", + "type": "array", + "description": "Array of items applied to the order. It can include up to 500 items.", + "items": { + "$ref": "#/components/schemas/OrderCalculatedItem" + }, + "nullable": true + } + }, + "nullable": true }, "channel": { "title": "LoyaltiesMembersRedemptionRedeemResponseBodyChannel", @@ -15723,7 +16506,7 @@ "items": { "title": "OrdersCreateRequestBodyItems", "type": "array", - "description": "Array of items applied to the order. It can include up 500 items.", + "description": "Array of items applied to the order. It can include up to 500 items.", "items": { "$ref": "#/components/schemas/OrderItem" }, @@ -15827,15 +16610,6 @@ "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", "nullable": true }, - "items": { - "title": "OrdersCreateResponseBodyItems", - "type": "array", - "description": "Array of items applied to the order. It can include up 500 items.", - "items": { - "$ref": "#/components/schemas/OrderCalculatedItem" - }, - "nullable": true - }, "metadata": { "title": "OrdersCreateResponseBodyMetadata", "type": "object", @@ -15890,6 +16664,15 @@ "$ref": "#/components/schemas/OrderRedemptionsEntry" }, "nullable": true + }, + "items": { + "title": "OrdersCreateResponseBodyItems", + "type": "array", + "description": "Array of items applied to the order. It can include up to 500 items.", + "items": { + "$ref": "#/components/schemas/OrderCalculatedItem" + }, + "nullable": true } }, "description": "Response body schema for **POST** `v1/orders`." @@ -16078,15 +16861,6 @@ "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", "nullable": true }, - "items": { - "title": "OrdersGetResponseBodyItems", - "type": "array", - "description": "Array of items applied to the order. It can include up 500 items.", - "items": { - "$ref": "#/components/schemas/OrderCalculatedItem" - }, - "nullable": true - }, "metadata": { "title": "OrdersGetResponseBodyMetadata", "type": "object", @@ -16141,6 +16915,15 @@ "$ref": "#/components/schemas/OrderRedemptionsEntry" }, "nullable": true + }, + "items": { + "title": "OrdersGetResponseBodyItems", + "type": "array", + "description": "Array of items applied to the order. It can include up to 500 items.", + "items": { + "$ref": "#/components/schemas/OrderCalculatedItem" + }, + "nullable": true } }, "description": "Response body schema for **GET** `v1/orders/{orderId}`." @@ -16225,7 +17008,25 @@ "type": "array", "description": "Contains array of order objects.", "items": { - "$ref": "#/components/schemas/OrderCalculated" + "title": "OrdersListResponseBodyOrdersItem", + "allOf": [ + { + "$ref": "#/components/schemas/OrderCalculated" + }, + { + "type": "object", + "properties": { + "items": { + "title": "OrdersListResponseBodyOrdersItemItems", + "type": "array", + "description": "Array of items applied to the order. It can include up to 500 items.", + "items": { + "$ref": "#/components/schemas/OrderCalculatedItem" + } + } + } + } + ] }, "nullable": true }, @@ -16275,7 +17076,7 @@ "items": { "title": "OrdersUpdateRequestBodyItems", "type": "array", - "description": "Array of items applied to the order. It can include up 500 items.", + "description": "Array of items applied to the order. It can include up to 500 items.", "items": { "$ref": "#/components/schemas/OrderItem" }, @@ -16379,15 +17180,6 @@ "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", "nullable": true }, - "items": { - "title": "OrdersUpdateResponseBodyItems", - "type": "array", - "description": "Array of items applied to the order. It can include up 500 items.", - "items": { - "$ref": "#/components/schemas/OrderCalculatedItem" - }, - "nullable": true - }, "metadata": { "title": "OrdersUpdateResponseBodyMetadata", "type": "object", @@ -16442,6 +17234,15 @@ "$ref": "#/components/schemas/OrderRedemptionsEntry" }, "nullable": true + }, + "items": { + "title": "OrdersUpdateResponseBodyItems", + "type": "array", + "description": "Array of items applied to the order. It can include up to 500 items.", + "items": { + "$ref": "#/components/schemas/OrderCalculatedItem" + }, + "nullable": true } }, "description": "Response body schema for **PUT** `v1/orders/{orderId}`." @@ -21161,145 +21962,9 @@ "nullable": true }, "order": { - "$ref": "#/components/schemas/OrderCalculated" - }, - "stacking_rules": { - "$ref": "#/components/schemas/StackingRules" - } - } - }, - "RedemptionsGetResponseBody": { - "title": "RedemptionsGetResponseBody", - "type": "object", - "properties": { - "id": { - "type": "string", - "nullable": true - }, - "object": { - "type": "string", - "enum": [ - "redemption", - "redemption_rollback" - ], - "nullable": true - }, - "date": { - "type": "string", - "example": "2021-12-22T10:13:06.487Z", - "description": "Timestamp representing the date and time when the object was created. The value is shown in the ISO 8601 format.", - "format": "date-time", - "nullable": true - }, - "customer_id": { - "type": "string", - "nullable": true, - "example": "cust_i8t5Tt6eiKG5K79KQlJ0Vs64", - "description": "Unique customer ID of the redeeming customer." - }, - "tracking_id": { - "type": "string", - "nullable": true, - "description": "Hashed customer source ID." - }, - "metadata": { - "title": "RedemptionsGetResponseBodyMetadata", + "title": "QualificationsCheckEligibilityResponseBodyOrder", "type": "object", "nullable": true, - "description": "The metadata object stores all custom attributes assigned to the redemption." - }, - "amount": { - "type": "integer", - "nullable": true, - "description": "For gift cards, this is a positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the number of redeemed credits.\nFor loyalty cards, this is the number of loyalty points used in the transaction. and For gift cards, this represents the number of the credits restored to the card in the rolledback redemption. The number is a negative integer in the smallest currency unit, e.g. -100 cents for $1.00 added back to the card.\nFor loyalty cards, this represents the number of loyalty points restored to the card in the rolledback redemption. The number is a negative integer." - }, - "redemption": { - "nullable": true, - "type": "string", - "description": "Unique redemption ID of the parent redemption.", - "example": "r_0c656311b5878a2031" - }, - "result": { - "type": "string", - "enum": [ - "SUCCESS", - "FAILURE" - ], - "description": "Redemption result.", - "nullable": true - }, - "status": { - "type": "string", - "enum": [ - "SUCCEEDED", - "FAILED", - "ROLLED_BACK" - ], - "nullable": true - }, - "related_redemptions": { - "title": "RedemptionsGetResponseBodyRelatedRedemptions", - "type": "object", - "properties": { - "rollbacks": { - "title": "RedemptionsGetResponseBodyRelatedRedemptionsRollbacks", - "type": "array", - "items": { - "title": "RedemptionsGetResponseBodyRelatedRedemptionsRollbacksItem", - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "date": { - "type": "string", - "example": "2021-12-22T10:13:06.487Z", - "description": "Timestamp representing the date and time when the object was created. The value is shown in the ISO 8601 format.", - "format": "date-time" - } - } - }, - "nullable": true - }, - "redemptions": { - "title": "RedemptionsGetResponseBodyRelatedRedemptionsRedemptions", - "type": "array", - "items": { - "title": "RedemptionsGetResponseBodyRelatedRedemptionsRedemptionsItem", - "type": "object", - "properties": { - "id": { - "type": "string", - "example": "r_0bc92f81a6801f9bca", - "description": "Unique redemption ID." - }, - "date": { - "type": "string", - "example": "2021-12-22T10:13:06.487Z", - "description": "Timestamp representing the date and time when the object was created. The value is shown in the ISO 8601 format.", - "format": "date-time" - } - } - }, - "nullable": true - } - }, - "nullable": true - }, - "failure_code": { - "type": "string", - "example": "customer_rules_violated", - "description": "If the result is `FAILURE`, this parameter will provide a generic reason as to why the redemption failed.", - "nullable": true - }, - "failure_message": { - "type": "string", - "description": "If the result is `FAILURE`, this parameter will provide a more expanded reason as to why the redemption failed.", - "nullable": true - }, - "order": { - "title": "RedemptionsGetResponseBodyOrder", - "type": "object", "properties": { "id": { "type": "string", @@ -21367,14 +22032,275 @@ "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", "nullable": true }, + "metadata": { + "title": "QualificationsCheckEligibilityResponseBodyOrderMetadata", + "type": "object", + "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", + "nullable": true + }, + "object": { + "type": "string", + "description": "The type of the object represented by JSON.", + "default": "order", + "enum": [ + "order" + ], + "nullable": true + }, + "created_at": { + "type": "string", + "example": "2021-12-22T10:13:06.487Z", + "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", + "format": "date-time", + "nullable": true + }, + "updated_at": { + "type": "string", + "nullable": true, + "example": "2021-12-22T10:14:45.316Z", + "format": "date-time", + "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." + }, + "customer_id": { + "type": "string", + "nullable": true, + "description": "Unique customer ID of the customer making the purchase.", + "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" + }, + "referrer_id": { + "type": "string", + "nullable": true, + "description": "Unique referrer ID.", + "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" + }, + "customer": { + "$ref": "#/components/schemas/CustomerId" + }, + "referrer": { + "$ref": "#/components/schemas/ReferrerId" + }, + "redemptions": { + "title": "QualificationsCheckEligibilityResponseBodyOrderRedemptionsEntry", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/OrderRedemptionsEntry" + }, + "nullable": true + }, "items": { - "title": "RedemptionsGetResponseBodyOrderItems", + "title": "QualificationsCheckEligibilityResponseBodyOrderItems", "type": "array", - "description": "Array of items applied to the order. It can include up 500 items.", + "description": "Array of items applied to the order. It can include up to 500 items.", "items": { "$ref": "#/components/schemas/OrderCalculatedItem" }, "nullable": true + } + } + }, + "stacking_rules": { + "$ref": "#/components/schemas/StackingRules" + } + } + }, + "RedemptionsGetResponseBody": { + "title": "RedemptionsGetResponseBody", + "type": "object", + "properties": { + "id": { + "type": "string", + "nullable": true + }, + "object": { + "type": "string", + "enum": [ + "redemption", + "redemption_rollback" + ], + "nullable": true + }, + "date": { + "type": "string", + "example": "2021-12-22T10:13:06.487Z", + "description": "Timestamp representing the date and time when the object was created. The value is shown in the ISO 8601 format.", + "format": "date-time", + "nullable": true + }, + "customer_id": { + "type": "string", + "nullable": true, + "example": "cust_i8t5Tt6eiKG5K79KQlJ0Vs64", + "description": "Unique customer ID of the redeeming customer." + }, + "tracking_id": { + "type": "string", + "nullable": true, + "description": "Hashed customer source ID." + }, + "metadata": { + "title": "RedemptionsGetResponseBodyMetadata", + "type": "object", + "nullable": true, + "description": "The metadata object stores all custom attributes assigned to the redemption." + }, + "amount": { + "type": "integer", + "nullable": true, + "description": "For gift cards, this is a positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the number of redeemed credits.\nFor loyalty cards, this is the number of loyalty points used in the transaction. and For gift cards, this represents the number of the credits restored to the card in the rolledback redemption. The number is a negative integer in the smallest currency unit, e.g. -100 cents for $1.00 added back to the card.\nFor loyalty cards, this represents the number of loyalty points restored to the card in the rolledback redemption. The number is a negative integer." + }, + "redemption": { + "nullable": true, + "type": "string", + "description": "Unique redemption ID of the parent redemption.", + "example": "r_0c656311b5878a2031" + }, + "result": { + "type": "string", + "enum": [ + "SUCCESS", + "FAILURE" + ], + "description": "Redemption result.", + "nullable": true + }, + "status": { + "type": "string", + "enum": [ + "SUCCEEDED", + "FAILED", + "ROLLED_BACK" + ], + "nullable": true + }, + "related_redemptions": { + "title": "RedemptionsGetResponseBodyRelatedRedemptions", + "type": "object", + "properties": { + "rollbacks": { + "title": "RedemptionsGetResponseBodyRelatedRedemptionsRollbacks", + "type": "array", + "items": { + "title": "RedemptionsGetResponseBodyRelatedRedemptionsRollbacksItem", + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "date": { + "type": "string", + "example": "2021-12-22T10:13:06.487Z", + "description": "Timestamp representing the date and time when the object was created. The value is shown in the ISO 8601 format.", + "format": "date-time" + } + } + }, + "nullable": true + }, + "redemptions": { + "title": "RedemptionsGetResponseBodyRelatedRedemptionsRedemptions", + "type": "array", + "items": { + "title": "RedemptionsGetResponseBodyRelatedRedemptionsRedemptionsItem", + "type": "object", + "properties": { + "id": { + "type": "string", + "example": "r_0bc92f81a6801f9bca", + "description": "Unique redemption ID." + }, + "date": { + "type": "string", + "example": "2021-12-22T10:13:06.487Z", + "description": "Timestamp representing the date and time when the object was created. The value is shown in the ISO 8601 format.", + "format": "date-time" + } + } + }, + "nullable": true + } + }, + "nullable": true + }, + "failure_code": { + "type": "string", + "example": "customer_rules_violated", + "description": "If the result is `FAILURE`, this parameter will provide a generic reason as to why the redemption failed.", + "nullable": true + }, + "failure_message": { + "type": "string", + "description": "If the result is `FAILURE`, this parameter will provide a more expanded reason as to why the redemption failed.", + "nullable": true + }, + "order": { + "title": "RedemptionsGetResponseBodyOrder", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", + "nullable": true + }, + "source_id": { + "type": "string", + "nullable": true, + "description": "Unique source ID of an existing order that will be linked to the redemption of this request." + }, + "status": { + "type": "string", + "description": "The order status.", + "enum": [ + "CREATED", + "PAID", + "CANCELED", + "FULFILLED" + ], + "nullable": true + }, + "amount": { + "type": "integer", + "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "initial_amount": { + "type": "integer", + "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "discount_amount": { + "type": "integer", + "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "items_discount_amount": { + "type": "integer", + "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "total_discount_amount": { + "type": "integer", + "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "total_amount": { + "type": "integer", + "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "applied_discount_amount": { + "type": "integer", + "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "items_applied_discount_amount": { + "type": "integer", + "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", + "nullable": true + }, + "total_applied_discount_amount": { + "type": "integer", + "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", + "nullable": true }, "metadata": { "title": "RedemptionsGetResponseBodyOrderMetadata", @@ -21466,6 +22392,15 @@ "$ref": "#/components/schemas/OrderRedemptionsEntry" }, "nullable": true + }, + "items": { + "title": "RedemptionsGetResponseBodyOrderItems", + "type": "array", + "description": "Array of items applied to the order. It can include up to 500 items.", + "items": { + "$ref": "#/components/schemas/OrderCalculatedItem" + }, + "nullable": true } }, "nullable": true @@ -22269,15 +23204,6 @@ "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", "nullable": true }, - "items": { - "title": "RedemptionsListResponseBodyRedemptionsItemOrderItems", - "type": "array", - "description": "Array of items applied to the order. It can include up 500 items.", - "items": { - "$ref": "#/components/schemas/OrderCalculatedItem" - }, - "nullable": true - }, "metadata": { "title": "RedemptionsListResponseBodyRedemptionsItemOrderMetadata", "type": "object", @@ -22366,6 +23292,15 @@ "$ref": "#/components/schemas/OrderRedemptionsEntry" }, "nullable": true + }, + "items": { + "title": "RedemptionsListResponseBodyRedemptionsItemOrderItems", + "type": "array", + "description": "Array of items applied to the order. It can include up to 500 items.", + "items": { + "$ref": "#/components/schemas/OrderCalculatedItem" + }, + "nullable": true } } }, @@ -23067,7 +24002,155 @@ "$ref": "#/components/schemas/Redemption" }, "order": { - "$ref": "#/components/schemas/OrderCalculated" + "title": "RedemptionsRedeemResponseBodyOrder", + "description": "Contains the order details associated with the redemption.", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", + "nullable": true + }, + "source_id": { + "type": "string", + "nullable": true, + "description": "Unique source ID of an existing order that will be linked to the redemption of this request." + }, + "status": { + "type": "string", + "description": "The order status.", + "enum": [ + "CREATED", + "PAID", + "CANCELED", + "FULFILLED" + ], + "nullable": true + }, + "amount": { + "type": "integer", + "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "initial_amount": { + "type": "integer", + "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "discount_amount": { + "type": "integer", + "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "items_discount_amount": { + "type": "integer", + "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "total_discount_amount": { + "type": "integer", + "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "total_amount": { + "type": "integer", + "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "applied_discount_amount": { + "type": "integer", + "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "items_applied_discount_amount": { + "type": "integer", + "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", + "nullable": true + }, + "total_applied_discount_amount": { + "type": "integer", + "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", + "nullable": true + }, + "metadata": { + "title": "RedemptionsRedeemResponseBodyOrderMetadata", + "type": "object", + "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", + "nullable": true + }, + "object": { + "type": "string", + "description": "The type of the object represented by JSON.", + "default": "order", + "enum": [ + "order" + ], + "nullable": true + }, + "created_at": { + "type": "string", + "example": "2021-12-22T10:13:06.487Z", + "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", + "format": "date-time", + "nullable": true + }, + "updated_at": { + "type": "string", + "nullable": true, + "example": "2021-12-22T10:14:45.316Z", + "format": "date-time", + "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." + }, + "customer_id": { + "type": "string", + "nullable": true, + "description": "Unique customer ID of the customer making the purchase.", + "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" + }, + "referrer_id": { + "type": "string", + "nullable": true, + "description": "Unique referrer ID.", + "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" + }, + "customer": { + "$ref": "#/components/schemas/CustomerId" + }, + "referrer": { + "$ref": "#/components/schemas/ReferrerId" + }, + "redemptions": { + "title": "RedemptionsRedeemResponseBodyOrderRedemptionsEntry", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/OrderRedemptionsEntry" + }, + "nullable": true + }, + "items": { + "title": "RedemptionsRedeemResponseBodyOrderItems", + "type": "array", + "description": "Array of items applied to the order. It can include up to 500 items.", + "items": { + "title": "RedemptionsRedeemResponseBodyOrderItemsItem", + "allOf": [ + { + "$ref": "#/components/schemas/OrderCalculatedItem" + }, + { + "type": "object", + "properties": { + "application_details": { + "$ref": "#/components/schemas/ApplicationDetails" + } + } + } + ] + }, + "nullable": true + } + }, + "nullable": true }, "inapplicable_redeemables": { "title": "RedemptionsRedeemResponseBodyInapplicableRedeemables", @@ -23259,7 +24342,141 @@ "nullable": true }, "order": { - "$ref": "#/components/schemas/OrderCalculated" + "title": "RedemptionsRollbackCreateResponseBodyOrder", + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", + "nullable": true + }, + "source_id": { + "type": "string", + "nullable": true, + "description": "Unique source ID of an existing order that will be linked to the redemption of this request." + }, + "status": { + "type": "string", + "description": "The order status.", + "enum": [ + "CREATED", + "PAID", + "CANCELED", + "FULFILLED" + ], + "nullable": true + }, + "amount": { + "type": "integer", + "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "initial_amount": { + "type": "integer", + "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "discount_amount": { + "type": "integer", + "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "items_discount_amount": { + "type": "integer", + "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "total_discount_amount": { + "type": "integer", + "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "total_amount": { + "type": "integer", + "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "applied_discount_amount": { + "type": "integer", + "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "items_applied_discount_amount": { + "type": "integer", + "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", + "nullable": true + }, + "total_applied_discount_amount": { + "type": "integer", + "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", + "nullable": true + }, + "metadata": { + "title": "RedemptionsRollbackCreateResponseBodyOrderMetadata", + "type": "object", + "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", + "nullable": true + }, + "object": { + "type": "string", + "description": "The type of the object represented by JSON.", + "default": "order", + "enum": [ + "order" + ], + "nullable": true + }, + "created_at": { + "type": "string", + "example": "2021-12-22T10:13:06.487Z", + "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", + "format": "date-time", + "nullable": true + }, + "updated_at": { + "type": "string", + "nullable": true, + "example": "2021-12-22T10:14:45.316Z", + "format": "date-time", + "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." + }, + "customer_id": { + "type": "string", + "nullable": true, + "description": "Unique customer ID of the customer making the purchase.", + "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" + }, + "referrer_id": { + "type": "string", + "nullable": true, + "description": "Unique referrer ID.", + "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" + }, + "customer": { + "$ref": "#/components/schemas/CustomerId" + }, + "referrer": { + "$ref": "#/components/schemas/ReferrerId" + }, + "redemptions": { + "title": "RedemptionsRollbackCreateResponseBodyOrderRedemptionsEntry", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/OrderRedemptionsEntry" + }, + "nullable": true + }, + "items": { + "title": "RedemptionsRollbackCreateResponseBodyOrderItems", + "type": "array", + "description": "Array of items applied to the order. It can include up to 500 items.", + "items": { + "$ref": "#/components/schemas/OrderCalculatedItem" + }, + "nullable": true + } + } }, "channel": { "title": "RedemptionsRollbackCreateResponseBodyChannel", @@ -23387,9 +24604,23 @@ "parent_rollback": { "$ref": "#/components/schemas/RedemptionRollback" }, - "order": { - "$ref": "#/components/schemas/OrderCalculated" - } + "allOf": [ + { + "$ref": "#/components/schemas/OrderCalculated" + }, + { + "type": "object", + "properties": { + "items": { + "type": "array", + "description": "Array of items applied to the order. It can include up to 500 items.", + "items": { + "$ref": "#/components/schemas/OrderCalculatedItem" + } + } + } + } + ] } }, "ReferralsMembersHoldersCreateInBulkRequestBody": { @@ -26272,7 +27503,176 @@ "nullable": true }, "order": { - "$ref": "#/components/schemas/OrderCalculated" + "title": "ValidationsValidateResponseBodyRedeemablesItemOrder", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", + "nullable": true + }, + "source_id": { + "type": "string", + "nullable": true, + "description": "Unique source ID of an existing order that will be linked to the redemption of this request." + }, + "status": { + "type": "string", + "description": "The order status.", + "enum": [ + "CREATED", + "PAID", + "CANCELED", + "FULFILLED" + ], + "nullable": true + }, + "amount": { + "type": "integer", + "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "initial_amount": { + "type": "integer", + "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "discount_amount": { + "type": "integer", + "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "items_discount_amount": { + "type": "integer", + "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "total_discount_amount": { + "type": "integer", + "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "total_amount": { + "type": "integer", + "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "applied_discount_amount": { + "type": "integer", + "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "items_applied_discount_amount": { + "type": "integer", + "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", + "nullable": true + }, + "total_applied_discount_amount": { + "type": "integer", + "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", + "nullable": true + }, + "metadata": { + "title": "ValidationsValidateResponseBodyRedeemablesItemOrderMetadata", + "type": "object", + "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", + "nullable": true + }, + "object": { + "type": "string", + "description": "The type of the object represented by JSON.", + "default": "order", + "enum": [ + "order" + ], + "nullable": true + }, + "created_at": { + "type": "string", + "example": "2021-12-22T10:13:06.487Z", + "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", + "format": "date-time", + "nullable": true + }, + "updated_at": { + "type": "string", + "nullable": true, + "example": "2021-12-22T10:14:45.316Z", + "format": "date-time", + "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." + }, + "customer_id": { + "type": "string", + "nullable": true, + "description": "Unique customer ID of the customer making the purchase.", + "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" + }, + "referrer_id": { + "type": "string", + "nullable": true, + "description": "Unique referrer ID.", + "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" + }, + "customer": { + "title": "ValidationsValidateResponseBodyRedeemablesItemOrderCustomer", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "A unique identifier of an existing customer.", + "nullable": true + }, + "object": { + "type": "string", + "description": "The type of the object represented by JSON.", + "default": "customer", + "enum": [ + "customer" + ], + "nullable": true + } + }, + "required": [] + }, + "referrer": { + "title": "ValidationsValidateResponseBodyRedeemablesItemOrderReferrer", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "A unique identifier of an existing customer.", + "nullable": true + }, + "object": { + "type": "string", + "description": "The type of the object represented by JSON.", + "default": "customer", + "enum": [ + "customer" + ], + "nullable": true + } + }, + "required": [] + }, + "redemptions": { + "title": "ValidationsValidateResponseBodyRedeemablesItemOrderRedemptionsEntry", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/OrderRedemptionsEntry" + }, + "nullable": true + }, + "items": { + "title": "ValidationsValidateResponseBodyRedeemablesItemOrderItems", + "type": "array", + "description": "Array of items applied to the order. It can include up to 500 items.", + "items": { + "$ref": "#/components/schemas/OrderCalculatedItem" + }, + "nullable": true + } + } }, "applicable_to": { "$ref": "#/components/schemas/ApplicableToResultList" @@ -26495,7 +27895,154 @@ "nullable": true }, "order": { - "$ref": "#/components/schemas/OrderCalculated" + "title": "ValidationsValidateResponseBodyOrder", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", + "nullable": true + }, + "source_id": { + "type": "string", + "nullable": true, + "description": "Unique source ID of an existing order that will be linked to the redemption of this request." + }, + "status": { + "type": "string", + "description": "The order status.", + "enum": [ + "CREATED", + "PAID", + "CANCELED", + "FULFILLED" + ], + "nullable": true + }, + "amount": { + "type": "integer", + "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "initial_amount": { + "type": "integer", + "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "discount_amount": { + "type": "integer", + "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "items_discount_amount": { + "type": "integer", + "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "total_discount_amount": { + "type": "integer", + "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "total_amount": { + "type": "integer", + "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "applied_discount_amount": { + "type": "integer", + "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "items_applied_discount_amount": { + "type": "integer", + "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", + "nullable": true + }, + "total_applied_discount_amount": { + "type": "integer", + "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", + "nullable": true + }, + "metadata": { + "title": "ValidationsValidateResponseBodyOrderMetadata", + "type": "object", + "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", + "nullable": true + }, + "object": { + "type": "string", + "description": "The type of the object represented by JSON.", + "default": "order", + "enum": [ + "order" + ], + "nullable": true + }, + "created_at": { + "type": "string", + "example": "2021-12-22T10:13:06.487Z", + "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", + "format": "date-time", + "nullable": true + }, + "updated_at": { + "type": "string", + "nullable": true, + "example": "2021-12-22T10:14:45.316Z", + "format": "date-time", + "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." + }, + "customer_id": { + "type": "string", + "nullable": true, + "description": "Unique customer ID of the customer making the purchase.", + "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" + }, + "referrer_id": { + "type": "string", + "nullable": true, + "description": "Unique referrer ID.", + "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" + }, + "customer": { + "$ref": "#/components/schemas/CustomerId" + }, + "referrer": { + "$ref": "#/components/schemas/ReferrerId" + }, + "redemptions": { + "title": "ValidationsValidateResponseBodyOrderRedemptionsEntry", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/OrderRedemptionsEntry" + }, + "nullable": true + }, + "items": { + "title": "ValidationsValidateResponseBodyOrderItems", + "type": "array", + "description": "Array of items applied to the order. It can include up to 500 items.", + "items": { + "title": "ValidationsValidateResponseBodyOrderItemsItem", + "allOf": [ + { + "$ref": "#/components/schemas/OrderCalculatedItem" + }, + { + "type": "object", + "properties": { + "application_details": { + "$ref": "#/components/schemas/ApplicationDetails" + } + } + } + ] + }, + "nullable": true + } + }, + "nullable": true }, "tracking_id": { "type": "string", @@ -28886,6 +30433,49 @@ }, "required": [] }, + "ApplicationDetails": { + "title": "ApplicationDetails", + "type": "array", + "description": "Array containing details about the items that are replaced and the items that are replacements for discounts with the `REPLACE_ITEMS` effect.", + "items": { + "title": "ApplicationDetailsItem", + "type": "object", + "description": "Object representing item replacement.", + "properties": { + "source_index": { + "type": "integer", + "description": "Index number of the source item that is replaced. The enumeration starts from `0`, which represents the first item in the request, e.g., if the replaced item is passed as the second in the request, `source_index` equals `3`.", + "minimum": 0 + }, + "source_applied_quantity": { + "type": "integer", + "description": "Number of source units that are replaced.", + "maximum": -1 + }, + "source_applied_quantity_amount": { + "type": "integer", + "description": "Amount equal to the price of the units that are replaced. Determines the change of the amount of the source item quantity.", + "maximum": 0 + }, + "target_index": { + "type": "integer", + "description": "Index number of the target item that is a replacement of the source item. The enumeration continues the values for the order items, e.g. if there are three items in the request, `target_index` equals `3`, as enumeration starts from `0`." + }, + "target_applied_quantity": { + "type": "integer", + "description": "Number of added target units that are replacements." + }, + "target_applied_quantity_amount": { + "type": "integer", + "description": "Amount equal to the price of the units that are replacements. Determines the change in the amount of the target item quantity." + }, + "target_applied_discount_amount": { + "type": "integer", + "description": "Discount amount applied to the target item with regard to the replacement. Equals the `target_applied_quantity_amount` minus `source_applied_quantity_amount`." + } + } + } + }, "AsyncActionBase": { "title": "AsyncActionBase", "type": "object", @@ -33989,7 +35579,7 @@ "items": { "title": "OrderItems", "type": "array", - "description": "Array of items applied to the order. It can include up 500 items.", + "description": "Array of items applied to the order. It can include up to 500 items.", "items": { "$ref": "#/components/schemas/OrderItem" }, @@ -34075,15 +35665,6 @@ "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", "nullable": true }, - "items": { - "title": "OrderCalculatedItems", - "type": "array", - "description": "Array of items applied to the order. It can include up 500 items.", - "items": { - "$ref": "#/components/schemas/OrderCalculatedItem" - }, - "nullable": true - }, "metadata": { "title": "OrderCalculatedMetadata", "type": "object", @@ -35774,7 +37355,179 @@ "nullable": true }, "order": { - "$ref": "#/components/schemas/OrderCalculated" + "title": "RedemptionOrder", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", + "nullable": true + }, + "source_id": { + "type": "string", + "nullable": true, + "description": "Unique source ID of an existing order that will be linked to the redemption of this request." + }, + "status": { + "type": "string", + "description": "The order status.", + "enum": [ + "CREATED", + "PAID", + "CANCELED", + "FULFILLED" + ], + "nullable": true + }, + "amount": { + "type": "integer", + "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "initial_amount": { + "type": "integer", + "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "discount_amount": { + "type": "integer", + "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "items_discount_amount": { + "type": "integer", + "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "total_discount_amount": { + "type": "integer", + "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "total_amount": { + "type": "integer", + "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "applied_discount_amount": { + "type": "integer", + "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "items_applied_discount_amount": { + "type": "integer", + "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", + "nullable": true + }, + "total_applied_discount_amount": { + "type": "integer", + "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", + "nullable": true + }, + "metadata": { + "title": "RedemptionOrderMetadata", + "type": "object", + "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", + "nullable": true + }, + "object": { + "type": "string", + "description": "The type of the object represented by JSON.", + "default": "order", + "enum": [ + "order" + ], + "nullable": true + }, + "created_at": { + "type": "string", + "example": "2021-12-22T10:13:06.487Z", + "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", + "format": "date-time", + "nullable": true + }, + "updated_at": { + "type": "string", + "nullable": true, + "example": "2021-12-22T10:14:45.316Z", + "format": "date-time", + "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." + }, + "customer_id": { + "type": "string", + "nullable": true, + "description": "Unique customer ID of the customer making the purchase.", + "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" + }, + "referrer_id": { + "type": "string", + "nullable": true, + "description": "Unique referrer ID.", + "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" + }, + "customer": { + "title": "RedemptionOrderCustomer", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "A unique identifier of an existing customer.", + "nullable": true + }, + "object": { + "type": "string", + "description": "The type of the object represented by JSON.", + "default": "customer", + "enum": [ + "customer" + ], + "nullable": true + } + }, + "required": [], + "nullable": true + }, + "referrer": { + "title": "RedemptionOrderReferrer", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "A unique identifier of an existing customer.", + "nullable": true + }, + "object": { + "type": "string", + "description": "The type of the object represented by JSON.", + "default": "customer", + "enum": [ + "customer" + ], + "nullable": true + } + }, + "required": [], + "nullable": true + }, + "redemptions": { + "title": "RedemptionOrderRedemptionsEntry", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/OrderRedemptionsEntry" + }, + "nullable": true + }, + "items": { + "title": "RedemptionOrderItems", + "type": "array", + "description": "Array of items applied to the order. It can include up to 500 items.", + "items": { + "$ref": "#/components/schemas/OrderCalculatedItem" + }, + "nullable": true + } + }, + "nullable": true }, "channel": { "title": "RedemptionChannel", @@ -36326,15 +38079,6 @@ "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", "nullable": true }, - "items": { - "title": "RedemptionEntryOrderItems", - "type": "array", - "description": "Array of items applied to the order. It can include up 500 items.", - "items": { - "$ref": "#/components/schemas/OrderCalculatedItem" - }, - "nullable": true - }, "metadata": { "title": "RedemptionEntryOrderMetadata", "type": "object", @@ -36425,6 +38169,15 @@ "$ref": "#/components/schemas/OrderRedemptionsEntry" }, "nullable": true + }, + "items": { + "title": "RedemptionEntryOrderItems", + "type": "array", + "description": "Array of items applied to the order. It can include up to 500 items.", + "items": { + "$ref": "#/components/schemas/OrderCalculatedItem" + }, + "nullable": true } }, "nullable": true @@ -37309,7 +39062,141 @@ "nullable": true }, "order": { - "$ref": "#/components/schemas/OrderCalculated" + "title": "RedemptionRollbackOrder", + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", + "nullable": true + }, + "source_id": { + "type": "string", + "nullable": true, + "description": "Unique source ID of an existing order that will be linked to the redemption of this request." + }, + "status": { + "type": "string", + "description": "The order status.", + "enum": [ + "CREATED", + "PAID", + "CANCELED", + "FULFILLED" + ], + "nullable": true + }, + "amount": { + "type": "integer", + "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "initial_amount": { + "type": "integer", + "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "discount_amount": { + "type": "integer", + "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "items_discount_amount": { + "type": "integer", + "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "total_discount_amount": { + "type": "integer", + "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "total_amount": { + "type": "integer", + "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "applied_discount_amount": { + "type": "integer", + "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "items_applied_discount_amount": { + "type": "integer", + "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", + "nullable": true + }, + "total_applied_discount_amount": { + "type": "integer", + "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", + "nullable": true + }, + "metadata": { + "title": "RedemptionRollbackOrderMetadata", + "type": "object", + "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", + "nullable": true + }, + "object": { + "type": "string", + "description": "The type of the object represented by JSON.", + "default": "order", + "enum": [ + "order" + ], + "nullable": true + }, + "created_at": { + "type": "string", + "example": "2021-12-22T10:13:06.487Z", + "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", + "format": "date-time", + "nullable": true + }, + "updated_at": { + "type": "string", + "nullable": true, + "example": "2021-12-22T10:14:45.316Z", + "format": "date-time", + "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." + }, + "customer_id": { + "type": "string", + "nullable": true, + "description": "Unique customer ID of the customer making the purchase.", + "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" + }, + "referrer_id": { + "type": "string", + "nullable": true, + "description": "Unique referrer ID.", + "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" + }, + "customer": { + "$ref": "#/components/schemas/CustomerId" + }, + "referrer": { + "$ref": "#/components/schemas/ReferrerId" + }, + "redemptions": { + "title": "RedemptionRollbackOrderRedemptionsEntry", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/OrderRedemptionsEntry" + }, + "nullable": true + }, + "items": { + "title": "RedemptionRollbackOrderItems", + "type": "array", + "description": "Array of items applied to the order. It can include up to 500 items.", + "items": { + "$ref": "#/components/schemas/OrderCalculatedItem" + }, + "nullable": true + } + } }, "channel": { "title": "RedemptionRollbackChannel", @@ -40650,7 +42537,154 @@ "$ref": "#/components/schemas/RedeemableResult" }, "order": { - "$ref": "#/components/schemas/OrderCalculated" + "title": "QualificationsRedeemableOrder", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", + "nullable": true + }, + "source_id": { + "type": "string", + "nullable": true, + "description": "Unique source ID of an existing order that will be linked to the redemption of this request." + }, + "status": { + "type": "string", + "description": "The order status.", + "enum": [ + "CREATED", + "PAID", + "CANCELED", + "FULFILLED" + ], + "nullable": true + }, + "amount": { + "type": "integer", + "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "initial_amount": { + "type": "integer", + "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "discount_amount": { + "type": "integer", + "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "items_discount_amount": { + "type": "integer", + "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "total_discount_amount": { + "type": "integer", + "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "total_amount": { + "type": "integer", + "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "applied_discount_amount": { + "type": "integer", + "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "items_applied_discount_amount": { + "type": "integer", + "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", + "nullable": true + }, + "total_applied_discount_amount": { + "type": "integer", + "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", + "nullable": true + }, + "metadata": { + "title": "QualificationsRedeemableOrderMetadata", + "type": "object", + "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", + "nullable": true + }, + "object": { + "type": "string", + "description": "The type of the object represented by JSON.", + "default": "order", + "enum": [ + "order" + ], + "nullable": true + }, + "created_at": { + "type": "string", + "example": "2021-12-22T10:13:06.487Z", + "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", + "format": "date-time", + "nullable": true + }, + "updated_at": { + "type": "string", + "nullable": true, + "example": "2021-12-22T10:14:45.316Z", + "format": "date-time", + "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." + }, + "customer_id": { + "type": "string", + "nullable": true, + "description": "Unique customer ID of the customer making the purchase.", + "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" + }, + "referrer_id": { + "type": "string", + "nullable": true, + "description": "Unique referrer ID.", + "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" + }, + "customer": { + "$ref": "#/components/schemas/CustomerId" + }, + "referrer": { + "$ref": "#/components/schemas/ReferrerId" + }, + "redemptions": { + "title": "QualificationsRedeemableOrderRedemptionsEntry", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/OrderRedemptionsEntry" + }, + "nullable": true + }, + "items": { + "title": "QualificationsRedeemableOrderItems", + "type": "array", + "description": "Array of items applied to the order. It can include up to 500 items.", + "items": { + "title": "QualificationsRedeemableOrderItemsItem", + "allOf": [ + { + "$ref": "#/components/schemas/OrderCalculatedItem" + }, + { + "type": "object", + "properties": { + "application_details": { + "$ref": "#/components/schemas/ApplicationDetails" + } + } + } + ] + }, + "nullable": true + } + }, + "nullable": true }, "validation_rule_id": { "type": "string", @@ -41435,7 +43469,154 @@ "$ref": "#/components/schemas/RedeemableResult" }, "order": { - "$ref": "#/components/schemas/OrderCalculated" + "title": "QualificationsRedeemableBaseOrder", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", + "nullable": true + }, + "source_id": { + "type": "string", + "nullable": true, + "description": "Unique source ID of an existing order that will be linked to the redemption of this request." + }, + "status": { + "type": "string", + "description": "The order status.", + "enum": [ + "CREATED", + "PAID", + "CANCELED", + "FULFILLED" + ], + "nullable": true + }, + "amount": { + "type": "integer", + "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "initial_amount": { + "type": "integer", + "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "discount_amount": { + "type": "integer", + "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "items_discount_amount": { + "type": "integer", + "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "total_discount_amount": { + "type": "integer", + "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "total_amount": { + "type": "integer", + "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "applied_discount_amount": { + "type": "integer", + "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", + "nullable": true + }, + "items_applied_discount_amount": { + "type": "integer", + "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", + "nullable": true + }, + "total_applied_discount_amount": { + "type": "integer", + "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", + "nullable": true + }, + "metadata": { + "title": "QualificationsRedeemableBaseOrderMetadata", + "type": "object", + "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", + "nullable": true + }, + "object": { + "type": "string", + "description": "The type of the object represented by JSON.", + "default": "order", + "enum": [ + "order" + ], + "nullable": true + }, + "created_at": { + "type": "string", + "example": "2021-12-22T10:13:06.487Z", + "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", + "format": "date-time", + "nullable": true + }, + "updated_at": { + "type": "string", + "nullable": true, + "example": "2021-12-22T10:14:45.316Z", + "format": "date-time", + "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." + }, + "customer_id": { + "type": "string", + "nullable": true, + "description": "Unique customer ID of the customer making the purchase.", + "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" + }, + "referrer_id": { + "type": "string", + "nullable": true, + "description": "Unique referrer ID.", + "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" + }, + "customer": { + "$ref": "#/components/schemas/CustomerId" + }, + "referrer": { + "$ref": "#/components/schemas/ReferrerId" + }, + "redemptions": { + "title": "QualificationsRedeemableBaseOrderRedemptionsEntry", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/OrderRedemptionsEntry" + }, + "nullable": true + }, + "items": { + "title": "QualificationsRedeemableBaseOrderItems", + "type": "array", + "description": "Array of items applied to the order. It can include up to 500 items.", + "items": { + "title": "QualificationsRedeemableBaseOrderItemsItem", + "allOf": [ + { + "$ref": "#/components/schemas/OrderCalculatedItem" + }, + { + "type": "object", + "properties": { + "application_details": { + "$ref": "#/components/schemas/ApplicationDetails" + } + } + } + ] + }, + "nullable": true + } + }, + "nullable": true }, "validation_rule_id": { "type": "string", From 2d7e2743c7fd6efe397c50e0ac044125cad7eb86 Mon Sep 17 00:00:00 2001 From: p-woznikowski Date: Tue, 17 Dec 2024 18:42:45 +0100 Subject: [PATCH 19/23] Update CONTRIBUTING.md --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 624c3612..888d50ef 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -271,7 +271,7 @@ In order to remove a category, remove its title from the list. Make sure to remo - Make changes in the repository following the [patterns](#naming-convention) and [good practices](#good-practices). - Run `npm run create-clean-version -- --vt={your name}-{pull request number}` to create a new project version with your tag number. - then follow instructions from the console or add `--ua` or `--uploadAll` option to the script -- If you need to make a change, run `npm run create-clean-version -- --vt={your name}-{pull request number}-{!!!any number!!!}` +- If you need to make a change, run `npm run create-clean-version -- --vt={your name}-{pull request number}-{!!!any number!!!}`; note that the underscore `_` symbol in the version name will fail the upload - then follow instructions from the console or add `--ua` or `--uploadAll` option to the script - on the readme dashboard delete version that is not good. - If changes are fine, then: From c9b6de012bb3a6ea100258539880bd6daffbc4bb Mon Sep 17 00:00:00 2001 From: p-zielinski Date: Thu, 19 Dec 2024 09:33:03 +0100 Subject: [PATCH 20/23] script that fixes breaking changes --- reference/readonly-sdks/java/OpenAPI.json | 2107 ++--------------- reference/readonly-sdks/php/OpenAPI.json | 2342 ++----------------- reference/readonly-sdks/python/OpenAPI.json | 2071 ++-------------- reference/readonly-sdks/ruby/OpenAPI.json | 2107 ++--------------- scripts/prepare-open-api-for-sdk/index.ts | 47 +- 5 files changed, 680 insertions(+), 7994 deletions(-) diff --git a/reference/readonly-sdks/java/OpenAPI.json b/reference/readonly-sdks/java/OpenAPI.json index bd1d3359..3c87c073 100644 --- a/reference/readonly-sdks/java/OpenAPI.json +++ b/reference/readonly-sdks/java/OpenAPI.json @@ -523,6 +523,9 @@ "description": "The metadata object stores all custom attributes assigned to the campaign. A set of key/value pairs that you can attach to a campaign object. It can be useful for storing additional information about the campaign in a structured format.", "nullable": true }, + "access_settings": { + "$ref": "#/components/schemas/AccessSettings" + }, "validation_rules": { "title": "CampaignsCreateRequestBodyValidationRules", "type": "array", @@ -1153,6 +1156,9 @@ "example": "cat_0b688929a2476386a7", "nullable": true }, + "access_settings": { + "$ref": "#/components/schemas/AccessSettings" + }, "activity_duration_after_publishing": { "type": "string", "description": "Defines the amount of time the vouchers will be active after publishing. The value is shown in the ISO 8601 format. For example, a voucher with the value of P24D will be valid for a duration of 24 days.", @@ -2475,154 +2481,7 @@ "nullable": true }, "order": { - "title": "ClientQualificationsCheckEligibilityResponseBodyOrder", - "type": "object", - "nullable": true, - "properties": { - "id": { - "type": "string", - "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", - "nullable": true - }, - "source_id": { - "type": "string", - "nullable": true, - "description": "Unique source ID of an existing order that will be linked to the redemption of this request." - }, - "status": { - "type": "string", - "description": "The order status.", - "enum": [ - "CREATED", - "PAID", - "CANCELED", - "FULFILLED" - ], - "nullable": true - }, - "amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "initial_amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "discount_amount": { - "type": "integer", - "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_amount": { - "type": "integer", - "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "applied_discount_amount": { - "type": "integer", - "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_applied_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", - "nullable": true - }, - "total_applied_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", - "nullable": true - }, - "metadata": { - "title": "ClientQualificationsCheckEligibilityResponseBodyOrderMetadata", - "type": "object", - "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "order", - "enum": [ - "order" - ], - "nullable": true - }, - "created_at": { - "type": "string", - "example": "2021-12-22T10:13:06.487Z", - "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", - "format": "date-time", - "nullable": true - }, - "updated_at": { - "type": "string", - "nullable": true, - "example": "2021-12-22T10:14:45.316Z", - "format": "date-time", - "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." - }, - "customer_id": { - "type": "string", - "nullable": true, - "description": "Unique customer ID of the customer making the purchase.", - "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" - }, - "referrer_id": { - "type": "string", - "nullable": true, - "description": "Unique referrer ID.", - "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" - }, - "customer": { - "$ref": "#/components/schemas/CustomerId" - }, - "referrer": { - "$ref": "#/components/schemas/ReferrerId" - }, - "redemptions": { - "title": "ClientQualificationsCheckEligibilityResponseBodyOrderRedemptionsEntry", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/OrderRedemptionsEntry" - }, - "nullable": true - }, - "items": { - "title": "ClientQualificationsCheckEligibilityResponseBodyOrderItems", - "type": "array", - "description": "Array of items applied to the order. It can include up to 500 items.", - "items": { - "title": "ClientQualificationsCheckEligibilityResponseBodyOrderItemsItem", - "allOf": [ - { - "$ref": "#/components/schemas/OrderCalculatedItem" - }, - { - "type": "object", - "properties": { - "application_details": { - "$ref": "#/components/schemas/ApplicationDetails" - } - } - } - ] - }, - "nullable": true - } - } + "$ref": "#/components/schemas/OrderCalculated" }, "stacking_rules": { "$ref": "#/components/schemas/StackingRules" @@ -2751,155 +2610,7 @@ "$ref": "#/components/schemas/Redemption" }, "order": { - "title": "ClientRedemptionsRedeemResponseBodyOrder", - "description": "Contains the order details associated with the redemption.", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", - "nullable": true - }, - "source_id": { - "type": "string", - "nullable": true, - "description": "Unique source ID of an existing order that will be linked to the redemption of this request." - }, - "status": { - "type": "string", - "description": "The order status.", - "enum": [ - "CREATED", - "PAID", - "CANCELED", - "FULFILLED" - ], - "nullable": true - }, - "amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "initial_amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "discount_amount": { - "type": "integer", - "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_amount": { - "type": "integer", - "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "applied_discount_amount": { - "type": "integer", - "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_applied_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", - "nullable": true - }, - "total_applied_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", - "nullable": true - }, - "metadata": { - "title": "ClientRedemptionsRedeemResponseBodyOrderMetadata", - "type": "object", - "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "order", - "enum": [ - "order" - ], - "nullable": true - }, - "created_at": { - "type": "string", - "example": "2021-12-22T10:13:06.487Z", - "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", - "format": "date-time", - "nullable": true - }, - "updated_at": { - "type": "string", - "nullable": true, - "example": "2021-12-22T10:14:45.316Z", - "format": "date-time", - "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." - }, - "customer_id": { - "type": "string", - "nullable": true, - "description": "Unique customer ID of the customer making the purchase.", - "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" - }, - "referrer_id": { - "type": "string", - "nullable": true, - "description": "Unique referrer ID.", - "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" - }, - "customer": { - "$ref": "#/components/schemas/CustomerId" - }, - "referrer": { - "$ref": "#/components/schemas/ReferrerId" - }, - "redemptions": { - "title": "ClientRedemptionsRedeemResponseBodyOrderRedemptionsEntry", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/OrderRedemptionsEntry" - }, - "nullable": true - }, - "items": { - "title": "ClientRedemptionsRedeemResponseBodyOrderItems", - "type": "array", - "description": "Array of items applied to the order. It can include up to 500 items.", - "items": { - "title": "ClientRedemptionsRedeemResponseBodyOrderItemsItem", - "allOf": [ - { - "$ref": "#/components/schemas/OrderCalculatedItem" - }, - { - "type": "object", - "properties": { - "application_details": { - "$ref": "#/components/schemas/ApplicationDetails" - } - } - } - ] - }, - "nullable": true - } - }, - "nullable": true + "$ref": "#/components/schemas/OrderCalculated" }, "inapplicable_redeemables": { "title": "ClientRedemptionsRedeemResponseBodyInapplicableRedeemables", @@ -3067,6 +2778,7 @@ "order": { "title": "ClientValidationsValidateResponseBodyRedeemablesItemOrder", "type": "object", + "description": "Order information.", "properties": { "id": { "type": "string", @@ -3176,46 +2888,10 @@ "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" }, "customer": { - "title": "ClientValidationsValidateResponseBodyRedeemablesItemOrderCustomer", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "A unique identifier of an existing customer.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "customer", - "enum": [ - "customer" - ], - "nullable": true - } - }, - "required": [] + "$ref": "#/components/schemas/CustomerId" }, "referrer": { - "title": "ClientValidationsValidateResponseBodyRedeemablesItemOrderReferrer", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "A unique identifier of an existing customer.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "customer", - "enum": [ - "customer" - ], - "nullable": true - } - }, - "required": [] + "$ref": "#/components/schemas/ReferrerId" }, "redemptions": { "title": "ClientValidationsValidateResponseBodyRedeemablesItemOrderRedemptionsEntry", @@ -3228,7 +2904,7 @@ "items": { "title": "ClientValidationsValidateResponseBodyRedeemablesItemOrderItems", "type": "array", - "description": "Array of items applied to the order. It can include up to 500 items.", + "description": "Array of items applied to the order. It can include up 500 items.", "items": { "$ref": "#/components/schemas/OrderCalculatedItem" }, @@ -3457,154 +3133,7 @@ "nullable": true }, "order": { - "title": "ClientValidationsValidateResponseBodyOrder", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", - "nullable": true - }, - "source_id": { - "type": "string", - "nullable": true, - "description": "Unique source ID of an existing order that will be linked to the redemption of this request." - }, - "status": { - "type": "string", - "description": "The order status.", - "enum": [ - "CREATED", - "PAID", - "CANCELED", - "FULFILLED" - ], - "nullable": true - }, - "amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "initial_amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "discount_amount": { - "type": "integer", - "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_amount": { - "type": "integer", - "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "applied_discount_amount": { - "type": "integer", - "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_applied_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", - "nullable": true - }, - "total_applied_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", - "nullable": true - }, - "metadata": { - "title": "ClientValidationsValidateResponseBodyOrderMetadata", - "type": "object", - "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "order", - "enum": [ - "order" - ], - "nullable": true - }, - "created_at": { - "type": "string", - "example": "2021-12-22T10:13:06.487Z", - "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", - "format": "date-time", - "nullable": true - }, - "updated_at": { - "type": "string", - "nullable": true, - "example": "2021-12-22T10:14:45.316Z", - "format": "date-time", - "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." - }, - "customer_id": { - "type": "string", - "nullable": true, - "description": "Unique customer ID of the customer making the purchase.", - "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" - }, - "referrer_id": { - "type": "string", - "nullable": true, - "description": "Unique referrer ID.", - "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" - }, - "customer": { - "$ref": "#/components/schemas/CustomerId" - }, - "referrer": { - "$ref": "#/components/schemas/ReferrerId" - }, - "redemptions": { - "title": "ClientValidationsValidateResponseBodyOrderRedemptionsEntry", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/OrderRedemptionsEntry" - }, - "nullable": true - }, - "items": { - "title": "ClientValidationsValidateResponseBodyOrderItems", - "type": "array", - "description": "Array of items applied to the order. It can include up to 500 items.", - "items": { - "title": "ClientValidationsValidateResponseBodyOrderItemsItem", - "allOf": [ - { - "$ref": "#/components/schemas/OrderCalculatedItem" - }, - { - "type": "object", - "properties": { - "application_details": { - "$ref": "#/components/schemas/ApplicationDetails" - } - } - } - ] - }, - "nullable": true - } - }, - "nullable": true + "$ref": "#/components/schemas/OrderCalculated" }, "tracking_id": { "type": "string", @@ -5739,6 +5268,9 @@ "description": "The metadata object stores all custom attributes assigned to the campaign. A set of key/value pairs that you can attach to a campaign object. It can be useful for storing additional information about the campaign in a structured format.", "nullable": true }, + "access_settings": { + "$ref": "#/components/schemas/AccessSettings" + }, "validation_rules": { "title": "LoyaltiesCreateCampaignRequestBodyValidationRules", "type": "array", @@ -9993,179 +9525,7 @@ "nullable": true }, "order": { - "title": "LoyaltiesMembersRedemptionRedeemResponseBodyOrder", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", - "nullable": true - }, - "source_id": { - "type": "string", - "nullable": true, - "description": "Unique source ID of an existing order that will be linked to the redemption of this request." - }, - "status": { - "type": "string", - "description": "The order status.", - "enum": [ - "CREATED", - "PAID", - "CANCELED", - "FULFILLED" - ], - "nullable": true - }, - "amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "initial_amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "discount_amount": { - "type": "integer", - "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_amount": { - "type": "integer", - "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "applied_discount_amount": { - "type": "integer", - "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_applied_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", - "nullable": true - }, - "total_applied_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", - "nullable": true - }, - "metadata": { - "title": "LoyaltiesMembersRedemptionRedeemResponseBodyOrderMetadata", - "type": "object", - "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "order", - "enum": [ - "order" - ], - "nullable": true - }, - "created_at": { - "type": "string", - "example": "2021-12-22T10:13:06.487Z", - "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", - "format": "date-time", - "nullable": true - }, - "updated_at": { - "type": "string", - "nullable": true, - "example": "2021-12-22T10:14:45.316Z", - "format": "date-time", - "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." - }, - "customer_id": { - "type": "string", - "nullable": true, - "description": "Unique customer ID of the customer making the purchase.", - "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" - }, - "referrer_id": { - "type": "string", - "nullable": true, - "description": "Unique referrer ID.", - "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" - }, - "customer": { - "title": "LoyaltiesMembersRedemptionRedeemResponseBodyOrderCustomer", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "A unique identifier of an existing customer.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "customer", - "enum": [ - "customer" - ], - "nullable": true - } - }, - "required": [], - "nullable": true - }, - "referrer": { - "title": "LoyaltiesMembersRedemptionRedeemResponseBodyOrderReferrer", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "A unique identifier of an existing customer.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "customer", - "enum": [ - "customer" - ], - "nullable": true - } - }, - "required": [], - "nullable": true - }, - "redemptions": { - "title": "LoyaltiesMembersRedemptionRedeemResponseBodyOrderRedemptionsEntry", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/OrderRedemptionsEntry" - }, - "nullable": true - }, - "items": { - "title": "LoyaltiesMembersRedemptionRedeemResponseBodyOrderItems", - "type": "array", - "description": "Array of items applied to the order. It can include up to 500 items.", - "items": { - "$ref": "#/components/schemas/OrderCalculatedItem" - }, - "nullable": true - } - }, - "nullable": true + "$ref": "#/components/schemas/OrderCalculated" }, "channel": { "title": "LoyaltiesMembersRedemptionRedeemResponseBodyChannel", @@ -11990,6 +11350,9 @@ "example": "cat_0b688929a2476386a7", "nullable": true }, + "access_settings": { + "$ref": "#/components/schemas/AccessSettings" + }, "activity_duration_after_publishing": { "type": "string", "description": "Defines the amount of time the vouchers will be active after publishing. The value is shown in the ISO 8601 format. For example, a voucher with the value of P24D will be valid for a duration of 24 days.", @@ -16634,7 +15997,7 @@ "items": { "title": "OrdersCreateResponseBodyItems", "type": "array", - "description": "Array of items applied to the order. It can include up to 500 items.", + "description": "Array of items applied to the order. It can include up 500 items.", "items": { "$ref": "#/components/schemas/OrderCalculatedItem" }, @@ -16885,7 +16248,7 @@ "items": { "title": "OrdersGetResponseBodyItems", "type": "array", - "description": "Array of items applied to the order. It can include up to 500 items.", + "description": "Array of items applied to the order. It can include up 500 items.", "items": { "$ref": "#/components/schemas/OrderCalculatedItem" }, @@ -16974,25 +16337,7 @@ "type": "array", "description": "Contains array of order objects.", "items": { - "title": "OrdersListResponseBodyOrdersItem", - "allOf": [ - { - "$ref": "#/components/schemas/OrderCalculated" - }, - { - "type": "object", - "properties": { - "items": { - "title": "OrdersListResponseBodyOrdersItemItems", - "type": "array", - "description": "Array of items applied to the order. It can include up to 500 items.", - "items": { - "$ref": "#/components/schemas/OrderCalculatedItem" - } - } - } - } - ] + "$ref": "#/components/schemas/OrderCalculated" }, "nullable": true }, @@ -17204,7 +16549,7 @@ "items": { "title": "OrdersUpdateResponseBodyItems", "type": "array", - "description": "Array of items applied to the order. It can include up to 500 items.", + "description": "Array of items applied to the order. It can include up 500 items.", "items": { "$ref": "#/components/schemas/OrderCalculatedItem" }, @@ -21928,141 +21273,7 @@ "nullable": true }, "order": { - "title": "QualificationsCheckEligibilityResponseBodyOrder", - "type": "object", - "nullable": true, - "properties": { - "id": { - "type": "string", - "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", - "nullable": true - }, - "source_id": { - "type": "string", - "nullable": true, - "description": "Unique source ID of an existing order that will be linked to the redemption of this request." - }, - "status": { - "type": "string", - "description": "The order status.", - "enum": [ - "CREATED", - "PAID", - "CANCELED", - "FULFILLED" - ], - "nullable": true - }, - "amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "initial_amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "discount_amount": { - "type": "integer", - "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_amount": { - "type": "integer", - "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "applied_discount_amount": { - "type": "integer", - "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_applied_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", - "nullable": true - }, - "total_applied_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", - "nullable": true - }, - "metadata": { - "title": "QualificationsCheckEligibilityResponseBodyOrderMetadata", - "type": "object", - "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "order", - "enum": [ - "order" - ], - "nullable": true - }, - "created_at": { - "type": "string", - "example": "2021-12-22T10:13:06.487Z", - "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", - "format": "date-time", - "nullable": true - }, - "updated_at": { - "type": "string", - "nullable": true, - "example": "2021-12-22T10:14:45.316Z", - "format": "date-time", - "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." - }, - "customer_id": { - "type": "string", - "nullable": true, - "description": "Unique customer ID of the customer making the purchase.", - "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" - }, - "referrer_id": { - "type": "string", - "nullable": true, - "description": "Unique referrer ID.", - "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" - }, - "customer": { - "$ref": "#/components/schemas/CustomerId" - }, - "referrer": { - "$ref": "#/components/schemas/ReferrerId" - }, - "redemptions": { - "title": "QualificationsCheckEligibilityResponseBodyOrderRedemptionsEntry", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/OrderRedemptionsEntry" - }, - "nullable": true - }, - "items": { - "title": "QualificationsCheckEligibilityResponseBodyOrderItems", - "type": "array", - "description": "Array of items applied to the order. It can include up to 500 items.", - "items": { - "$ref": "#/components/schemas/OrderCalculatedItem" - }, - "nullable": true - } - } + "$ref": "#/components/schemas/OrderCalculated" }, "stacking_rules": { "$ref": "#/components/schemas/StackingRules" @@ -22362,7 +21573,7 @@ "items": { "title": "RedemptionsGetResponseBodyOrderItems", "type": "array", - "description": "Array of items applied to the order. It can include up to 500 items.", + "description": "Array of items applied to the order. It can include up 500 items.", "items": { "$ref": "#/components/schemas/OrderCalculatedItem" }, @@ -23262,7 +22473,7 @@ "items": { "title": "RedemptionsListResponseBodyRedemptionsItemOrderItems", "type": "array", - "description": "Array of items applied to the order. It can include up to 500 items.", + "description": "Array of items applied to the order. It can include up 500 items.", "items": { "$ref": "#/components/schemas/OrderCalculatedItem" }, @@ -23968,155 +23179,7 @@ "$ref": "#/components/schemas/Redemption" }, "order": { - "title": "RedemptionsRedeemResponseBodyOrder", - "description": "Contains the order details associated with the redemption.", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", - "nullable": true - }, - "source_id": { - "type": "string", - "nullable": true, - "description": "Unique source ID of an existing order that will be linked to the redemption of this request." - }, - "status": { - "type": "string", - "description": "The order status.", - "enum": [ - "CREATED", - "PAID", - "CANCELED", - "FULFILLED" - ], - "nullable": true - }, - "amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "initial_amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "discount_amount": { - "type": "integer", - "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_amount": { - "type": "integer", - "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "applied_discount_amount": { - "type": "integer", - "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_applied_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", - "nullable": true - }, - "total_applied_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", - "nullable": true - }, - "metadata": { - "title": "RedemptionsRedeemResponseBodyOrderMetadata", - "type": "object", - "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "order", - "enum": [ - "order" - ], - "nullable": true - }, - "created_at": { - "type": "string", - "example": "2021-12-22T10:13:06.487Z", - "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", - "format": "date-time", - "nullable": true - }, - "updated_at": { - "type": "string", - "nullable": true, - "example": "2021-12-22T10:14:45.316Z", - "format": "date-time", - "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." - }, - "customer_id": { - "type": "string", - "nullable": true, - "description": "Unique customer ID of the customer making the purchase.", - "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" - }, - "referrer_id": { - "type": "string", - "nullable": true, - "description": "Unique referrer ID.", - "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" - }, - "customer": { - "$ref": "#/components/schemas/CustomerId" - }, - "referrer": { - "$ref": "#/components/schemas/ReferrerId" - }, - "redemptions": { - "title": "RedemptionsRedeemResponseBodyOrderRedemptionsEntry", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/OrderRedemptionsEntry" - }, - "nullable": true - }, - "items": { - "title": "RedemptionsRedeemResponseBodyOrderItems", - "type": "array", - "description": "Array of items applied to the order. It can include up to 500 items.", - "items": { - "title": "RedemptionsRedeemResponseBodyOrderItemsItem", - "allOf": [ - { - "$ref": "#/components/schemas/OrderCalculatedItem" - }, - { - "type": "object", - "properties": { - "application_details": { - "$ref": "#/components/schemas/ApplicationDetails" - } - } - } - ] - }, - "nullable": true - } - }, - "nullable": true + "$ref": "#/components/schemas/OrderCalculated" }, "inapplicable_redeemables": { "title": "RedemptionsRedeemResponseBodyInapplicableRedeemables", @@ -24308,141 +23371,7 @@ "nullable": true }, "order": { - "title": "RedemptionsRollbackCreateResponseBodyOrder", - "nullable": true, - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", - "nullable": true - }, - "source_id": { - "type": "string", - "nullable": true, - "description": "Unique source ID of an existing order that will be linked to the redemption of this request." - }, - "status": { - "type": "string", - "description": "The order status.", - "enum": [ - "CREATED", - "PAID", - "CANCELED", - "FULFILLED" - ], - "nullable": true - }, - "amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "initial_amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "discount_amount": { - "type": "integer", - "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_amount": { - "type": "integer", - "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "applied_discount_amount": { - "type": "integer", - "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_applied_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", - "nullable": true - }, - "total_applied_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", - "nullable": true - }, - "metadata": { - "title": "RedemptionsRollbackCreateResponseBodyOrderMetadata", - "type": "object", - "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "order", - "enum": [ - "order" - ], - "nullable": true - }, - "created_at": { - "type": "string", - "example": "2021-12-22T10:13:06.487Z", - "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", - "format": "date-time", - "nullable": true - }, - "updated_at": { - "type": "string", - "nullable": true, - "example": "2021-12-22T10:14:45.316Z", - "format": "date-time", - "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." - }, - "customer_id": { - "type": "string", - "nullable": true, - "description": "Unique customer ID of the customer making the purchase.", - "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" - }, - "referrer_id": { - "type": "string", - "nullable": true, - "description": "Unique referrer ID.", - "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" - }, - "customer": { - "$ref": "#/components/schemas/CustomerId" - }, - "referrer": { - "$ref": "#/components/schemas/ReferrerId" - }, - "redemptions": { - "title": "RedemptionsRollbackCreateResponseBodyOrderRedemptionsEntry", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/OrderRedemptionsEntry" - }, - "nullable": true - }, - "items": { - "title": "RedemptionsRollbackCreateResponseBodyOrderItems", - "type": "array", - "description": "Array of items applied to the order. It can include up to 500 items.", - "items": { - "$ref": "#/components/schemas/OrderCalculatedItem" - }, - "nullable": true - } - } + "$ref": "#/components/schemas/OrderCalculated" }, "channel": { "title": "RedemptionsRollbackCreateResponseBodyChannel", @@ -24573,18 +23502,6 @@ "allOf": [ { "$ref": "#/components/schemas/OrderCalculated" - }, - { - "type": "object", - "properties": { - "items": { - "type": "array", - "description": "Array of items applied to the order. It can include up to 500 items.", - "items": { - "$ref": "#/components/schemas/OrderCalculatedItem" - } - } - } } ] } @@ -25897,6 +24814,9 @@ "description": "The metadata object stores all custom attributes assigned to the campaign. A set of key/value pairs that you can attach to a campaign object. It can be useful for storing additional information about the campaign in a structured format.", "nullable": true }, + "access_settings": { + "$ref": "#/components/schemas/AccessSettings" + }, "voucher": { "title": "TemplatesCampaignsCampaignSetupCreateRequestBodyVoucher", "type": "object", @@ -27471,6 +26391,7 @@ "order": { "title": "ValidationsValidateResponseBodyRedeemablesItemOrder", "type": "object", + "description": "Order information.", "properties": { "id": { "type": "string", @@ -27580,46 +26501,10 @@ "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" }, "customer": { - "title": "ValidationsValidateResponseBodyRedeemablesItemOrderCustomer", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "A unique identifier of an existing customer.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "customer", - "enum": [ - "customer" - ], - "nullable": true - } - }, - "required": [] + "$ref": "#/components/schemas/CustomerId" }, "referrer": { - "title": "ValidationsValidateResponseBodyRedeemablesItemOrderReferrer", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "A unique identifier of an existing customer.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "customer", - "enum": [ - "customer" - ], - "nullable": true - } - }, - "required": [] + "$ref": "#/components/schemas/ReferrerId" }, "redemptions": { "title": "ValidationsValidateResponseBodyRedeemablesItemOrderRedemptionsEntry", @@ -27632,7 +26517,7 @@ "items": { "title": "ValidationsValidateResponseBodyRedeemablesItemOrderItems", "type": "array", - "description": "Array of items applied to the order. It can include up to 500 items.", + "description": "Array of items applied to the order. It can include up 500 items.", "items": { "$ref": "#/components/schemas/OrderCalculatedItem" }, @@ -27861,154 +26746,7 @@ "nullable": true }, "order": { - "title": "ValidationsValidateResponseBodyOrder", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", - "nullable": true - }, - "source_id": { - "type": "string", - "nullable": true, - "description": "Unique source ID of an existing order that will be linked to the redemption of this request." - }, - "status": { - "type": "string", - "description": "The order status.", - "enum": [ - "CREATED", - "PAID", - "CANCELED", - "FULFILLED" - ], - "nullable": true - }, - "amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "initial_amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "discount_amount": { - "type": "integer", - "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_amount": { - "type": "integer", - "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "applied_discount_amount": { - "type": "integer", - "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_applied_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", - "nullable": true - }, - "total_applied_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", - "nullable": true - }, - "metadata": { - "title": "ValidationsValidateResponseBodyOrderMetadata", - "type": "object", - "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "order", - "enum": [ - "order" - ], - "nullable": true - }, - "created_at": { - "type": "string", - "example": "2021-12-22T10:13:06.487Z", - "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", - "format": "date-time", - "nullable": true - }, - "updated_at": { - "type": "string", - "nullable": true, - "example": "2021-12-22T10:14:45.316Z", - "format": "date-time", - "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." - }, - "customer_id": { - "type": "string", - "nullable": true, - "description": "Unique customer ID of the customer making the purchase.", - "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" - }, - "referrer_id": { - "type": "string", - "nullable": true, - "description": "Unique referrer ID.", - "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" - }, - "customer": { - "$ref": "#/components/schemas/CustomerId" - }, - "referrer": { - "$ref": "#/components/schemas/ReferrerId" - }, - "redemptions": { - "title": "ValidationsValidateResponseBodyOrderRedemptionsEntry", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/OrderRedemptionsEntry" - }, - "nullable": true - }, - "items": { - "title": "ValidationsValidateResponseBodyOrderItems", - "type": "array", - "description": "Array of items applied to the order. It can include up to 500 items.", - "items": { - "title": "ValidationsValidateResponseBodyOrderItemsItem", - "allOf": [ - { - "$ref": "#/components/schemas/OrderCalculatedItem" - }, - { - "type": "object", - "properties": { - "application_details": { - "$ref": "#/components/schemas/ApplicationDetails" - } - } - } - ] - }, - "nullable": true - } - }, - "nullable": true + "$ref": "#/components/schemas/OrderCalculated" }, "tracking_id": { "type": "string", @@ -30192,6 +28930,69 @@ "type": "string", "format": "hostname" }, + "AccessSettings": { + "title": "AccessSettings", + "type": "object", + "description": "Assigns or unassigns an area or store to the campaign.\n\n**NOTE**: this object can be sent if the Areas and Stores enterprise feature is enabled. Contact [Voucherify Sales](https://www.voucherify.io/contact-sales) to learn more.", + "properties": { + "assign": { + "title": "AccessSettingsAssign", + "type": "object", + "description": "Assigns the campaign to an area or a store. Provide the area and/or store IDs in the respective arrays. If a campaign changes assignments between areas or stores, unassign it from the area. For example, if a campaign is assigned to Area-01, but it must be now assigned to Store-01 within this area, you have to unassign the campaign from Area-01 and assign to Store-01 only.\n\nIf you want to assign the campaign to stores only, you do not have to send the area ID.", + "properties": { + "areas_ids": { + "title": "AccessSettingsAssignAreasIds", + "type": "array", + "description": "List all area IDs to which the campaign will be assigned.", + "items": { + "title": "AccessSettingsAssignAreasIdsItem", + "type": "string" + }, + "nullable": true + }, + "area_stores_ids": { + "title": "AccessSettingsAssignAreaStoresIds", + "type": "array", + "description": "List all store IDs to which the campaign will be assigned.", + "items": { + "title": "AccessSettingsAssignAreaStoresIdsItem", + "type": "string" + }, + "nullable": true + } + }, + "nullable": true + }, + "unassign": { + "title": "AccessSettingsUnassign", + "type": "object", + "description": "Unassigns the campaign from an area or a store. Provide the area and/or store IDs in the respective arrays. If a campaign changes assignments between areas or stores, unassign it first. For example, if a campaign is assigned to Area-01, but it must be now assigned to Store-01 within this area, you have to unassign the campaign from Area-01 and assigned to Store-01 only.\n\nIf you want to assign the campaign to stores only, you do not have to send the area ID.", + "properties": { + "areas_ids": { + "title": "AccessSettingsUnassignAreasIds", + "type": "array", + "description": "List all area IDs from which the campaign will be unassigned.", + "items": { + "title": "AccessSettingsUnassignAreasIdsItem", + "type": "string" + }, + "nullable": true + }, + "area_stores_ids": { + "title": "AccessSettingsUnassignAreaStoresIds", + "type": "array", + "description": "List all store IDs to which the campaign will be unassigned.", + "items": { + "title": "AccessSettingsUnassignAreaStoresIdsItem", + "type": "string" + }, + "nullable": true + } + }, + "nullable": true + } + } + }, "AccessSettingsCampaignAssignmentsList": { "title": "AccessSettingsCampaignAssignmentsList", "type": "object", @@ -30399,49 +29200,6 @@ }, "required": [] }, - "ApplicationDetails": { - "title": "ApplicationDetails", - "type": "array", - "description": "Array containing details about the items that are replaced and the items that are replacements for discounts with the `REPLACE_ITEMS` effect.", - "items": { - "title": "ApplicationDetailsItem", - "type": "object", - "description": "Object representing item replacement.", - "properties": { - "source_index": { - "type": "integer", - "description": "Index number of the source item that is replaced. The enumeration starts from `0`, which represents the first item in the request, e.g., if the replaced item is passed as the second in the request, `source_index` equals `3`.", - "minimum": 0 - }, - "source_applied_quantity": { - "type": "integer", - "description": "Number of source units that are replaced.", - "maximum": -1 - }, - "source_applied_quantity_amount": { - "type": "integer", - "description": "Amount equal to the price of the units that are replaced. Determines the change of the amount of the source item quantity.", - "maximum": 0 - }, - "target_index": { - "type": "integer", - "description": "Index number of the target item that is a replacement of the source item. The enumeration continues the values for the order items, e.g. if there are three items in the request, `target_index` equals `3`, as enumeration starts from `0`." - }, - "target_applied_quantity": { - "type": "integer", - "description": "Number of added target units that are replacements." - }, - "target_applied_quantity_amount": { - "type": "integer", - "description": "Amount equal to the price of the units that are replacements. Determines the change in the amount of the target item quantity." - }, - "target_applied_discount_amount": { - "type": "integer", - "description": "Discount amount applied to the target item with regard to the replacement. Equals the `target_applied_quantity_amount` minus `source_applied_quantity_amount`." - } - } - } - }, "AsyncActionBase": { "title": "AsyncActionBase", "type": "object", @@ -35685,6 +34443,15 @@ "$ref": "#/components/schemas/OrderRedemptionsEntry" }, "nullable": true + }, + "items": { + "title": "OrderCalculatedItems", + "type": "array", + "description": "Array of items applied to the order. It can include up 500 items.", + "items": { + "$ref": "#/components/schemas/OrderCalculatedItem" + }, + "nullable": true } } }, @@ -35873,6 +34640,9 @@ "type": "object", "description": "A set of custom key/value pairs that you can attach to an item object. It can be useful for storing additional information about the item in a structured format. It can be used to define business validation rules or discount formulas.", "nullable": true + }, + "application_details": { + "$ref": "#/components/schemas/ApplicationDetails" } }, "required": [] @@ -37321,179 +36091,7 @@ "nullable": true }, "order": { - "title": "RedemptionOrder", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", - "nullable": true - }, - "source_id": { - "type": "string", - "nullable": true, - "description": "Unique source ID of an existing order that will be linked to the redemption of this request." - }, - "status": { - "type": "string", - "description": "The order status.", - "enum": [ - "CREATED", - "PAID", - "CANCELED", - "FULFILLED" - ], - "nullable": true - }, - "amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "initial_amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "discount_amount": { - "type": "integer", - "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_amount": { - "type": "integer", - "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "applied_discount_amount": { - "type": "integer", - "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_applied_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", - "nullable": true - }, - "total_applied_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", - "nullable": true - }, - "metadata": { - "title": "RedemptionOrderMetadata", - "type": "object", - "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "order", - "enum": [ - "order" - ], - "nullable": true - }, - "created_at": { - "type": "string", - "example": "2021-12-22T10:13:06.487Z", - "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", - "format": "date-time", - "nullable": true - }, - "updated_at": { - "type": "string", - "nullable": true, - "example": "2021-12-22T10:14:45.316Z", - "format": "date-time", - "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." - }, - "customer_id": { - "type": "string", - "nullable": true, - "description": "Unique customer ID of the customer making the purchase.", - "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" - }, - "referrer_id": { - "type": "string", - "nullable": true, - "description": "Unique referrer ID.", - "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" - }, - "customer": { - "title": "RedemptionOrderCustomer", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "A unique identifier of an existing customer.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "customer", - "enum": [ - "customer" - ], - "nullable": true - } - }, - "required": [], - "nullable": true - }, - "referrer": { - "title": "RedemptionOrderReferrer", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "A unique identifier of an existing customer.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "customer", - "enum": [ - "customer" - ], - "nullable": true - } - }, - "required": [], - "nullable": true - }, - "redemptions": { - "title": "RedemptionOrderRedemptionsEntry", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/OrderRedemptionsEntry" - }, - "nullable": true - }, - "items": { - "title": "RedemptionOrderItems", - "type": "array", - "description": "Array of items applied to the order. It can include up to 500 items.", - "items": { - "$ref": "#/components/schemas/OrderCalculatedItem" - }, - "nullable": true - } - }, - "nullable": true + "$ref": "#/components/schemas/OrderCalculated" }, "channel": { "title": "RedemptionChannel", @@ -38139,7 +36737,7 @@ "items": { "title": "RedemptionEntryOrderItems", "type": "array", - "description": "Array of items applied to the order. It can include up to 500 items.", + "description": "Array of items applied to the order. It can include up 500 items.", "items": { "$ref": "#/components/schemas/OrderCalculatedItem" }, @@ -39028,141 +37626,7 @@ "nullable": true }, "order": { - "title": "RedemptionRollbackOrder", - "nullable": true, - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", - "nullable": true - }, - "source_id": { - "type": "string", - "nullable": true, - "description": "Unique source ID of an existing order that will be linked to the redemption of this request." - }, - "status": { - "type": "string", - "description": "The order status.", - "enum": [ - "CREATED", - "PAID", - "CANCELED", - "FULFILLED" - ], - "nullable": true - }, - "amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "initial_amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "discount_amount": { - "type": "integer", - "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_amount": { - "type": "integer", - "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "applied_discount_amount": { - "type": "integer", - "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_applied_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", - "nullable": true - }, - "total_applied_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", - "nullable": true - }, - "metadata": { - "title": "RedemptionRollbackOrderMetadata", - "type": "object", - "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "order", - "enum": [ - "order" - ], - "nullable": true - }, - "created_at": { - "type": "string", - "example": "2021-12-22T10:13:06.487Z", - "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", - "format": "date-time", - "nullable": true - }, - "updated_at": { - "type": "string", - "nullable": true, - "example": "2021-12-22T10:14:45.316Z", - "format": "date-time", - "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." - }, - "customer_id": { - "type": "string", - "nullable": true, - "description": "Unique customer ID of the customer making the purchase.", - "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" - }, - "referrer_id": { - "type": "string", - "nullable": true, - "description": "Unique referrer ID.", - "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" - }, - "customer": { - "$ref": "#/components/schemas/CustomerId" - }, - "referrer": { - "$ref": "#/components/schemas/ReferrerId" - }, - "redemptions": { - "title": "RedemptionRollbackOrderRedemptionsEntry", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/OrderRedemptionsEntry" - }, - "nullable": true - }, - "items": { - "title": "RedemptionRollbackOrderItems", - "type": "array", - "description": "Array of items applied to the order. It can include up to 500 items.", - "items": { - "$ref": "#/components/schemas/OrderCalculatedItem" - }, - "nullable": true - } - } + "$ref": "#/components/schemas/OrderCalculated" }, "channel": { "title": "RedemptionRollbackChannel", @@ -41875,6 +40339,49 @@ "APPLY_FROM_MOST_EXPENSIVE" ] }, + "ApplicationDetails": { + "title": "ApplicationDetails", + "type": "array", + "description": "Array containing details about the items that are replaced and the items that are replacements for discounts with the `REPLACE_ITEMS` effect.", + "items": { + "title": "ApplicationDetailsItem", + "type": "object", + "description": "Object representing item replacement.", + "properties": { + "source_index": { + "type": "integer", + "description": "Index number of the source item that is replaced. The enumeration starts from `0`, which represents the first item in the request, e.g., if the replaced item is passed as the second in the request, `source_index` equals `3`.", + "minimum": 0 + }, + "source_applied_quantity": { + "type": "integer", + "description": "Number of source units that are replaced.", + "maximum": -1 + }, + "source_applied_quantity_amount": { + "type": "integer", + "description": "Amount equal to the price of the units that are replaced. Determines the change of the amount of the source item quantity.", + "maximum": 0 + }, + "target_index": { + "type": "integer", + "description": "Index number of the target item that is a replacement of the source item. The enumeration continues the values for the order items, e.g. if there are three items in the request, `target_index` equals `3`, as enumeration starts from `0`." + }, + "target_applied_quantity": { + "type": "integer", + "description": "Number of added target units that are replacements." + }, + "target_applied_quantity_amount": { + "type": "integer", + "description": "Amount equal to the price of the units that are replacements. Determines the change in the amount of the target item quantity." + }, + "target_applied_discount_amount": { + "type": "integer", + "description": "Discount amount applied to the target item with regard to the replacement. Equals the `target_applied_quantity_amount` minus `source_applied_quantity_amount`." + } + } + } + }, "AreaStoreCampaignAssignment": { "title": "AreaStoreCampaignAssignment", "type": "object", @@ -42503,154 +41010,7 @@ "$ref": "#/components/schemas/RedeemableResult" }, "order": { - "title": "QualificationsRedeemableOrder", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", - "nullable": true - }, - "source_id": { - "type": "string", - "nullable": true, - "description": "Unique source ID of an existing order that will be linked to the redemption of this request." - }, - "status": { - "type": "string", - "description": "The order status.", - "enum": [ - "CREATED", - "PAID", - "CANCELED", - "FULFILLED" - ], - "nullable": true - }, - "amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "initial_amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "discount_amount": { - "type": "integer", - "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_amount": { - "type": "integer", - "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "applied_discount_amount": { - "type": "integer", - "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_applied_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", - "nullable": true - }, - "total_applied_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", - "nullable": true - }, - "metadata": { - "title": "QualificationsRedeemableOrderMetadata", - "type": "object", - "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "order", - "enum": [ - "order" - ], - "nullable": true - }, - "created_at": { - "type": "string", - "example": "2021-12-22T10:13:06.487Z", - "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", - "format": "date-time", - "nullable": true - }, - "updated_at": { - "type": "string", - "nullable": true, - "example": "2021-12-22T10:14:45.316Z", - "format": "date-time", - "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." - }, - "customer_id": { - "type": "string", - "nullable": true, - "description": "Unique customer ID of the customer making the purchase.", - "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" - }, - "referrer_id": { - "type": "string", - "nullable": true, - "description": "Unique referrer ID.", - "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" - }, - "customer": { - "$ref": "#/components/schemas/CustomerId" - }, - "referrer": { - "$ref": "#/components/schemas/ReferrerId" - }, - "redemptions": { - "title": "QualificationsRedeemableOrderRedemptionsEntry", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/OrderRedemptionsEntry" - }, - "nullable": true - }, - "items": { - "title": "QualificationsRedeemableOrderItems", - "type": "array", - "description": "Array of items applied to the order. It can include up to 500 items.", - "items": { - "title": "QualificationsRedeemableOrderItemsItem", - "allOf": [ - { - "$ref": "#/components/schemas/OrderCalculatedItem" - }, - { - "type": "object", - "properties": { - "application_details": { - "$ref": "#/components/schemas/ApplicationDetails" - } - } - } - ] - }, - "nullable": true - } - }, - "nullable": true + "$ref": "#/components/schemas/OrderCalculated" }, "validation_rule_id": { "type": "string", @@ -43435,154 +41795,7 @@ "$ref": "#/components/schemas/RedeemableResult" }, "order": { - "title": "QualificationsRedeemableBaseOrder", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", - "nullable": true - }, - "source_id": { - "type": "string", - "nullable": true, - "description": "Unique source ID of an existing order that will be linked to the redemption of this request." - }, - "status": { - "type": "string", - "description": "The order status.", - "enum": [ - "CREATED", - "PAID", - "CANCELED", - "FULFILLED" - ], - "nullable": true - }, - "amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "initial_amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "discount_amount": { - "type": "integer", - "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_amount": { - "type": "integer", - "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "applied_discount_amount": { - "type": "integer", - "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_applied_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", - "nullable": true - }, - "total_applied_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", - "nullable": true - }, - "metadata": { - "title": "QualificationsRedeemableBaseOrderMetadata", - "type": "object", - "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "order", - "enum": [ - "order" - ], - "nullable": true - }, - "created_at": { - "type": "string", - "example": "2021-12-22T10:13:06.487Z", - "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", - "format": "date-time", - "nullable": true - }, - "updated_at": { - "type": "string", - "nullable": true, - "example": "2021-12-22T10:14:45.316Z", - "format": "date-time", - "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." - }, - "customer_id": { - "type": "string", - "nullable": true, - "description": "Unique customer ID of the customer making the purchase.", - "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" - }, - "referrer_id": { - "type": "string", - "nullable": true, - "description": "Unique referrer ID.", - "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" - }, - "customer": { - "$ref": "#/components/schemas/CustomerId" - }, - "referrer": { - "$ref": "#/components/schemas/ReferrerId" - }, - "redemptions": { - "title": "QualificationsRedeemableBaseOrderRedemptionsEntry", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/OrderRedemptionsEntry" - }, - "nullable": true - }, - "items": { - "title": "QualificationsRedeemableBaseOrderItems", - "type": "array", - "description": "Array of items applied to the order. It can include up to 500 items.", - "items": { - "title": "QualificationsRedeemableBaseOrderItemsItem", - "allOf": [ - { - "$ref": "#/components/schemas/OrderCalculatedItem" - }, - { - "type": "object", - "properties": { - "application_details": { - "$ref": "#/components/schemas/ApplicationDetails" - } - } - } - ] - }, - "nullable": true - } - }, - "nullable": true + "$ref": "#/components/schemas/OrderCalculated" }, "validation_rule_id": { "type": "string", diff --git a/reference/readonly-sdks/php/OpenAPI.json b/reference/readonly-sdks/php/OpenAPI.json index e67ad7a5..171f683d 100644 --- a/reference/readonly-sdks/php/OpenAPI.json +++ b/reference/readonly-sdks/php/OpenAPI.json @@ -539,6 +539,9 @@ "description": "The metadata object stores all custom attributes assigned to the campaign. A set of key/value pairs that you can attach to a campaign object. It can be useful for storing additional information about the campaign in a structured format.", "nullable": true }, + "access_settings": { + "$ref": "#/components/schemas/AccessSettings" + }, "validation_rules": { "title": "CampaignsCreateRequestBodyValidationRules", "type": "array", @@ -1217,6 +1220,9 @@ "example": "cat_0b688929a2476386a7", "nullable": true }, + "access_settings": { + "$ref": "#/components/schemas/AccessSettings" + }, "activity_duration_after_publishing": { "type": "string", "description": "Defines the amount of time the vouchers will be active after publishing. The value is shown in the ISO 8601 format. For example, a voucher with the value of P24D will be valid for a duration of 24 days.", @@ -2587,194 +2593,7 @@ "nullable": true }, "order": { - "title": "ClientQualificationsCheckEligibilityResponseBodyOrder", - "type": "object", - "nullable": true, - "properties": { - "id": { - "type": "string", - "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", - "nullable": true - }, - "source_id": { - "type": "string", - "nullable": true, - "description": "Unique source ID of an existing order that will be linked to the redemption of this request." - }, - "status": { - "type": "string", - "description": "The order status.", - "enum": [ - "CREATED", - "PAID", - "CANCELED", - "FULFILLED" - ], - "nullable": true - }, - "amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "initial_amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "discount_amount": { - "type": "integer", - "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_amount": { - "type": "integer", - "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "applied_discount_amount": { - "type": "integer", - "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_applied_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", - "nullable": true - }, - "total_applied_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", - "nullable": true - }, - "metadata": { - "title": "ClientQualificationsCheckEligibilityResponseBodyOrderMetadata", - "type": "object", - "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "order", - "enum": [ - "order" - ], - "nullable": true - }, - "created_at": { - "type": "string", - "example": "2021-12-22T10:13:06.487Z", - "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", - "format": "date-time", - "nullable": true - }, - "updated_at": { - "type": "string", - "nullable": true, - "example": "2021-12-22T10:14:45.316Z", - "format": "date-time", - "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." - }, - "customer_id": { - "type": "string", - "nullable": true, - "description": "Unique customer ID of the customer making the purchase.", - "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" - }, - "referrer_id": { - "type": "string", - "nullable": true, - "description": "Unique referrer ID.", - "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" - }, - "customer": { - "$ref": "#/components/schemas/CustomerId" - }, - "referrer": { - "$ref": "#/components/schemas/ReferrerId" - }, - "redemptions": { - "title": "ClientQualificationsCheckEligibilityResponseBodyOrderRedemptionsEntry", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/OrderRedemptionsEntry" - }, - "nullable": true - }, - "items": { - "title": "ClientQualificationsCheckEligibilityResponseBodyOrderItems", - "type": "array", - "description": "Array of items applied to the order. It can include up to 500 items.", - "items": { - "title": "ClientQualificationsCheckEligibilityResponseBodyOrderItemsItem", - "allOf": [ - { - "$ref": "#/components/schemas/OrderCalculatedItem" - }, - { - "type": "object", - "properties": { - "application_details": { - "title": "ClientQualificationsCheckEligibilityResponseBodyOrderItemsItemApplicationDetails", - "type": "array", - "description": "Array containing details about the items that are replaced and the items that are replacements for discounts with the `REPLACE_ITEMS` effect.", - "items": { - "title": "ClientQualificationsCheckEligibilityResponseBodyOrderItemsItemApplicationDetailsItem", - "type": "object", - "description": "Object representing item replacement.", - "properties": { - "source_index": { - "type": "integer", - "description": "Index number of the source item that is replaced. The enumeration starts from `0`, which represents the first item in the request, e.g., if the replaced item is passed as the second in the request, `source_index` equals `3`.", - "minimum": 0 - }, - "source_applied_quantity": { - "type": "integer", - "description": "Number of source units that are replaced.", - "maximum": -1 - }, - "source_applied_quantity_amount": { - "type": "integer", - "description": "Amount equal to the price of the units that are replaced. Determines the change of the amount of the source item quantity.", - "maximum": 0 - }, - "target_index": { - "type": "integer", - "description": "Index number of the target item that is a replacement of the source item. The enumeration continues the values for the order items, e.g. if there are three items in the request, `target_index` equals `3`, as enumeration starts from `0`." - }, - "target_applied_quantity": { - "type": "integer", - "description": "Number of added target units that are replacements." - }, - "target_applied_quantity_amount": { - "type": "integer", - "description": "Amount equal to the price of the units that are replacements. Determines the change in the amount of the target item quantity." - }, - "target_applied_discount_amount": { - "type": "integer", - "description": "Discount amount applied to the target item with regard to the replacement. Equals the `target_applied_quantity_amount` minus `source_applied_quantity_amount`." - } - } - } - } - } - } - ] - }, - "nullable": true - } - } + "$ref": "#/components/schemas/OrderCalculated" }, "stacking_rules": { "$ref": "#/components/schemas/StackingRules" @@ -2903,195 +2722,7 @@ "$ref": "#/components/schemas/Redemption" }, "order": { - "title": "ClientRedemptionsRedeemResponseBodyOrder", - "description": "Contains the order details associated with the redemption.", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", - "nullable": true - }, - "source_id": { - "type": "string", - "nullable": true, - "description": "Unique source ID of an existing order that will be linked to the redemption of this request." - }, - "status": { - "type": "string", - "description": "The order status.", - "enum": [ - "CREATED", - "PAID", - "CANCELED", - "FULFILLED" - ], - "nullable": true - }, - "amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "initial_amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "discount_amount": { - "type": "integer", - "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_amount": { - "type": "integer", - "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "applied_discount_amount": { - "type": "integer", - "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_applied_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", - "nullable": true - }, - "total_applied_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", - "nullable": true - }, - "metadata": { - "title": "ClientRedemptionsRedeemResponseBodyOrderMetadata", - "type": "object", - "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "order", - "enum": [ - "order" - ], - "nullable": true - }, - "created_at": { - "type": "string", - "example": "2021-12-22T10:13:06.487Z", - "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", - "format": "date-time", - "nullable": true - }, - "updated_at": { - "type": "string", - "nullable": true, - "example": "2021-12-22T10:14:45.316Z", - "format": "date-time", - "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." - }, - "customer_id": { - "type": "string", - "nullable": true, - "description": "Unique customer ID of the customer making the purchase.", - "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" - }, - "referrer_id": { - "type": "string", - "nullable": true, - "description": "Unique referrer ID.", - "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" - }, - "customer": { - "$ref": "#/components/schemas/CustomerId" - }, - "referrer": { - "$ref": "#/components/schemas/ReferrerId" - }, - "redemptions": { - "title": "ClientRedemptionsRedeemResponseBodyOrderRedemptionsEntry", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/OrderRedemptionsEntry" - }, - "nullable": true - }, - "items": { - "title": "ClientRedemptionsRedeemResponseBodyOrderItems", - "type": "array", - "description": "Array of items applied to the order. It can include up to 500 items.", - "items": { - "title": "ClientRedemptionsRedeemResponseBodyOrderItemsItem", - "allOf": [ - { - "$ref": "#/components/schemas/OrderCalculatedItem" - }, - { - "type": "object", - "properties": { - "application_details": { - "title": "ClientRedemptionsRedeemResponseBodyOrderItemsItemApplicationDetails", - "type": "array", - "description": "Array containing details about the items that are replaced and the items that are replacements for discounts with the `REPLACE_ITEMS` effect.", - "items": { - "title": "ClientRedemptionsRedeemResponseBodyOrderItemsItemApplicationDetailsItem", - "type": "object", - "description": "Object representing item replacement.", - "properties": { - "source_index": { - "type": "integer", - "description": "Index number of the source item that is replaced. The enumeration starts from `0`, which represents the first item in the request, e.g., if the replaced item is passed as the second in the request, `source_index` equals `3`.", - "minimum": 0 - }, - "source_applied_quantity": { - "type": "integer", - "description": "Number of source units that are replaced.", - "maximum": -1 - }, - "source_applied_quantity_amount": { - "type": "integer", - "description": "Amount equal to the price of the units that are replaced. Determines the change of the amount of the source item quantity.", - "maximum": 0 - }, - "target_index": { - "type": "integer", - "description": "Index number of the target item that is a replacement of the source item. The enumeration continues the values for the order items, e.g. if there are three items in the request, `target_index` equals `3`, as enumeration starts from `0`." - }, - "target_applied_quantity": { - "type": "integer", - "description": "Number of added target units that are replacements." - }, - "target_applied_quantity_amount": { - "type": "integer", - "description": "Amount equal to the price of the units that are replacements. Determines the change in the amount of the target item quantity." - }, - "target_applied_discount_amount": { - "type": "integer", - "description": "Discount amount applied to the target item with regard to the replacement. Equals the `target_applied_quantity_amount` minus `source_applied_quantity_amount`." - } - } - } - } - } - } - ] - }, - "nullable": true - } - }, - "nullable": true + "$ref": "#/components/schemas/OrderCalculated" }, "inapplicable_redeemables": { "title": "ClientRedemptionsRedeemResponseBodyInapplicableRedeemables", @@ -3259,6 +2890,7 @@ "order": { "title": "ClientValidationsValidateResponseBodyRedeemablesItemOrder", "type": "object", + "description": "Order information.", "properties": { "id": { "type": "string", @@ -3368,46 +3000,10 @@ "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" }, "customer": { - "title": "ClientValidationsValidateResponseBodyRedeemablesItemOrderCustomer", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "A unique identifier of an existing customer.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "customer", - "enum": [ - "customer" - ], - "nullable": true - } - }, - "required": [] + "$ref": "#/components/schemas/CustomerId" }, "referrer": { - "title": "ClientValidationsValidateResponseBodyRedeemablesItemOrderReferrer", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "A unique identifier of an existing customer.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "customer", - "enum": [ - "customer" - ], - "nullable": true - } - }, - "required": [] + "$ref": "#/components/schemas/ReferrerId" }, "redemptions": { "title": "ClientValidationsValidateResponseBodyRedeemablesItemOrderRedemptionsEntry", @@ -3420,7 +3016,7 @@ "items": { "title": "ClientValidationsValidateResponseBodyRedeemablesItemOrderItems", "type": "array", - "description": "Array of items applied to the order. It can include up to 500 items.", + "description": "Array of items applied to the order. It can include up 500 items.", "items": { "$ref": "#/components/schemas/OrderCalculatedItem" }, @@ -3649,194 +3245,7 @@ "nullable": true }, "order": { - "title": "ClientValidationsValidateResponseBodyOrder", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", - "nullable": true - }, - "source_id": { - "type": "string", - "nullable": true, - "description": "Unique source ID of an existing order that will be linked to the redemption of this request." - }, - "status": { - "type": "string", - "description": "The order status.", - "enum": [ - "CREATED", - "PAID", - "CANCELED", - "FULFILLED" - ], - "nullable": true - }, - "amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "initial_amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "discount_amount": { - "type": "integer", - "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_amount": { - "type": "integer", - "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "applied_discount_amount": { - "type": "integer", - "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_applied_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", - "nullable": true - }, - "total_applied_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", - "nullable": true - }, - "metadata": { - "title": "ClientValidationsValidateResponseBodyOrderMetadata", - "type": "object", - "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "order", - "enum": [ - "order" - ], - "nullable": true - }, - "created_at": { - "type": "string", - "example": "2021-12-22T10:13:06.487Z", - "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", - "format": "date-time", - "nullable": true - }, - "updated_at": { - "type": "string", - "nullable": true, - "example": "2021-12-22T10:14:45.316Z", - "format": "date-time", - "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." - }, - "customer_id": { - "type": "string", - "nullable": true, - "description": "Unique customer ID of the customer making the purchase.", - "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" - }, - "referrer_id": { - "type": "string", - "nullable": true, - "description": "Unique referrer ID.", - "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" - }, - "customer": { - "$ref": "#/components/schemas/CustomerId" - }, - "referrer": { - "$ref": "#/components/schemas/ReferrerId" - }, - "redemptions": { - "title": "ClientValidationsValidateResponseBodyOrderRedemptionsEntry", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/OrderRedemptionsEntry" - }, - "nullable": true - }, - "items": { - "title": "ClientValidationsValidateResponseBodyOrderItems", - "type": "array", - "description": "Array of items applied to the order. It can include up to 500 items.", - "items": { - "title": "ClientValidationsValidateResponseBodyOrderItemsItem", - "allOf": [ - { - "$ref": "#/components/schemas/OrderCalculatedItem" - }, - { - "type": "object", - "properties": { - "application_details": { - "title": "ClientValidationsValidateResponseBodyOrderItemsItemApplicationDetails", - "type": "array", - "description": "Array containing details about the items that are replaced and the items that are replacements for discounts with the `REPLACE_ITEMS` effect.", - "items": { - "title": "ClientValidationsValidateResponseBodyOrderItemsItemApplicationDetailsItem", - "type": "object", - "description": "Object representing item replacement.", - "properties": { - "source_index": { - "type": "integer", - "description": "Index number of the source item that is replaced. The enumeration starts from `0`, which represents the first item in the request, e.g., if the replaced item is passed as the second in the request, `source_index` equals `3`.", - "minimum": 0 - }, - "source_applied_quantity": { - "type": "integer", - "description": "Number of source units that are replaced.", - "maximum": -1 - }, - "source_applied_quantity_amount": { - "type": "integer", - "description": "Amount equal to the price of the units that are replaced. Determines the change of the amount of the source item quantity.", - "maximum": 0 - }, - "target_index": { - "type": "integer", - "description": "Index number of the target item that is a replacement of the source item. The enumeration continues the values for the order items, e.g. if there are three items in the request, `target_index` equals `3`, as enumeration starts from `0`." - }, - "target_applied_quantity": { - "type": "integer", - "description": "Number of added target units that are replacements." - }, - "target_applied_quantity_amount": { - "type": "integer", - "description": "Amount equal to the price of the units that are replacements. Determines the change in the amount of the target item quantity." - }, - "target_applied_discount_amount": { - "type": "integer", - "description": "Discount amount applied to the target item with regard to the replacement. Equals the `target_applied_quantity_amount` minus `source_applied_quantity_amount`." - } - } - } - } - } - } - ] - }, - "nullable": true - } - }, - "nullable": true + "$ref": "#/components/schemas/OrderCalculated" }, "tracking_id": { "type": "string", @@ -5987,6 +5396,9 @@ "description": "The metadata object stores all custom attributes assigned to the campaign. A set of key/value pairs that you can attach to a campaign object. It can be useful for storing additional information about the campaign in a structured format.", "nullable": true }, + "access_settings": { + "$ref": "#/components/schemas/AccessSettings" + }, "validation_rules": { "title": "LoyaltiesCreateCampaignRequestBodyValidationRules", "type": "array", @@ -10433,179 +9845,7 @@ "nullable": true }, "order": { - "title": "LoyaltiesMembersRedemptionRedeemResponseBodyOrder", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", - "nullable": true - }, - "source_id": { - "type": "string", - "nullable": true, - "description": "Unique source ID of an existing order that will be linked to the redemption of this request." - }, - "status": { - "type": "string", - "description": "The order status.", - "enum": [ - "CREATED", - "PAID", - "CANCELED", - "FULFILLED" - ], - "nullable": true - }, - "amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "initial_amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "discount_amount": { - "type": "integer", - "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_amount": { - "type": "integer", - "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "applied_discount_amount": { - "type": "integer", - "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_applied_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", - "nullable": true - }, - "total_applied_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", - "nullable": true - }, - "metadata": { - "title": "LoyaltiesMembersRedemptionRedeemResponseBodyOrderMetadata", - "type": "object", - "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "order", - "enum": [ - "order" - ], - "nullable": true - }, - "created_at": { - "type": "string", - "example": "2021-12-22T10:13:06.487Z", - "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", - "format": "date-time", - "nullable": true - }, - "updated_at": { - "type": "string", - "nullable": true, - "example": "2021-12-22T10:14:45.316Z", - "format": "date-time", - "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." - }, - "customer_id": { - "type": "string", - "nullable": true, - "description": "Unique customer ID of the customer making the purchase.", - "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" - }, - "referrer_id": { - "type": "string", - "nullable": true, - "description": "Unique referrer ID.", - "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" - }, - "customer": { - "title": "LoyaltiesMembersRedemptionRedeemResponseBodyOrderCustomer", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "A unique identifier of an existing customer.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "customer", - "enum": [ - "customer" - ], - "nullable": true - } - }, - "required": [], - "nullable": true - }, - "referrer": { - "title": "LoyaltiesMembersRedemptionRedeemResponseBodyOrderReferrer", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "A unique identifier of an existing customer.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "customer", - "enum": [ - "customer" - ], - "nullable": true - } - }, - "required": [], - "nullable": true - }, - "redemptions": { - "title": "LoyaltiesMembersRedemptionRedeemResponseBodyOrderRedemptionsEntry", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/OrderRedemptionsEntry" - }, - "nullable": true - }, - "items": { - "title": "LoyaltiesMembersRedemptionRedeemResponseBodyOrderItems", - "type": "array", - "description": "Array of items applied to the order. It can include up to 500 items.", - "items": { - "$ref": "#/components/schemas/OrderCalculatedItem" - }, - "nullable": true - } - }, - "nullable": true + "$ref": "#/components/schemas/OrderCalculated" }, "channel": { "title": "LoyaltiesMembersRedemptionRedeemResponseBodyChannel", @@ -12517,6 +11757,9 @@ "example": "cat_0b688929a2476386a7", "nullable": true }, + "access_settings": { + "$ref": "#/components/schemas/AccessSettings" + }, "activity_duration_after_publishing": { "type": "string", "description": "Defines the amount of time the vouchers will be active after publishing. The value is shown in the ISO 8601 format. For example, a voucher with the value of P24D will be valid for a duration of 24 days.", @@ -17177,7 +16420,7 @@ "items": { "title": "OrdersCreateResponseBodyItems", "type": "array", - "description": "Array of items applied to the order. It can include up to 500 items.", + "description": "Array of items applied to the order. It can include up 500 items.", "items": { "$ref": "#/components/schemas/OrderCalculatedItem" }, @@ -17478,7 +16721,7 @@ "items": { "title": "OrdersGetResponseBodyItems", "type": "array", - "description": "Array of items applied to the order. It can include up to 500 items.", + "description": "Array of items applied to the order. It can include up 500 items.", "items": { "$ref": "#/components/schemas/OrderCalculatedItem" }, @@ -17567,25 +16810,7 @@ "type": "array", "description": "Contains array of order objects.", "items": { - "title": "OrdersListResponseBodyOrdersItem", - "allOf": [ - { - "$ref": "#/components/schemas/OrderCalculated" - }, - { - "type": "object", - "properties": { - "items": { - "title": "OrdersListResponseBodyOrdersItemItems", - "type": "array", - "description": "Array of items applied to the order. It can include up to 500 items.", - "items": { - "$ref": "#/components/schemas/OrderCalculatedItem" - } - } - } - } - ] + "$ref": "#/components/schemas/OrderCalculated" }, "nullable": true }, @@ -17797,7 +17022,7 @@ "items": { "title": "OrdersUpdateResponseBodyItems", "type": "array", - "description": "Array of items applied to the order. It can include up to 500 items.", + "description": "Array of items applied to the order. It can include up 500 items.", "items": { "$ref": "#/components/schemas/OrderCalculatedItem" }, @@ -22755,141 +21980,7 @@ "nullable": true }, "order": { - "title": "QualificationsCheckEligibilityResponseBodyOrder", - "type": "object", - "nullable": true, - "properties": { - "id": { - "type": "string", - "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", - "nullable": true - }, - "source_id": { - "type": "string", - "nullable": true, - "description": "Unique source ID of an existing order that will be linked to the redemption of this request." - }, - "status": { - "type": "string", - "description": "The order status.", - "enum": [ - "CREATED", - "PAID", - "CANCELED", - "FULFILLED" - ], - "nullable": true - }, - "amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "initial_amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "discount_amount": { - "type": "integer", - "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_amount": { - "type": "integer", - "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "applied_discount_amount": { - "type": "integer", - "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_applied_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", - "nullable": true - }, - "total_applied_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", - "nullable": true - }, - "metadata": { - "title": "QualificationsCheckEligibilityResponseBodyOrderMetadata", - "type": "object", - "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "order", - "enum": [ - "order" - ], - "nullable": true - }, - "created_at": { - "type": "string", - "example": "2021-12-22T10:13:06.487Z", - "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", - "format": "date-time", - "nullable": true - }, - "updated_at": { - "type": "string", - "nullable": true, - "example": "2021-12-22T10:14:45.316Z", - "format": "date-time", - "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." - }, - "customer_id": { - "type": "string", - "nullable": true, - "description": "Unique customer ID of the customer making the purchase.", - "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" - }, - "referrer_id": { - "type": "string", - "nullable": true, - "description": "Unique referrer ID.", - "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" - }, - "customer": { - "$ref": "#/components/schemas/CustomerId" - }, - "referrer": { - "$ref": "#/components/schemas/ReferrerId" - }, - "redemptions": { - "title": "QualificationsCheckEligibilityResponseBodyOrderRedemptionsEntry", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/OrderRedemptionsEntry" - }, - "nullable": true - }, - "items": { - "title": "QualificationsCheckEligibilityResponseBodyOrderItems", - "type": "array", - "description": "Array of items applied to the order. It can include up to 500 items.", - "items": { - "$ref": "#/components/schemas/OrderCalculatedItem" - }, - "nullable": true - } - } + "$ref": "#/components/schemas/OrderCalculated" }, "stacking_rules": { "$ref": "#/components/schemas/StackingRules" @@ -23189,7 +22280,7 @@ "items": { "title": "RedemptionsGetResponseBodyOrderItems", "type": "array", - "description": "Array of items applied to the order. It can include up to 500 items.", + "description": "Array of items applied to the order. It can include up 500 items.", "items": { "$ref": "#/components/schemas/OrderCalculatedItem" }, @@ -24137,7 +23228,7 @@ "items": { "title": "RedemptionsListResponseBodyRedemptionsItemOrderItems", "type": "array", - "description": "Array of items applied to the order. It can include up to 500 items.", + "description": "Array of items applied to the order. It can include up 500 items.", "items": { "$ref": "#/components/schemas/OrderCalculatedItem" }, @@ -24891,195 +23982,7 @@ "$ref": "#/components/schemas/Redemption" }, "order": { - "title": "RedemptionsRedeemResponseBodyOrder", - "description": "Contains the order details associated with the redemption.", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", - "nullable": true - }, - "source_id": { - "type": "string", - "nullable": true, - "description": "Unique source ID of an existing order that will be linked to the redemption of this request." - }, - "status": { - "type": "string", - "description": "The order status.", - "enum": [ - "CREATED", - "PAID", - "CANCELED", - "FULFILLED" - ], - "nullable": true - }, - "amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "initial_amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "discount_amount": { - "type": "integer", - "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_amount": { - "type": "integer", - "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "applied_discount_amount": { - "type": "integer", - "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_applied_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", - "nullable": true - }, - "total_applied_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", - "nullable": true - }, - "metadata": { - "title": "RedemptionsRedeemResponseBodyOrderMetadata", - "type": "object", - "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "order", - "enum": [ - "order" - ], - "nullable": true - }, - "created_at": { - "type": "string", - "example": "2021-12-22T10:13:06.487Z", - "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", - "format": "date-time", - "nullable": true - }, - "updated_at": { - "type": "string", - "nullable": true, - "example": "2021-12-22T10:14:45.316Z", - "format": "date-time", - "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." - }, - "customer_id": { - "type": "string", - "nullable": true, - "description": "Unique customer ID of the customer making the purchase.", - "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" - }, - "referrer_id": { - "type": "string", - "nullable": true, - "description": "Unique referrer ID.", - "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" - }, - "customer": { - "$ref": "#/components/schemas/CustomerId" - }, - "referrer": { - "$ref": "#/components/schemas/ReferrerId" - }, - "redemptions": { - "title": "RedemptionsRedeemResponseBodyOrderRedemptionsEntry", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/OrderRedemptionsEntry" - }, - "nullable": true - }, - "items": { - "title": "RedemptionsRedeemResponseBodyOrderItems", - "type": "array", - "description": "Array of items applied to the order. It can include up to 500 items.", - "items": { - "title": "RedemptionsRedeemResponseBodyOrderItemsItem", - "allOf": [ - { - "$ref": "#/components/schemas/OrderCalculatedItem" - }, - { - "type": "object", - "properties": { - "application_details": { - "title": "RedemptionsRedeemResponseBodyOrderItemsItemApplicationDetails", - "type": "array", - "description": "Array containing details about the items that are replaced and the items that are replacements for discounts with the `REPLACE_ITEMS` effect.", - "items": { - "title": "RedemptionsRedeemResponseBodyOrderItemsItemApplicationDetailsItem", - "type": "object", - "description": "Object representing item replacement.", - "properties": { - "source_index": { - "type": "integer", - "description": "Index number of the source item that is replaced. The enumeration starts from `0`, which represents the first item in the request, e.g., if the replaced item is passed as the second in the request, `source_index` equals `3`.", - "minimum": 0 - }, - "source_applied_quantity": { - "type": "integer", - "description": "Number of source units that are replaced.", - "maximum": -1 - }, - "source_applied_quantity_amount": { - "type": "integer", - "description": "Amount equal to the price of the units that are replaced. Determines the change of the amount of the source item quantity.", - "maximum": 0 - }, - "target_index": { - "type": "integer", - "description": "Index number of the target item that is a replacement of the source item. The enumeration continues the values for the order items, e.g. if there are three items in the request, `target_index` equals `3`, as enumeration starts from `0`." - }, - "target_applied_quantity": { - "type": "integer", - "description": "Number of added target units that are replacements." - }, - "target_applied_quantity_amount": { - "type": "integer", - "description": "Amount equal to the price of the units that are replacements. Determines the change in the amount of the target item quantity." - }, - "target_applied_discount_amount": { - "type": "integer", - "description": "Discount amount applied to the target item with regard to the replacement. Equals the `target_applied_quantity_amount` minus `source_applied_quantity_amount`." - } - } - } - } - } - } - ] - }, - "nullable": true - } - }, - "nullable": true + "$ref": "#/components/schemas/OrderCalculated" }, "inapplicable_redeemables": { "title": "RedemptionsRedeemResponseBodyInapplicableRedeemables", @@ -25271,141 +24174,7 @@ "nullable": true }, "order": { - "title": "RedemptionsRollbackCreateResponseBodyOrder", - "nullable": true, - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", - "nullable": true - }, - "source_id": { - "type": "string", - "nullable": true, - "description": "Unique source ID of an existing order that will be linked to the redemption of this request." - }, - "status": { - "type": "string", - "description": "The order status.", - "enum": [ - "CREATED", - "PAID", - "CANCELED", - "FULFILLED" - ], - "nullable": true - }, - "amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "initial_amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "discount_amount": { - "type": "integer", - "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_amount": { - "type": "integer", - "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "applied_discount_amount": { - "type": "integer", - "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_applied_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", - "nullable": true - }, - "total_applied_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", - "nullable": true - }, - "metadata": { - "title": "RedemptionsRollbackCreateResponseBodyOrderMetadata", - "type": "object", - "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "order", - "enum": [ - "order" - ], - "nullable": true - }, - "created_at": { - "type": "string", - "example": "2021-12-22T10:13:06.487Z", - "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", - "format": "date-time", - "nullable": true - }, - "updated_at": { - "type": "string", - "nullable": true, - "example": "2021-12-22T10:14:45.316Z", - "format": "date-time", - "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." - }, - "customer_id": { - "type": "string", - "nullable": true, - "description": "Unique customer ID of the customer making the purchase.", - "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" - }, - "referrer_id": { - "type": "string", - "nullable": true, - "description": "Unique referrer ID.", - "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" - }, - "customer": { - "$ref": "#/components/schemas/CustomerId" - }, - "referrer": { - "$ref": "#/components/schemas/ReferrerId" - }, - "redemptions": { - "title": "RedemptionsRollbackCreateResponseBodyOrderRedemptionsEntry", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/OrderRedemptionsEntry" - }, - "nullable": true - }, - "items": { - "title": "RedemptionsRollbackCreateResponseBodyOrderItems", - "type": "array", - "description": "Array of items applied to the order. It can include up to 500 items.", - "items": { - "$ref": "#/components/schemas/OrderCalculatedItem" - }, - "nullable": true - } - } + "$ref": "#/components/schemas/OrderCalculated" }, "channel": { "title": "RedemptionsRollbackCreateResponseBodyChannel", @@ -25536,18 +24305,6 @@ "allOf": [ { "$ref": "#/components/schemas/OrderCalculated" - }, - { - "type": "object", - "properties": { - "items": { - "type": "array", - "description": "Array of items applied to the order. It can include up to 500 items.", - "items": { - "$ref": "#/components/schemas/OrderCalculatedItem" - } - } - } } ] } @@ -26876,6 +25633,9 @@ "description": "The metadata object stores all custom attributes assigned to the campaign. A set of key/value pairs that you can attach to a campaign object. It can be useful for storing additional information about the campaign in a structured format.", "nullable": true }, + "access_settings": { + "$ref": "#/components/schemas/AccessSettings" + }, "voucher": { "title": "TemplatesCampaignsCampaignSetupCreateRequestBodyVoucher", "type": "object", @@ -28466,6 +27226,7 @@ "order": { "title": "ValidationsValidateResponseBodyRedeemablesItemOrder", "type": "object", + "description": "Order information.", "properties": { "id": { "type": "string", @@ -28575,46 +27336,10 @@ "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" }, "customer": { - "title": "ValidationsValidateResponseBodyRedeemablesItemOrderCustomer", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "A unique identifier of an existing customer.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "customer", - "enum": [ - "customer" - ], - "nullable": true - } - }, - "required": [] + "$ref": "#/components/schemas/CustomerId" }, "referrer": { - "title": "ValidationsValidateResponseBodyRedeemablesItemOrderReferrer", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "A unique identifier of an existing customer.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "customer", - "enum": [ - "customer" - ], - "nullable": true - } - }, - "required": [] + "$ref": "#/components/schemas/ReferrerId" }, "redemptions": { "title": "ValidationsValidateResponseBodyRedeemablesItemOrderRedemptionsEntry", @@ -28627,7 +27352,7 @@ "items": { "title": "ValidationsValidateResponseBodyRedeemablesItemOrderItems", "type": "array", - "description": "Array of items applied to the order. It can include up to 500 items.", + "description": "Array of items applied to the order. It can include up 500 items.", "items": { "$ref": "#/components/schemas/OrderCalculatedItem" }, @@ -28856,194 +27581,7 @@ "nullable": true }, "order": { - "title": "ValidationsValidateResponseBodyOrder", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", - "nullable": true - }, - "source_id": { - "type": "string", - "nullable": true, - "description": "Unique source ID of an existing order that will be linked to the redemption of this request." - }, - "status": { - "type": "string", - "description": "The order status.", - "enum": [ - "CREATED", - "PAID", - "CANCELED", - "FULFILLED" - ], - "nullable": true - }, - "amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "initial_amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "discount_amount": { - "type": "integer", - "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_amount": { - "type": "integer", - "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "applied_discount_amount": { - "type": "integer", - "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_applied_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", - "nullable": true - }, - "total_applied_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", - "nullable": true - }, - "metadata": { - "title": "ValidationsValidateResponseBodyOrderMetadata", - "type": "object", - "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "order", - "enum": [ - "order" - ], - "nullable": true - }, - "created_at": { - "type": "string", - "example": "2021-12-22T10:13:06.487Z", - "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", - "format": "date-time", - "nullable": true - }, - "updated_at": { - "type": "string", - "nullable": true, - "example": "2021-12-22T10:14:45.316Z", - "format": "date-time", - "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." - }, - "customer_id": { - "type": "string", - "nullable": true, - "description": "Unique customer ID of the customer making the purchase.", - "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" - }, - "referrer_id": { - "type": "string", - "nullable": true, - "description": "Unique referrer ID.", - "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" - }, - "customer": { - "$ref": "#/components/schemas/CustomerId" - }, - "referrer": { - "$ref": "#/components/schemas/ReferrerId" - }, - "redemptions": { - "title": "ValidationsValidateResponseBodyOrderRedemptionsEntry", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/OrderRedemptionsEntry" - }, - "nullable": true - }, - "items": { - "title": "ValidationsValidateResponseBodyOrderItems", - "type": "array", - "description": "Array of items applied to the order. It can include up to 500 items.", - "items": { - "title": "ValidationsValidateResponseBodyOrderItemsItem", - "allOf": [ - { - "$ref": "#/components/schemas/OrderCalculatedItem" - }, - { - "type": "object", - "properties": { - "application_details": { - "title": "ValidationsValidateResponseBodyOrderItemsItemApplicationDetails", - "type": "array", - "description": "Array containing details about the items that are replaced and the items that are replacements for discounts with the `REPLACE_ITEMS` effect.", - "items": { - "title": "ValidationsValidateResponseBodyOrderItemsItemApplicationDetailsItem", - "type": "object", - "description": "Object representing item replacement.", - "properties": { - "source_index": { - "type": "integer", - "description": "Index number of the source item that is replaced. The enumeration starts from `0`, which represents the first item in the request, e.g., if the replaced item is passed as the second in the request, `source_index` equals `3`.", - "minimum": 0 - }, - "source_applied_quantity": { - "type": "integer", - "description": "Number of source units that are replaced.", - "maximum": -1 - }, - "source_applied_quantity_amount": { - "type": "integer", - "description": "Amount equal to the price of the units that are replaced. Determines the change of the amount of the source item quantity.", - "maximum": 0 - }, - "target_index": { - "type": "integer", - "description": "Index number of the target item that is a replacement of the source item. The enumeration continues the values for the order items, e.g. if there are three items in the request, `target_index` equals `3`, as enumeration starts from `0`." - }, - "target_applied_quantity": { - "type": "integer", - "description": "Number of added target units that are replacements." - }, - "target_applied_quantity_amount": { - "type": "integer", - "description": "Amount equal to the price of the units that are replacements. Determines the change in the amount of the target item quantity." - }, - "target_applied_discount_amount": { - "type": "integer", - "description": "Discount amount applied to the target item with regard to the replacement. Equals the `target_applied_quantity_amount` minus `source_applied_quantity_amount`." - } - } - } - } - } - } - ] - }, - "nullable": true - } - }, - "nullable": true + "$ref": "#/components/schemas/OrderCalculated" }, "tracking_id": { "type": "string", @@ -31355,6 +29893,69 @@ "type": "string", "format": "hostname" }, + "AccessSettings": { + "title": "AccessSettings", + "type": "object", + "description": "Assigns or unassigns an area or store to the campaign.\n\n**NOTE**: this object can be sent if the Areas and Stores enterprise feature is enabled. Contact [Voucherify Sales](https://www.voucherify.io/contact-sales) to learn more.", + "properties": { + "assign": { + "title": "AccessSettingsAssign", + "type": "object", + "description": "Assigns the campaign to an area or a store. Provide the area and/or store IDs in the respective arrays. If a campaign changes assignments between areas or stores, unassign it from the area. For example, if a campaign is assigned to Area-01, but it must be now assigned to Store-01 within this area, you have to unassign the campaign from Area-01 and assign to Store-01 only.\n\nIf you want to assign the campaign to stores only, you do not have to send the area ID.", + "properties": { + "areas_ids": { + "title": "AccessSettingsAssignAreasIds", + "type": "array", + "description": "List all area IDs to which the campaign will be assigned.", + "items": { + "title": "AccessSettingsAssignAreasIdsItem", + "type": "string" + }, + "nullable": true + }, + "area_stores_ids": { + "title": "AccessSettingsAssignAreaStoresIds", + "type": "array", + "description": "List all store IDs to which the campaign will be assigned.", + "items": { + "title": "AccessSettingsAssignAreaStoresIdsItem", + "type": "string" + }, + "nullable": true + } + }, + "nullable": true + }, + "unassign": { + "title": "AccessSettingsUnassign", + "type": "object", + "description": "Unassigns the campaign from an area or a store. Provide the area and/or store IDs in the respective arrays. If a campaign changes assignments between areas or stores, unassign it first. For example, if a campaign is assigned to Area-01, but it must be now assigned to Store-01 within this area, you have to unassign the campaign from Area-01 and assigned to Store-01 only.\n\nIf you want to assign the campaign to stores only, you do not have to send the area ID.", + "properties": { + "areas_ids": { + "title": "AccessSettingsUnassignAreasIds", + "type": "array", + "description": "List all area IDs from which the campaign will be unassigned.", + "items": { + "title": "AccessSettingsUnassignAreasIdsItem", + "type": "string" + }, + "nullable": true + }, + "area_stores_ids": { + "title": "AccessSettingsUnassignAreaStoresIds", + "type": "array", + "description": "List all store IDs to which the campaign will be unassigned.", + "items": { + "title": "AccessSettingsUnassignAreaStoresIdsItem", + "type": "string" + }, + "nullable": true + } + }, + "nullable": true + } + } + }, "AccessSettingsCampaignAssignmentsList": { "title": "AccessSettingsCampaignAssignmentsList", "type": "object", @@ -36888,6 +35489,15 @@ "$ref": "#/components/schemas/OrderRedemptionsEntry" }, "nullable": true + }, + "items": { + "title": "OrderCalculatedItems", + "type": "array", + "description": "Array of items applied to the order. It can include up 500 items.", + "items": { + "$ref": "#/components/schemas/OrderCalculatedItem" + }, + "nullable": true } } }, @@ -37076,6 +35686,50 @@ "type": "object", "description": "A set of custom key/value pairs that you can attach to an item object. It can be useful for storing additional information about the item in a structured format. It can be used to define business validation rules or discount formulas.", "nullable": true + }, + "application_details": { + "title": "OrderCalculatedItemApplicationDetails", + "type": "array", + "description": "Array containing details about the items that are replaced and the items that are replacements for discounts with the `REPLACE_ITEMS` effect.", + "items": { + "title": "OrderCalculatedItemApplicationDetailsItem", + "type": "object", + "description": "Object representing item replacement.", + "properties": { + "source_index": { + "type": "integer", + "description": "Index number of the source item that is replaced. The enumeration starts from `0`, which represents the first item in the request, e.g., if the replaced item is passed as the second in the request, `source_index` equals `3`.", + "minimum": 0 + }, + "source_applied_quantity": { + "type": "integer", + "description": "Number of source units that are replaced.", + "maximum": -1 + }, + "source_applied_quantity_amount": { + "type": "integer", + "description": "Amount equal to the price of the units that are replaced. Determines the change of the amount of the source item quantity.", + "maximum": 0 + }, + "target_index": { + "type": "integer", + "description": "Index number of the target item that is a replacement of the source item. The enumeration continues the values for the order items, e.g. if there are three items in the request, `target_index` equals `3`, as enumeration starts from `0`." + }, + "target_applied_quantity": { + "type": "integer", + "description": "Number of added target units that are replacements." + }, + "target_applied_quantity_amount": { + "type": "integer", + "description": "Amount equal to the price of the units that are replacements. Determines the change in the amount of the target item quantity." + }, + "target_applied_discount_amount": { + "type": "integer", + "description": "Discount amount applied to the target item with regard to the replacement. Equals the `target_applied_quantity_amount` minus `source_applied_quantity_amount`." + } + } + }, + "nullable": true } }, "required": [] @@ -38629,179 +37283,7 @@ "nullable": true }, "order": { - "title": "RedemptionOrder", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", - "nullable": true - }, - "source_id": { - "type": "string", - "nullable": true, - "description": "Unique source ID of an existing order that will be linked to the redemption of this request." - }, - "status": { - "type": "string", - "description": "The order status.", - "enum": [ - "CREATED", - "PAID", - "CANCELED", - "FULFILLED" - ], - "nullable": true - }, - "amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "initial_amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "discount_amount": { - "type": "integer", - "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_amount": { - "type": "integer", - "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "applied_discount_amount": { - "type": "integer", - "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_applied_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", - "nullable": true - }, - "total_applied_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", - "nullable": true - }, - "metadata": { - "title": "RedemptionOrderMetadata", - "type": "object", - "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "order", - "enum": [ - "order" - ], - "nullable": true - }, - "created_at": { - "type": "string", - "example": "2021-12-22T10:13:06.487Z", - "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", - "format": "date-time", - "nullable": true - }, - "updated_at": { - "type": "string", - "nullable": true, - "example": "2021-12-22T10:14:45.316Z", - "format": "date-time", - "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." - }, - "customer_id": { - "type": "string", - "nullable": true, - "description": "Unique customer ID of the customer making the purchase.", - "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" - }, - "referrer_id": { - "type": "string", - "nullable": true, - "description": "Unique referrer ID.", - "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" - }, - "customer": { - "title": "RedemptionOrderCustomer", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "A unique identifier of an existing customer.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "customer", - "enum": [ - "customer" - ], - "nullable": true - } - }, - "required": [], - "nullable": true - }, - "referrer": { - "title": "RedemptionOrderReferrer", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "A unique identifier of an existing customer.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "customer", - "enum": [ - "customer" - ], - "nullable": true - } - }, - "required": [], - "nullable": true - }, - "redemptions": { - "title": "RedemptionOrderRedemptionsEntry", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/OrderRedemptionsEntry" - }, - "nullable": true - }, - "items": { - "title": "RedemptionOrderItems", - "type": "array", - "description": "Array of items applied to the order. It can include up to 500 items.", - "items": { - "$ref": "#/components/schemas/OrderCalculatedItem" - }, - "nullable": true - } - }, - "nullable": true + "$ref": "#/components/schemas/OrderCalculated" }, "channel": { "title": "RedemptionChannel", @@ -39463,7 +37945,7 @@ "items": { "title": "RedemptionEntryOrderItems", "type": "array", - "description": "Array of items applied to the order. It can include up to 500 items.", + "description": "Array of items applied to the order. It can include up 500 items.", "items": { "$ref": "#/components/schemas/OrderCalculatedItem" }, @@ -40400,141 +38882,7 @@ "nullable": true }, "order": { - "title": "RedemptionRollbackOrder", - "nullable": true, - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", - "nullable": true - }, - "source_id": { - "type": "string", - "nullable": true, - "description": "Unique source ID of an existing order that will be linked to the redemption of this request." - }, - "status": { - "type": "string", - "description": "The order status.", - "enum": [ - "CREATED", - "PAID", - "CANCELED", - "FULFILLED" - ], - "nullable": true - }, - "amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "initial_amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "discount_amount": { - "type": "integer", - "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_amount": { - "type": "integer", - "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "applied_discount_amount": { - "type": "integer", - "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_applied_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", - "nullable": true - }, - "total_applied_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", - "nullable": true - }, - "metadata": { - "title": "RedemptionRollbackOrderMetadata", - "type": "object", - "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "order", - "enum": [ - "order" - ], - "nullable": true - }, - "created_at": { - "type": "string", - "example": "2021-12-22T10:13:06.487Z", - "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", - "format": "date-time", - "nullable": true - }, - "updated_at": { - "type": "string", - "nullable": true, - "example": "2021-12-22T10:14:45.316Z", - "format": "date-time", - "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." - }, - "customer_id": { - "type": "string", - "nullable": true, - "description": "Unique customer ID of the customer making the purchase.", - "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" - }, - "referrer_id": { - "type": "string", - "nullable": true, - "description": "Unique referrer ID.", - "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" - }, - "customer": { - "$ref": "#/components/schemas/CustomerId" - }, - "referrer": { - "$ref": "#/components/schemas/ReferrerId" - }, - "redemptions": { - "title": "RedemptionRollbackOrderRedemptionsEntry", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/OrderRedemptionsEntry" - }, - "nullable": true - }, - "items": { - "title": "RedemptionRollbackOrderItems", - "type": "array", - "description": "Array of items applied to the order. It can include up to 500 items.", - "items": { - "$ref": "#/components/schemas/OrderCalculatedItem" - }, - "nullable": true - } - } + "$ref": "#/components/schemas/OrderCalculated" }, "channel": { "title": "RedemptionRollbackChannel", @@ -43880,194 +42228,7 @@ "$ref": "#/components/schemas/RedeemableResult" }, "order": { - "title": "QualificationsRedeemableOrder", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", - "nullable": true - }, - "source_id": { - "type": "string", - "nullable": true, - "description": "Unique source ID of an existing order that will be linked to the redemption of this request." - }, - "status": { - "type": "string", - "description": "The order status.", - "enum": [ - "CREATED", - "PAID", - "CANCELED", - "FULFILLED" - ], - "nullable": true - }, - "amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "initial_amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "discount_amount": { - "type": "integer", - "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_amount": { - "type": "integer", - "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "applied_discount_amount": { - "type": "integer", - "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_applied_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", - "nullable": true - }, - "total_applied_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", - "nullable": true - }, - "metadata": { - "title": "QualificationsRedeemableOrderMetadata", - "type": "object", - "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "order", - "enum": [ - "order" - ], - "nullable": true - }, - "created_at": { - "type": "string", - "example": "2021-12-22T10:13:06.487Z", - "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", - "format": "date-time", - "nullable": true - }, - "updated_at": { - "type": "string", - "nullable": true, - "example": "2021-12-22T10:14:45.316Z", - "format": "date-time", - "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." - }, - "customer_id": { - "type": "string", - "nullable": true, - "description": "Unique customer ID of the customer making the purchase.", - "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" - }, - "referrer_id": { - "type": "string", - "nullable": true, - "description": "Unique referrer ID.", - "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" - }, - "customer": { - "$ref": "#/components/schemas/CustomerId" - }, - "referrer": { - "$ref": "#/components/schemas/ReferrerId" - }, - "redemptions": { - "title": "QualificationsRedeemableOrderRedemptionsEntry", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/OrderRedemptionsEntry" - }, - "nullable": true - }, - "items": { - "title": "QualificationsRedeemableOrderItems", - "type": "array", - "description": "Array of items applied to the order. It can include up to 500 items.", - "items": { - "title": "QualificationsRedeemableOrderItemsItem", - "allOf": [ - { - "$ref": "#/components/schemas/OrderCalculatedItem" - }, - { - "type": "object", - "properties": { - "application_details": { - "title": "QualificationsRedeemableOrderItemsItemApplicationDetails", - "type": "array", - "description": "Array containing details about the items that are replaced and the items that are replacements for discounts with the `REPLACE_ITEMS` effect.", - "items": { - "title": "QualificationsRedeemableOrderItemsItemApplicationDetailsItem", - "type": "object", - "description": "Object representing item replacement.", - "properties": { - "source_index": { - "type": "integer", - "description": "Index number of the source item that is replaced. The enumeration starts from `0`, which represents the first item in the request, e.g., if the replaced item is passed as the second in the request, `source_index` equals `3`.", - "minimum": 0 - }, - "source_applied_quantity": { - "type": "integer", - "description": "Number of source units that are replaced.", - "maximum": -1 - }, - "source_applied_quantity_amount": { - "type": "integer", - "description": "Amount equal to the price of the units that are replaced. Determines the change of the amount of the source item quantity.", - "maximum": 0 - }, - "target_index": { - "type": "integer", - "description": "Index number of the target item that is a replacement of the source item. The enumeration continues the values for the order items, e.g. if there are three items in the request, `target_index` equals `3`, as enumeration starts from `0`." - }, - "target_applied_quantity": { - "type": "integer", - "description": "Number of added target units that are replacements." - }, - "target_applied_quantity_amount": { - "type": "integer", - "description": "Amount equal to the price of the units that are replacements. Determines the change in the amount of the target item quantity." - }, - "target_applied_discount_amount": { - "type": "integer", - "description": "Discount amount applied to the target item with regard to the replacement. Equals the `target_applied_quantity_amount` minus `source_applied_quantity_amount`." - } - } - } - } - } - } - ] - }, - "nullable": true - } - }, - "nullable": true + "$ref": "#/components/schemas/OrderCalculated" }, "validation_rule_id": { "type": "string", @@ -44858,194 +43019,7 @@ "$ref": "#/components/schemas/RedeemableResult" }, "order": { - "title": "QualificationsRedeemableBaseOrder", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", - "nullable": true - }, - "source_id": { - "type": "string", - "nullable": true, - "description": "Unique source ID of an existing order that will be linked to the redemption of this request." - }, - "status": { - "type": "string", - "description": "The order status.", - "enum": [ - "CREATED", - "PAID", - "CANCELED", - "FULFILLED" - ], - "nullable": true - }, - "amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "initial_amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "discount_amount": { - "type": "integer", - "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_amount": { - "type": "integer", - "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "applied_discount_amount": { - "type": "integer", - "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_applied_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", - "nullable": true - }, - "total_applied_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", - "nullable": true - }, - "metadata": { - "title": "QualificationsRedeemableBaseOrderMetadata", - "type": "object", - "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "order", - "enum": [ - "order" - ], - "nullable": true - }, - "created_at": { - "type": "string", - "example": "2021-12-22T10:13:06.487Z", - "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", - "format": "date-time", - "nullable": true - }, - "updated_at": { - "type": "string", - "nullable": true, - "example": "2021-12-22T10:14:45.316Z", - "format": "date-time", - "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." - }, - "customer_id": { - "type": "string", - "nullable": true, - "description": "Unique customer ID of the customer making the purchase.", - "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" - }, - "referrer_id": { - "type": "string", - "nullable": true, - "description": "Unique referrer ID.", - "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" - }, - "customer": { - "$ref": "#/components/schemas/CustomerId" - }, - "referrer": { - "$ref": "#/components/schemas/ReferrerId" - }, - "redemptions": { - "title": "QualificationsRedeemableBaseOrderRedemptionsEntry", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/OrderRedemptionsEntry" - }, - "nullable": true - }, - "items": { - "title": "QualificationsRedeemableBaseOrderItems", - "type": "array", - "description": "Array of items applied to the order. It can include up to 500 items.", - "items": { - "title": "QualificationsRedeemableBaseOrderItemsItem", - "allOf": [ - { - "$ref": "#/components/schemas/OrderCalculatedItem" - }, - { - "type": "object", - "properties": { - "application_details": { - "title": "QualificationsRedeemableBaseOrderItemsItemApplicationDetails", - "type": "array", - "description": "Array containing details about the items that are replaced and the items that are replacements for discounts with the `REPLACE_ITEMS` effect.", - "items": { - "title": "QualificationsRedeemableBaseOrderItemsItemApplicationDetailsItem", - "type": "object", - "description": "Object representing item replacement.", - "properties": { - "source_index": { - "type": "integer", - "description": "Index number of the source item that is replaced. The enumeration starts from `0`, which represents the first item in the request, e.g., if the replaced item is passed as the second in the request, `source_index` equals `3`.", - "minimum": 0 - }, - "source_applied_quantity": { - "type": "integer", - "description": "Number of source units that are replaced.", - "maximum": -1 - }, - "source_applied_quantity_amount": { - "type": "integer", - "description": "Amount equal to the price of the units that are replaced. Determines the change of the amount of the source item quantity.", - "maximum": 0 - }, - "target_index": { - "type": "integer", - "description": "Index number of the target item that is a replacement of the source item. The enumeration continues the values for the order items, e.g. if there are three items in the request, `target_index` equals `3`, as enumeration starts from `0`." - }, - "target_applied_quantity": { - "type": "integer", - "description": "Number of added target units that are replacements." - }, - "target_applied_quantity_amount": { - "type": "integer", - "description": "Amount equal to the price of the units that are replacements. Determines the change in the amount of the target item quantity." - }, - "target_applied_discount_amount": { - "type": "integer", - "description": "Discount amount applied to the target item with regard to the replacement. Equals the `target_applied_quantity_amount` minus `source_applied_quantity_amount`." - } - } - } - } - } - } - ] - }, - "nullable": true - } - }, - "nullable": true + "$ref": "#/components/schemas/OrderCalculated" }, "validation_rule_id": { "type": "string", diff --git a/reference/readonly-sdks/python/OpenAPI.json b/reference/readonly-sdks/python/OpenAPI.json index 5a6a9655..042b74f6 100644 --- a/reference/readonly-sdks/python/OpenAPI.json +++ b/reference/readonly-sdks/python/OpenAPI.json @@ -523,6 +523,9 @@ "description": "The metadata object stores all custom attributes assigned to the campaign. A set of key/value pairs that you can attach to a campaign object. It can be useful for storing additional information about the campaign in a structured format.", "nullable": true }, + "access_settings": { + "$ref": "#/components/schemas/AccessSettings" + }, "validation_rules": { "title": "CampaignsCreateRequestBodyValidationRules", "type": "array", @@ -1153,6 +1156,9 @@ "example": "cat_0b688929a2476386a7", "nullable": true }, + "access_settings": { + "$ref": "#/components/schemas/AccessSettings" + }, "activity_duration_after_publishing": { "type": "string", "description": "Defines the amount of time the vouchers will be active after publishing. The value is shown in the ISO 8601 format. For example, a voucher with the value of P24D will be valid for a duration of 24 days.", @@ -2475,151 +2481,7 @@ "nullable": true }, "order": { - "title": "ClientQualificationsCheckEligibilityResponseBodyOrder", - "type": "object", - "nullable": true, - "properties": { - "id": { - "type": "string", - "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", - "nullable": true - }, - "source_id": { - "type": "string", - "nullable": true, - "description": "Unique source ID of an existing order that will be linked to the redemption of this request." - }, - "status": { - "type": "string", - "description": "The order status.", - "enum": [ - "CREATED", - "PAID", - "CANCELED", - "FULFILLED" - ], - "nullable": true - }, - "amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "initial_amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "discount_amount": { - "type": "integer", - "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_amount": { - "type": "integer", - "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "applied_discount_amount": { - "type": "integer", - "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_applied_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", - "nullable": true - }, - "total_applied_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", - "nullable": true - }, - "metadata": { - "title": "ClientQualificationsCheckEligibilityResponseBodyOrderMetadata", - "type": "object", - "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "order", - "enum": [ - "order" - ], - "nullable": true - }, - "created_at": { - "type": "string", - "example": "2021-12-22T10:13:06.487Z", - "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", - "format": "date-time", - "nullable": true - }, - "updated_at": { - "type": "string", - "nullable": true, - "example": "2021-12-22T10:14:45.316Z", - "format": "date-time", - "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." - }, - "customer_id": { - "type": "string", - "nullable": true, - "description": "Unique customer ID of the customer making the purchase.", - "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" - }, - "referrer_id": { - "type": "string", - "nullable": true, - "description": "Unique referrer ID.", - "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" - }, - "customer": { - "$ref": "#/components/schemas/CustomerId" - }, - "referrer": { - "$ref": "#/components/schemas/ReferrerId" - }, - "redemptions": { - "title": "ClientQualificationsCheckEligibilityResponseBodyOrderRedemptions", - "type": "object", - "nullable": true - }, - "items": { - "title": "ClientQualificationsCheckEligibilityResponseBodyOrderItems", - "type": "array", - "description": "Array of items applied to the order. It can include up to 500 items.", - "items": { - "title": "ClientQualificationsCheckEligibilityResponseBodyOrderItemsItem", - "allOf": [ - { - "$ref": "#/components/schemas/OrderCalculatedItem" - }, - { - "type": "object", - "properties": { - "application_details": { - "$ref": "#/components/schemas/ApplicationDetails" - } - } - } - ] - }, - "nullable": true - } - } + "$ref": "#/components/schemas/OrderCalculated" }, "stacking_rules": { "$ref": "#/components/schemas/StackingRules" @@ -2748,152 +2610,7 @@ "$ref": "#/components/schemas/Redemption" }, "order": { - "title": "ClientRedemptionsRedeemResponseBodyOrder", - "description": "Contains the order details associated with the redemption.", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", - "nullable": true - }, - "source_id": { - "type": "string", - "nullable": true, - "description": "Unique source ID of an existing order that will be linked to the redemption of this request." - }, - "status": { - "type": "string", - "description": "The order status.", - "enum": [ - "CREATED", - "PAID", - "CANCELED", - "FULFILLED" - ], - "nullable": true - }, - "amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "initial_amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "discount_amount": { - "type": "integer", - "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_amount": { - "type": "integer", - "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "applied_discount_amount": { - "type": "integer", - "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_applied_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", - "nullable": true - }, - "total_applied_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", - "nullable": true - }, - "metadata": { - "title": "ClientRedemptionsRedeemResponseBodyOrderMetadata", - "type": "object", - "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "order", - "enum": [ - "order" - ], - "nullable": true - }, - "created_at": { - "type": "string", - "example": "2021-12-22T10:13:06.487Z", - "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", - "format": "date-time", - "nullable": true - }, - "updated_at": { - "type": "string", - "nullable": true, - "example": "2021-12-22T10:14:45.316Z", - "format": "date-time", - "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." - }, - "customer_id": { - "type": "string", - "nullable": true, - "description": "Unique customer ID of the customer making the purchase.", - "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" - }, - "referrer_id": { - "type": "string", - "nullable": true, - "description": "Unique referrer ID.", - "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" - }, - "customer": { - "$ref": "#/components/schemas/CustomerId" - }, - "referrer": { - "$ref": "#/components/schemas/ReferrerId" - }, - "redemptions": { - "title": "ClientRedemptionsRedeemResponseBodyOrderRedemptions", - "type": "object", - "nullable": true - }, - "items": { - "title": "ClientRedemptionsRedeemResponseBodyOrderItems", - "type": "array", - "description": "Array of items applied to the order. It can include up to 500 items.", - "items": { - "title": "ClientRedemptionsRedeemResponseBodyOrderItemsItem", - "allOf": [ - { - "$ref": "#/components/schemas/OrderCalculatedItem" - }, - { - "type": "object", - "properties": { - "application_details": { - "$ref": "#/components/schemas/ApplicationDetails" - } - } - } - ] - }, - "nullable": true - } - }, - "nullable": true + "$ref": "#/components/schemas/OrderCalculated" }, "inapplicable_redeemables": { "title": "ClientRedemptionsRedeemResponseBodyInapplicableRedeemables", @@ -3061,6 +2778,7 @@ "order": { "title": "ClientValidationsValidateResponseBodyRedeemablesItemOrder", "type": "object", + "description": "Order information.", "properties": { "id": { "type": "string", @@ -3170,46 +2888,10 @@ "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" }, "customer": { - "title": "ClientValidationsValidateResponseBodyRedeemablesItemOrderCustomer", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "A unique identifier of an existing customer.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "customer", - "enum": [ - "customer" - ], - "nullable": true - } - }, - "required": [] + "$ref": "#/components/schemas/CustomerId" }, "referrer": { - "title": "ClientValidationsValidateResponseBodyRedeemablesItemOrderReferrer", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "A unique identifier of an existing customer.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "customer", - "enum": [ - "customer" - ], - "nullable": true - } - }, - "required": [] + "$ref": "#/components/schemas/ReferrerId" }, "redemptions": { "title": "ClientValidationsValidateResponseBodyRedeemablesItemOrderRedemptions", @@ -3219,7 +2901,7 @@ "items": { "title": "ClientValidationsValidateResponseBodyRedeemablesItemOrderItems", "type": "array", - "description": "Array of items applied to the order. It can include up to 500 items.", + "description": "Array of items applied to the order. It can include up 500 items.", "items": { "$ref": "#/components/schemas/OrderCalculatedItem" }, @@ -3448,151 +3130,7 @@ "nullable": true }, "order": { - "title": "ClientValidationsValidateResponseBodyOrder", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", - "nullable": true - }, - "source_id": { - "type": "string", - "nullable": true, - "description": "Unique source ID of an existing order that will be linked to the redemption of this request." - }, - "status": { - "type": "string", - "description": "The order status.", - "enum": [ - "CREATED", - "PAID", - "CANCELED", - "FULFILLED" - ], - "nullable": true - }, - "amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "initial_amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "discount_amount": { - "type": "integer", - "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_amount": { - "type": "integer", - "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "applied_discount_amount": { - "type": "integer", - "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_applied_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", - "nullable": true - }, - "total_applied_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", - "nullable": true - }, - "metadata": { - "title": "ClientValidationsValidateResponseBodyOrderMetadata", - "type": "object", - "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "order", - "enum": [ - "order" - ], - "nullable": true - }, - "created_at": { - "type": "string", - "example": "2021-12-22T10:13:06.487Z", - "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", - "format": "date-time", - "nullable": true - }, - "updated_at": { - "type": "string", - "nullable": true, - "example": "2021-12-22T10:14:45.316Z", - "format": "date-time", - "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." - }, - "customer_id": { - "type": "string", - "nullable": true, - "description": "Unique customer ID of the customer making the purchase.", - "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" - }, - "referrer_id": { - "type": "string", - "nullable": true, - "description": "Unique referrer ID.", - "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" - }, - "customer": { - "$ref": "#/components/schemas/CustomerId" - }, - "referrer": { - "$ref": "#/components/schemas/ReferrerId" - }, - "redemptions": { - "title": "ClientValidationsValidateResponseBodyOrderRedemptions", - "type": "object", - "nullable": true - }, - "items": { - "title": "ClientValidationsValidateResponseBodyOrderItems", - "type": "array", - "description": "Array of items applied to the order. It can include up to 500 items.", - "items": { - "title": "ClientValidationsValidateResponseBodyOrderItemsItem", - "allOf": [ - { - "$ref": "#/components/schemas/OrderCalculatedItem" - }, - { - "type": "object", - "properties": { - "application_details": { - "$ref": "#/components/schemas/ApplicationDetails" - } - } - } - ] - }, - "nullable": true - } - }, - "nullable": true + "$ref": "#/components/schemas/OrderCalculated" }, "tracking_id": { "type": "string", @@ -5727,6 +5265,9 @@ "description": "The metadata object stores all custom attributes assigned to the campaign. A set of key/value pairs that you can attach to a campaign object. It can be useful for storing additional information about the campaign in a structured format.", "nullable": true }, + "access_settings": { + "$ref": "#/components/schemas/AccessSettings" + }, "validation_rules": { "title": "LoyaltiesCreateCampaignRequestBodyValidationRules", "type": "array", @@ -9981,176 +9522,7 @@ "nullable": true }, "order": { - "title": "LoyaltiesMembersRedemptionRedeemResponseBodyOrder", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", - "nullable": true - }, - "source_id": { - "type": "string", - "nullable": true, - "description": "Unique source ID of an existing order that will be linked to the redemption of this request." - }, - "status": { - "type": "string", - "description": "The order status.", - "enum": [ - "CREATED", - "PAID", - "CANCELED", - "FULFILLED" - ], - "nullable": true - }, - "amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "initial_amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "discount_amount": { - "type": "integer", - "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_amount": { - "type": "integer", - "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "applied_discount_amount": { - "type": "integer", - "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_applied_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", - "nullable": true - }, - "total_applied_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", - "nullable": true - }, - "metadata": { - "title": "LoyaltiesMembersRedemptionRedeemResponseBodyOrderMetadata", - "type": "object", - "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "order", - "enum": [ - "order" - ], - "nullable": true - }, - "created_at": { - "type": "string", - "example": "2021-12-22T10:13:06.487Z", - "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", - "format": "date-time", - "nullable": true - }, - "updated_at": { - "type": "string", - "nullable": true, - "example": "2021-12-22T10:14:45.316Z", - "format": "date-time", - "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." - }, - "customer_id": { - "type": "string", - "nullable": true, - "description": "Unique customer ID of the customer making the purchase.", - "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" - }, - "referrer_id": { - "type": "string", - "nullable": true, - "description": "Unique referrer ID.", - "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" - }, - "customer": { - "title": "LoyaltiesMembersRedemptionRedeemResponseBodyOrderCustomer", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "A unique identifier of an existing customer.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "customer", - "enum": [ - "customer" - ], - "nullable": true - } - }, - "required": [], - "nullable": true - }, - "referrer": { - "title": "LoyaltiesMembersRedemptionRedeemResponseBodyOrderReferrer", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "A unique identifier of an existing customer.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "customer", - "enum": [ - "customer" - ], - "nullable": true - } - }, - "required": [], - "nullable": true - }, - "redemptions": { - "title": "LoyaltiesMembersRedemptionRedeemResponseBodyOrderRedemptions", - "type": "object", - "nullable": true - }, - "items": { - "title": "LoyaltiesMembersRedemptionRedeemResponseBodyOrderItems", - "type": "array", - "description": "Array of items applied to the order. It can include up to 500 items.", - "items": { - "$ref": "#/components/schemas/OrderCalculatedItem" - }, - "nullable": true - } - }, - "nullable": true + "$ref": "#/components/schemas/OrderCalculated" }, "channel": { "title": "LoyaltiesMembersRedemptionRedeemResponseBodyChannel", @@ -11969,6 +11341,9 @@ "example": "cat_0b688929a2476386a7", "nullable": true }, + "access_settings": { + "$ref": "#/components/schemas/AccessSettings" + }, "activity_duration_after_publishing": { "type": "string", "description": "Defines the amount of time the vouchers will be active after publishing. The value is shown in the ISO 8601 format. For example, a voucher with the value of P24D will be valid for a duration of 24 days.", @@ -16431,7 +15806,7 @@ "items": { "title": "OrdersCreateResponseBodyItems", "type": "array", - "description": "Array of items applied to the order. It can include up to 500 items.", + "description": "Array of items applied to the order. It can include up 500 items.", "items": { "$ref": "#/components/schemas/OrderCalculatedItem" }, @@ -16679,7 +16054,7 @@ "items": { "title": "OrdersGetResponseBodyItems", "type": "array", - "description": "Array of items applied to the order. It can include up to 500 items.", + "description": "Array of items applied to the order. It can include up 500 items.", "items": { "$ref": "#/components/schemas/OrderCalculatedItem" }, @@ -16768,25 +16143,7 @@ "type": "array", "description": "Contains array of order objects.", "items": { - "title": "OrdersListResponseBodyOrdersItem", - "allOf": [ - { - "$ref": "#/components/schemas/OrderCalculated" - }, - { - "type": "object", - "properties": { - "items": { - "title": "OrdersListResponseBodyOrdersItemItems", - "type": "array", - "description": "Array of items applied to the order. It can include up to 500 items.", - "items": { - "$ref": "#/components/schemas/OrderCalculatedItem" - } - } - } - } - ] + "$ref": "#/components/schemas/OrderCalculated" }, "nullable": true }, @@ -16995,7 +16352,7 @@ "items": { "title": "OrdersUpdateResponseBodyItems", "type": "array", - "description": "Array of items applied to the order. It can include up to 500 items.", + "description": "Array of items applied to the order. It can include up 500 items.", "items": { "$ref": "#/components/schemas/OrderCalculatedItem" }, @@ -21719,138 +21076,7 @@ "nullable": true }, "order": { - "title": "QualificationsCheckEligibilityResponseBodyOrder", - "type": "object", - "nullable": true, - "properties": { - "id": { - "type": "string", - "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", - "nullable": true - }, - "source_id": { - "type": "string", - "nullable": true, - "description": "Unique source ID of an existing order that will be linked to the redemption of this request." - }, - "status": { - "type": "string", - "description": "The order status.", - "enum": [ - "CREATED", - "PAID", - "CANCELED", - "FULFILLED" - ], - "nullable": true - }, - "amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "initial_amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "discount_amount": { - "type": "integer", - "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_amount": { - "type": "integer", - "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "applied_discount_amount": { - "type": "integer", - "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_applied_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", - "nullable": true - }, - "total_applied_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", - "nullable": true - }, - "metadata": { - "title": "QualificationsCheckEligibilityResponseBodyOrderMetadata", - "type": "object", - "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "order", - "enum": [ - "order" - ], - "nullable": true - }, - "created_at": { - "type": "string", - "example": "2021-12-22T10:13:06.487Z", - "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", - "format": "date-time", - "nullable": true - }, - "updated_at": { - "type": "string", - "nullable": true, - "example": "2021-12-22T10:14:45.316Z", - "format": "date-time", - "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." - }, - "customer_id": { - "type": "string", - "nullable": true, - "description": "Unique customer ID of the customer making the purchase.", - "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" - }, - "referrer_id": { - "type": "string", - "nullable": true, - "description": "Unique referrer ID.", - "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" - }, - "customer": { - "$ref": "#/components/schemas/CustomerId" - }, - "referrer": { - "$ref": "#/components/schemas/ReferrerId" - }, - "redemptions": { - "title": "QualificationsCheckEligibilityResponseBodyOrderRedemptions", - "type": "object", - "nullable": true - }, - "items": { - "title": "QualificationsCheckEligibilityResponseBodyOrderItems", - "type": "array", - "description": "Array of items applied to the order. It can include up to 500 items.", - "items": { - "$ref": "#/components/schemas/OrderCalculatedItem" - }, - "nullable": true - } - } + "$ref": "#/components/schemas/OrderCalculated" }, "stacking_rules": { "$ref": "#/components/schemas/StackingRules" @@ -22147,7 +21373,7 @@ "items": { "title": "RedemptionsGetResponseBodyOrderItems", "type": "array", - "description": "Array of items applied to the order. It can include up to 500 items.", + "description": "Array of items applied to the order. It can include up 500 items.", "items": { "$ref": "#/components/schemas/OrderCalculatedItem" }, @@ -23044,7 +22270,7 @@ "items": { "title": "RedemptionsListResponseBodyRedemptionsItemOrderItems", "type": "array", - "description": "Array of items applied to the order. It can include up to 500 items.", + "description": "Array of items applied to the order. It can include up 500 items.", "items": { "$ref": "#/components/schemas/OrderCalculatedItem" }, @@ -23750,152 +22976,7 @@ "$ref": "#/components/schemas/Redemption" }, "order": { - "title": "RedemptionsRedeemResponseBodyOrder", - "description": "Contains the order details associated with the redemption.", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", - "nullable": true - }, - "source_id": { - "type": "string", - "nullable": true, - "description": "Unique source ID of an existing order that will be linked to the redemption of this request." - }, - "status": { - "type": "string", - "description": "The order status.", - "enum": [ - "CREATED", - "PAID", - "CANCELED", - "FULFILLED" - ], - "nullable": true - }, - "amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "initial_amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "discount_amount": { - "type": "integer", - "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_amount": { - "type": "integer", - "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "applied_discount_amount": { - "type": "integer", - "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_applied_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", - "nullable": true - }, - "total_applied_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", - "nullable": true - }, - "metadata": { - "title": "RedemptionsRedeemResponseBodyOrderMetadata", - "type": "object", - "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "order", - "enum": [ - "order" - ], - "nullable": true - }, - "created_at": { - "type": "string", - "example": "2021-12-22T10:13:06.487Z", - "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", - "format": "date-time", - "nullable": true - }, - "updated_at": { - "type": "string", - "nullable": true, - "example": "2021-12-22T10:14:45.316Z", - "format": "date-time", - "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." - }, - "customer_id": { - "type": "string", - "nullable": true, - "description": "Unique customer ID of the customer making the purchase.", - "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" - }, - "referrer_id": { - "type": "string", - "nullable": true, - "description": "Unique referrer ID.", - "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" - }, - "customer": { - "$ref": "#/components/schemas/CustomerId" - }, - "referrer": { - "$ref": "#/components/schemas/ReferrerId" - }, - "redemptions": { - "title": "RedemptionsRedeemResponseBodyOrderRedemptions", - "type": "object", - "nullable": true - }, - "items": { - "title": "RedemptionsRedeemResponseBodyOrderItems", - "type": "array", - "description": "Array of items applied to the order. It can include up to 500 items.", - "items": { - "title": "RedemptionsRedeemResponseBodyOrderItemsItem", - "allOf": [ - { - "$ref": "#/components/schemas/OrderCalculatedItem" - }, - { - "type": "object", - "properties": { - "application_details": { - "$ref": "#/components/schemas/ApplicationDetails" - } - } - } - ] - }, - "nullable": true - } - }, - "nullable": true + "$ref": "#/components/schemas/OrderCalculated" }, "inapplicable_redeemables": { "title": "RedemptionsRedeemResponseBodyInapplicableRedeemables", @@ -24087,138 +23168,7 @@ "nullable": true }, "order": { - "title": "RedemptionsRollbackCreateResponseBodyOrder", - "nullable": true, - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", - "nullable": true - }, - "source_id": { - "type": "string", - "nullable": true, - "description": "Unique source ID of an existing order that will be linked to the redemption of this request." - }, - "status": { - "type": "string", - "description": "The order status.", - "enum": [ - "CREATED", - "PAID", - "CANCELED", - "FULFILLED" - ], - "nullable": true - }, - "amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "initial_amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "discount_amount": { - "type": "integer", - "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_amount": { - "type": "integer", - "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "applied_discount_amount": { - "type": "integer", - "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_applied_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", - "nullable": true - }, - "total_applied_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", - "nullable": true - }, - "metadata": { - "title": "RedemptionsRollbackCreateResponseBodyOrderMetadata", - "type": "object", - "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "order", - "enum": [ - "order" - ], - "nullable": true - }, - "created_at": { - "type": "string", - "example": "2021-12-22T10:13:06.487Z", - "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", - "format": "date-time", - "nullable": true - }, - "updated_at": { - "type": "string", - "nullable": true, - "example": "2021-12-22T10:14:45.316Z", - "format": "date-time", - "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." - }, - "customer_id": { - "type": "string", - "nullable": true, - "description": "Unique customer ID of the customer making the purchase.", - "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" - }, - "referrer_id": { - "type": "string", - "nullable": true, - "description": "Unique referrer ID.", - "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" - }, - "customer": { - "$ref": "#/components/schemas/CustomerId" - }, - "referrer": { - "$ref": "#/components/schemas/ReferrerId" - }, - "redemptions": { - "title": "RedemptionsRollbackCreateResponseBodyOrderRedemptions", - "type": "object", - "nullable": true - }, - "items": { - "title": "RedemptionsRollbackCreateResponseBodyOrderItems", - "type": "array", - "description": "Array of items applied to the order. It can include up to 500 items.", - "items": { - "$ref": "#/components/schemas/OrderCalculatedItem" - }, - "nullable": true - } - } + "$ref": "#/components/schemas/OrderCalculated" }, "channel": { "title": "RedemptionsRollbackCreateResponseBodyChannel", @@ -24349,18 +23299,6 @@ "allOf": [ { "$ref": "#/components/schemas/OrderCalculated" - }, - { - "type": "object", - "properties": { - "items": { - "type": "array", - "description": "Array of items applied to the order. It can include up to 500 items.", - "items": { - "$ref": "#/components/schemas/OrderCalculatedItem" - } - } - } } ] } @@ -25673,6 +24611,9 @@ "description": "The metadata object stores all custom attributes assigned to the campaign. A set of key/value pairs that you can attach to a campaign object. It can be useful for storing additional information about the campaign in a structured format.", "nullable": true }, + "access_settings": { + "$ref": "#/components/schemas/AccessSettings" + }, "voucher": { "title": "TemplatesCampaignsCampaignSetupCreateRequestBodyVoucher", "type": "object", @@ -27247,6 +26188,7 @@ "order": { "title": "ValidationsValidateResponseBodyRedeemablesItemOrder", "type": "object", + "description": "Order information.", "properties": { "id": { "type": "string", @@ -27356,46 +26298,10 @@ "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" }, "customer": { - "title": "ValidationsValidateResponseBodyRedeemablesItemOrderCustomer", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "A unique identifier of an existing customer.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "customer", - "enum": [ - "customer" - ], - "nullable": true - } - }, - "required": [] + "$ref": "#/components/schemas/CustomerId" }, "referrer": { - "title": "ValidationsValidateResponseBodyRedeemablesItemOrderReferrer", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "A unique identifier of an existing customer.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "customer", - "enum": [ - "customer" - ], - "nullable": true - } - }, - "required": [] + "$ref": "#/components/schemas/ReferrerId" }, "redemptions": { "title": "ValidationsValidateResponseBodyRedeemablesItemOrderRedemptions", @@ -27405,7 +26311,7 @@ "items": { "title": "ValidationsValidateResponseBodyRedeemablesItemOrderItems", "type": "array", - "description": "Array of items applied to the order. It can include up to 500 items.", + "description": "Array of items applied to the order. It can include up 500 items.", "items": { "$ref": "#/components/schemas/OrderCalculatedItem" }, @@ -27634,151 +26540,7 @@ "nullable": true }, "order": { - "title": "ValidationsValidateResponseBodyOrder", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", - "nullable": true - }, - "source_id": { - "type": "string", - "nullable": true, - "description": "Unique source ID of an existing order that will be linked to the redemption of this request." - }, - "status": { - "type": "string", - "description": "The order status.", - "enum": [ - "CREATED", - "PAID", - "CANCELED", - "FULFILLED" - ], - "nullable": true - }, - "amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "initial_amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "discount_amount": { - "type": "integer", - "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_amount": { - "type": "integer", - "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "applied_discount_amount": { - "type": "integer", - "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_applied_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", - "nullable": true - }, - "total_applied_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", - "nullable": true - }, - "metadata": { - "title": "ValidationsValidateResponseBodyOrderMetadata", - "type": "object", - "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "order", - "enum": [ - "order" - ], - "nullable": true - }, - "created_at": { - "type": "string", - "example": "2021-12-22T10:13:06.487Z", - "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", - "format": "date-time", - "nullable": true - }, - "updated_at": { - "type": "string", - "nullable": true, - "example": "2021-12-22T10:14:45.316Z", - "format": "date-time", - "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." - }, - "customer_id": { - "type": "string", - "nullable": true, - "description": "Unique customer ID of the customer making the purchase.", - "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" - }, - "referrer_id": { - "type": "string", - "nullable": true, - "description": "Unique referrer ID.", - "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" - }, - "customer": { - "$ref": "#/components/schemas/CustomerId" - }, - "referrer": { - "$ref": "#/components/schemas/ReferrerId" - }, - "redemptions": { - "title": "ValidationsValidateResponseBodyOrderRedemptions", - "type": "object", - "nullable": true - }, - "items": { - "title": "ValidationsValidateResponseBodyOrderItems", - "type": "array", - "description": "Array of items applied to the order. It can include up to 500 items.", - "items": { - "title": "ValidationsValidateResponseBodyOrderItemsItem", - "allOf": [ - { - "$ref": "#/components/schemas/OrderCalculatedItem" - }, - { - "type": "object", - "properties": { - "application_details": { - "$ref": "#/components/schemas/ApplicationDetails" - } - } - } - ] - }, - "nullable": true - } - }, - "nullable": true + "$ref": "#/components/schemas/OrderCalculated" }, "tracking_id": { "type": "string", @@ -29962,6 +28724,69 @@ "type": "string", "format": "hostname" }, + "AccessSettings": { + "title": "AccessSettings", + "type": "object", + "description": "Assigns or unassigns an area or store to the campaign.\n\n**NOTE**: this object can be sent if the Areas and Stores enterprise feature is enabled. Contact [Voucherify Sales](https://www.voucherify.io/contact-sales) to learn more.", + "properties": { + "assign": { + "title": "AccessSettingsAssign", + "type": "object", + "description": "Assigns the campaign to an area or a store. Provide the area and/or store IDs in the respective arrays. If a campaign changes assignments between areas or stores, unassign it from the area. For example, if a campaign is assigned to Area-01, but it must be now assigned to Store-01 within this area, you have to unassign the campaign from Area-01 and assign to Store-01 only.\n\nIf you want to assign the campaign to stores only, you do not have to send the area ID.", + "properties": { + "areas_ids": { + "title": "AccessSettingsAssignAreasIds", + "type": "array", + "description": "List all area IDs to which the campaign will be assigned.", + "items": { + "title": "AccessSettingsAssignAreasIdsItem", + "type": "string" + }, + "nullable": true + }, + "area_stores_ids": { + "title": "AccessSettingsAssignAreaStoresIds", + "type": "array", + "description": "List all store IDs to which the campaign will be assigned.", + "items": { + "title": "AccessSettingsAssignAreaStoresIdsItem", + "type": "string" + }, + "nullable": true + } + }, + "nullable": true + }, + "unassign": { + "title": "AccessSettingsUnassign", + "type": "object", + "description": "Unassigns the campaign from an area or a store. Provide the area and/or store IDs in the respective arrays. If a campaign changes assignments between areas or stores, unassign it first. For example, if a campaign is assigned to Area-01, but it must be now assigned to Store-01 within this area, you have to unassign the campaign from Area-01 and assigned to Store-01 only.\n\nIf you want to assign the campaign to stores only, you do not have to send the area ID.", + "properties": { + "areas_ids": { + "title": "AccessSettingsUnassignAreasIds", + "type": "array", + "description": "List all area IDs from which the campaign will be unassigned.", + "items": { + "title": "AccessSettingsUnassignAreasIdsItem", + "type": "string" + }, + "nullable": true + }, + "area_stores_ids": { + "title": "AccessSettingsUnassignAreaStoresIds", + "type": "array", + "description": "List all store IDs to which the campaign will be unassigned.", + "items": { + "title": "AccessSettingsUnassignAreaStoresIdsItem", + "type": "string" + }, + "nullable": true + } + }, + "nullable": true + } + } + }, "AccessSettingsCampaignAssignmentsList": { "title": "AccessSettingsCampaignAssignmentsList", "type": "object", @@ -30169,49 +28994,6 @@ }, "required": [] }, - "ApplicationDetails": { - "title": "ApplicationDetails", - "type": "array", - "description": "Array containing details about the items that are replaced and the items that are replacements for discounts with the `REPLACE_ITEMS` effect.", - "items": { - "title": "ApplicationDetailsItem", - "type": "object", - "description": "Object representing item replacement.", - "properties": { - "source_index": { - "type": "integer", - "description": "Index number of the source item that is replaced. The enumeration starts from `0`, which represents the first item in the request, e.g., if the replaced item is passed as the second in the request, `source_index` equals `3`.", - "minimum": 0 - }, - "source_applied_quantity": { - "type": "integer", - "description": "Number of source units that are replaced.", - "maximum": -1 - }, - "source_applied_quantity_amount": { - "type": "integer", - "description": "Amount equal to the price of the units that are replaced. Determines the change of the amount of the source item quantity.", - "maximum": 0 - }, - "target_index": { - "type": "integer", - "description": "Index number of the target item that is a replacement of the source item. The enumeration continues the values for the order items, e.g. if there are three items in the request, `target_index` equals `3`, as enumeration starts from `0`." - }, - "target_applied_quantity": { - "type": "integer", - "description": "Number of added target units that are replacements." - }, - "target_applied_quantity_amount": { - "type": "integer", - "description": "Amount equal to the price of the units that are replacements. Determines the change in the amount of the target item quantity." - }, - "target_applied_discount_amount": { - "type": "integer", - "description": "Discount amount applied to the target item with regard to the replacement. Equals the `target_applied_quantity_amount` minus `source_applied_quantity_amount`." - } - } - } - }, "AsyncActionBase": { "title": "AsyncActionBase", "type": "object", @@ -35170,6 +33952,15 @@ "title": "OrderCalculatedRedemptions", "type": "object", "nullable": true + }, + "items": { + "title": "OrderCalculatedItems", + "type": "array", + "description": "Array of items applied to the order. It can include up 500 items.", + "items": { + "$ref": "#/components/schemas/OrderCalculatedItem" + }, + "nullable": true } } }, @@ -35358,6 +34149,9 @@ "type": "object", "description": "A set of custom key/value pairs that you can attach to an item object. It can be useful for storing additional information about the item in a structured format. It can be used to define business validation rules or discount formulas.", "nullable": true + }, + "application_details": { + "$ref": "#/components/schemas/ApplicationDetails" } }, "required": [] @@ -36743,176 +35537,7 @@ "nullable": true }, "order": { - "title": "RedemptionOrder", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", - "nullable": true - }, - "source_id": { - "type": "string", - "nullable": true, - "description": "Unique source ID of an existing order that will be linked to the redemption of this request." - }, - "status": { - "type": "string", - "description": "The order status.", - "enum": [ - "CREATED", - "PAID", - "CANCELED", - "FULFILLED" - ], - "nullable": true - }, - "amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "initial_amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "discount_amount": { - "type": "integer", - "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_amount": { - "type": "integer", - "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "applied_discount_amount": { - "type": "integer", - "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_applied_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", - "nullable": true - }, - "total_applied_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", - "nullable": true - }, - "metadata": { - "title": "RedemptionOrderMetadata", - "type": "object", - "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "order", - "enum": [ - "order" - ], - "nullable": true - }, - "created_at": { - "type": "string", - "example": "2021-12-22T10:13:06.487Z", - "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", - "format": "date-time", - "nullable": true - }, - "updated_at": { - "type": "string", - "nullable": true, - "example": "2021-12-22T10:14:45.316Z", - "format": "date-time", - "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." - }, - "customer_id": { - "type": "string", - "nullable": true, - "description": "Unique customer ID of the customer making the purchase.", - "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" - }, - "referrer_id": { - "type": "string", - "nullable": true, - "description": "Unique referrer ID.", - "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" - }, - "customer": { - "title": "RedemptionOrderCustomer", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "A unique identifier of an existing customer.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "customer", - "enum": [ - "customer" - ], - "nullable": true - } - }, - "required": [], - "nullable": true - }, - "referrer": { - "title": "RedemptionOrderReferrer", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "A unique identifier of an existing customer.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "customer", - "enum": [ - "customer" - ], - "nullable": true - } - }, - "required": [], - "nullable": true - }, - "redemptions": { - "title": "RedemptionOrderRedemptions", - "type": "object", - "nullable": true - }, - "items": { - "title": "RedemptionOrderItems", - "type": "array", - "description": "Array of items applied to the order. It can include up to 500 items.", - "items": { - "$ref": "#/components/schemas/OrderCalculatedItem" - }, - "nullable": true - } - }, - "nullable": true + "$ref": "#/components/schemas/OrderCalculated" }, "channel": { "title": "RedemptionChannel", @@ -37555,7 +36180,7 @@ "items": { "title": "RedemptionEntryOrderItems", "type": "array", - "description": "Array of items applied to the order. It can include up to 500 items.", + "description": "Array of items applied to the order. It can include up 500 items.", "items": { "$ref": "#/components/schemas/OrderCalculatedItem" }, @@ -38444,138 +37069,7 @@ "nullable": true }, "order": { - "title": "RedemptionRollbackOrder", - "nullable": true, - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", - "nullable": true - }, - "source_id": { - "type": "string", - "nullable": true, - "description": "Unique source ID of an existing order that will be linked to the redemption of this request." - }, - "status": { - "type": "string", - "description": "The order status.", - "enum": [ - "CREATED", - "PAID", - "CANCELED", - "FULFILLED" - ], - "nullable": true - }, - "amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "initial_amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "discount_amount": { - "type": "integer", - "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_amount": { - "type": "integer", - "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "applied_discount_amount": { - "type": "integer", - "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_applied_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", - "nullable": true - }, - "total_applied_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", - "nullable": true - }, - "metadata": { - "title": "RedemptionRollbackOrderMetadata", - "type": "object", - "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "order", - "enum": [ - "order" - ], - "nullable": true - }, - "created_at": { - "type": "string", - "example": "2021-12-22T10:13:06.487Z", - "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", - "format": "date-time", - "nullable": true - }, - "updated_at": { - "type": "string", - "nullable": true, - "example": "2021-12-22T10:14:45.316Z", - "format": "date-time", - "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." - }, - "customer_id": { - "type": "string", - "nullable": true, - "description": "Unique customer ID of the customer making the purchase.", - "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" - }, - "referrer_id": { - "type": "string", - "nullable": true, - "description": "Unique referrer ID.", - "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" - }, - "customer": { - "$ref": "#/components/schemas/CustomerId" - }, - "referrer": { - "$ref": "#/components/schemas/ReferrerId" - }, - "redemptions": { - "title": "RedemptionRollbackOrderRedemptions", - "type": "object", - "nullable": true - }, - "items": { - "title": "RedemptionRollbackOrderItems", - "type": "array", - "description": "Array of items applied to the order. It can include up to 500 items.", - "items": { - "$ref": "#/components/schemas/OrderCalculatedItem" - }, - "nullable": true - } - } + "$ref": "#/components/schemas/OrderCalculated" }, "channel": { "title": "RedemptionRollbackChannel", @@ -41284,6 +39778,49 @@ "APPLY_FROM_MOST_EXPENSIVE" ] }, + "ApplicationDetails": { + "title": "ApplicationDetails", + "type": "array", + "description": "Array containing details about the items that are replaced and the items that are replacements for discounts with the `REPLACE_ITEMS` effect.", + "items": { + "title": "ApplicationDetailsItem", + "type": "object", + "description": "Object representing item replacement.", + "properties": { + "source_index": { + "type": "integer", + "description": "Index number of the source item that is replaced. The enumeration starts from `0`, which represents the first item in the request, e.g., if the replaced item is passed as the second in the request, `source_index` equals `3`.", + "minimum": 0 + }, + "source_applied_quantity": { + "type": "integer", + "description": "Number of source units that are replaced.", + "maximum": -1 + }, + "source_applied_quantity_amount": { + "type": "integer", + "description": "Amount equal to the price of the units that are replaced. Determines the change of the amount of the source item quantity.", + "maximum": 0 + }, + "target_index": { + "type": "integer", + "description": "Index number of the target item that is a replacement of the source item. The enumeration continues the values for the order items, e.g. if there are three items in the request, `target_index` equals `3`, as enumeration starts from `0`." + }, + "target_applied_quantity": { + "type": "integer", + "description": "Number of added target units that are replacements." + }, + "target_applied_quantity_amount": { + "type": "integer", + "description": "Amount equal to the price of the units that are replacements. Determines the change in the amount of the target item quantity." + }, + "target_applied_discount_amount": { + "type": "integer", + "description": "Discount amount applied to the target item with regard to the replacement. Equals the `target_applied_quantity_amount` minus `source_applied_quantity_amount`." + } + } + } + }, "AreaStoreCampaignAssignment": { "title": "AreaStoreCampaignAssignment", "type": "object", @@ -41912,151 +40449,7 @@ "$ref": "#/components/schemas/RedeemableResult" }, "order": { - "title": "QualificationsRedeemableOrder", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", - "nullable": true - }, - "source_id": { - "type": "string", - "nullable": true, - "description": "Unique source ID of an existing order that will be linked to the redemption of this request." - }, - "status": { - "type": "string", - "description": "The order status.", - "enum": [ - "CREATED", - "PAID", - "CANCELED", - "FULFILLED" - ], - "nullable": true - }, - "amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "initial_amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "discount_amount": { - "type": "integer", - "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_amount": { - "type": "integer", - "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "applied_discount_amount": { - "type": "integer", - "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_applied_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", - "nullable": true - }, - "total_applied_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", - "nullable": true - }, - "metadata": { - "title": "QualificationsRedeemableOrderMetadata", - "type": "object", - "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "order", - "enum": [ - "order" - ], - "nullable": true - }, - "created_at": { - "type": "string", - "example": "2021-12-22T10:13:06.487Z", - "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", - "format": "date-time", - "nullable": true - }, - "updated_at": { - "type": "string", - "nullable": true, - "example": "2021-12-22T10:14:45.316Z", - "format": "date-time", - "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." - }, - "customer_id": { - "type": "string", - "nullable": true, - "description": "Unique customer ID of the customer making the purchase.", - "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" - }, - "referrer_id": { - "type": "string", - "nullable": true, - "description": "Unique referrer ID.", - "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" - }, - "customer": { - "$ref": "#/components/schemas/CustomerId" - }, - "referrer": { - "$ref": "#/components/schemas/ReferrerId" - }, - "redemptions": { - "title": "QualificationsRedeemableOrderRedemptions", - "type": "object", - "nullable": true - }, - "items": { - "title": "QualificationsRedeemableOrderItems", - "type": "array", - "description": "Array of items applied to the order. It can include up to 500 items.", - "items": { - "title": "QualificationsRedeemableOrderItemsItem", - "allOf": [ - { - "$ref": "#/components/schemas/OrderCalculatedItem" - }, - { - "type": "object", - "properties": { - "application_details": { - "$ref": "#/components/schemas/ApplicationDetails" - } - } - } - ] - }, - "nullable": true - } - }, - "nullable": true + "$ref": "#/components/schemas/OrderCalculated" }, "validation_rule_id": { "type": "string", @@ -42841,151 +41234,7 @@ "$ref": "#/components/schemas/RedeemableResult" }, "order": { - "title": "QualificationsRedeemableBaseOrder", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", - "nullable": true - }, - "source_id": { - "type": "string", - "nullable": true, - "description": "Unique source ID of an existing order that will be linked to the redemption of this request." - }, - "status": { - "type": "string", - "description": "The order status.", - "enum": [ - "CREATED", - "PAID", - "CANCELED", - "FULFILLED" - ], - "nullable": true - }, - "amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "initial_amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "discount_amount": { - "type": "integer", - "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_amount": { - "type": "integer", - "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "applied_discount_amount": { - "type": "integer", - "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_applied_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", - "nullable": true - }, - "total_applied_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", - "nullable": true - }, - "metadata": { - "title": "QualificationsRedeemableBaseOrderMetadata", - "type": "object", - "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "order", - "enum": [ - "order" - ], - "nullable": true - }, - "created_at": { - "type": "string", - "example": "2021-12-22T10:13:06.487Z", - "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", - "format": "date-time", - "nullable": true - }, - "updated_at": { - "type": "string", - "nullable": true, - "example": "2021-12-22T10:14:45.316Z", - "format": "date-time", - "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." - }, - "customer_id": { - "type": "string", - "nullable": true, - "description": "Unique customer ID of the customer making the purchase.", - "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" - }, - "referrer_id": { - "type": "string", - "nullable": true, - "description": "Unique referrer ID.", - "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" - }, - "customer": { - "$ref": "#/components/schemas/CustomerId" - }, - "referrer": { - "$ref": "#/components/schemas/ReferrerId" - }, - "redemptions": { - "title": "QualificationsRedeemableBaseOrderRedemptions", - "type": "object", - "nullable": true - }, - "items": { - "title": "QualificationsRedeemableBaseOrderItems", - "type": "array", - "description": "Array of items applied to the order. It can include up to 500 items.", - "items": { - "title": "QualificationsRedeemableBaseOrderItemsItem", - "allOf": [ - { - "$ref": "#/components/schemas/OrderCalculatedItem" - }, - { - "type": "object", - "properties": { - "application_details": { - "$ref": "#/components/schemas/ApplicationDetails" - } - } - } - ] - }, - "nullable": true - } - }, - "nullable": true + "$ref": "#/components/schemas/OrderCalculated" }, "validation_rule_id": { "type": "string", diff --git a/reference/readonly-sdks/ruby/OpenAPI.json b/reference/readonly-sdks/ruby/OpenAPI.json index 3db0181a..2704f918 100644 --- a/reference/readonly-sdks/ruby/OpenAPI.json +++ b/reference/readonly-sdks/ruby/OpenAPI.json @@ -523,6 +523,9 @@ "description": "The metadata object stores all custom attributes assigned to the campaign. A set of key/value pairs that you can attach to a campaign object. It can be useful for storing additional information about the campaign in a structured format.", "nullable": true }, + "access_settings": { + "$ref": "#/components/schemas/AccessSettings" + }, "validation_rules": { "title": "CampaignsCreateRequestBodyValidationRules", "type": "array", @@ -1153,6 +1156,9 @@ "example": "cat_0b688929a2476386a7", "nullable": true }, + "access_settings": { + "$ref": "#/components/schemas/AccessSettings" + }, "activity_duration_after_publishing": { "type": "string", "description": "Defines the amount of time the vouchers will be active after publishing. The value is shown in the ISO 8601 format. For example, a voucher with the value of P24D will be valid for a duration of 24 days.", @@ -2475,154 +2481,7 @@ "nullable": true }, "order": { - "title": "ClientQualificationsCheckEligibilityResponseBodyOrder", - "type": "object", - "nullable": true, - "properties": { - "id": { - "type": "string", - "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", - "nullable": true - }, - "source_id": { - "type": "string", - "nullable": true, - "description": "Unique source ID of an existing order that will be linked to the redemption of this request." - }, - "status": { - "type": "string", - "description": "The order status.", - "enum": [ - "CREATED", - "PAID", - "CANCELED", - "FULFILLED" - ], - "nullable": true - }, - "amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "initial_amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "discount_amount": { - "type": "integer", - "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_amount": { - "type": "integer", - "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "applied_discount_amount": { - "type": "integer", - "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_applied_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", - "nullable": true - }, - "total_applied_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", - "nullable": true - }, - "metadata": { - "title": "ClientQualificationsCheckEligibilityResponseBodyOrderMetadata", - "type": "object", - "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "order", - "enum": [ - "order" - ], - "nullable": true - }, - "created_at": { - "type": "string", - "example": "2021-12-22T10:13:06.487Z", - "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", - "format": "date-time", - "nullable": true - }, - "updated_at": { - "type": "string", - "nullable": true, - "example": "2021-12-22T10:14:45.316Z", - "format": "date-time", - "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." - }, - "customer_id": { - "type": "string", - "nullable": true, - "description": "Unique customer ID of the customer making the purchase.", - "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" - }, - "referrer_id": { - "type": "string", - "nullable": true, - "description": "Unique referrer ID.", - "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" - }, - "customer": { - "$ref": "#/components/schemas/CustomerId" - }, - "referrer": { - "$ref": "#/components/schemas/ReferrerId" - }, - "redemptions": { - "title": "ClientQualificationsCheckEligibilityResponseBodyOrderRedemptionsEntry", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/OrderRedemptionsEntry" - }, - "nullable": true - }, - "items": { - "title": "ClientQualificationsCheckEligibilityResponseBodyOrderItems", - "type": "array", - "description": "Array of items applied to the order. It can include up to 500 items.", - "items": { - "title": "ClientQualificationsCheckEligibilityResponseBodyOrderItemsItem", - "allOf": [ - { - "$ref": "#/components/schemas/OrderCalculatedItem" - }, - { - "type": "object", - "properties": { - "application_details": { - "$ref": "#/components/schemas/ApplicationDetails" - } - } - } - ] - }, - "nullable": true - } - } + "$ref": "#/components/schemas/OrderCalculated" }, "stacking_rules": { "$ref": "#/components/schemas/StackingRules" @@ -2751,155 +2610,7 @@ "$ref": "#/components/schemas/Redemption" }, "order": { - "title": "ClientRedemptionsRedeemResponseBodyOrder", - "description": "Contains the order details associated with the redemption.", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", - "nullable": true - }, - "source_id": { - "type": "string", - "nullable": true, - "description": "Unique source ID of an existing order that will be linked to the redemption of this request." - }, - "status": { - "type": "string", - "description": "The order status.", - "enum": [ - "CREATED", - "PAID", - "CANCELED", - "FULFILLED" - ], - "nullable": true - }, - "amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "initial_amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "discount_amount": { - "type": "integer", - "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_amount": { - "type": "integer", - "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "applied_discount_amount": { - "type": "integer", - "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_applied_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", - "nullable": true - }, - "total_applied_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", - "nullable": true - }, - "metadata": { - "title": "ClientRedemptionsRedeemResponseBodyOrderMetadata", - "type": "object", - "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "order", - "enum": [ - "order" - ], - "nullable": true - }, - "created_at": { - "type": "string", - "example": "2021-12-22T10:13:06.487Z", - "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", - "format": "date-time", - "nullable": true - }, - "updated_at": { - "type": "string", - "nullable": true, - "example": "2021-12-22T10:14:45.316Z", - "format": "date-time", - "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." - }, - "customer_id": { - "type": "string", - "nullable": true, - "description": "Unique customer ID of the customer making the purchase.", - "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" - }, - "referrer_id": { - "type": "string", - "nullable": true, - "description": "Unique referrer ID.", - "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" - }, - "customer": { - "$ref": "#/components/schemas/CustomerId" - }, - "referrer": { - "$ref": "#/components/schemas/ReferrerId" - }, - "redemptions": { - "title": "ClientRedemptionsRedeemResponseBodyOrderRedemptionsEntry", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/OrderRedemptionsEntry" - }, - "nullable": true - }, - "items": { - "title": "ClientRedemptionsRedeemResponseBodyOrderItems", - "type": "array", - "description": "Array of items applied to the order. It can include up to 500 items.", - "items": { - "title": "ClientRedemptionsRedeemResponseBodyOrderItemsItem", - "allOf": [ - { - "$ref": "#/components/schemas/OrderCalculatedItem" - }, - { - "type": "object", - "properties": { - "application_details": { - "$ref": "#/components/schemas/ApplicationDetails" - } - } - } - ] - }, - "nullable": true - } - }, - "nullable": true + "$ref": "#/components/schemas/OrderCalculated" }, "inapplicable_redeemables": { "title": "ClientRedemptionsRedeemResponseBodyInapplicableRedeemables", @@ -3067,6 +2778,7 @@ "order": { "title": "ClientValidationsValidateResponseBodyRedeemablesItemOrder", "type": "object", + "description": "Order information.", "properties": { "id": { "type": "string", @@ -3176,46 +2888,10 @@ "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" }, "customer": { - "title": "ClientValidationsValidateResponseBodyRedeemablesItemOrderCustomer", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "A unique identifier of an existing customer.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "customer", - "enum": [ - "customer" - ], - "nullable": true - } - }, - "required": [] + "$ref": "#/components/schemas/CustomerId" }, "referrer": { - "title": "ClientValidationsValidateResponseBodyRedeemablesItemOrderReferrer", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "A unique identifier of an existing customer.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "customer", - "enum": [ - "customer" - ], - "nullable": true - } - }, - "required": [] + "$ref": "#/components/schemas/ReferrerId" }, "redemptions": { "title": "ClientValidationsValidateResponseBodyRedeemablesItemOrderRedemptionsEntry", @@ -3228,7 +2904,7 @@ "items": { "title": "ClientValidationsValidateResponseBodyRedeemablesItemOrderItems", "type": "array", - "description": "Array of items applied to the order. It can include up to 500 items.", + "description": "Array of items applied to the order. It can include up 500 items.", "items": { "$ref": "#/components/schemas/OrderCalculatedItem" }, @@ -3457,154 +3133,7 @@ "nullable": true }, "order": { - "title": "ClientValidationsValidateResponseBodyOrder", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", - "nullable": true - }, - "source_id": { - "type": "string", - "nullable": true, - "description": "Unique source ID of an existing order that will be linked to the redemption of this request." - }, - "status": { - "type": "string", - "description": "The order status.", - "enum": [ - "CREATED", - "PAID", - "CANCELED", - "FULFILLED" - ], - "nullable": true - }, - "amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "initial_amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "discount_amount": { - "type": "integer", - "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_amount": { - "type": "integer", - "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "applied_discount_amount": { - "type": "integer", - "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_applied_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", - "nullable": true - }, - "total_applied_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", - "nullable": true - }, - "metadata": { - "title": "ClientValidationsValidateResponseBodyOrderMetadata", - "type": "object", - "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "order", - "enum": [ - "order" - ], - "nullable": true - }, - "created_at": { - "type": "string", - "example": "2021-12-22T10:13:06.487Z", - "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", - "format": "date-time", - "nullable": true - }, - "updated_at": { - "type": "string", - "nullable": true, - "example": "2021-12-22T10:14:45.316Z", - "format": "date-time", - "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." - }, - "customer_id": { - "type": "string", - "nullable": true, - "description": "Unique customer ID of the customer making the purchase.", - "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" - }, - "referrer_id": { - "type": "string", - "nullable": true, - "description": "Unique referrer ID.", - "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" - }, - "customer": { - "$ref": "#/components/schemas/CustomerId" - }, - "referrer": { - "$ref": "#/components/schemas/ReferrerId" - }, - "redemptions": { - "title": "ClientValidationsValidateResponseBodyOrderRedemptionsEntry", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/OrderRedemptionsEntry" - }, - "nullable": true - }, - "items": { - "title": "ClientValidationsValidateResponseBodyOrderItems", - "type": "array", - "description": "Array of items applied to the order. It can include up to 500 items.", - "items": { - "title": "ClientValidationsValidateResponseBodyOrderItemsItem", - "allOf": [ - { - "$ref": "#/components/schemas/OrderCalculatedItem" - }, - { - "type": "object", - "properties": { - "application_details": { - "$ref": "#/components/schemas/ApplicationDetails" - } - } - } - ] - }, - "nullable": true - } - }, - "nullable": true + "$ref": "#/components/schemas/OrderCalculated" }, "tracking_id": { "type": "string", @@ -5773,6 +5302,9 @@ "description": "The metadata object stores all custom attributes assigned to the campaign. A set of key/value pairs that you can attach to a campaign object. It can be useful for storing additional information about the campaign in a structured format.", "nullable": true }, + "access_settings": { + "$ref": "#/components/schemas/AccessSettings" + }, "validation_rules": { "title": "LoyaltiesCreateCampaignRequestBodyValidationRules", "type": "array", @@ -10027,179 +9559,7 @@ "nullable": true }, "order": { - "title": "LoyaltiesMembersRedemptionRedeemResponseBodyOrder", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", - "nullable": true - }, - "source_id": { - "type": "string", - "nullable": true, - "description": "Unique source ID of an existing order that will be linked to the redemption of this request." - }, - "status": { - "type": "string", - "description": "The order status.", - "enum": [ - "CREATED", - "PAID", - "CANCELED", - "FULFILLED" - ], - "nullable": true - }, - "amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "initial_amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "discount_amount": { - "type": "integer", - "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_amount": { - "type": "integer", - "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "applied_discount_amount": { - "type": "integer", - "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_applied_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", - "nullable": true - }, - "total_applied_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", - "nullable": true - }, - "metadata": { - "title": "LoyaltiesMembersRedemptionRedeemResponseBodyOrderMetadata", - "type": "object", - "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "order", - "enum": [ - "order" - ], - "nullable": true - }, - "created_at": { - "type": "string", - "example": "2021-12-22T10:13:06.487Z", - "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", - "format": "date-time", - "nullable": true - }, - "updated_at": { - "type": "string", - "nullable": true, - "example": "2021-12-22T10:14:45.316Z", - "format": "date-time", - "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." - }, - "customer_id": { - "type": "string", - "nullable": true, - "description": "Unique customer ID of the customer making the purchase.", - "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" - }, - "referrer_id": { - "type": "string", - "nullable": true, - "description": "Unique referrer ID.", - "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" - }, - "customer": { - "title": "LoyaltiesMembersRedemptionRedeemResponseBodyOrderCustomer", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "A unique identifier of an existing customer.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "customer", - "enum": [ - "customer" - ], - "nullable": true - } - }, - "required": [], - "nullable": true - }, - "referrer": { - "title": "LoyaltiesMembersRedemptionRedeemResponseBodyOrderReferrer", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "A unique identifier of an existing customer.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "customer", - "enum": [ - "customer" - ], - "nullable": true - } - }, - "required": [], - "nullable": true - }, - "redemptions": { - "title": "LoyaltiesMembersRedemptionRedeemResponseBodyOrderRedemptionsEntry", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/OrderRedemptionsEntry" - }, - "nullable": true - }, - "items": { - "title": "LoyaltiesMembersRedemptionRedeemResponseBodyOrderItems", - "type": "array", - "description": "Array of items applied to the order. It can include up to 500 items.", - "items": { - "$ref": "#/components/schemas/OrderCalculatedItem" - }, - "nullable": true - } - }, - "nullable": true + "$ref": "#/components/schemas/OrderCalculated" }, "channel": { "title": "LoyaltiesMembersRedemptionRedeemResponseBodyChannel", @@ -12024,6 +11384,9 @@ "example": "cat_0b688929a2476386a7", "nullable": true }, + "access_settings": { + "$ref": "#/components/schemas/AccessSettings" + }, "activity_duration_after_publishing": { "type": "string", "description": "Defines the amount of time the vouchers will be active after publishing. The value is shown in the ISO 8601 format. For example, a voucher with the value of P24D will be valid for a duration of 24 days.", @@ -16668,7 +16031,7 @@ "items": { "title": "OrdersCreateResponseBodyItems", "type": "array", - "description": "Array of items applied to the order. It can include up to 500 items.", + "description": "Array of items applied to the order. It can include up 500 items.", "items": { "$ref": "#/components/schemas/OrderCalculatedItem" }, @@ -16919,7 +16282,7 @@ "items": { "title": "OrdersGetResponseBodyItems", "type": "array", - "description": "Array of items applied to the order. It can include up to 500 items.", + "description": "Array of items applied to the order. It can include up 500 items.", "items": { "$ref": "#/components/schemas/OrderCalculatedItem" }, @@ -17008,25 +16371,7 @@ "type": "array", "description": "Contains array of order objects.", "items": { - "title": "OrdersListResponseBodyOrdersItem", - "allOf": [ - { - "$ref": "#/components/schemas/OrderCalculated" - }, - { - "type": "object", - "properties": { - "items": { - "title": "OrdersListResponseBodyOrdersItemItems", - "type": "array", - "description": "Array of items applied to the order. It can include up to 500 items.", - "items": { - "$ref": "#/components/schemas/OrderCalculatedItem" - } - } - } - } - ] + "$ref": "#/components/schemas/OrderCalculated" }, "nullable": true }, @@ -17238,7 +16583,7 @@ "items": { "title": "OrdersUpdateResponseBodyItems", "type": "array", - "description": "Array of items applied to the order. It can include up to 500 items.", + "description": "Array of items applied to the order. It can include up 500 items.", "items": { "$ref": "#/components/schemas/OrderCalculatedItem" }, @@ -21962,141 +21307,7 @@ "nullable": true }, "order": { - "title": "QualificationsCheckEligibilityResponseBodyOrder", - "type": "object", - "nullable": true, - "properties": { - "id": { - "type": "string", - "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", - "nullable": true - }, - "source_id": { - "type": "string", - "nullable": true, - "description": "Unique source ID of an existing order that will be linked to the redemption of this request." - }, - "status": { - "type": "string", - "description": "The order status.", - "enum": [ - "CREATED", - "PAID", - "CANCELED", - "FULFILLED" - ], - "nullable": true - }, - "amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "initial_amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "discount_amount": { - "type": "integer", - "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_amount": { - "type": "integer", - "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "applied_discount_amount": { - "type": "integer", - "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_applied_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", - "nullable": true - }, - "total_applied_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", - "nullable": true - }, - "metadata": { - "title": "QualificationsCheckEligibilityResponseBodyOrderMetadata", - "type": "object", - "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "order", - "enum": [ - "order" - ], - "nullable": true - }, - "created_at": { - "type": "string", - "example": "2021-12-22T10:13:06.487Z", - "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", - "format": "date-time", - "nullable": true - }, - "updated_at": { - "type": "string", - "nullable": true, - "example": "2021-12-22T10:14:45.316Z", - "format": "date-time", - "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." - }, - "customer_id": { - "type": "string", - "nullable": true, - "description": "Unique customer ID of the customer making the purchase.", - "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" - }, - "referrer_id": { - "type": "string", - "nullable": true, - "description": "Unique referrer ID.", - "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" - }, - "customer": { - "$ref": "#/components/schemas/CustomerId" - }, - "referrer": { - "$ref": "#/components/schemas/ReferrerId" - }, - "redemptions": { - "title": "QualificationsCheckEligibilityResponseBodyOrderRedemptionsEntry", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/OrderRedemptionsEntry" - }, - "nullable": true - }, - "items": { - "title": "QualificationsCheckEligibilityResponseBodyOrderItems", - "type": "array", - "description": "Array of items applied to the order. It can include up to 500 items.", - "items": { - "$ref": "#/components/schemas/OrderCalculatedItem" - }, - "nullable": true - } - } + "$ref": "#/components/schemas/OrderCalculated" }, "stacking_rules": { "$ref": "#/components/schemas/StackingRules" @@ -22396,7 +21607,7 @@ "items": { "title": "RedemptionsGetResponseBodyOrderItems", "type": "array", - "description": "Array of items applied to the order. It can include up to 500 items.", + "description": "Array of items applied to the order. It can include up 500 items.", "items": { "$ref": "#/components/schemas/OrderCalculatedItem" }, @@ -23296,7 +22507,7 @@ "items": { "title": "RedemptionsListResponseBodyRedemptionsItemOrderItems", "type": "array", - "description": "Array of items applied to the order. It can include up to 500 items.", + "description": "Array of items applied to the order. It can include up 500 items.", "items": { "$ref": "#/components/schemas/OrderCalculatedItem" }, @@ -24002,155 +23213,7 @@ "$ref": "#/components/schemas/Redemption" }, "order": { - "title": "RedemptionsRedeemResponseBodyOrder", - "description": "Contains the order details associated with the redemption.", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", - "nullable": true - }, - "source_id": { - "type": "string", - "nullable": true, - "description": "Unique source ID of an existing order that will be linked to the redemption of this request." - }, - "status": { - "type": "string", - "description": "The order status.", - "enum": [ - "CREATED", - "PAID", - "CANCELED", - "FULFILLED" - ], - "nullable": true - }, - "amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "initial_amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "discount_amount": { - "type": "integer", - "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_amount": { - "type": "integer", - "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "applied_discount_amount": { - "type": "integer", - "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_applied_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", - "nullable": true - }, - "total_applied_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", - "nullable": true - }, - "metadata": { - "title": "RedemptionsRedeemResponseBodyOrderMetadata", - "type": "object", - "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "order", - "enum": [ - "order" - ], - "nullable": true - }, - "created_at": { - "type": "string", - "example": "2021-12-22T10:13:06.487Z", - "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", - "format": "date-time", - "nullable": true - }, - "updated_at": { - "type": "string", - "nullable": true, - "example": "2021-12-22T10:14:45.316Z", - "format": "date-time", - "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." - }, - "customer_id": { - "type": "string", - "nullable": true, - "description": "Unique customer ID of the customer making the purchase.", - "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" - }, - "referrer_id": { - "type": "string", - "nullable": true, - "description": "Unique referrer ID.", - "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" - }, - "customer": { - "$ref": "#/components/schemas/CustomerId" - }, - "referrer": { - "$ref": "#/components/schemas/ReferrerId" - }, - "redemptions": { - "title": "RedemptionsRedeemResponseBodyOrderRedemptionsEntry", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/OrderRedemptionsEntry" - }, - "nullable": true - }, - "items": { - "title": "RedemptionsRedeemResponseBodyOrderItems", - "type": "array", - "description": "Array of items applied to the order. It can include up to 500 items.", - "items": { - "title": "RedemptionsRedeemResponseBodyOrderItemsItem", - "allOf": [ - { - "$ref": "#/components/schemas/OrderCalculatedItem" - }, - { - "type": "object", - "properties": { - "application_details": { - "$ref": "#/components/schemas/ApplicationDetails" - } - } - } - ] - }, - "nullable": true - } - }, - "nullable": true + "$ref": "#/components/schemas/OrderCalculated" }, "inapplicable_redeemables": { "title": "RedemptionsRedeemResponseBodyInapplicableRedeemables", @@ -24342,141 +23405,7 @@ "nullable": true }, "order": { - "title": "RedemptionsRollbackCreateResponseBodyOrder", - "nullable": true, - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", - "nullable": true - }, - "source_id": { - "type": "string", - "nullable": true, - "description": "Unique source ID of an existing order that will be linked to the redemption of this request." - }, - "status": { - "type": "string", - "description": "The order status.", - "enum": [ - "CREATED", - "PAID", - "CANCELED", - "FULFILLED" - ], - "nullable": true - }, - "amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "initial_amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "discount_amount": { - "type": "integer", - "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_amount": { - "type": "integer", - "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "applied_discount_amount": { - "type": "integer", - "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_applied_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", - "nullable": true - }, - "total_applied_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", - "nullable": true - }, - "metadata": { - "title": "RedemptionsRollbackCreateResponseBodyOrderMetadata", - "type": "object", - "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "order", - "enum": [ - "order" - ], - "nullable": true - }, - "created_at": { - "type": "string", - "example": "2021-12-22T10:13:06.487Z", - "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", - "format": "date-time", - "nullable": true - }, - "updated_at": { - "type": "string", - "nullable": true, - "example": "2021-12-22T10:14:45.316Z", - "format": "date-time", - "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." - }, - "customer_id": { - "type": "string", - "nullable": true, - "description": "Unique customer ID of the customer making the purchase.", - "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" - }, - "referrer_id": { - "type": "string", - "nullable": true, - "description": "Unique referrer ID.", - "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" - }, - "customer": { - "$ref": "#/components/schemas/CustomerId" - }, - "referrer": { - "$ref": "#/components/schemas/ReferrerId" - }, - "redemptions": { - "title": "RedemptionsRollbackCreateResponseBodyOrderRedemptionsEntry", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/OrderRedemptionsEntry" - }, - "nullable": true - }, - "items": { - "title": "RedemptionsRollbackCreateResponseBodyOrderItems", - "type": "array", - "description": "Array of items applied to the order. It can include up to 500 items.", - "items": { - "$ref": "#/components/schemas/OrderCalculatedItem" - }, - "nullable": true - } - } + "$ref": "#/components/schemas/OrderCalculated" }, "channel": { "title": "RedemptionsRollbackCreateResponseBodyChannel", @@ -24607,18 +23536,6 @@ "allOf": [ { "$ref": "#/components/schemas/OrderCalculated" - }, - { - "type": "object", - "properties": { - "items": { - "type": "array", - "description": "Array of items applied to the order. It can include up to 500 items.", - "items": { - "$ref": "#/components/schemas/OrderCalculatedItem" - } - } - } } ] } @@ -25931,6 +24848,9 @@ "description": "The metadata object stores all custom attributes assigned to the campaign. A set of key/value pairs that you can attach to a campaign object. It can be useful for storing additional information about the campaign in a structured format.", "nullable": true }, + "access_settings": { + "$ref": "#/components/schemas/AccessSettings" + }, "voucher": { "title": "TemplatesCampaignsCampaignSetupCreateRequestBodyVoucher", "type": "object", @@ -27505,6 +26425,7 @@ "order": { "title": "ValidationsValidateResponseBodyRedeemablesItemOrder", "type": "object", + "description": "Order information.", "properties": { "id": { "type": "string", @@ -27614,46 +26535,10 @@ "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" }, "customer": { - "title": "ValidationsValidateResponseBodyRedeemablesItemOrderCustomer", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "A unique identifier of an existing customer.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "customer", - "enum": [ - "customer" - ], - "nullable": true - } - }, - "required": [] + "$ref": "#/components/schemas/CustomerId" }, "referrer": { - "title": "ValidationsValidateResponseBodyRedeemablesItemOrderReferrer", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "A unique identifier of an existing customer.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "customer", - "enum": [ - "customer" - ], - "nullable": true - } - }, - "required": [] + "$ref": "#/components/schemas/ReferrerId" }, "redemptions": { "title": "ValidationsValidateResponseBodyRedeemablesItemOrderRedemptionsEntry", @@ -27666,7 +26551,7 @@ "items": { "title": "ValidationsValidateResponseBodyRedeemablesItemOrderItems", "type": "array", - "description": "Array of items applied to the order. It can include up to 500 items.", + "description": "Array of items applied to the order. It can include up 500 items.", "items": { "$ref": "#/components/schemas/OrderCalculatedItem" }, @@ -27895,154 +26780,7 @@ "nullable": true }, "order": { - "title": "ValidationsValidateResponseBodyOrder", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", - "nullable": true - }, - "source_id": { - "type": "string", - "nullable": true, - "description": "Unique source ID of an existing order that will be linked to the redemption of this request." - }, - "status": { - "type": "string", - "description": "The order status.", - "enum": [ - "CREATED", - "PAID", - "CANCELED", - "FULFILLED" - ], - "nullable": true - }, - "amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "initial_amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "discount_amount": { - "type": "integer", - "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_amount": { - "type": "integer", - "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "applied_discount_amount": { - "type": "integer", - "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_applied_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", - "nullable": true - }, - "total_applied_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", - "nullable": true - }, - "metadata": { - "title": "ValidationsValidateResponseBodyOrderMetadata", - "type": "object", - "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "order", - "enum": [ - "order" - ], - "nullable": true - }, - "created_at": { - "type": "string", - "example": "2021-12-22T10:13:06.487Z", - "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", - "format": "date-time", - "nullable": true - }, - "updated_at": { - "type": "string", - "nullable": true, - "example": "2021-12-22T10:14:45.316Z", - "format": "date-time", - "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." - }, - "customer_id": { - "type": "string", - "nullable": true, - "description": "Unique customer ID of the customer making the purchase.", - "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" - }, - "referrer_id": { - "type": "string", - "nullable": true, - "description": "Unique referrer ID.", - "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" - }, - "customer": { - "$ref": "#/components/schemas/CustomerId" - }, - "referrer": { - "$ref": "#/components/schemas/ReferrerId" - }, - "redemptions": { - "title": "ValidationsValidateResponseBodyOrderRedemptionsEntry", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/OrderRedemptionsEntry" - }, - "nullable": true - }, - "items": { - "title": "ValidationsValidateResponseBodyOrderItems", - "type": "array", - "description": "Array of items applied to the order. It can include up to 500 items.", - "items": { - "title": "ValidationsValidateResponseBodyOrderItemsItem", - "allOf": [ - { - "$ref": "#/components/schemas/OrderCalculatedItem" - }, - { - "type": "object", - "properties": { - "application_details": { - "$ref": "#/components/schemas/ApplicationDetails" - } - } - } - ] - }, - "nullable": true - } - }, - "nullable": true + "$ref": "#/components/schemas/OrderCalculated" }, "tracking_id": { "type": "string", @@ -30226,6 +28964,69 @@ "type": "string", "format": "hostname" }, + "AccessSettings": { + "title": "AccessSettings", + "type": "object", + "description": "Assigns or unassigns an area or store to the campaign.\n\n**NOTE**: this object can be sent if the Areas and Stores enterprise feature is enabled. Contact [Voucherify Sales](https://www.voucherify.io/contact-sales) to learn more.", + "properties": { + "assign": { + "title": "AccessSettingsAssign", + "type": "object", + "description": "Assigns the campaign to an area or a store. Provide the area and/or store IDs in the respective arrays. If a campaign changes assignments between areas or stores, unassign it from the area. For example, if a campaign is assigned to Area-01, but it must be now assigned to Store-01 within this area, you have to unassign the campaign from Area-01 and assign to Store-01 only.\n\nIf you want to assign the campaign to stores only, you do not have to send the area ID.", + "properties": { + "areas_ids": { + "title": "AccessSettingsAssignAreasIds", + "type": "array", + "description": "List all area IDs to which the campaign will be assigned.", + "items": { + "title": "AccessSettingsAssignAreasIdsItem", + "type": "string" + }, + "nullable": true + }, + "area_stores_ids": { + "title": "AccessSettingsAssignAreaStoresIds", + "type": "array", + "description": "List all store IDs to which the campaign will be assigned.", + "items": { + "title": "AccessSettingsAssignAreaStoresIdsItem", + "type": "string" + }, + "nullable": true + } + }, + "nullable": true + }, + "unassign": { + "title": "AccessSettingsUnassign", + "type": "object", + "description": "Unassigns the campaign from an area or a store. Provide the area and/or store IDs in the respective arrays. If a campaign changes assignments between areas or stores, unassign it first. For example, if a campaign is assigned to Area-01, but it must be now assigned to Store-01 within this area, you have to unassign the campaign from Area-01 and assigned to Store-01 only.\n\nIf you want to assign the campaign to stores only, you do not have to send the area ID.", + "properties": { + "areas_ids": { + "title": "AccessSettingsUnassignAreasIds", + "type": "array", + "description": "List all area IDs from which the campaign will be unassigned.", + "items": { + "title": "AccessSettingsUnassignAreasIdsItem", + "type": "string" + }, + "nullable": true + }, + "area_stores_ids": { + "title": "AccessSettingsUnassignAreaStoresIds", + "type": "array", + "description": "List all store IDs to which the campaign will be unassigned.", + "items": { + "title": "AccessSettingsUnassignAreaStoresIdsItem", + "type": "string" + }, + "nullable": true + } + }, + "nullable": true + } + } + }, "AccessSettingsCampaignAssignmentsList": { "title": "AccessSettingsCampaignAssignmentsList", "type": "object", @@ -30433,49 +29234,6 @@ }, "required": [] }, - "ApplicationDetails": { - "title": "ApplicationDetails", - "type": "array", - "description": "Array containing details about the items that are replaced and the items that are replacements for discounts with the `REPLACE_ITEMS` effect.", - "items": { - "title": "ApplicationDetailsItem", - "type": "object", - "description": "Object representing item replacement.", - "properties": { - "source_index": { - "type": "integer", - "description": "Index number of the source item that is replaced. The enumeration starts from `0`, which represents the first item in the request, e.g., if the replaced item is passed as the second in the request, `source_index` equals `3`.", - "minimum": 0 - }, - "source_applied_quantity": { - "type": "integer", - "description": "Number of source units that are replaced.", - "maximum": -1 - }, - "source_applied_quantity_amount": { - "type": "integer", - "description": "Amount equal to the price of the units that are replaced. Determines the change of the amount of the source item quantity.", - "maximum": 0 - }, - "target_index": { - "type": "integer", - "description": "Index number of the target item that is a replacement of the source item. The enumeration continues the values for the order items, e.g. if there are three items in the request, `target_index` equals `3`, as enumeration starts from `0`." - }, - "target_applied_quantity": { - "type": "integer", - "description": "Number of added target units that are replacements." - }, - "target_applied_quantity_amount": { - "type": "integer", - "description": "Amount equal to the price of the units that are replacements. Determines the change in the amount of the target item quantity." - }, - "target_applied_discount_amount": { - "type": "integer", - "description": "Discount amount applied to the target item with regard to the replacement. Equals the `target_applied_quantity_amount` minus `source_applied_quantity_amount`." - } - } - } - }, "AsyncActionBase": { "title": "AsyncActionBase", "type": "object", @@ -35719,6 +34477,15 @@ "$ref": "#/components/schemas/OrderRedemptionsEntry" }, "nullable": true + }, + "items": { + "title": "OrderCalculatedItems", + "type": "array", + "description": "Array of items applied to the order. It can include up 500 items.", + "items": { + "$ref": "#/components/schemas/OrderCalculatedItem" + }, + "nullable": true } } }, @@ -35907,6 +34674,9 @@ "type": "object", "description": "A set of custom key/value pairs that you can attach to an item object. It can be useful for storing additional information about the item in a structured format. It can be used to define business validation rules or discount formulas.", "nullable": true + }, + "application_details": { + "$ref": "#/components/schemas/ApplicationDetails" } }, "required": [] @@ -37355,179 +36125,7 @@ "nullable": true }, "order": { - "title": "RedemptionOrder", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", - "nullable": true - }, - "source_id": { - "type": "string", - "nullable": true, - "description": "Unique source ID of an existing order that will be linked to the redemption of this request." - }, - "status": { - "type": "string", - "description": "The order status.", - "enum": [ - "CREATED", - "PAID", - "CANCELED", - "FULFILLED" - ], - "nullable": true - }, - "amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "initial_amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "discount_amount": { - "type": "integer", - "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_amount": { - "type": "integer", - "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "applied_discount_amount": { - "type": "integer", - "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_applied_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", - "nullable": true - }, - "total_applied_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", - "nullable": true - }, - "metadata": { - "title": "RedemptionOrderMetadata", - "type": "object", - "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "order", - "enum": [ - "order" - ], - "nullable": true - }, - "created_at": { - "type": "string", - "example": "2021-12-22T10:13:06.487Z", - "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", - "format": "date-time", - "nullable": true - }, - "updated_at": { - "type": "string", - "nullable": true, - "example": "2021-12-22T10:14:45.316Z", - "format": "date-time", - "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." - }, - "customer_id": { - "type": "string", - "nullable": true, - "description": "Unique customer ID of the customer making the purchase.", - "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" - }, - "referrer_id": { - "type": "string", - "nullable": true, - "description": "Unique referrer ID.", - "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" - }, - "customer": { - "title": "RedemptionOrderCustomer", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "A unique identifier of an existing customer.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "customer", - "enum": [ - "customer" - ], - "nullable": true - } - }, - "required": [], - "nullable": true - }, - "referrer": { - "title": "RedemptionOrderReferrer", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "A unique identifier of an existing customer.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "customer", - "enum": [ - "customer" - ], - "nullable": true - } - }, - "required": [], - "nullable": true - }, - "redemptions": { - "title": "RedemptionOrderRedemptionsEntry", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/OrderRedemptionsEntry" - }, - "nullable": true - }, - "items": { - "title": "RedemptionOrderItems", - "type": "array", - "description": "Array of items applied to the order. It can include up to 500 items.", - "items": { - "$ref": "#/components/schemas/OrderCalculatedItem" - }, - "nullable": true - } - }, - "nullable": true + "$ref": "#/components/schemas/OrderCalculated" }, "channel": { "title": "RedemptionChannel", @@ -38173,7 +36771,7 @@ "items": { "title": "RedemptionEntryOrderItems", "type": "array", - "description": "Array of items applied to the order. It can include up to 500 items.", + "description": "Array of items applied to the order. It can include up 500 items.", "items": { "$ref": "#/components/schemas/OrderCalculatedItem" }, @@ -39062,141 +37660,7 @@ "nullable": true }, "order": { - "title": "RedemptionRollbackOrder", - "nullable": true, - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", - "nullable": true - }, - "source_id": { - "type": "string", - "nullable": true, - "description": "Unique source ID of an existing order that will be linked to the redemption of this request." - }, - "status": { - "type": "string", - "description": "The order status.", - "enum": [ - "CREATED", - "PAID", - "CANCELED", - "FULFILLED" - ], - "nullable": true - }, - "amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "initial_amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "discount_amount": { - "type": "integer", - "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_amount": { - "type": "integer", - "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "applied_discount_amount": { - "type": "integer", - "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_applied_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", - "nullable": true - }, - "total_applied_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", - "nullable": true - }, - "metadata": { - "title": "RedemptionRollbackOrderMetadata", - "type": "object", - "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "order", - "enum": [ - "order" - ], - "nullable": true - }, - "created_at": { - "type": "string", - "example": "2021-12-22T10:13:06.487Z", - "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", - "format": "date-time", - "nullable": true - }, - "updated_at": { - "type": "string", - "nullable": true, - "example": "2021-12-22T10:14:45.316Z", - "format": "date-time", - "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." - }, - "customer_id": { - "type": "string", - "nullable": true, - "description": "Unique customer ID of the customer making the purchase.", - "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" - }, - "referrer_id": { - "type": "string", - "nullable": true, - "description": "Unique referrer ID.", - "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" - }, - "customer": { - "$ref": "#/components/schemas/CustomerId" - }, - "referrer": { - "$ref": "#/components/schemas/ReferrerId" - }, - "redemptions": { - "title": "RedemptionRollbackOrderRedemptionsEntry", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/OrderRedemptionsEntry" - }, - "nullable": true - }, - "items": { - "title": "RedemptionRollbackOrderItems", - "type": "array", - "description": "Array of items applied to the order. It can include up to 500 items.", - "items": { - "$ref": "#/components/schemas/OrderCalculatedItem" - }, - "nullable": true - } - } + "$ref": "#/components/schemas/OrderCalculated" }, "channel": { "title": "RedemptionRollbackChannel", @@ -41909,6 +40373,49 @@ "APPLY_FROM_MOST_EXPENSIVE" ] }, + "ApplicationDetails": { + "title": "ApplicationDetails", + "type": "array", + "description": "Array containing details about the items that are replaced and the items that are replacements for discounts with the `REPLACE_ITEMS` effect.", + "items": { + "title": "ApplicationDetailsItem", + "type": "object", + "description": "Object representing item replacement.", + "properties": { + "source_index": { + "type": "integer", + "description": "Index number of the source item that is replaced. The enumeration starts from `0`, which represents the first item in the request, e.g., if the replaced item is passed as the second in the request, `source_index` equals `3`.", + "minimum": 0 + }, + "source_applied_quantity": { + "type": "integer", + "description": "Number of source units that are replaced.", + "maximum": -1 + }, + "source_applied_quantity_amount": { + "type": "integer", + "description": "Amount equal to the price of the units that are replaced. Determines the change of the amount of the source item quantity.", + "maximum": 0 + }, + "target_index": { + "type": "integer", + "description": "Index number of the target item that is a replacement of the source item. The enumeration continues the values for the order items, e.g. if there are three items in the request, `target_index` equals `3`, as enumeration starts from `0`." + }, + "target_applied_quantity": { + "type": "integer", + "description": "Number of added target units that are replacements." + }, + "target_applied_quantity_amount": { + "type": "integer", + "description": "Amount equal to the price of the units that are replacements. Determines the change in the amount of the target item quantity." + }, + "target_applied_discount_amount": { + "type": "integer", + "description": "Discount amount applied to the target item with regard to the replacement. Equals the `target_applied_quantity_amount` minus `source_applied_quantity_amount`." + } + } + } + }, "AreaStoreCampaignAssignment": { "title": "AreaStoreCampaignAssignment", "type": "object", @@ -42537,154 +41044,7 @@ "$ref": "#/components/schemas/RedeemableResult" }, "order": { - "title": "QualificationsRedeemableOrder", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", - "nullable": true - }, - "source_id": { - "type": "string", - "nullable": true, - "description": "Unique source ID of an existing order that will be linked to the redemption of this request." - }, - "status": { - "type": "string", - "description": "The order status.", - "enum": [ - "CREATED", - "PAID", - "CANCELED", - "FULFILLED" - ], - "nullable": true - }, - "amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "initial_amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "discount_amount": { - "type": "integer", - "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_amount": { - "type": "integer", - "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "applied_discount_amount": { - "type": "integer", - "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_applied_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", - "nullable": true - }, - "total_applied_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", - "nullable": true - }, - "metadata": { - "title": "QualificationsRedeemableOrderMetadata", - "type": "object", - "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "order", - "enum": [ - "order" - ], - "nullable": true - }, - "created_at": { - "type": "string", - "example": "2021-12-22T10:13:06.487Z", - "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", - "format": "date-time", - "nullable": true - }, - "updated_at": { - "type": "string", - "nullable": true, - "example": "2021-12-22T10:14:45.316Z", - "format": "date-time", - "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." - }, - "customer_id": { - "type": "string", - "nullable": true, - "description": "Unique customer ID of the customer making the purchase.", - "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" - }, - "referrer_id": { - "type": "string", - "nullable": true, - "description": "Unique referrer ID.", - "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" - }, - "customer": { - "$ref": "#/components/schemas/CustomerId" - }, - "referrer": { - "$ref": "#/components/schemas/ReferrerId" - }, - "redemptions": { - "title": "QualificationsRedeemableOrderRedemptionsEntry", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/OrderRedemptionsEntry" - }, - "nullable": true - }, - "items": { - "title": "QualificationsRedeemableOrderItems", - "type": "array", - "description": "Array of items applied to the order. It can include up to 500 items.", - "items": { - "title": "QualificationsRedeemableOrderItemsItem", - "allOf": [ - { - "$ref": "#/components/schemas/OrderCalculatedItem" - }, - { - "type": "object", - "properties": { - "application_details": { - "$ref": "#/components/schemas/ApplicationDetails" - } - } - } - ] - }, - "nullable": true - } - }, - "nullable": true + "$ref": "#/components/schemas/OrderCalculated" }, "validation_rule_id": { "type": "string", @@ -43469,154 +41829,7 @@ "$ref": "#/components/schemas/RedeemableResult" }, "order": { - "title": "QualificationsRedeemableBaseOrder", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", - "nullable": true - }, - "source_id": { - "type": "string", - "nullable": true, - "description": "Unique source ID of an existing order that will be linked to the redemption of this request." - }, - "status": { - "type": "string", - "description": "The order status.", - "enum": [ - "CREATED", - "PAID", - "CANCELED", - "FULFILLED" - ], - "nullable": true - }, - "amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "initial_amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "discount_amount": { - "type": "integer", - "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_amount": { - "type": "integer", - "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "applied_discount_amount": { - "type": "integer", - "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_applied_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", - "nullable": true - }, - "total_applied_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", - "nullable": true - }, - "metadata": { - "title": "QualificationsRedeemableBaseOrderMetadata", - "type": "object", - "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "order", - "enum": [ - "order" - ], - "nullable": true - }, - "created_at": { - "type": "string", - "example": "2021-12-22T10:13:06.487Z", - "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", - "format": "date-time", - "nullable": true - }, - "updated_at": { - "type": "string", - "nullable": true, - "example": "2021-12-22T10:14:45.316Z", - "format": "date-time", - "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." - }, - "customer_id": { - "type": "string", - "nullable": true, - "description": "Unique customer ID of the customer making the purchase.", - "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" - }, - "referrer_id": { - "type": "string", - "nullable": true, - "description": "Unique referrer ID.", - "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" - }, - "customer": { - "$ref": "#/components/schemas/CustomerId" - }, - "referrer": { - "$ref": "#/components/schemas/ReferrerId" - }, - "redemptions": { - "title": "QualificationsRedeemableBaseOrderRedemptionsEntry", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/OrderRedemptionsEntry" - }, - "nullable": true - }, - "items": { - "title": "QualificationsRedeemableBaseOrderItems", - "type": "array", - "description": "Array of items applied to the order. It can include up to 500 items.", - "items": { - "title": "QualificationsRedeemableBaseOrderItemsItem", - "allOf": [ - { - "$ref": "#/components/schemas/OrderCalculatedItem" - }, - { - "type": "object", - "properties": { - "application_details": { - "$ref": "#/components/schemas/ApplicationDetails" - } - } - } - ] - }, - "nullable": true - } - }, - "nullable": true + "$ref": "#/components/schemas/OrderCalculated" }, "validation_rule_id": { "type": "string", diff --git a/scripts/prepare-open-api-for-sdk/index.ts b/scripts/prepare-open-api-for-sdk/index.ts index 6d654af8..23d05618 100644 --- a/scripts/prepare-open-api-for-sdk/index.ts +++ b/scripts/prepare-open-api-for-sdk/index.ts @@ -5,7 +5,7 @@ import minimist from "minimist"; import colors from "colors"; import { parseNullsToNullableObjects, removeStoplightTag } from "./utils"; import originalOpenAPIContent from "../../reference/OpenAPI.json"; -import _ from "lodash"; +import _, { omit } from "lodash"; let openAPIContent = originalOpenAPIContent; import { removedNotUsedParameters } from "./removed-not-used-parameters"; @@ -91,10 +91,7 @@ const main = async (languageOptions: LanguageOptions) => { }); ////////////////////////////////////////////////////////////////////////////// removeStoplightTag(openAPIContent); - openAPIContent = removeUnwantedProperties(openAPIContent, [ - "readmeTitle", - "access_settings", //@todo remove when fixed - ]); + openAPIContent = removeUnwantedProperties(openAPIContent, ["readmeTitle"]); openAPIContent.components.schemas = removeUnwantedProperties( openAPIContent.components.schemas, ["title"], @@ -195,6 +192,24 @@ const main = async (languageOptions: LanguageOptions) => { //ValidationRuleRules fix for Readme – should stay forever openAPIContent.components.schemas.ValidationRuleRules.additionalProperties.properties.rules.$ref = "#/components/schemas/ValidationRuleRules"; + //Do not add breaking change on application_details + openAPIContent.components.schemas.OrderCalculated.properties["items"] = { + type: "array", + description: + "Array of items applied to the order. It can include up 500 items.", + items: { + $ref: "#/components/schemas/OrderCalculatedItem", + }, + nullable: true, + }; + openAPIContent.components.schemas.OrderCalculatedItem.properties[ + "application_details" + ] = { + $ref: "#/components/schemas/ApplicationDetails", + }; + openAPIContent.components.schemas = fixOrderCalculated( + openAPIContent.components.schemas, + ); ////////////////////////////////////////////////////////////////////////////// openAPIContent = addMissingDefaults(openAPIContent); const { paths, newSchemas } = getPathsWithoutDeprecated( @@ -522,6 +537,28 @@ const moveSchemasOnTheBack = (schemas: any, schemasNames: string[]) => ({ ..._.pick(schemas, schemasNames), }); +const fixOrderCalculated = (object: any) => { + if (Array.isArray(object)) { + return object.map((value) => fixOrderCalculated(value)); + } + if (object instanceof Object) { + if ( + object.allOf?.find( + (e) => e?.$ref === "#/components/schemas/OrderCalculated", + ) + ) { + object.allOf = object.allOf.filter((e) => !e?.properties?.items); + } + return Object.fromEntries( + Object.entries(object).map((keyAndEntry) => { + const [key, entry] = keyAndEntry; + return [key, fixOrderCalculated(entry)]; + }), + ); + } + return object; +}; + if (!("language" in options)) { console.log(colors.red("invalid arguments, missing language parameter")); } else if ( From cdaa2cd76e4a649c986ab43f0e350f62d1b8b422 Mon Sep 17 00:00:00 2001 From: p-zielinski Date: Thu, 19 Dec 2024 09:57:13 +0100 Subject: [PATCH 21/23] script that fixes breaking changes cd --- reference/readonly-sdks/java/OpenAPI.json | 272 +------------------- reference/readonly-sdks/php/OpenAPI.json | 272 +------------------- reference/readonly-sdks/python/OpenAPI.json | 266 +------------------ reference/readonly-sdks/ruby/OpenAPI.json | 272 +------------------- scripts/prepare-open-api-for-sdk/index.ts | 11 +- 5 files changed, 18 insertions(+), 1075 deletions(-) diff --git a/reference/readonly-sdks/java/OpenAPI.json b/reference/readonly-sdks/java/OpenAPI.json index 3c87c073..66ba4cc4 100644 --- a/reference/readonly-sdks/java/OpenAPI.json +++ b/reference/readonly-sdks/java/OpenAPI.json @@ -2776,141 +2776,7 @@ "nullable": true }, "order": { - "title": "ClientValidationsValidateResponseBodyRedeemablesItemOrder", - "type": "object", - "description": "Order information.", - "properties": { - "id": { - "type": "string", - "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", - "nullable": true - }, - "source_id": { - "type": "string", - "nullable": true, - "description": "Unique source ID of an existing order that will be linked to the redemption of this request." - }, - "status": { - "type": "string", - "description": "The order status.", - "enum": [ - "CREATED", - "PAID", - "CANCELED", - "FULFILLED" - ], - "nullable": true - }, - "amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "initial_amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "discount_amount": { - "type": "integer", - "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_amount": { - "type": "integer", - "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "applied_discount_amount": { - "type": "integer", - "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_applied_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", - "nullable": true - }, - "total_applied_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", - "nullable": true - }, - "metadata": { - "title": "ClientValidationsValidateResponseBodyRedeemablesItemOrderMetadata", - "type": "object", - "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "order", - "enum": [ - "order" - ], - "nullable": true - }, - "created_at": { - "type": "string", - "example": "2021-12-22T10:13:06.487Z", - "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", - "format": "date-time", - "nullable": true - }, - "updated_at": { - "type": "string", - "nullable": true, - "example": "2021-12-22T10:14:45.316Z", - "format": "date-time", - "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." - }, - "customer_id": { - "type": "string", - "nullable": true, - "description": "Unique customer ID of the customer making the purchase.", - "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" - }, - "referrer_id": { - "type": "string", - "nullable": true, - "description": "Unique referrer ID.", - "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" - }, - "customer": { - "$ref": "#/components/schemas/CustomerId" - }, - "referrer": { - "$ref": "#/components/schemas/ReferrerId" - }, - "redemptions": { - "title": "ClientValidationsValidateResponseBodyRedeemablesItemOrderRedemptionsEntry", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/OrderRedemptionsEntry" - }, - "nullable": true - }, - "items": { - "title": "ClientValidationsValidateResponseBodyRedeemablesItemOrderItems", - "type": "array", - "description": "Array of items applied to the order. It can include up 500 items.", - "items": { - "$ref": "#/components/schemas/OrderCalculatedItem" - }, - "nullable": true - } - } + "$ref": "#/components/schemas/OrderCalculated" }, "applicable_to": { "$ref": "#/components/schemas/ApplicableToResultList" @@ -26389,141 +26255,7 @@ "nullable": true }, "order": { - "title": "ValidationsValidateResponseBodyRedeemablesItemOrder", - "type": "object", - "description": "Order information.", - "properties": { - "id": { - "type": "string", - "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", - "nullable": true - }, - "source_id": { - "type": "string", - "nullable": true, - "description": "Unique source ID of an existing order that will be linked to the redemption of this request." - }, - "status": { - "type": "string", - "description": "The order status.", - "enum": [ - "CREATED", - "PAID", - "CANCELED", - "FULFILLED" - ], - "nullable": true - }, - "amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "initial_amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "discount_amount": { - "type": "integer", - "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_amount": { - "type": "integer", - "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "applied_discount_amount": { - "type": "integer", - "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_applied_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", - "nullable": true - }, - "total_applied_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", - "nullable": true - }, - "metadata": { - "title": "ValidationsValidateResponseBodyRedeemablesItemOrderMetadata", - "type": "object", - "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "order", - "enum": [ - "order" - ], - "nullable": true - }, - "created_at": { - "type": "string", - "example": "2021-12-22T10:13:06.487Z", - "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", - "format": "date-time", - "nullable": true - }, - "updated_at": { - "type": "string", - "nullable": true, - "example": "2021-12-22T10:14:45.316Z", - "format": "date-time", - "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." - }, - "customer_id": { - "type": "string", - "nullable": true, - "description": "Unique customer ID of the customer making the purchase.", - "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" - }, - "referrer_id": { - "type": "string", - "nullable": true, - "description": "Unique referrer ID.", - "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" - }, - "customer": { - "$ref": "#/components/schemas/CustomerId" - }, - "referrer": { - "$ref": "#/components/schemas/ReferrerId" - }, - "redemptions": { - "title": "ValidationsValidateResponseBodyRedeemablesItemOrderRedemptionsEntry", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/OrderRedemptionsEntry" - }, - "nullable": true - }, - "items": { - "title": "ValidationsValidateResponseBodyRedeemablesItemOrderItems", - "type": "array", - "description": "Array of items applied to the order. It can include up 500 items.", - "items": { - "$ref": "#/components/schemas/OrderCalculatedItem" - }, - "nullable": true - } - } + "$ref": "#/components/schemas/OrderCalculated" }, "applicable_to": { "$ref": "#/components/schemas/ApplicableToResultList" diff --git a/reference/readonly-sdks/php/OpenAPI.json b/reference/readonly-sdks/php/OpenAPI.json index 171f683d..75d808b4 100644 --- a/reference/readonly-sdks/php/OpenAPI.json +++ b/reference/readonly-sdks/php/OpenAPI.json @@ -2888,141 +2888,7 @@ "nullable": true }, "order": { - "title": "ClientValidationsValidateResponseBodyRedeemablesItemOrder", - "type": "object", - "description": "Order information.", - "properties": { - "id": { - "type": "string", - "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", - "nullable": true - }, - "source_id": { - "type": "string", - "nullable": true, - "description": "Unique source ID of an existing order that will be linked to the redemption of this request." - }, - "status": { - "type": "string", - "description": "The order status.", - "enum": [ - "CREATED", - "PAID", - "CANCELED", - "FULFILLED" - ], - "nullable": true - }, - "amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "initial_amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "discount_amount": { - "type": "integer", - "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_amount": { - "type": "integer", - "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "applied_discount_amount": { - "type": "integer", - "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_applied_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", - "nullable": true - }, - "total_applied_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", - "nullable": true - }, - "metadata": { - "title": "ClientValidationsValidateResponseBodyRedeemablesItemOrderMetadata", - "type": "object", - "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "order", - "enum": [ - "order" - ], - "nullable": true - }, - "created_at": { - "type": "string", - "example": "2021-12-22T10:13:06.487Z", - "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", - "format": "date-time", - "nullable": true - }, - "updated_at": { - "type": "string", - "nullable": true, - "example": "2021-12-22T10:14:45.316Z", - "format": "date-time", - "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." - }, - "customer_id": { - "type": "string", - "nullable": true, - "description": "Unique customer ID of the customer making the purchase.", - "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" - }, - "referrer_id": { - "type": "string", - "nullable": true, - "description": "Unique referrer ID.", - "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" - }, - "customer": { - "$ref": "#/components/schemas/CustomerId" - }, - "referrer": { - "$ref": "#/components/schemas/ReferrerId" - }, - "redemptions": { - "title": "ClientValidationsValidateResponseBodyRedeemablesItemOrderRedemptionsEntry", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/OrderRedemptionsEntry" - }, - "nullable": true - }, - "items": { - "title": "ClientValidationsValidateResponseBodyRedeemablesItemOrderItems", - "type": "array", - "description": "Array of items applied to the order. It can include up 500 items.", - "items": { - "$ref": "#/components/schemas/OrderCalculatedItem" - }, - "nullable": true - } - } + "$ref": "#/components/schemas/OrderCalculated" }, "applicable_to": { "$ref": "#/components/schemas/ApplicableToResultList" @@ -27224,141 +27090,7 @@ "nullable": true }, "order": { - "title": "ValidationsValidateResponseBodyRedeemablesItemOrder", - "type": "object", - "description": "Order information.", - "properties": { - "id": { - "type": "string", - "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", - "nullable": true - }, - "source_id": { - "type": "string", - "nullable": true, - "description": "Unique source ID of an existing order that will be linked to the redemption of this request." - }, - "status": { - "type": "string", - "description": "The order status.", - "enum": [ - "CREATED", - "PAID", - "CANCELED", - "FULFILLED" - ], - "nullable": true - }, - "amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "initial_amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "discount_amount": { - "type": "integer", - "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_amount": { - "type": "integer", - "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "applied_discount_amount": { - "type": "integer", - "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_applied_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", - "nullable": true - }, - "total_applied_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", - "nullable": true - }, - "metadata": { - "title": "ValidationsValidateResponseBodyRedeemablesItemOrderMetadata", - "type": "object", - "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "order", - "enum": [ - "order" - ], - "nullable": true - }, - "created_at": { - "type": "string", - "example": "2021-12-22T10:13:06.487Z", - "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", - "format": "date-time", - "nullable": true - }, - "updated_at": { - "type": "string", - "nullable": true, - "example": "2021-12-22T10:14:45.316Z", - "format": "date-time", - "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." - }, - "customer_id": { - "type": "string", - "nullable": true, - "description": "Unique customer ID of the customer making the purchase.", - "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" - }, - "referrer_id": { - "type": "string", - "nullable": true, - "description": "Unique referrer ID.", - "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" - }, - "customer": { - "$ref": "#/components/schemas/CustomerId" - }, - "referrer": { - "$ref": "#/components/schemas/ReferrerId" - }, - "redemptions": { - "title": "ValidationsValidateResponseBodyRedeemablesItemOrderRedemptionsEntry", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/OrderRedemptionsEntry" - }, - "nullable": true - }, - "items": { - "title": "ValidationsValidateResponseBodyRedeemablesItemOrderItems", - "type": "array", - "description": "Array of items applied to the order. It can include up 500 items.", - "items": { - "$ref": "#/components/schemas/OrderCalculatedItem" - }, - "nullable": true - } - } + "$ref": "#/components/schemas/OrderCalculated" }, "applicable_to": { "$ref": "#/components/schemas/ApplicableToResultList" diff --git a/reference/readonly-sdks/python/OpenAPI.json b/reference/readonly-sdks/python/OpenAPI.json index 042b74f6..7f85263e 100644 --- a/reference/readonly-sdks/python/OpenAPI.json +++ b/reference/readonly-sdks/python/OpenAPI.json @@ -2776,138 +2776,7 @@ "nullable": true }, "order": { - "title": "ClientValidationsValidateResponseBodyRedeemablesItemOrder", - "type": "object", - "description": "Order information.", - "properties": { - "id": { - "type": "string", - "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", - "nullable": true - }, - "source_id": { - "type": "string", - "nullable": true, - "description": "Unique source ID of an existing order that will be linked to the redemption of this request." - }, - "status": { - "type": "string", - "description": "The order status.", - "enum": [ - "CREATED", - "PAID", - "CANCELED", - "FULFILLED" - ], - "nullable": true - }, - "amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "initial_amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "discount_amount": { - "type": "integer", - "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_amount": { - "type": "integer", - "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "applied_discount_amount": { - "type": "integer", - "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_applied_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", - "nullable": true - }, - "total_applied_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", - "nullable": true - }, - "metadata": { - "title": "ClientValidationsValidateResponseBodyRedeemablesItemOrderMetadata", - "type": "object", - "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "order", - "enum": [ - "order" - ], - "nullable": true - }, - "created_at": { - "type": "string", - "example": "2021-12-22T10:13:06.487Z", - "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", - "format": "date-time", - "nullable": true - }, - "updated_at": { - "type": "string", - "nullable": true, - "example": "2021-12-22T10:14:45.316Z", - "format": "date-time", - "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." - }, - "customer_id": { - "type": "string", - "nullable": true, - "description": "Unique customer ID of the customer making the purchase.", - "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" - }, - "referrer_id": { - "type": "string", - "nullable": true, - "description": "Unique referrer ID.", - "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" - }, - "customer": { - "$ref": "#/components/schemas/CustomerId" - }, - "referrer": { - "$ref": "#/components/schemas/ReferrerId" - }, - "redemptions": { - "title": "ClientValidationsValidateResponseBodyRedeemablesItemOrderRedemptions", - "type": "object", - "nullable": true - }, - "items": { - "title": "ClientValidationsValidateResponseBodyRedeemablesItemOrderItems", - "type": "array", - "description": "Array of items applied to the order. It can include up 500 items.", - "items": { - "$ref": "#/components/schemas/OrderCalculatedItem" - }, - "nullable": true - } - } + "$ref": "#/components/schemas/OrderCalculated" }, "applicable_to": { "$ref": "#/components/schemas/ApplicableToResultList" @@ -26186,138 +26055,7 @@ "nullable": true }, "order": { - "title": "ValidationsValidateResponseBodyRedeemablesItemOrder", - "type": "object", - "description": "Order information.", - "properties": { - "id": { - "type": "string", - "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", - "nullable": true - }, - "source_id": { - "type": "string", - "nullable": true, - "description": "Unique source ID of an existing order that will be linked to the redemption of this request." - }, - "status": { - "type": "string", - "description": "The order status.", - "enum": [ - "CREATED", - "PAID", - "CANCELED", - "FULFILLED" - ], - "nullable": true - }, - "amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "initial_amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "discount_amount": { - "type": "integer", - "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_amount": { - "type": "integer", - "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "applied_discount_amount": { - "type": "integer", - "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_applied_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", - "nullable": true - }, - "total_applied_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", - "nullable": true - }, - "metadata": { - "title": "ValidationsValidateResponseBodyRedeemablesItemOrderMetadata", - "type": "object", - "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "order", - "enum": [ - "order" - ], - "nullable": true - }, - "created_at": { - "type": "string", - "example": "2021-12-22T10:13:06.487Z", - "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", - "format": "date-time", - "nullable": true - }, - "updated_at": { - "type": "string", - "nullable": true, - "example": "2021-12-22T10:14:45.316Z", - "format": "date-time", - "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." - }, - "customer_id": { - "type": "string", - "nullable": true, - "description": "Unique customer ID of the customer making the purchase.", - "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" - }, - "referrer_id": { - "type": "string", - "nullable": true, - "description": "Unique referrer ID.", - "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" - }, - "customer": { - "$ref": "#/components/schemas/CustomerId" - }, - "referrer": { - "$ref": "#/components/schemas/ReferrerId" - }, - "redemptions": { - "title": "ValidationsValidateResponseBodyRedeemablesItemOrderRedemptions", - "type": "object", - "nullable": true - }, - "items": { - "title": "ValidationsValidateResponseBodyRedeemablesItemOrderItems", - "type": "array", - "description": "Array of items applied to the order. It can include up 500 items.", - "items": { - "$ref": "#/components/schemas/OrderCalculatedItem" - }, - "nullable": true - } - } + "$ref": "#/components/schemas/OrderCalculated" }, "applicable_to": { "$ref": "#/components/schemas/ApplicableToResultList" diff --git a/reference/readonly-sdks/ruby/OpenAPI.json b/reference/readonly-sdks/ruby/OpenAPI.json index 2704f918..cd35eb16 100644 --- a/reference/readonly-sdks/ruby/OpenAPI.json +++ b/reference/readonly-sdks/ruby/OpenAPI.json @@ -2776,141 +2776,7 @@ "nullable": true }, "order": { - "title": "ClientValidationsValidateResponseBodyRedeemablesItemOrder", - "type": "object", - "description": "Order information.", - "properties": { - "id": { - "type": "string", - "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", - "nullable": true - }, - "source_id": { - "type": "string", - "nullable": true, - "description": "Unique source ID of an existing order that will be linked to the redemption of this request." - }, - "status": { - "type": "string", - "description": "The order status.", - "enum": [ - "CREATED", - "PAID", - "CANCELED", - "FULFILLED" - ], - "nullable": true - }, - "amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "initial_amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "discount_amount": { - "type": "integer", - "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_amount": { - "type": "integer", - "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "applied_discount_amount": { - "type": "integer", - "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_applied_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", - "nullable": true - }, - "total_applied_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", - "nullable": true - }, - "metadata": { - "title": "ClientValidationsValidateResponseBodyRedeemablesItemOrderMetadata", - "type": "object", - "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "order", - "enum": [ - "order" - ], - "nullable": true - }, - "created_at": { - "type": "string", - "example": "2021-12-22T10:13:06.487Z", - "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", - "format": "date-time", - "nullable": true - }, - "updated_at": { - "type": "string", - "nullable": true, - "example": "2021-12-22T10:14:45.316Z", - "format": "date-time", - "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." - }, - "customer_id": { - "type": "string", - "nullable": true, - "description": "Unique customer ID of the customer making the purchase.", - "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" - }, - "referrer_id": { - "type": "string", - "nullable": true, - "description": "Unique referrer ID.", - "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" - }, - "customer": { - "$ref": "#/components/schemas/CustomerId" - }, - "referrer": { - "$ref": "#/components/schemas/ReferrerId" - }, - "redemptions": { - "title": "ClientValidationsValidateResponseBodyRedeemablesItemOrderRedemptionsEntry", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/OrderRedemptionsEntry" - }, - "nullable": true - }, - "items": { - "title": "ClientValidationsValidateResponseBodyRedeemablesItemOrderItems", - "type": "array", - "description": "Array of items applied to the order. It can include up 500 items.", - "items": { - "$ref": "#/components/schemas/OrderCalculatedItem" - }, - "nullable": true - } - } + "$ref": "#/components/schemas/OrderCalculated" }, "applicable_to": { "$ref": "#/components/schemas/ApplicableToResultList" @@ -26423,141 +26289,7 @@ "nullable": true }, "order": { - "title": "ValidationsValidateResponseBodyRedeemablesItemOrder", - "type": "object", - "description": "Order information.", - "properties": { - "id": { - "type": "string", - "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", - "nullable": true - }, - "source_id": { - "type": "string", - "nullable": true, - "description": "Unique source ID of an existing order that will be linked to the redemption of this request." - }, - "status": { - "type": "string", - "description": "The order status.", - "enum": [ - "CREATED", - "PAID", - "CANCELED", - "FULFILLED" - ], - "nullable": true - }, - "amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "initial_amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "discount_amount": { - "type": "integer", - "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_amount": { - "type": "integer", - "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "applied_discount_amount": { - "type": "integer", - "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_applied_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", - "nullable": true - }, - "total_applied_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", - "nullable": true - }, - "metadata": { - "title": "ValidationsValidateResponseBodyRedeemablesItemOrderMetadata", - "type": "object", - "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "order", - "enum": [ - "order" - ], - "nullable": true - }, - "created_at": { - "type": "string", - "example": "2021-12-22T10:13:06.487Z", - "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", - "format": "date-time", - "nullable": true - }, - "updated_at": { - "type": "string", - "nullable": true, - "example": "2021-12-22T10:14:45.316Z", - "format": "date-time", - "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." - }, - "customer_id": { - "type": "string", - "nullable": true, - "description": "Unique customer ID of the customer making the purchase.", - "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" - }, - "referrer_id": { - "type": "string", - "nullable": true, - "description": "Unique referrer ID.", - "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" - }, - "customer": { - "$ref": "#/components/schemas/CustomerId" - }, - "referrer": { - "$ref": "#/components/schemas/ReferrerId" - }, - "redemptions": { - "title": "ValidationsValidateResponseBodyRedeemablesItemOrderRedemptionsEntry", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/OrderRedemptionsEntry" - }, - "nullable": true - }, - "items": { - "title": "ValidationsValidateResponseBodyRedeemablesItemOrderItems", - "type": "array", - "description": "Array of items applied to the order. It can include up 500 items.", - "items": { - "$ref": "#/components/schemas/OrderCalculatedItem" - }, - "nullable": true - } - } + "$ref": "#/components/schemas/OrderCalculated" }, "applicable_to": { "$ref": "#/components/schemas/ApplicableToResultList" diff --git a/scripts/prepare-open-api-for-sdk/index.ts b/scripts/prepare-open-api-for-sdk/index.ts index 23d05618..e395debc 100644 --- a/scripts/prepare-open-api-for-sdk/index.ts +++ b/scripts/prepare-open-api-for-sdk/index.ts @@ -299,7 +299,16 @@ const main = async (languageOptions: LanguageOptions) => { }, paths: pathsWithFixedResponses, }); - + //Do not add breaking change on application_details + newOpenApiFile.components.schemas.ClientValidationsValidateResponseBody.properties.redeemables.items.properties.order = + { + $ref: "#/components/schemas/OrderCalculated", + }; + newOpenApiFile.components.schemas.ValidationsValidateResponseBody.properties.redeemables.items.properties.order = + { + $ref: "#/components/schemas/OrderCalculated", + }; + //////////////// newOpenApiFile.components.schemas.LoyaltiesMembersPointsExpirationListResponseBody.properties.data.items = newOpenApiFile.components.schemas.LoyaltyPointsBucket; newOpenApiFile.components.schemas.LoyaltyCardTransaction.properties.details.properties.balance = From 79b9264e7b036947036faa24bfddd1bf60ed3874 Mon Sep 17 00:00:00 2001 From: p-zielinski Date: Thu, 19 Dec 2024 09:33:03 +0100 Subject: [PATCH 22/23] script that fixes breaking changes --- reference/readonly-sdks/java/OpenAPI.json | 2860 +---------------- reference/readonly-sdks/php/OpenAPI.json | 3095 +------------------ reference/readonly-sdks/python/OpenAPI.json | 2809 +---------------- reference/readonly-sdks/ruby/OpenAPI.json | 2860 +---------------- scripts/prepare-open-api-for-sdk/index.ts | 68 +- 5 files changed, 688 insertions(+), 11004 deletions(-) diff --git a/reference/readonly-sdks/java/OpenAPI.json b/reference/readonly-sdks/java/OpenAPI.json index bd1d3359..904624d8 100644 --- a/reference/readonly-sdks/java/OpenAPI.json +++ b/reference/readonly-sdks/java/OpenAPI.json @@ -523,6 +523,9 @@ "description": "The metadata object stores all custom attributes assigned to the campaign. A set of key/value pairs that you can attach to a campaign object. It can be useful for storing additional information about the campaign in a structured format.", "nullable": true }, + "access_settings": { + "$ref": "#/components/schemas/AccessSettings" + }, "validation_rules": { "title": "CampaignsCreateRequestBodyValidationRules", "type": "array", @@ -1153,6 +1156,9 @@ "example": "cat_0b688929a2476386a7", "nullable": true }, + "access_settings": { + "$ref": "#/components/schemas/AccessSettings" + }, "activity_duration_after_publishing": { "type": "string", "description": "Defines the amount of time the vouchers will be active after publishing. The value is shown in the ISO 8601 format. For example, a voucher with the value of P24D will be valid for a duration of 24 days.", @@ -2475,154 +2481,7 @@ "nullable": true }, "order": { - "title": "ClientQualificationsCheckEligibilityResponseBodyOrder", - "type": "object", - "nullable": true, - "properties": { - "id": { - "type": "string", - "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", - "nullable": true - }, - "source_id": { - "type": "string", - "nullable": true, - "description": "Unique source ID of an existing order that will be linked to the redemption of this request." - }, - "status": { - "type": "string", - "description": "The order status.", - "enum": [ - "CREATED", - "PAID", - "CANCELED", - "FULFILLED" - ], - "nullable": true - }, - "amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "initial_amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "discount_amount": { - "type": "integer", - "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_amount": { - "type": "integer", - "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "applied_discount_amount": { - "type": "integer", - "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_applied_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", - "nullable": true - }, - "total_applied_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", - "nullable": true - }, - "metadata": { - "title": "ClientQualificationsCheckEligibilityResponseBodyOrderMetadata", - "type": "object", - "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "order", - "enum": [ - "order" - ], - "nullable": true - }, - "created_at": { - "type": "string", - "example": "2021-12-22T10:13:06.487Z", - "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", - "format": "date-time", - "nullable": true - }, - "updated_at": { - "type": "string", - "nullable": true, - "example": "2021-12-22T10:14:45.316Z", - "format": "date-time", - "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." - }, - "customer_id": { - "type": "string", - "nullable": true, - "description": "Unique customer ID of the customer making the purchase.", - "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" - }, - "referrer_id": { - "type": "string", - "nullable": true, - "description": "Unique referrer ID.", - "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" - }, - "customer": { - "$ref": "#/components/schemas/CustomerId" - }, - "referrer": { - "$ref": "#/components/schemas/ReferrerId" - }, - "redemptions": { - "title": "ClientQualificationsCheckEligibilityResponseBodyOrderRedemptionsEntry", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/OrderRedemptionsEntry" - }, - "nullable": true - }, - "items": { - "title": "ClientQualificationsCheckEligibilityResponseBodyOrderItems", - "type": "array", - "description": "Array of items applied to the order. It can include up to 500 items.", - "items": { - "title": "ClientQualificationsCheckEligibilityResponseBodyOrderItemsItem", - "allOf": [ - { - "$ref": "#/components/schemas/OrderCalculatedItem" - }, - { - "type": "object", - "properties": { - "application_details": { - "$ref": "#/components/schemas/ApplicationDetails" - } - } - } - ] - }, - "nullable": true - } - } + "$ref": "#/components/schemas/OrderCalculated" }, "stacking_rules": { "$ref": "#/components/schemas/StackingRules" @@ -2751,155 +2610,7 @@ "$ref": "#/components/schemas/Redemption" }, "order": { - "title": "ClientRedemptionsRedeemResponseBodyOrder", - "description": "Contains the order details associated with the redemption.", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", - "nullable": true - }, - "source_id": { - "type": "string", - "nullable": true, - "description": "Unique source ID of an existing order that will be linked to the redemption of this request." - }, - "status": { - "type": "string", - "description": "The order status.", - "enum": [ - "CREATED", - "PAID", - "CANCELED", - "FULFILLED" - ], - "nullable": true - }, - "amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "initial_amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "discount_amount": { - "type": "integer", - "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_amount": { - "type": "integer", - "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "applied_discount_amount": { - "type": "integer", - "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_applied_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", - "nullable": true - }, - "total_applied_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", - "nullable": true - }, - "metadata": { - "title": "ClientRedemptionsRedeemResponseBodyOrderMetadata", - "type": "object", - "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "order", - "enum": [ - "order" - ], - "nullable": true - }, - "created_at": { - "type": "string", - "example": "2021-12-22T10:13:06.487Z", - "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", - "format": "date-time", - "nullable": true - }, - "updated_at": { - "type": "string", - "nullable": true, - "example": "2021-12-22T10:14:45.316Z", - "format": "date-time", - "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." - }, - "customer_id": { - "type": "string", - "nullable": true, - "description": "Unique customer ID of the customer making the purchase.", - "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" - }, - "referrer_id": { - "type": "string", - "nullable": true, - "description": "Unique referrer ID.", - "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" - }, - "customer": { - "$ref": "#/components/schemas/CustomerId" - }, - "referrer": { - "$ref": "#/components/schemas/ReferrerId" - }, - "redemptions": { - "title": "ClientRedemptionsRedeemResponseBodyOrderRedemptionsEntry", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/OrderRedemptionsEntry" - }, - "nullable": true - }, - "items": { - "title": "ClientRedemptionsRedeemResponseBodyOrderItems", - "type": "array", - "description": "Array of items applied to the order. It can include up to 500 items.", - "items": { - "title": "ClientRedemptionsRedeemResponseBodyOrderItemsItem", - "allOf": [ - { - "$ref": "#/components/schemas/OrderCalculatedItem" - }, - { - "type": "object", - "properties": { - "application_details": { - "$ref": "#/components/schemas/ApplicationDetails" - } - } - } - ] - }, - "nullable": true - } - }, - "nullable": true + "$ref": "#/components/schemas/OrderCalculated" }, "inapplicable_redeemables": { "title": "ClientRedemptionsRedeemResponseBodyInapplicableRedeemables", @@ -3065,176 +2776,7 @@ "nullable": true }, "order": { - "title": "ClientValidationsValidateResponseBodyRedeemablesItemOrder", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", - "nullable": true - }, - "source_id": { - "type": "string", - "nullable": true, - "description": "Unique source ID of an existing order that will be linked to the redemption of this request." - }, - "status": { - "type": "string", - "description": "The order status.", - "enum": [ - "CREATED", - "PAID", - "CANCELED", - "FULFILLED" - ], - "nullable": true - }, - "amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "initial_amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "discount_amount": { - "type": "integer", - "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_amount": { - "type": "integer", - "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "applied_discount_amount": { - "type": "integer", - "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_applied_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", - "nullable": true - }, - "total_applied_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", - "nullable": true - }, - "metadata": { - "title": "ClientValidationsValidateResponseBodyRedeemablesItemOrderMetadata", - "type": "object", - "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "order", - "enum": [ - "order" - ], - "nullable": true - }, - "created_at": { - "type": "string", - "example": "2021-12-22T10:13:06.487Z", - "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", - "format": "date-time", - "nullable": true - }, - "updated_at": { - "type": "string", - "nullable": true, - "example": "2021-12-22T10:14:45.316Z", - "format": "date-time", - "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." - }, - "customer_id": { - "type": "string", - "nullable": true, - "description": "Unique customer ID of the customer making the purchase.", - "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" - }, - "referrer_id": { - "type": "string", - "nullable": true, - "description": "Unique referrer ID.", - "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" - }, - "customer": { - "title": "ClientValidationsValidateResponseBodyRedeemablesItemOrderCustomer", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "A unique identifier of an existing customer.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "customer", - "enum": [ - "customer" - ], - "nullable": true - } - }, - "required": [] - }, - "referrer": { - "title": "ClientValidationsValidateResponseBodyRedeemablesItemOrderReferrer", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "A unique identifier of an existing customer.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "customer", - "enum": [ - "customer" - ], - "nullable": true - } - }, - "required": [] - }, - "redemptions": { - "title": "ClientValidationsValidateResponseBodyRedeemablesItemOrderRedemptionsEntry", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/OrderRedemptionsEntry" - }, - "nullable": true - }, - "items": { - "title": "ClientValidationsValidateResponseBodyRedeemablesItemOrderItems", - "type": "array", - "description": "Array of items applied to the order. It can include up to 500 items.", - "items": { - "$ref": "#/components/schemas/OrderCalculatedItem" - }, - "nullable": true - } - } + "$ref": "#/components/schemas/OrderCalculated" }, "applicable_to": { "$ref": "#/components/schemas/ApplicableToResultList" @@ -3457,154 +2999,7 @@ "nullable": true }, "order": { - "title": "ClientValidationsValidateResponseBodyOrder", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", - "nullable": true - }, - "source_id": { - "type": "string", - "nullable": true, - "description": "Unique source ID of an existing order that will be linked to the redemption of this request." - }, - "status": { - "type": "string", - "description": "The order status.", - "enum": [ - "CREATED", - "PAID", - "CANCELED", - "FULFILLED" - ], - "nullable": true - }, - "amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "initial_amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "discount_amount": { - "type": "integer", - "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_amount": { - "type": "integer", - "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "applied_discount_amount": { - "type": "integer", - "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_applied_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", - "nullable": true - }, - "total_applied_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", - "nullable": true - }, - "metadata": { - "title": "ClientValidationsValidateResponseBodyOrderMetadata", - "type": "object", - "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "order", - "enum": [ - "order" - ], - "nullable": true - }, - "created_at": { - "type": "string", - "example": "2021-12-22T10:13:06.487Z", - "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", - "format": "date-time", - "nullable": true - }, - "updated_at": { - "type": "string", - "nullable": true, - "example": "2021-12-22T10:14:45.316Z", - "format": "date-time", - "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." - }, - "customer_id": { - "type": "string", - "nullable": true, - "description": "Unique customer ID of the customer making the purchase.", - "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" - }, - "referrer_id": { - "type": "string", - "nullable": true, - "description": "Unique referrer ID.", - "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" - }, - "customer": { - "$ref": "#/components/schemas/CustomerId" - }, - "referrer": { - "$ref": "#/components/schemas/ReferrerId" - }, - "redemptions": { - "title": "ClientValidationsValidateResponseBodyOrderRedemptionsEntry", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/OrderRedemptionsEntry" - }, - "nullable": true - }, - "items": { - "title": "ClientValidationsValidateResponseBodyOrderItems", - "type": "array", - "description": "Array of items applied to the order. It can include up to 500 items.", - "items": { - "title": "ClientValidationsValidateResponseBodyOrderItemsItem", - "allOf": [ - { - "$ref": "#/components/schemas/OrderCalculatedItem" - }, - { - "type": "object", - "properties": { - "application_details": { - "$ref": "#/components/schemas/ApplicationDetails" - } - } - } - ] - }, - "nullable": true - } - }, - "nullable": true + "$ref": "#/components/schemas/OrderCalculated" }, "tracking_id": { "type": "string", @@ -5739,6 +5134,9 @@ "description": "The metadata object stores all custom attributes assigned to the campaign. A set of key/value pairs that you can attach to a campaign object. It can be useful for storing additional information about the campaign in a structured format.", "nullable": true }, + "access_settings": { + "$ref": "#/components/schemas/AccessSettings" + }, "validation_rules": { "title": "LoyaltiesCreateCampaignRequestBodyValidationRules", "type": "array", @@ -9993,179 +9391,7 @@ "nullable": true }, "order": { - "title": "LoyaltiesMembersRedemptionRedeemResponseBodyOrder", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", - "nullable": true - }, - "source_id": { - "type": "string", - "nullable": true, - "description": "Unique source ID of an existing order that will be linked to the redemption of this request." - }, - "status": { - "type": "string", - "description": "The order status.", - "enum": [ - "CREATED", - "PAID", - "CANCELED", - "FULFILLED" - ], - "nullable": true - }, - "amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "initial_amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "discount_amount": { - "type": "integer", - "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_amount": { - "type": "integer", - "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "applied_discount_amount": { - "type": "integer", - "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_applied_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", - "nullable": true - }, - "total_applied_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", - "nullable": true - }, - "metadata": { - "title": "LoyaltiesMembersRedemptionRedeemResponseBodyOrderMetadata", - "type": "object", - "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "order", - "enum": [ - "order" - ], - "nullable": true - }, - "created_at": { - "type": "string", - "example": "2021-12-22T10:13:06.487Z", - "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", - "format": "date-time", - "nullable": true - }, - "updated_at": { - "type": "string", - "nullable": true, - "example": "2021-12-22T10:14:45.316Z", - "format": "date-time", - "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." - }, - "customer_id": { - "type": "string", - "nullable": true, - "description": "Unique customer ID of the customer making the purchase.", - "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" - }, - "referrer_id": { - "type": "string", - "nullable": true, - "description": "Unique referrer ID.", - "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" - }, - "customer": { - "title": "LoyaltiesMembersRedemptionRedeemResponseBodyOrderCustomer", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "A unique identifier of an existing customer.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "customer", - "enum": [ - "customer" - ], - "nullable": true - } - }, - "required": [], - "nullable": true - }, - "referrer": { - "title": "LoyaltiesMembersRedemptionRedeemResponseBodyOrderReferrer", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "A unique identifier of an existing customer.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "customer", - "enum": [ - "customer" - ], - "nullable": true - } - }, - "required": [], - "nullable": true - }, - "redemptions": { - "title": "LoyaltiesMembersRedemptionRedeemResponseBodyOrderRedemptionsEntry", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/OrderRedemptionsEntry" - }, - "nullable": true - }, - "items": { - "title": "LoyaltiesMembersRedemptionRedeemResponseBodyOrderItems", - "type": "array", - "description": "Array of items applied to the order. It can include up to 500 items.", - "items": { - "$ref": "#/components/schemas/OrderCalculatedItem" - }, - "nullable": true - } - }, - "nullable": true + "$ref": "#/components/schemas/OrderCalculated" }, "channel": { "title": "LoyaltiesMembersRedemptionRedeemResponseBodyChannel", @@ -11990,6 +11216,9 @@ "example": "cat_0b688929a2476386a7", "nullable": true }, + "access_settings": { + "$ref": "#/components/schemas/AccessSettings" + }, "activity_duration_after_publishing": { "type": "string", "description": "Defines the amount of time the vouchers will be active after publishing. The value is shown in the ISO 8601 format. For example, a voucher with the value of P24D will be valid for a duration of 24 days.", @@ -16974,25 +16203,7 @@ "type": "array", "description": "Contains array of order objects.", "items": { - "title": "OrdersListResponseBodyOrdersItem", - "allOf": [ - { - "$ref": "#/components/schemas/OrderCalculated" - }, - { - "type": "object", - "properties": { - "items": { - "title": "OrdersListResponseBodyOrdersItemItems", - "type": "array", - "description": "Array of items applied to the order. It can include up to 500 items.", - "items": { - "$ref": "#/components/schemas/OrderCalculatedItem" - } - } - } - } - ] + "$ref": "#/components/schemas/OrderCalculated" }, "nullable": true }, @@ -21928,141 +21139,7 @@ "nullable": true }, "order": { - "title": "QualificationsCheckEligibilityResponseBodyOrder", - "type": "object", - "nullable": true, - "properties": { - "id": { - "type": "string", - "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", - "nullable": true - }, - "source_id": { - "type": "string", - "nullable": true, - "description": "Unique source ID of an existing order that will be linked to the redemption of this request." - }, - "status": { - "type": "string", - "description": "The order status.", - "enum": [ - "CREATED", - "PAID", - "CANCELED", - "FULFILLED" - ], - "nullable": true - }, - "amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "initial_amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "discount_amount": { - "type": "integer", - "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_amount": { - "type": "integer", - "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "applied_discount_amount": { - "type": "integer", - "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_applied_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", - "nullable": true - }, - "total_applied_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", - "nullable": true - }, - "metadata": { - "title": "QualificationsCheckEligibilityResponseBodyOrderMetadata", - "type": "object", - "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "order", - "enum": [ - "order" - ], - "nullable": true - }, - "created_at": { - "type": "string", - "example": "2021-12-22T10:13:06.487Z", - "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", - "format": "date-time", - "nullable": true - }, - "updated_at": { - "type": "string", - "nullable": true, - "example": "2021-12-22T10:14:45.316Z", - "format": "date-time", - "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." - }, - "customer_id": { - "type": "string", - "nullable": true, - "description": "Unique customer ID of the customer making the purchase.", - "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" - }, - "referrer_id": { - "type": "string", - "nullable": true, - "description": "Unique referrer ID.", - "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" - }, - "customer": { - "$ref": "#/components/schemas/CustomerId" - }, - "referrer": { - "$ref": "#/components/schemas/ReferrerId" - }, - "redemptions": { - "title": "QualificationsCheckEligibilityResponseBodyOrderRedemptionsEntry", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/OrderRedemptionsEntry" - }, - "nullable": true - }, - "items": { - "title": "QualificationsCheckEligibilityResponseBodyOrderItems", - "type": "array", - "description": "Array of items applied to the order. It can include up to 500 items.", - "items": { - "$ref": "#/components/schemas/OrderCalculatedItem" - }, - "nullable": true - } - } + "$ref": "#/components/schemas/OrderCalculated" }, "stacking_rules": { "$ref": "#/components/schemas/StackingRules" @@ -22199,177 +21276,7 @@ "nullable": true }, "order": { - "title": "RedemptionsGetResponseBodyOrder", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", - "nullable": true - }, - "source_id": { - "type": "string", - "nullable": true, - "description": "Unique source ID of an existing order that will be linked to the redemption of this request." - }, - "status": { - "type": "string", - "description": "The order status.", - "enum": [ - "CREATED", - "PAID", - "CANCELED", - "FULFILLED" - ], - "nullable": true - }, - "amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "initial_amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "discount_amount": { - "type": "integer", - "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_amount": { - "type": "integer", - "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "applied_discount_amount": { - "type": "integer", - "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_applied_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", - "nullable": true - }, - "total_applied_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", - "nullable": true - }, - "metadata": { - "title": "RedemptionsGetResponseBodyOrderMetadata", - "type": "object", - "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "order", - "enum": [ - "order" - ], - "nullable": true - }, - "created_at": { - "type": "string", - "example": "2021-12-22T10:13:06.487Z", - "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", - "format": "date-time", - "nullable": true - }, - "updated_at": { - "type": "string", - "nullable": true, - "example": "2021-12-22T10:14:45.316Z", - "format": "date-time", - "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." - }, - "customer_id": { - "type": "string", - "nullable": true, - "description": "Unique customer ID of the customer making the purchase.", - "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" - }, - "referrer_id": { - "type": "string", - "nullable": true, - "description": "Unique referrer ID.", - "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" - }, - "customer": { - "title": "RedemptionsGetResponseBodyOrderCustomer", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "A unique identifier of an existing customer.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "customer", - "enum": [ - "customer" - ], - "nullable": true - } - }, - "nullable": true - }, - "referrer": { - "title": "RedemptionsGetResponseBodyOrderReferrer", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "A unique identifier of an existing customer.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "customer", - "enum": [ - "customer" - ], - "nullable": true - } - }, - "nullable": true - }, - "redemptions": { - "title": "RedemptionsGetResponseBodyOrderRedemptionsEntry", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/OrderRedemptionsEntry" - }, - "nullable": true - }, - "items": { - "title": "RedemptionsGetResponseBodyOrderItems", - "type": "array", - "description": "Array of items applied to the order. It can include up to 500 items.", - "items": { - "$ref": "#/components/schemas/OrderCalculatedItem" - }, - "nullable": true - } - }, - "nullable": true + "$ref": "#/components/schemas/OrderCalculated" }, "channel": { "title": "RedemptionsGetResponseBodyChannel", @@ -23101,174 +22008,7 @@ "nullable": true }, "order": { - "title": "RedemptionsListResponseBodyRedemptionsItemOrder", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", - "nullable": true - }, - "source_id": { - "type": "string", - "nullable": true, - "description": "Unique source ID of an existing order that will be linked to the redemption of this request." - }, - "status": { - "type": "string", - "description": "The order status.", - "enum": [ - "CREATED", - "PAID", - "CANCELED", - "FULFILLED" - ], - "nullable": true - }, - "amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "initial_amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "discount_amount": { - "type": "integer", - "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_amount": { - "type": "integer", - "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "applied_discount_amount": { - "type": "integer", - "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_applied_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", - "nullable": true - }, - "total_applied_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", - "nullable": true - }, - "metadata": { - "title": "RedemptionsListResponseBodyRedemptionsItemOrderMetadata", - "type": "object", - "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "order", - "enum": [ - "order" - ], - "nullable": true - }, - "created_at": { - "type": "string", - "example": "2021-12-22T10:13:06.487Z", - "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", - "format": "date-time", - "nullable": true - }, - "updated_at": { - "type": "string", - "nullable": true, - "example": "2021-12-22T10:14:45.316Z", - "format": "date-time", - "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." - }, - "customer_id": { - "type": "string", - "nullable": true, - "description": "Unique customer ID of the customer making the purchase.", - "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" - }, - "referrer_id": { - "type": "string", - "nullable": true, - "description": "Unique referrer ID.", - "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" - }, - "customer": { - "title": "RedemptionsListResponseBodyRedemptionsItemOrderCustomer", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "A unique identifier of an existing customer.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "customer", - "enum": [ - "customer" - ], - "nullable": true - } - } - }, - "referrer": { - "title": "RedemptionsListResponseBodyRedemptionsItemOrderReferrer", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "A unique identifier of an existing customer.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "customer", - "enum": [ - "customer" - ], - "nullable": true - } - } - }, - "redemptions": { - "title": "RedemptionsListResponseBodyRedemptionsItemOrderRedemptionsEntry", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/OrderRedemptionsEntry" - }, - "nullable": true - }, - "items": { - "title": "RedemptionsListResponseBodyRedemptionsItemOrderItems", - "type": "array", - "description": "Array of items applied to the order. It can include up to 500 items.", - "items": { - "$ref": "#/components/schemas/OrderCalculatedItem" - }, - "nullable": true - } - } + "$ref": "#/components/schemas/OrderCalculated" }, "channel": { "title": "RedemptionsListResponseBodyRedemptionsItemChannel", @@ -23968,155 +22708,7 @@ "$ref": "#/components/schemas/Redemption" }, "order": { - "title": "RedemptionsRedeemResponseBodyOrder", - "description": "Contains the order details associated with the redemption.", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", - "nullable": true - }, - "source_id": { - "type": "string", - "nullable": true, - "description": "Unique source ID of an existing order that will be linked to the redemption of this request." - }, - "status": { - "type": "string", - "description": "The order status.", - "enum": [ - "CREATED", - "PAID", - "CANCELED", - "FULFILLED" - ], - "nullable": true - }, - "amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "initial_amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "discount_amount": { - "type": "integer", - "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_amount": { - "type": "integer", - "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "applied_discount_amount": { - "type": "integer", - "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_applied_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", - "nullable": true - }, - "total_applied_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", - "nullable": true - }, - "metadata": { - "title": "RedemptionsRedeemResponseBodyOrderMetadata", - "type": "object", - "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "order", - "enum": [ - "order" - ], - "nullable": true - }, - "created_at": { - "type": "string", - "example": "2021-12-22T10:13:06.487Z", - "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", - "format": "date-time", - "nullable": true - }, - "updated_at": { - "type": "string", - "nullable": true, - "example": "2021-12-22T10:14:45.316Z", - "format": "date-time", - "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." - }, - "customer_id": { - "type": "string", - "nullable": true, - "description": "Unique customer ID of the customer making the purchase.", - "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" - }, - "referrer_id": { - "type": "string", - "nullable": true, - "description": "Unique referrer ID.", - "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" - }, - "customer": { - "$ref": "#/components/schemas/CustomerId" - }, - "referrer": { - "$ref": "#/components/schemas/ReferrerId" - }, - "redemptions": { - "title": "RedemptionsRedeemResponseBodyOrderRedemptionsEntry", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/OrderRedemptionsEntry" - }, - "nullable": true - }, - "items": { - "title": "RedemptionsRedeemResponseBodyOrderItems", - "type": "array", - "description": "Array of items applied to the order. It can include up to 500 items.", - "items": { - "title": "RedemptionsRedeemResponseBodyOrderItemsItem", - "allOf": [ - { - "$ref": "#/components/schemas/OrderCalculatedItem" - }, - { - "type": "object", - "properties": { - "application_details": { - "$ref": "#/components/schemas/ApplicationDetails" - } - } - } - ] - }, - "nullable": true - } - }, - "nullable": true + "$ref": "#/components/schemas/OrderCalculated" }, "inapplicable_redeemables": { "title": "RedemptionsRedeemResponseBodyInapplicableRedeemables", @@ -24308,141 +22900,7 @@ "nullable": true }, "order": { - "title": "RedemptionsRollbackCreateResponseBodyOrder", - "nullable": true, - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", - "nullable": true - }, - "source_id": { - "type": "string", - "nullable": true, - "description": "Unique source ID of an existing order that will be linked to the redemption of this request." - }, - "status": { - "type": "string", - "description": "The order status.", - "enum": [ - "CREATED", - "PAID", - "CANCELED", - "FULFILLED" - ], - "nullable": true - }, - "amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "initial_amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "discount_amount": { - "type": "integer", - "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_amount": { - "type": "integer", - "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "applied_discount_amount": { - "type": "integer", - "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_applied_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", - "nullable": true - }, - "total_applied_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", - "nullable": true - }, - "metadata": { - "title": "RedemptionsRollbackCreateResponseBodyOrderMetadata", - "type": "object", - "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "order", - "enum": [ - "order" - ], - "nullable": true - }, - "created_at": { - "type": "string", - "example": "2021-12-22T10:13:06.487Z", - "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", - "format": "date-time", - "nullable": true - }, - "updated_at": { - "type": "string", - "nullable": true, - "example": "2021-12-22T10:14:45.316Z", - "format": "date-time", - "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." - }, - "customer_id": { - "type": "string", - "nullable": true, - "description": "Unique customer ID of the customer making the purchase.", - "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" - }, - "referrer_id": { - "type": "string", - "nullable": true, - "description": "Unique referrer ID.", - "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" - }, - "customer": { - "$ref": "#/components/schemas/CustomerId" - }, - "referrer": { - "$ref": "#/components/schemas/ReferrerId" - }, - "redemptions": { - "title": "RedemptionsRollbackCreateResponseBodyOrderRedemptionsEntry", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/OrderRedemptionsEntry" - }, - "nullable": true - }, - "items": { - "title": "RedemptionsRollbackCreateResponseBodyOrderItems", - "type": "array", - "description": "Array of items applied to the order. It can include up to 500 items.", - "items": { - "$ref": "#/components/schemas/OrderCalculatedItem" - }, - "nullable": true - } - } + "$ref": "#/components/schemas/OrderCalculated" }, "channel": { "title": "RedemptionsRollbackCreateResponseBodyChannel", @@ -24521,7 +22979,9 @@ "nullable": true } }, - "required": [], + "required": [ + "order" + ], "description": "Response body schema for **POST** `v1/redemptions/{redemptionId}/rollback`." }, "RedemptionsRollbacksCreateRequestBody": { @@ -25897,6 +24357,9 @@ "description": "The metadata object stores all custom attributes assigned to the campaign. A set of key/value pairs that you can attach to a campaign object. It can be useful for storing additional information about the campaign in a structured format.", "nullable": true }, + "access_settings": { + "$ref": "#/components/schemas/AccessSettings" + }, "voucher": { "title": "TemplatesCampaignsCampaignSetupCreateRequestBodyVoucher", "type": "object", @@ -27469,176 +25932,7 @@ "nullable": true }, "order": { - "title": "ValidationsValidateResponseBodyRedeemablesItemOrder", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", - "nullable": true - }, - "source_id": { - "type": "string", - "nullable": true, - "description": "Unique source ID of an existing order that will be linked to the redemption of this request." - }, - "status": { - "type": "string", - "description": "The order status.", - "enum": [ - "CREATED", - "PAID", - "CANCELED", - "FULFILLED" - ], - "nullable": true - }, - "amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "initial_amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "discount_amount": { - "type": "integer", - "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_amount": { - "type": "integer", - "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "applied_discount_amount": { - "type": "integer", - "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_applied_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", - "nullable": true - }, - "total_applied_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", - "nullable": true - }, - "metadata": { - "title": "ValidationsValidateResponseBodyRedeemablesItemOrderMetadata", - "type": "object", - "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "order", - "enum": [ - "order" - ], - "nullable": true - }, - "created_at": { - "type": "string", - "example": "2021-12-22T10:13:06.487Z", - "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", - "format": "date-time", - "nullable": true - }, - "updated_at": { - "type": "string", - "nullable": true, - "example": "2021-12-22T10:14:45.316Z", - "format": "date-time", - "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." - }, - "customer_id": { - "type": "string", - "nullable": true, - "description": "Unique customer ID of the customer making the purchase.", - "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" - }, - "referrer_id": { - "type": "string", - "nullable": true, - "description": "Unique referrer ID.", - "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" - }, - "customer": { - "title": "ValidationsValidateResponseBodyRedeemablesItemOrderCustomer", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "A unique identifier of an existing customer.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "customer", - "enum": [ - "customer" - ], - "nullable": true - } - }, - "required": [] - }, - "referrer": { - "title": "ValidationsValidateResponseBodyRedeemablesItemOrderReferrer", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "A unique identifier of an existing customer.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "customer", - "enum": [ - "customer" - ], - "nullable": true - } - }, - "required": [] - }, - "redemptions": { - "title": "ValidationsValidateResponseBodyRedeemablesItemOrderRedemptionsEntry", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/OrderRedemptionsEntry" - }, - "nullable": true - }, - "items": { - "title": "ValidationsValidateResponseBodyRedeemablesItemOrderItems", - "type": "array", - "description": "Array of items applied to the order. It can include up to 500 items.", - "items": { - "$ref": "#/components/schemas/OrderCalculatedItem" - }, - "nullable": true - } - } + "$ref": "#/components/schemas/OrderCalculated" }, "applicable_to": { "$ref": "#/components/schemas/ApplicableToResultList" @@ -27861,154 +26155,7 @@ "nullable": true }, "order": { - "title": "ValidationsValidateResponseBodyOrder", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", - "nullable": true - }, - "source_id": { - "type": "string", - "nullable": true, - "description": "Unique source ID of an existing order that will be linked to the redemption of this request." - }, - "status": { - "type": "string", - "description": "The order status.", - "enum": [ - "CREATED", - "PAID", - "CANCELED", - "FULFILLED" - ], - "nullable": true - }, - "amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "initial_amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "discount_amount": { - "type": "integer", - "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_amount": { - "type": "integer", - "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "applied_discount_amount": { - "type": "integer", - "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_applied_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", - "nullable": true - }, - "total_applied_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", - "nullable": true - }, - "metadata": { - "title": "ValidationsValidateResponseBodyOrderMetadata", - "type": "object", - "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "order", - "enum": [ - "order" - ], - "nullable": true - }, - "created_at": { - "type": "string", - "example": "2021-12-22T10:13:06.487Z", - "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", - "format": "date-time", - "nullable": true - }, - "updated_at": { - "type": "string", - "nullable": true, - "example": "2021-12-22T10:14:45.316Z", - "format": "date-time", - "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." - }, - "customer_id": { - "type": "string", - "nullable": true, - "description": "Unique customer ID of the customer making the purchase.", - "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" - }, - "referrer_id": { - "type": "string", - "nullable": true, - "description": "Unique referrer ID.", - "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" - }, - "customer": { - "$ref": "#/components/schemas/CustomerId" - }, - "referrer": { - "$ref": "#/components/schemas/ReferrerId" - }, - "redemptions": { - "title": "ValidationsValidateResponseBodyOrderRedemptionsEntry", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/OrderRedemptionsEntry" - }, - "nullable": true - }, - "items": { - "title": "ValidationsValidateResponseBodyOrderItems", - "type": "array", - "description": "Array of items applied to the order. It can include up to 500 items.", - "items": { - "title": "ValidationsValidateResponseBodyOrderItemsItem", - "allOf": [ - { - "$ref": "#/components/schemas/OrderCalculatedItem" - }, - { - "type": "object", - "properties": { - "application_details": { - "$ref": "#/components/schemas/ApplicationDetails" - } - } - } - ] - }, - "nullable": true - } - }, - "nullable": true + "$ref": "#/components/schemas/OrderCalculated" }, "tracking_id": { "type": "string", @@ -30192,6 +28339,69 @@ "type": "string", "format": "hostname" }, + "AccessSettings": { + "title": "AccessSettings", + "type": "object", + "description": "Assigns or unassigns an area or store to the campaign.\n\n**NOTE**: this object can be sent if the Areas and Stores enterprise feature is enabled. Contact [Voucherify Sales](https://www.voucherify.io/contact-sales) to learn more.", + "properties": { + "assign": { + "title": "AccessSettingsAssign", + "type": "object", + "description": "Assigns the campaign to an area or a store. Provide the area and/or store IDs in the respective arrays. If a campaign changes assignments between areas or stores, unassign it from the area. For example, if a campaign is assigned to Area-01, but it must be now assigned to Store-01 within this area, you have to unassign the campaign from Area-01 and assign to Store-01 only.\n\nIf you want to assign the campaign to stores only, you do not have to send the area ID.", + "properties": { + "areas_ids": { + "title": "AccessSettingsAssignAreasIds", + "type": "array", + "description": "List all area IDs to which the campaign will be assigned.", + "items": { + "title": "AccessSettingsAssignAreasIdsItem", + "type": "string" + }, + "nullable": true + }, + "area_stores_ids": { + "title": "AccessSettingsAssignAreaStoresIds", + "type": "array", + "description": "List all store IDs to which the campaign will be assigned.", + "items": { + "title": "AccessSettingsAssignAreaStoresIdsItem", + "type": "string" + }, + "nullable": true + } + }, + "nullable": true + }, + "unassign": { + "title": "AccessSettingsUnassign", + "type": "object", + "description": "Unassigns the campaign from an area or a store. Provide the area and/or store IDs in the respective arrays. If a campaign changes assignments between areas or stores, unassign it first. For example, if a campaign is assigned to Area-01, but it must be now assigned to Store-01 within this area, you have to unassign the campaign from Area-01 and assigned to Store-01 only.\n\nIf you want to assign the campaign to stores only, you do not have to send the area ID.", + "properties": { + "areas_ids": { + "title": "AccessSettingsUnassignAreasIds", + "type": "array", + "description": "List all area IDs from which the campaign will be unassigned.", + "items": { + "title": "AccessSettingsUnassignAreasIdsItem", + "type": "string" + }, + "nullable": true + }, + "area_stores_ids": { + "title": "AccessSettingsUnassignAreaStoresIds", + "type": "array", + "description": "List all store IDs to which the campaign will be unassigned.", + "items": { + "title": "AccessSettingsUnassignAreaStoresIdsItem", + "type": "string" + }, + "nullable": true + } + }, + "nullable": true + } + } + }, "AccessSettingsCampaignAssignmentsList": { "title": "AccessSettingsCampaignAssignmentsList", "type": "object", @@ -30399,49 +28609,6 @@ }, "required": [] }, - "ApplicationDetails": { - "title": "ApplicationDetails", - "type": "array", - "description": "Array containing details about the items that are replaced and the items that are replacements for discounts with the `REPLACE_ITEMS` effect.", - "items": { - "title": "ApplicationDetailsItem", - "type": "object", - "description": "Object representing item replacement.", - "properties": { - "source_index": { - "type": "integer", - "description": "Index number of the source item that is replaced. The enumeration starts from `0`, which represents the first item in the request, e.g., if the replaced item is passed as the second in the request, `source_index` equals `3`.", - "minimum": 0 - }, - "source_applied_quantity": { - "type": "integer", - "description": "Number of source units that are replaced.", - "maximum": -1 - }, - "source_applied_quantity_amount": { - "type": "integer", - "description": "Amount equal to the price of the units that are replaced. Determines the change of the amount of the source item quantity.", - "maximum": 0 - }, - "target_index": { - "type": "integer", - "description": "Index number of the target item that is a replacement of the source item. The enumeration continues the values for the order items, e.g. if there are three items in the request, `target_index` equals `3`, as enumeration starts from `0`." - }, - "target_applied_quantity": { - "type": "integer", - "description": "Number of added target units that are replacements." - }, - "target_applied_quantity_amount": { - "type": "integer", - "description": "Amount equal to the price of the units that are replacements. Determines the change in the amount of the target item quantity." - }, - "target_applied_discount_amount": { - "type": "integer", - "description": "Discount amount applied to the target item with regard to the replacement. Equals the `target_applied_quantity_amount` minus `source_applied_quantity_amount`." - } - } - } - }, "AsyncActionBase": { "title": "AsyncActionBase", "type": "object", @@ -35685,6 +33852,15 @@ "$ref": "#/components/schemas/OrderRedemptionsEntry" }, "nullable": true + }, + "items": { + "title": "OrderCalculatedItems", + "type": "array", + "description": "Array of items applied to the order. It can include up 500 items.", + "items": { + "$ref": "#/components/schemas/OrderCalculatedItem" + }, + "nullable": true } } }, @@ -35873,6 +34049,9 @@ "type": "object", "description": "A set of custom key/value pairs that you can attach to an item object. It can be useful for storing additional information about the item in a structured format. It can be used to define business validation rules or discount formulas.", "nullable": true + }, + "application_details": { + "$ref": "#/components/schemas/ApplicationDetails" } }, "required": [] @@ -37321,179 +35500,7 @@ "nullable": true }, "order": { - "title": "RedemptionOrder", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", - "nullable": true - }, - "source_id": { - "type": "string", - "nullable": true, - "description": "Unique source ID of an existing order that will be linked to the redemption of this request." - }, - "status": { - "type": "string", - "description": "The order status.", - "enum": [ - "CREATED", - "PAID", - "CANCELED", - "FULFILLED" - ], - "nullable": true - }, - "amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "initial_amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "discount_amount": { - "type": "integer", - "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_amount": { - "type": "integer", - "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "applied_discount_amount": { - "type": "integer", - "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_applied_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", - "nullable": true - }, - "total_applied_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", - "nullable": true - }, - "metadata": { - "title": "RedemptionOrderMetadata", - "type": "object", - "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "order", - "enum": [ - "order" - ], - "nullable": true - }, - "created_at": { - "type": "string", - "example": "2021-12-22T10:13:06.487Z", - "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", - "format": "date-time", - "nullable": true - }, - "updated_at": { - "type": "string", - "nullable": true, - "example": "2021-12-22T10:14:45.316Z", - "format": "date-time", - "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." - }, - "customer_id": { - "type": "string", - "nullable": true, - "description": "Unique customer ID of the customer making the purchase.", - "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" - }, - "referrer_id": { - "type": "string", - "nullable": true, - "description": "Unique referrer ID.", - "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" - }, - "customer": { - "title": "RedemptionOrderCustomer", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "A unique identifier of an existing customer.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "customer", - "enum": [ - "customer" - ], - "nullable": true - } - }, - "required": [], - "nullable": true - }, - "referrer": { - "title": "RedemptionOrderReferrer", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "A unique identifier of an existing customer.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "customer", - "enum": [ - "customer" - ], - "nullable": true - } - }, - "required": [], - "nullable": true - }, - "redemptions": { - "title": "RedemptionOrderRedemptionsEntry", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/OrderRedemptionsEntry" - }, - "nullable": true - }, - "items": { - "title": "RedemptionOrderItems", - "type": "array", - "description": "Array of items applied to the order. It can include up to 500 items.", - "items": { - "$ref": "#/components/schemas/OrderCalculatedItem" - }, - "nullable": true - } - }, - "nullable": true + "$ref": "#/components/schemas/OrderCalculated" }, "channel": { "title": "RedemptionChannel", @@ -37976,177 +35983,7 @@ "nullable": true }, "order": { - "title": "RedemptionEntryOrder", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", - "nullable": true - }, - "source_id": { - "type": "string", - "nullable": true, - "description": "Unique source ID of an existing order that will be linked to the redemption of this request." - }, - "status": { - "type": "string", - "description": "The order status.", - "enum": [ - "CREATED", - "PAID", - "CANCELED", - "FULFILLED" - ], - "nullable": true - }, - "amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "initial_amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "discount_amount": { - "type": "integer", - "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_amount": { - "type": "integer", - "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "applied_discount_amount": { - "type": "integer", - "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_applied_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", - "nullable": true - }, - "total_applied_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", - "nullable": true - }, - "metadata": { - "title": "RedemptionEntryOrderMetadata", - "type": "object", - "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "order", - "enum": [ - "order" - ], - "nullable": true - }, - "created_at": { - "type": "string", - "example": "2021-12-22T10:13:06.487Z", - "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", - "format": "date-time", - "nullable": true - }, - "updated_at": { - "type": "string", - "nullable": true, - "example": "2021-12-22T10:14:45.316Z", - "format": "date-time", - "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." - }, - "customer_id": { - "type": "string", - "nullable": true, - "description": "Unique customer ID of the customer making the purchase.", - "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" - }, - "referrer_id": { - "type": "string", - "nullable": true, - "description": "Unique referrer ID.", - "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" - }, - "customer": { - "title": "RedemptionEntryOrderCustomer", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "A unique identifier of an existing customer.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "customer", - "enum": [ - "customer" - ], - "nullable": true - } - }, - "nullable": true - }, - "referrer": { - "title": "RedemptionEntryOrderReferrer", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "A unique identifier of an existing customer.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "customer", - "enum": [ - "customer" - ], - "nullable": true - } - }, - "nullable": true - }, - "redemptions": { - "title": "RedemptionEntryOrderRedemptionsEntry", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/OrderRedemptionsEntry" - }, - "nullable": true - }, - "items": { - "title": "RedemptionEntryOrderItems", - "type": "array", - "description": "Array of items applied to the order. It can include up to 500 items.", - "items": { - "$ref": "#/components/schemas/OrderCalculatedItem" - }, - "nullable": true - } - }, - "nullable": true + "$ref": "#/components/schemas/OrderCalculated" }, "channel": { "title": "RedemptionEntryChannel", @@ -39028,141 +36865,7 @@ "nullable": true }, "order": { - "title": "RedemptionRollbackOrder", - "nullable": true, - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", - "nullable": true - }, - "source_id": { - "type": "string", - "nullable": true, - "description": "Unique source ID of an existing order that will be linked to the redemption of this request." - }, - "status": { - "type": "string", - "description": "The order status.", - "enum": [ - "CREATED", - "PAID", - "CANCELED", - "FULFILLED" - ], - "nullable": true - }, - "amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "initial_amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "discount_amount": { - "type": "integer", - "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_amount": { - "type": "integer", - "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "applied_discount_amount": { - "type": "integer", - "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_applied_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", - "nullable": true - }, - "total_applied_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", - "nullable": true - }, - "metadata": { - "title": "RedemptionRollbackOrderMetadata", - "type": "object", - "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "order", - "enum": [ - "order" - ], - "nullable": true - }, - "created_at": { - "type": "string", - "example": "2021-12-22T10:13:06.487Z", - "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", - "format": "date-time", - "nullable": true - }, - "updated_at": { - "type": "string", - "nullable": true, - "example": "2021-12-22T10:14:45.316Z", - "format": "date-time", - "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." - }, - "customer_id": { - "type": "string", - "nullable": true, - "description": "Unique customer ID of the customer making the purchase.", - "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" - }, - "referrer_id": { - "type": "string", - "nullable": true, - "description": "Unique referrer ID.", - "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" - }, - "customer": { - "$ref": "#/components/schemas/CustomerId" - }, - "referrer": { - "$ref": "#/components/schemas/ReferrerId" - }, - "redemptions": { - "title": "RedemptionRollbackOrderRedemptionsEntry", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/OrderRedemptionsEntry" - }, - "nullable": true - }, - "items": { - "title": "RedemptionRollbackOrderItems", - "type": "array", - "description": "Array of items applied to the order. It can include up to 500 items.", - "items": { - "$ref": "#/components/schemas/OrderCalculatedItem" - }, - "nullable": true - } - } + "$ref": "#/components/schemas/OrderCalculated" }, "channel": { "title": "RedemptionRollbackChannel", @@ -39241,7 +36944,9 @@ "nullable": true } }, - "required": [] + "required": [ + "order" + ] }, "ReferralProgram": { "title": "ReferralProgram", @@ -41875,6 +39580,49 @@ "APPLY_FROM_MOST_EXPENSIVE" ] }, + "ApplicationDetails": { + "title": "ApplicationDetails", + "type": "array", + "description": "Array containing details about the items that are replaced and the items that are replacements for discounts with the `REPLACE_ITEMS` effect.", + "items": { + "title": "ApplicationDetailsItem", + "type": "object", + "description": "Object representing item replacement.", + "properties": { + "source_index": { + "type": "integer", + "description": "Index number of the source item that is replaced. The enumeration starts from `0`, which represents the first item in the request, e.g., if the replaced item is passed as the second in the request, `source_index` equals `3`.", + "minimum": 0 + }, + "source_applied_quantity": { + "type": "integer", + "description": "Number of source units that are replaced.", + "maximum": -1 + }, + "source_applied_quantity_amount": { + "type": "integer", + "description": "Amount equal to the price of the units that are replaced. Determines the change of the amount of the source item quantity.", + "maximum": 0 + }, + "target_index": { + "type": "integer", + "description": "Index number of the target item that is a replacement of the source item. The enumeration continues the values for the order items, e.g. if there are three items in the request, `target_index` equals `3`, as enumeration starts from `0`." + }, + "target_applied_quantity": { + "type": "integer", + "description": "Number of added target units that are replacements." + }, + "target_applied_quantity_amount": { + "type": "integer", + "description": "Amount equal to the price of the units that are replacements. Determines the change in the amount of the target item quantity." + }, + "target_applied_discount_amount": { + "type": "integer", + "description": "Discount amount applied to the target item with regard to the replacement. Equals the `target_applied_quantity_amount` minus `source_applied_quantity_amount`." + } + } + } + }, "AreaStoreCampaignAssignment": { "title": "AreaStoreCampaignAssignment", "type": "object", @@ -42503,154 +40251,7 @@ "$ref": "#/components/schemas/RedeemableResult" }, "order": { - "title": "QualificationsRedeemableOrder", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", - "nullable": true - }, - "source_id": { - "type": "string", - "nullable": true, - "description": "Unique source ID of an existing order that will be linked to the redemption of this request." - }, - "status": { - "type": "string", - "description": "The order status.", - "enum": [ - "CREATED", - "PAID", - "CANCELED", - "FULFILLED" - ], - "nullable": true - }, - "amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "initial_amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "discount_amount": { - "type": "integer", - "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_amount": { - "type": "integer", - "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "applied_discount_amount": { - "type": "integer", - "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_applied_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", - "nullable": true - }, - "total_applied_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", - "nullable": true - }, - "metadata": { - "title": "QualificationsRedeemableOrderMetadata", - "type": "object", - "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "order", - "enum": [ - "order" - ], - "nullable": true - }, - "created_at": { - "type": "string", - "example": "2021-12-22T10:13:06.487Z", - "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", - "format": "date-time", - "nullable": true - }, - "updated_at": { - "type": "string", - "nullable": true, - "example": "2021-12-22T10:14:45.316Z", - "format": "date-time", - "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." - }, - "customer_id": { - "type": "string", - "nullable": true, - "description": "Unique customer ID of the customer making the purchase.", - "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" - }, - "referrer_id": { - "type": "string", - "nullable": true, - "description": "Unique referrer ID.", - "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" - }, - "customer": { - "$ref": "#/components/schemas/CustomerId" - }, - "referrer": { - "$ref": "#/components/schemas/ReferrerId" - }, - "redemptions": { - "title": "QualificationsRedeemableOrderRedemptionsEntry", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/OrderRedemptionsEntry" - }, - "nullable": true - }, - "items": { - "title": "QualificationsRedeemableOrderItems", - "type": "array", - "description": "Array of items applied to the order. It can include up to 500 items.", - "items": { - "title": "QualificationsRedeemableOrderItemsItem", - "allOf": [ - { - "$ref": "#/components/schemas/OrderCalculatedItem" - }, - { - "type": "object", - "properties": { - "application_details": { - "$ref": "#/components/schemas/ApplicationDetails" - } - } - } - ] - }, - "nullable": true - } - }, - "nullable": true + "$ref": "#/components/schemas/OrderCalculated" }, "validation_rule_id": { "type": "string", @@ -43435,154 +41036,7 @@ "$ref": "#/components/schemas/RedeemableResult" }, "order": { - "title": "QualificationsRedeemableBaseOrder", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", - "nullable": true - }, - "source_id": { - "type": "string", - "nullable": true, - "description": "Unique source ID of an existing order that will be linked to the redemption of this request." - }, - "status": { - "type": "string", - "description": "The order status.", - "enum": [ - "CREATED", - "PAID", - "CANCELED", - "FULFILLED" - ], - "nullable": true - }, - "amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "initial_amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "discount_amount": { - "type": "integer", - "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_amount": { - "type": "integer", - "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "applied_discount_amount": { - "type": "integer", - "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_applied_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", - "nullable": true - }, - "total_applied_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", - "nullable": true - }, - "metadata": { - "title": "QualificationsRedeemableBaseOrderMetadata", - "type": "object", - "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "order", - "enum": [ - "order" - ], - "nullable": true - }, - "created_at": { - "type": "string", - "example": "2021-12-22T10:13:06.487Z", - "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", - "format": "date-time", - "nullable": true - }, - "updated_at": { - "type": "string", - "nullable": true, - "example": "2021-12-22T10:14:45.316Z", - "format": "date-time", - "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." - }, - "customer_id": { - "type": "string", - "nullable": true, - "description": "Unique customer ID of the customer making the purchase.", - "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" - }, - "referrer_id": { - "type": "string", - "nullable": true, - "description": "Unique referrer ID.", - "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" - }, - "customer": { - "$ref": "#/components/schemas/CustomerId" - }, - "referrer": { - "$ref": "#/components/schemas/ReferrerId" - }, - "redemptions": { - "title": "QualificationsRedeemableBaseOrderRedemptionsEntry", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/OrderRedemptionsEntry" - }, - "nullable": true - }, - "items": { - "title": "QualificationsRedeemableBaseOrderItems", - "type": "array", - "description": "Array of items applied to the order. It can include up to 500 items.", - "items": { - "title": "QualificationsRedeemableBaseOrderItemsItem", - "allOf": [ - { - "$ref": "#/components/schemas/OrderCalculatedItem" - }, - { - "type": "object", - "properties": { - "application_details": { - "$ref": "#/components/schemas/ApplicationDetails" - } - } - } - ] - }, - "nullable": true - } - }, - "nullable": true + "$ref": "#/components/schemas/OrderCalculated" }, "validation_rule_id": { "type": "string", diff --git a/reference/readonly-sdks/php/OpenAPI.json b/reference/readonly-sdks/php/OpenAPI.json index e67ad7a5..328962b0 100644 --- a/reference/readonly-sdks/php/OpenAPI.json +++ b/reference/readonly-sdks/php/OpenAPI.json @@ -539,6 +539,9 @@ "description": "The metadata object stores all custom attributes assigned to the campaign. A set of key/value pairs that you can attach to a campaign object. It can be useful for storing additional information about the campaign in a structured format.", "nullable": true }, + "access_settings": { + "$ref": "#/components/schemas/AccessSettings" + }, "validation_rules": { "title": "CampaignsCreateRequestBodyValidationRules", "type": "array", @@ -1217,6 +1220,9 @@ "example": "cat_0b688929a2476386a7", "nullable": true }, + "access_settings": { + "$ref": "#/components/schemas/AccessSettings" + }, "activity_duration_after_publishing": { "type": "string", "description": "Defines the amount of time the vouchers will be active after publishing. The value is shown in the ISO 8601 format. For example, a voucher with the value of P24D will be valid for a duration of 24 days.", @@ -2587,194 +2593,7 @@ "nullable": true }, "order": { - "title": "ClientQualificationsCheckEligibilityResponseBodyOrder", - "type": "object", - "nullable": true, - "properties": { - "id": { - "type": "string", - "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", - "nullable": true - }, - "source_id": { - "type": "string", - "nullable": true, - "description": "Unique source ID of an existing order that will be linked to the redemption of this request." - }, - "status": { - "type": "string", - "description": "The order status.", - "enum": [ - "CREATED", - "PAID", - "CANCELED", - "FULFILLED" - ], - "nullable": true - }, - "amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "initial_amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "discount_amount": { - "type": "integer", - "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_amount": { - "type": "integer", - "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "applied_discount_amount": { - "type": "integer", - "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_applied_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", - "nullable": true - }, - "total_applied_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", - "nullable": true - }, - "metadata": { - "title": "ClientQualificationsCheckEligibilityResponseBodyOrderMetadata", - "type": "object", - "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "order", - "enum": [ - "order" - ], - "nullable": true - }, - "created_at": { - "type": "string", - "example": "2021-12-22T10:13:06.487Z", - "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", - "format": "date-time", - "nullable": true - }, - "updated_at": { - "type": "string", - "nullable": true, - "example": "2021-12-22T10:14:45.316Z", - "format": "date-time", - "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." - }, - "customer_id": { - "type": "string", - "nullable": true, - "description": "Unique customer ID of the customer making the purchase.", - "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" - }, - "referrer_id": { - "type": "string", - "nullable": true, - "description": "Unique referrer ID.", - "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" - }, - "customer": { - "$ref": "#/components/schemas/CustomerId" - }, - "referrer": { - "$ref": "#/components/schemas/ReferrerId" - }, - "redemptions": { - "title": "ClientQualificationsCheckEligibilityResponseBodyOrderRedemptionsEntry", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/OrderRedemptionsEntry" - }, - "nullable": true - }, - "items": { - "title": "ClientQualificationsCheckEligibilityResponseBodyOrderItems", - "type": "array", - "description": "Array of items applied to the order. It can include up to 500 items.", - "items": { - "title": "ClientQualificationsCheckEligibilityResponseBodyOrderItemsItem", - "allOf": [ - { - "$ref": "#/components/schemas/OrderCalculatedItem" - }, - { - "type": "object", - "properties": { - "application_details": { - "title": "ClientQualificationsCheckEligibilityResponseBodyOrderItemsItemApplicationDetails", - "type": "array", - "description": "Array containing details about the items that are replaced and the items that are replacements for discounts with the `REPLACE_ITEMS` effect.", - "items": { - "title": "ClientQualificationsCheckEligibilityResponseBodyOrderItemsItemApplicationDetailsItem", - "type": "object", - "description": "Object representing item replacement.", - "properties": { - "source_index": { - "type": "integer", - "description": "Index number of the source item that is replaced. The enumeration starts from `0`, which represents the first item in the request, e.g., if the replaced item is passed as the second in the request, `source_index` equals `3`.", - "minimum": 0 - }, - "source_applied_quantity": { - "type": "integer", - "description": "Number of source units that are replaced.", - "maximum": -1 - }, - "source_applied_quantity_amount": { - "type": "integer", - "description": "Amount equal to the price of the units that are replaced. Determines the change of the amount of the source item quantity.", - "maximum": 0 - }, - "target_index": { - "type": "integer", - "description": "Index number of the target item that is a replacement of the source item. The enumeration continues the values for the order items, e.g. if there are three items in the request, `target_index` equals `3`, as enumeration starts from `0`." - }, - "target_applied_quantity": { - "type": "integer", - "description": "Number of added target units that are replacements." - }, - "target_applied_quantity_amount": { - "type": "integer", - "description": "Amount equal to the price of the units that are replacements. Determines the change in the amount of the target item quantity." - }, - "target_applied_discount_amount": { - "type": "integer", - "description": "Discount amount applied to the target item with regard to the replacement. Equals the `target_applied_quantity_amount` minus `source_applied_quantity_amount`." - } - } - } - } - } - } - ] - }, - "nullable": true - } - } + "$ref": "#/components/schemas/OrderCalculated" }, "stacking_rules": { "$ref": "#/components/schemas/StackingRules" @@ -2903,195 +2722,7 @@ "$ref": "#/components/schemas/Redemption" }, "order": { - "title": "ClientRedemptionsRedeemResponseBodyOrder", - "description": "Contains the order details associated with the redemption.", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", - "nullable": true - }, - "source_id": { - "type": "string", - "nullable": true, - "description": "Unique source ID of an existing order that will be linked to the redemption of this request." - }, - "status": { - "type": "string", - "description": "The order status.", - "enum": [ - "CREATED", - "PAID", - "CANCELED", - "FULFILLED" - ], - "nullable": true - }, - "amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "initial_amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "discount_amount": { - "type": "integer", - "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_amount": { - "type": "integer", - "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "applied_discount_amount": { - "type": "integer", - "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_applied_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", - "nullable": true - }, - "total_applied_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", - "nullable": true - }, - "metadata": { - "title": "ClientRedemptionsRedeemResponseBodyOrderMetadata", - "type": "object", - "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "order", - "enum": [ - "order" - ], - "nullable": true - }, - "created_at": { - "type": "string", - "example": "2021-12-22T10:13:06.487Z", - "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", - "format": "date-time", - "nullable": true - }, - "updated_at": { - "type": "string", - "nullable": true, - "example": "2021-12-22T10:14:45.316Z", - "format": "date-time", - "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." - }, - "customer_id": { - "type": "string", - "nullable": true, - "description": "Unique customer ID of the customer making the purchase.", - "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" - }, - "referrer_id": { - "type": "string", - "nullable": true, - "description": "Unique referrer ID.", - "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" - }, - "customer": { - "$ref": "#/components/schemas/CustomerId" - }, - "referrer": { - "$ref": "#/components/schemas/ReferrerId" - }, - "redemptions": { - "title": "ClientRedemptionsRedeemResponseBodyOrderRedemptionsEntry", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/OrderRedemptionsEntry" - }, - "nullable": true - }, - "items": { - "title": "ClientRedemptionsRedeemResponseBodyOrderItems", - "type": "array", - "description": "Array of items applied to the order. It can include up to 500 items.", - "items": { - "title": "ClientRedemptionsRedeemResponseBodyOrderItemsItem", - "allOf": [ - { - "$ref": "#/components/schemas/OrderCalculatedItem" - }, - { - "type": "object", - "properties": { - "application_details": { - "title": "ClientRedemptionsRedeemResponseBodyOrderItemsItemApplicationDetails", - "type": "array", - "description": "Array containing details about the items that are replaced and the items that are replacements for discounts with the `REPLACE_ITEMS` effect.", - "items": { - "title": "ClientRedemptionsRedeemResponseBodyOrderItemsItemApplicationDetailsItem", - "type": "object", - "description": "Object representing item replacement.", - "properties": { - "source_index": { - "type": "integer", - "description": "Index number of the source item that is replaced. The enumeration starts from `0`, which represents the first item in the request, e.g., if the replaced item is passed as the second in the request, `source_index` equals `3`.", - "minimum": 0 - }, - "source_applied_quantity": { - "type": "integer", - "description": "Number of source units that are replaced.", - "maximum": -1 - }, - "source_applied_quantity_amount": { - "type": "integer", - "description": "Amount equal to the price of the units that are replaced. Determines the change of the amount of the source item quantity.", - "maximum": 0 - }, - "target_index": { - "type": "integer", - "description": "Index number of the target item that is a replacement of the source item. The enumeration continues the values for the order items, e.g. if there are three items in the request, `target_index` equals `3`, as enumeration starts from `0`." - }, - "target_applied_quantity": { - "type": "integer", - "description": "Number of added target units that are replacements." - }, - "target_applied_quantity_amount": { - "type": "integer", - "description": "Amount equal to the price of the units that are replacements. Determines the change in the amount of the target item quantity." - }, - "target_applied_discount_amount": { - "type": "integer", - "description": "Discount amount applied to the target item with regard to the replacement. Equals the `target_applied_quantity_amount` minus `source_applied_quantity_amount`." - } - } - } - } - } - } - ] - }, - "nullable": true - } - }, - "nullable": true + "$ref": "#/components/schemas/OrderCalculated" }, "inapplicable_redeemables": { "title": "ClientRedemptionsRedeemResponseBodyInapplicableRedeemables", @@ -3257,176 +2888,7 @@ "nullable": true }, "order": { - "title": "ClientValidationsValidateResponseBodyRedeemablesItemOrder", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", - "nullable": true - }, - "source_id": { - "type": "string", - "nullable": true, - "description": "Unique source ID of an existing order that will be linked to the redemption of this request." - }, - "status": { - "type": "string", - "description": "The order status.", - "enum": [ - "CREATED", - "PAID", - "CANCELED", - "FULFILLED" - ], - "nullable": true - }, - "amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "initial_amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "discount_amount": { - "type": "integer", - "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_amount": { - "type": "integer", - "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "applied_discount_amount": { - "type": "integer", - "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_applied_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", - "nullable": true - }, - "total_applied_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", - "nullable": true - }, - "metadata": { - "title": "ClientValidationsValidateResponseBodyRedeemablesItemOrderMetadata", - "type": "object", - "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "order", - "enum": [ - "order" - ], - "nullable": true - }, - "created_at": { - "type": "string", - "example": "2021-12-22T10:13:06.487Z", - "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", - "format": "date-time", - "nullable": true - }, - "updated_at": { - "type": "string", - "nullable": true, - "example": "2021-12-22T10:14:45.316Z", - "format": "date-time", - "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." - }, - "customer_id": { - "type": "string", - "nullable": true, - "description": "Unique customer ID of the customer making the purchase.", - "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" - }, - "referrer_id": { - "type": "string", - "nullable": true, - "description": "Unique referrer ID.", - "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" - }, - "customer": { - "title": "ClientValidationsValidateResponseBodyRedeemablesItemOrderCustomer", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "A unique identifier of an existing customer.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "customer", - "enum": [ - "customer" - ], - "nullable": true - } - }, - "required": [] - }, - "referrer": { - "title": "ClientValidationsValidateResponseBodyRedeemablesItemOrderReferrer", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "A unique identifier of an existing customer.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "customer", - "enum": [ - "customer" - ], - "nullable": true - } - }, - "required": [] - }, - "redemptions": { - "title": "ClientValidationsValidateResponseBodyRedeemablesItemOrderRedemptionsEntry", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/OrderRedemptionsEntry" - }, - "nullable": true - }, - "items": { - "title": "ClientValidationsValidateResponseBodyRedeemablesItemOrderItems", - "type": "array", - "description": "Array of items applied to the order. It can include up to 500 items.", - "items": { - "$ref": "#/components/schemas/OrderCalculatedItem" - }, - "nullable": true - } - } + "$ref": "#/components/schemas/OrderCalculated" }, "applicable_to": { "$ref": "#/components/schemas/ApplicableToResultList" @@ -3649,194 +3111,7 @@ "nullable": true }, "order": { - "title": "ClientValidationsValidateResponseBodyOrder", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", - "nullable": true - }, - "source_id": { - "type": "string", - "nullable": true, - "description": "Unique source ID of an existing order that will be linked to the redemption of this request." - }, - "status": { - "type": "string", - "description": "The order status.", - "enum": [ - "CREATED", - "PAID", - "CANCELED", - "FULFILLED" - ], - "nullable": true - }, - "amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "initial_amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "discount_amount": { - "type": "integer", - "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_amount": { - "type": "integer", - "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "applied_discount_amount": { - "type": "integer", - "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_applied_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", - "nullable": true - }, - "total_applied_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", - "nullable": true - }, - "metadata": { - "title": "ClientValidationsValidateResponseBodyOrderMetadata", - "type": "object", - "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "order", - "enum": [ - "order" - ], - "nullable": true - }, - "created_at": { - "type": "string", - "example": "2021-12-22T10:13:06.487Z", - "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", - "format": "date-time", - "nullable": true - }, - "updated_at": { - "type": "string", - "nullable": true, - "example": "2021-12-22T10:14:45.316Z", - "format": "date-time", - "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." - }, - "customer_id": { - "type": "string", - "nullable": true, - "description": "Unique customer ID of the customer making the purchase.", - "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" - }, - "referrer_id": { - "type": "string", - "nullable": true, - "description": "Unique referrer ID.", - "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" - }, - "customer": { - "$ref": "#/components/schemas/CustomerId" - }, - "referrer": { - "$ref": "#/components/schemas/ReferrerId" - }, - "redemptions": { - "title": "ClientValidationsValidateResponseBodyOrderRedemptionsEntry", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/OrderRedemptionsEntry" - }, - "nullable": true - }, - "items": { - "title": "ClientValidationsValidateResponseBodyOrderItems", - "type": "array", - "description": "Array of items applied to the order. It can include up to 500 items.", - "items": { - "title": "ClientValidationsValidateResponseBodyOrderItemsItem", - "allOf": [ - { - "$ref": "#/components/schemas/OrderCalculatedItem" - }, - { - "type": "object", - "properties": { - "application_details": { - "title": "ClientValidationsValidateResponseBodyOrderItemsItemApplicationDetails", - "type": "array", - "description": "Array containing details about the items that are replaced and the items that are replacements for discounts with the `REPLACE_ITEMS` effect.", - "items": { - "title": "ClientValidationsValidateResponseBodyOrderItemsItemApplicationDetailsItem", - "type": "object", - "description": "Object representing item replacement.", - "properties": { - "source_index": { - "type": "integer", - "description": "Index number of the source item that is replaced. The enumeration starts from `0`, which represents the first item in the request, e.g., if the replaced item is passed as the second in the request, `source_index` equals `3`.", - "minimum": 0 - }, - "source_applied_quantity": { - "type": "integer", - "description": "Number of source units that are replaced.", - "maximum": -1 - }, - "source_applied_quantity_amount": { - "type": "integer", - "description": "Amount equal to the price of the units that are replaced. Determines the change of the amount of the source item quantity.", - "maximum": 0 - }, - "target_index": { - "type": "integer", - "description": "Index number of the target item that is a replacement of the source item. The enumeration continues the values for the order items, e.g. if there are three items in the request, `target_index` equals `3`, as enumeration starts from `0`." - }, - "target_applied_quantity": { - "type": "integer", - "description": "Number of added target units that are replacements." - }, - "target_applied_quantity_amount": { - "type": "integer", - "description": "Amount equal to the price of the units that are replacements. Determines the change in the amount of the target item quantity." - }, - "target_applied_discount_amount": { - "type": "integer", - "description": "Discount amount applied to the target item with regard to the replacement. Equals the `target_applied_quantity_amount` minus `source_applied_quantity_amount`." - } - } - } - } - } - } - ] - }, - "nullable": true - } - }, - "nullable": true + "$ref": "#/components/schemas/OrderCalculated" }, "tracking_id": { "type": "string", @@ -5987,6 +5262,9 @@ "description": "The metadata object stores all custom attributes assigned to the campaign. A set of key/value pairs that you can attach to a campaign object. It can be useful for storing additional information about the campaign in a structured format.", "nullable": true }, + "access_settings": { + "$ref": "#/components/schemas/AccessSettings" + }, "validation_rules": { "title": "LoyaltiesCreateCampaignRequestBodyValidationRules", "type": "array", @@ -10433,179 +9711,7 @@ "nullable": true }, "order": { - "title": "LoyaltiesMembersRedemptionRedeemResponseBodyOrder", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", - "nullable": true - }, - "source_id": { - "type": "string", - "nullable": true, - "description": "Unique source ID of an existing order that will be linked to the redemption of this request." - }, - "status": { - "type": "string", - "description": "The order status.", - "enum": [ - "CREATED", - "PAID", - "CANCELED", - "FULFILLED" - ], - "nullable": true - }, - "amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "initial_amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "discount_amount": { - "type": "integer", - "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_amount": { - "type": "integer", - "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "applied_discount_amount": { - "type": "integer", - "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_applied_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", - "nullable": true - }, - "total_applied_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", - "nullable": true - }, - "metadata": { - "title": "LoyaltiesMembersRedemptionRedeemResponseBodyOrderMetadata", - "type": "object", - "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "order", - "enum": [ - "order" - ], - "nullable": true - }, - "created_at": { - "type": "string", - "example": "2021-12-22T10:13:06.487Z", - "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", - "format": "date-time", - "nullable": true - }, - "updated_at": { - "type": "string", - "nullable": true, - "example": "2021-12-22T10:14:45.316Z", - "format": "date-time", - "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." - }, - "customer_id": { - "type": "string", - "nullable": true, - "description": "Unique customer ID of the customer making the purchase.", - "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" - }, - "referrer_id": { - "type": "string", - "nullable": true, - "description": "Unique referrer ID.", - "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" - }, - "customer": { - "title": "LoyaltiesMembersRedemptionRedeemResponseBodyOrderCustomer", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "A unique identifier of an existing customer.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "customer", - "enum": [ - "customer" - ], - "nullable": true - } - }, - "required": [], - "nullable": true - }, - "referrer": { - "title": "LoyaltiesMembersRedemptionRedeemResponseBodyOrderReferrer", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "A unique identifier of an existing customer.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "customer", - "enum": [ - "customer" - ], - "nullable": true - } - }, - "required": [], - "nullable": true - }, - "redemptions": { - "title": "LoyaltiesMembersRedemptionRedeemResponseBodyOrderRedemptionsEntry", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/OrderRedemptionsEntry" - }, - "nullable": true - }, - "items": { - "title": "LoyaltiesMembersRedemptionRedeemResponseBodyOrderItems", - "type": "array", - "description": "Array of items applied to the order. It can include up to 500 items.", - "items": { - "$ref": "#/components/schemas/OrderCalculatedItem" - }, - "nullable": true - } - }, - "nullable": true + "$ref": "#/components/schemas/OrderCalculated" }, "channel": { "title": "LoyaltiesMembersRedemptionRedeemResponseBodyChannel", @@ -12517,6 +11623,9 @@ "example": "cat_0b688929a2476386a7", "nullable": true }, + "access_settings": { + "$ref": "#/components/schemas/AccessSettings" + }, "activity_duration_after_publishing": { "type": "string", "description": "Defines the amount of time the vouchers will be active after publishing. The value is shown in the ISO 8601 format. For example, a voucher with the value of P24D will be valid for a duration of 24 days.", @@ -17567,25 +16676,7 @@ "type": "array", "description": "Contains array of order objects.", "items": { - "title": "OrdersListResponseBodyOrdersItem", - "allOf": [ - { - "$ref": "#/components/schemas/OrderCalculated" - }, - { - "type": "object", - "properties": { - "items": { - "title": "OrdersListResponseBodyOrdersItemItems", - "type": "array", - "description": "Array of items applied to the order. It can include up to 500 items.", - "items": { - "$ref": "#/components/schemas/OrderCalculatedItem" - } - } - } - } - ] + "$ref": "#/components/schemas/OrderCalculated" }, "nullable": true }, @@ -22755,141 +21846,7 @@ "nullable": true }, "order": { - "title": "QualificationsCheckEligibilityResponseBodyOrder", - "type": "object", - "nullable": true, - "properties": { - "id": { - "type": "string", - "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", - "nullable": true - }, - "source_id": { - "type": "string", - "nullable": true, - "description": "Unique source ID of an existing order that will be linked to the redemption of this request." - }, - "status": { - "type": "string", - "description": "The order status.", - "enum": [ - "CREATED", - "PAID", - "CANCELED", - "FULFILLED" - ], - "nullable": true - }, - "amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "initial_amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "discount_amount": { - "type": "integer", - "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_amount": { - "type": "integer", - "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "applied_discount_amount": { - "type": "integer", - "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_applied_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", - "nullable": true - }, - "total_applied_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", - "nullable": true - }, - "metadata": { - "title": "QualificationsCheckEligibilityResponseBodyOrderMetadata", - "type": "object", - "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "order", - "enum": [ - "order" - ], - "nullable": true - }, - "created_at": { - "type": "string", - "example": "2021-12-22T10:13:06.487Z", - "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", - "format": "date-time", - "nullable": true - }, - "updated_at": { - "type": "string", - "nullable": true, - "example": "2021-12-22T10:14:45.316Z", - "format": "date-time", - "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." - }, - "customer_id": { - "type": "string", - "nullable": true, - "description": "Unique customer ID of the customer making the purchase.", - "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" - }, - "referrer_id": { - "type": "string", - "nullable": true, - "description": "Unique referrer ID.", - "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" - }, - "customer": { - "$ref": "#/components/schemas/CustomerId" - }, - "referrer": { - "$ref": "#/components/schemas/ReferrerId" - }, - "redemptions": { - "title": "QualificationsCheckEligibilityResponseBodyOrderRedemptionsEntry", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/OrderRedemptionsEntry" - }, - "nullable": true - }, - "items": { - "title": "QualificationsCheckEligibilityResponseBodyOrderItems", - "type": "array", - "description": "Array of items applied to the order. It can include up to 500 items.", - "items": { - "$ref": "#/components/schemas/OrderCalculatedItem" - }, - "nullable": true - } - } + "$ref": "#/components/schemas/OrderCalculated" }, "stacking_rules": { "$ref": "#/components/schemas/StackingRules" @@ -23026,177 +21983,7 @@ "nullable": true }, "order": { - "title": "RedemptionsGetResponseBodyOrder", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", - "nullable": true - }, - "source_id": { - "type": "string", - "nullable": true, - "description": "Unique source ID of an existing order that will be linked to the redemption of this request." - }, - "status": { - "type": "string", - "description": "The order status.", - "enum": [ - "CREATED", - "PAID", - "CANCELED", - "FULFILLED" - ], - "nullable": true - }, - "amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "initial_amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "discount_amount": { - "type": "integer", - "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_amount": { - "type": "integer", - "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "applied_discount_amount": { - "type": "integer", - "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_applied_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", - "nullable": true - }, - "total_applied_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", - "nullable": true - }, - "metadata": { - "title": "RedemptionsGetResponseBodyOrderMetadata", - "type": "object", - "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "order", - "enum": [ - "order" - ], - "nullable": true - }, - "created_at": { - "type": "string", - "example": "2021-12-22T10:13:06.487Z", - "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", - "format": "date-time", - "nullable": true - }, - "updated_at": { - "type": "string", - "nullable": true, - "example": "2021-12-22T10:14:45.316Z", - "format": "date-time", - "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." - }, - "customer_id": { - "type": "string", - "nullable": true, - "description": "Unique customer ID of the customer making the purchase.", - "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" - }, - "referrer_id": { - "type": "string", - "nullable": true, - "description": "Unique referrer ID.", - "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" - }, - "customer": { - "title": "RedemptionsGetResponseBodyOrderCustomer", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "A unique identifier of an existing customer.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "customer", - "enum": [ - "customer" - ], - "nullable": true - } - }, - "nullable": true - }, - "referrer": { - "title": "RedemptionsGetResponseBodyOrderReferrer", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "A unique identifier of an existing customer.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "customer", - "enum": [ - "customer" - ], - "nullable": true - } - }, - "nullable": true - }, - "redemptions": { - "title": "RedemptionsGetResponseBodyOrderRedemptionsEntry", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/OrderRedemptionsEntry" - }, - "nullable": true - }, - "items": { - "title": "RedemptionsGetResponseBodyOrderItems", - "type": "array", - "description": "Array of items applied to the order. It can include up to 500 items.", - "items": { - "$ref": "#/components/schemas/OrderCalculatedItem" - }, - "nullable": true - } - }, - "nullable": true + "$ref": "#/components/schemas/OrderCalculated" }, "channel": { "title": "RedemptionsGetResponseBodyChannel", @@ -23976,174 +22763,7 @@ "nullable": true }, "order": { - "title": "RedemptionsListResponseBodyRedemptionsItemOrder", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", - "nullable": true - }, - "source_id": { - "type": "string", - "nullable": true, - "description": "Unique source ID of an existing order that will be linked to the redemption of this request." - }, - "status": { - "type": "string", - "description": "The order status.", - "enum": [ - "CREATED", - "PAID", - "CANCELED", - "FULFILLED" - ], - "nullable": true - }, - "amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "initial_amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "discount_amount": { - "type": "integer", - "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_amount": { - "type": "integer", - "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "applied_discount_amount": { - "type": "integer", - "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_applied_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", - "nullable": true - }, - "total_applied_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", - "nullable": true - }, - "metadata": { - "title": "RedemptionsListResponseBodyRedemptionsItemOrderMetadata", - "type": "object", - "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "order", - "enum": [ - "order" - ], - "nullable": true - }, - "created_at": { - "type": "string", - "example": "2021-12-22T10:13:06.487Z", - "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", - "format": "date-time", - "nullable": true - }, - "updated_at": { - "type": "string", - "nullable": true, - "example": "2021-12-22T10:14:45.316Z", - "format": "date-time", - "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." - }, - "customer_id": { - "type": "string", - "nullable": true, - "description": "Unique customer ID of the customer making the purchase.", - "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" - }, - "referrer_id": { - "type": "string", - "nullable": true, - "description": "Unique referrer ID.", - "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" - }, - "customer": { - "title": "RedemptionsListResponseBodyRedemptionsItemOrderCustomer", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "A unique identifier of an existing customer.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "customer", - "enum": [ - "customer" - ], - "nullable": true - } - } - }, - "referrer": { - "title": "RedemptionsListResponseBodyRedemptionsItemOrderReferrer", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "A unique identifier of an existing customer.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "customer", - "enum": [ - "customer" - ], - "nullable": true - } - } - }, - "redemptions": { - "title": "RedemptionsListResponseBodyRedemptionsItemOrderRedemptionsEntry", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/OrderRedemptionsEntry" - }, - "nullable": true - }, - "items": { - "title": "RedemptionsListResponseBodyRedemptionsItemOrderItems", - "type": "array", - "description": "Array of items applied to the order. It can include up to 500 items.", - "items": { - "$ref": "#/components/schemas/OrderCalculatedItem" - }, - "nullable": true - } - } + "$ref": "#/components/schemas/OrderCalculated" }, "channel": { "title": "RedemptionsListResponseBodyRedemptionsItemChannel", @@ -24891,195 +23511,7 @@ "$ref": "#/components/schemas/Redemption" }, "order": { - "title": "RedemptionsRedeemResponseBodyOrder", - "description": "Contains the order details associated with the redemption.", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", - "nullable": true - }, - "source_id": { - "type": "string", - "nullable": true, - "description": "Unique source ID of an existing order that will be linked to the redemption of this request." - }, - "status": { - "type": "string", - "description": "The order status.", - "enum": [ - "CREATED", - "PAID", - "CANCELED", - "FULFILLED" - ], - "nullable": true - }, - "amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "initial_amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "discount_amount": { - "type": "integer", - "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_amount": { - "type": "integer", - "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "applied_discount_amount": { - "type": "integer", - "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_applied_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", - "nullable": true - }, - "total_applied_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", - "nullable": true - }, - "metadata": { - "title": "RedemptionsRedeemResponseBodyOrderMetadata", - "type": "object", - "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "order", - "enum": [ - "order" - ], - "nullable": true - }, - "created_at": { - "type": "string", - "example": "2021-12-22T10:13:06.487Z", - "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", - "format": "date-time", - "nullable": true - }, - "updated_at": { - "type": "string", - "nullable": true, - "example": "2021-12-22T10:14:45.316Z", - "format": "date-time", - "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." - }, - "customer_id": { - "type": "string", - "nullable": true, - "description": "Unique customer ID of the customer making the purchase.", - "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" - }, - "referrer_id": { - "type": "string", - "nullable": true, - "description": "Unique referrer ID.", - "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" - }, - "customer": { - "$ref": "#/components/schemas/CustomerId" - }, - "referrer": { - "$ref": "#/components/schemas/ReferrerId" - }, - "redemptions": { - "title": "RedemptionsRedeemResponseBodyOrderRedemptionsEntry", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/OrderRedemptionsEntry" - }, - "nullable": true - }, - "items": { - "title": "RedemptionsRedeemResponseBodyOrderItems", - "type": "array", - "description": "Array of items applied to the order. It can include up to 500 items.", - "items": { - "title": "RedemptionsRedeemResponseBodyOrderItemsItem", - "allOf": [ - { - "$ref": "#/components/schemas/OrderCalculatedItem" - }, - { - "type": "object", - "properties": { - "application_details": { - "title": "RedemptionsRedeemResponseBodyOrderItemsItemApplicationDetails", - "type": "array", - "description": "Array containing details about the items that are replaced and the items that are replacements for discounts with the `REPLACE_ITEMS` effect.", - "items": { - "title": "RedemptionsRedeemResponseBodyOrderItemsItemApplicationDetailsItem", - "type": "object", - "description": "Object representing item replacement.", - "properties": { - "source_index": { - "type": "integer", - "description": "Index number of the source item that is replaced. The enumeration starts from `0`, which represents the first item in the request, e.g., if the replaced item is passed as the second in the request, `source_index` equals `3`.", - "minimum": 0 - }, - "source_applied_quantity": { - "type": "integer", - "description": "Number of source units that are replaced.", - "maximum": -1 - }, - "source_applied_quantity_amount": { - "type": "integer", - "description": "Amount equal to the price of the units that are replaced. Determines the change of the amount of the source item quantity.", - "maximum": 0 - }, - "target_index": { - "type": "integer", - "description": "Index number of the target item that is a replacement of the source item. The enumeration continues the values for the order items, e.g. if there are three items in the request, `target_index` equals `3`, as enumeration starts from `0`." - }, - "target_applied_quantity": { - "type": "integer", - "description": "Number of added target units that are replacements." - }, - "target_applied_quantity_amount": { - "type": "integer", - "description": "Amount equal to the price of the units that are replacements. Determines the change in the amount of the target item quantity." - }, - "target_applied_discount_amount": { - "type": "integer", - "description": "Discount amount applied to the target item with regard to the replacement. Equals the `target_applied_quantity_amount` minus `source_applied_quantity_amount`." - } - } - } - } - } - } - ] - }, - "nullable": true - } - }, - "nullable": true + "$ref": "#/components/schemas/OrderCalculated" }, "inapplicable_redeemables": { "title": "RedemptionsRedeemResponseBodyInapplicableRedeemables", @@ -25271,141 +23703,7 @@ "nullable": true }, "order": { - "title": "RedemptionsRollbackCreateResponseBodyOrder", - "nullable": true, - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", - "nullable": true - }, - "source_id": { - "type": "string", - "nullable": true, - "description": "Unique source ID of an existing order that will be linked to the redemption of this request." - }, - "status": { - "type": "string", - "description": "The order status.", - "enum": [ - "CREATED", - "PAID", - "CANCELED", - "FULFILLED" - ], - "nullable": true - }, - "amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "initial_amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "discount_amount": { - "type": "integer", - "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_amount": { - "type": "integer", - "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "applied_discount_amount": { - "type": "integer", - "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_applied_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", - "nullable": true - }, - "total_applied_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", - "nullable": true - }, - "metadata": { - "title": "RedemptionsRollbackCreateResponseBodyOrderMetadata", - "type": "object", - "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "order", - "enum": [ - "order" - ], - "nullable": true - }, - "created_at": { - "type": "string", - "example": "2021-12-22T10:13:06.487Z", - "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", - "format": "date-time", - "nullable": true - }, - "updated_at": { - "type": "string", - "nullable": true, - "example": "2021-12-22T10:14:45.316Z", - "format": "date-time", - "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." - }, - "customer_id": { - "type": "string", - "nullable": true, - "description": "Unique customer ID of the customer making the purchase.", - "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" - }, - "referrer_id": { - "type": "string", - "nullable": true, - "description": "Unique referrer ID.", - "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" - }, - "customer": { - "$ref": "#/components/schemas/CustomerId" - }, - "referrer": { - "$ref": "#/components/schemas/ReferrerId" - }, - "redemptions": { - "title": "RedemptionsRollbackCreateResponseBodyOrderRedemptionsEntry", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/OrderRedemptionsEntry" - }, - "nullable": true - }, - "items": { - "title": "RedemptionsRollbackCreateResponseBodyOrderItems", - "type": "array", - "description": "Array of items applied to the order. It can include up to 500 items.", - "items": { - "$ref": "#/components/schemas/OrderCalculatedItem" - }, - "nullable": true - } - } + "$ref": "#/components/schemas/OrderCalculated" }, "channel": { "title": "RedemptionsRollbackCreateResponseBodyChannel", @@ -25484,7 +23782,9 @@ "nullable": true } }, - "required": [], + "required": [ + "order" + ], "description": "Response body schema for **POST** `v1/redemptions/{redemptionId}/rollback`." }, "RedemptionsRollbacksCreateRequestBody": { @@ -26876,6 +25176,9 @@ "description": "The metadata object stores all custom attributes assigned to the campaign. A set of key/value pairs that you can attach to a campaign object. It can be useful for storing additional information about the campaign in a structured format.", "nullable": true }, + "access_settings": { + "$ref": "#/components/schemas/AccessSettings" + }, "voucher": { "title": "TemplatesCampaignsCampaignSetupCreateRequestBodyVoucher", "type": "object", @@ -28464,176 +26767,7 @@ "nullable": true }, "order": { - "title": "ValidationsValidateResponseBodyRedeemablesItemOrder", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", - "nullable": true - }, - "source_id": { - "type": "string", - "nullable": true, - "description": "Unique source ID of an existing order that will be linked to the redemption of this request." - }, - "status": { - "type": "string", - "description": "The order status.", - "enum": [ - "CREATED", - "PAID", - "CANCELED", - "FULFILLED" - ], - "nullable": true - }, - "amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "initial_amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "discount_amount": { - "type": "integer", - "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_amount": { - "type": "integer", - "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "applied_discount_amount": { - "type": "integer", - "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_applied_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", - "nullable": true - }, - "total_applied_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", - "nullable": true - }, - "metadata": { - "title": "ValidationsValidateResponseBodyRedeemablesItemOrderMetadata", - "type": "object", - "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "order", - "enum": [ - "order" - ], - "nullable": true - }, - "created_at": { - "type": "string", - "example": "2021-12-22T10:13:06.487Z", - "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", - "format": "date-time", - "nullable": true - }, - "updated_at": { - "type": "string", - "nullable": true, - "example": "2021-12-22T10:14:45.316Z", - "format": "date-time", - "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." - }, - "customer_id": { - "type": "string", - "nullable": true, - "description": "Unique customer ID of the customer making the purchase.", - "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" - }, - "referrer_id": { - "type": "string", - "nullable": true, - "description": "Unique referrer ID.", - "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" - }, - "customer": { - "title": "ValidationsValidateResponseBodyRedeemablesItemOrderCustomer", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "A unique identifier of an existing customer.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "customer", - "enum": [ - "customer" - ], - "nullable": true - } - }, - "required": [] - }, - "referrer": { - "title": "ValidationsValidateResponseBodyRedeemablesItemOrderReferrer", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "A unique identifier of an existing customer.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "customer", - "enum": [ - "customer" - ], - "nullable": true - } - }, - "required": [] - }, - "redemptions": { - "title": "ValidationsValidateResponseBodyRedeemablesItemOrderRedemptionsEntry", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/OrderRedemptionsEntry" - }, - "nullable": true - }, - "items": { - "title": "ValidationsValidateResponseBodyRedeemablesItemOrderItems", - "type": "array", - "description": "Array of items applied to the order. It can include up to 500 items.", - "items": { - "$ref": "#/components/schemas/OrderCalculatedItem" - }, - "nullable": true - } - } + "$ref": "#/components/schemas/OrderCalculated" }, "applicable_to": { "$ref": "#/components/schemas/ApplicableToResultList" @@ -28856,194 +26990,7 @@ "nullable": true }, "order": { - "title": "ValidationsValidateResponseBodyOrder", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", - "nullable": true - }, - "source_id": { - "type": "string", - "nullable": true, - "description": "Unique source ID of an existing order that will be linked to the redemption of this request." - }, - "status": { - "type": "string", - "description": "The order status.", - "enum": [ - "CREATED", - "PAID", - "CANCELED", - "FULFILLED" - ], - "nullable": true - }, - "amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "initial_amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "discount_amount": { - "type": "integer", - "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_amount": { - "type": "integer", - "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "applied_discount_amount": { - "type": "integer", - "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_applied_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", - "nullable": true - }, - "total_applied_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", - "nullable": true - }, - "metadata": { - "title": "ValidationsValidateResponseBodyOrderMetadata", - "type": "object", - "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "order", - "enum": [ - "order" - ], - "nullable": true - }, - "created_at": { - "type": "string", - "example": "2021-12-22T10:13:06.487Z", - "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", - "format": "date-time", - "nullable": true - }, - "updated_at": { - "type": "string", - "nullable": true, - "example": "2021-12-22T10:14:45.316Z", - "format": "date-time", - "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." - }, - "customer_id": { - "type": "string", - "nullable": true, - "description": "Unique customer ID of the customer making the purchase.", - "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" - }, - "referrer_id": { - "type": "string", - "nullable": true, - "description": "Unique referrer ID.", - "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" - }, - "customer": { - "$ref": "#/components/schemas/CustomerId" - }, - "referrer": { - "$ref": "#/components/schemas/ReferrerId" - }, - "redemptions": { - "title": "ValidationsValidateResponseBodyOrderRedemptionsEntry", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/OrderRedemptionsEntry" - }, - "nullable": true - }, - "items": { - "title": "ValidationsValidateResponseBodyOrderItems", - "type": "array", - "description": "Array of items applied to the order. It can include up to 500 items.", - "items": { - "title": "ValidationsValidateResponseBodyOrderItemsItem", - "allOf": [ - { - "$ref": "#/components/schemas/OrderCalculatedItem" - }, - { - "type": "object", - "properties": { - "application_details": { - "title": "ValidationsValidateResponseBodyOrderItemsItemApplicationDetails", - "type": "array", - "description": "Array containing details about the items that are replaced and the items that are replacements for discounts with the `REPLACE_ITEMS` effect.", - "items": { - "title": "ValidationsValidateResponseBodyOrderItemsItemApplicationDetailsItem", - "type": "object", - "description": "Object representing item replacement.", - "properties": { - "source_index": { - "type": "integer", - "description": "Index number of the source item that is replaced. The enumeration starts from `0`, which represents the first item in the request, e.g., if the replaced item is passed as the second in the request, `source_index` equals `3`.", - "minimum": 0 - }, - "source_applied_quantity": { - "type": "integer", - "description": "Number of source units that are replaced.", - "maximum": -1 - }, - "source_applied_quantity_amount": { - "type": "integer", - "description": "Amount equal to the price of the units that are replaced. Determines the change of the amount of the source item quantity.", - "maximum": 0 - }, - "target_index": { - "type": "integer", - "description": "Index number of the target item that is a replacement of the source item. The enumeration continues the values for the order items, e.g. if there are three items in the request, `target_index` equals `3`, as enumeration starts from `0`." - }, - "target_applied_quantity": { - "type": "integer", - "description": "Number of added target units that are replacements." - }, - "target_applied_quantity_amount": { - "type": "integer", - "description": "Amount equal to the price of the units that are replacements. Determines the change in the amount of the target item quantity." - }, - "target_applied_discount_amount": { - "type": "integer", - "description": "Discount amount applied to the target item with regard to the replacement. Equals the `target_applied_quantity_amount` minus `source_applied_quantity_amount`." - } - } - } - } - } - } - ] - }, - "nullable": true - } - }, - "nullable": true + "$ref": "#/components/schemas/OrderCalculated" }, "tracking_id": { "type": "string", @@ -31355,6 +29302,69 @@ "type": "string", "format": "hostname" }, + "AccessSettings": { + "title": "AccessSettings", + "type": "object", + "description": "Assigns or unassigns an area or store to the campaign.\n\n**NOTE**: this object can be sent if the Areas and Stores enterprise feature is enabled. Contact [Voucherify Sales](https://www.voucherify.io/contact-sales) to learn more.", + "properties": { + "assign": { + "title": "AccessSettingsAssign", + "type": "object", + "description": "Assigns the campaign to an area or a store. Provide the area and/or store IDs in the respective arrays. If a campaign changes assignments between areas or stores, unassign it from the area. For example, if a campaign is assigned to Area-01, but it must be now assigned to Store-01 within this area, you have to unassign the campaign from Area-01 and assign to Store-01 only.\n\nIf you want to assign the campaign to stores only, you do not have to send the area ID.", + "properties": { + "areas_ids": { + "title": "AccessSettingsAssignAreasIds", + "type": "array", + "description": "List all area IDs to which the campaign will be assigned.", + "items": { + "title": "AccessSettingsAssignAreasIdsItem", + "type": "string" + }, + "nullable": true + }, + "area_stores_ids": { + "title": "AccessSettingsAssignAreaStoresIds", + "type": "array", + "description": "List all store IDs to which the campaign will be assigned.", + "items": { + "title": "AccessSettingsAssignAreaStoresIdsItem", + "type": "string" + }, + "nullable": true + } + }, + "nullable": true + }, + "unassign": { + "title": "AccessSettingsUnassign", + "type": "object", + "description": "Unassigns the campaign from an area or a store. Provide the area and/or store IDs in the respective arrays. If a campaign changes assignments between areas or stores, unassign it first. For example, if a campaign is assigned to Area-01, but it must be now assigned to Store-01 within this area, you have to unassign the campaign from Area-01 and assigned to Store-01 only.\n\nIf you want to assign the campaign to stores only, you do not have to send the area ID.", + "properties": { + "areas_ids": { + "title": "AccessSettingsUnassignAreasIds", + "type": "array", + "description": "List all area IDs from which the campaign will be unassigned.", + "items": { + "title": "AccessSettingsUnassignAreasIdsItem", + "type": "string" + }, + "nullable": true + }, + "area_stores_ids": { + "title": "AccessSettingsUnassignAreaStoresIds", + "type": "array", + "description": "List all store IDs to which the campaign will be unassigned.", + "items": { + "title": "AccessSettingsUnassignAreaStoresIdsItem", + "type": "string" + }, + "nullable": true + } + }, + "nullable": true + } + } + }, "AccessSettingsCampaignAssignmentsList": { "title": "AccessSettingsCampaignAssignmentsList", "type": "object", @@ -36888,6 +34898,15 @@ "$ref": "#/components/schemas/OrderRedemptionsEntry" }, "nullable": true + }, + "items": { + "title": "OrderCalculatedItems", + "type": "array", + "description": "Array of items applied to the order. It can include up 500 items.", + "items": { + "$ref": "#/components/schemas/OrderCalculatedItem" + }, + "nullable": true } } }, @@ -37076,6 +35095,50 @@ "type": "object", "description": "A set of custom key/value pairs that you can attach to an item object. It can be useful for storing additional information about the item in a structured format. It can be used to define business validation rules or discount formulas.", "nullable": true + }, + "application_details": { + "title": "OrderCalculatedItemApplicationDetails", + "type": "array", + "description": "Array containing details about the items that are replaced and the items that are replacements for discounts with the `REPLACE_ITEMS` effect.", + "items": { + "title": "OrderCalculatedItemApplicationDetailsItem", + "type": "object", + "description": "Object representing item replacement.", + "properties": { + "source_index": { + "type": "integer", + "description": "Index number of the source item that is replaced. The enumeration starts from `0`, which represents the first item in the request, e.g., if the replaced item is passed as the second in the request, `source_index` equals `3`.", + "minimum": 0 + }, + "source_applied_quantity": { + "type": "integer", + "description": "Number of source units that are replaced.", + "maximum": -1 + }, + "source_applied_quantity_amount": { + "type": "integer", + "description": "Amount equal to the price of the units that are replaced. Determines the change of the amount of the source item quantity.", + "maximum": 0 + }, + "target_index": { + "type": "integer", + "description": "Index number of the target item that is a replacement of the source item. The enumeration continues the values for the order items, e.g. if there are three items in the request, `target_index` equals `3`, as enumeration starts from `0`." + }, + "target_applied_quantity": { + "type": "integer", + "description": "Number of added target units that are replacements." + }, + "target_applied_quantity_amount": { + "type": "integer", + "description": "Amount equal to the price of the units that are replacements. Determines the change in the amount of the target item quantity." + }, + "target_applied_discount_amount": { + "type": "integer", + "description": "Discount amount applied to the target item with regard to the replacement. Equals the `target_applied_quantity_amount` minus `source_applied_quantity_amount`." + } + } + }, + "nullable": true } }, "required": [] @@ -38629,179 +36692,7 @@ "nullable": true }, "order": { - "title": "RedemptionOrder", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", - "nullable": true - }, - "source_id": { - "type": "string", - "nullable": true, - "description": "Unique source ID of an existing order that will be linked to the redemption of this request." - }, - "status": { - "type": "string", - "description": "The order status.", - "enum": [ - "CREATED", - "PAID", - "CANCELED", - "FULFILLED" - ], - "nullable": true - }, - "amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "initial_amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "discount_amount": { - "type": "integer", - "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_amount": { - "type": "integer", - "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "applied_discount_amount": { - "type": "integer", - "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_applied_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", - "nullable": true - }, - "total_applied_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", - "nullable": true - }, - "metadata": { - "title": "RedemptionOrderMetadata", - "type": "object", - "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "order", - "enum": [ - "order" - ], - "nullable": true - }, - "created_at": { - "type": "string", - "example": "2021-12-22T10:13:06.487Z", - "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", - "format": "date-time", - "nullable": true - }, - "updated_at": { - "type": "string", - "nullable": true, - "example": "2021-12-22T10:14:45.316Z", - "format": "date-time", - "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." - }, - "customer_id": { - "type": "string", - "nullable": true, - "description": "Unique customer ID of the customer making the purchase.", - "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" - }, - "referrer_id": { - "type": "string", - "nullable": true, - "description": "Unique referrer ID.", - "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" - }, - "customer": { - "title": "RedemptionOrderCustomer", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "A unique identifier of an existing customer.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "customer", - "enum": [ - "customer" - ], - "nullable": true - } - }, - "required": [], - "nullable": true - }, - "referrer": { - "title": "RedemptionOrderReferrer", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "A unique identifier of an existing customer.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "customer", - "enum": [ - "customer" - ], - "nullable": true - } - }, - "required": [], - "nullable": true - }, - "redemptions": { - "title": "RedemptionOrderRedemptionsEntry", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/OrderRedemptionsEntry" - }, - "nullable": true - }, - "items": { - "title": "RedemptionOrderItems", - "type": "array", - "description": "Array of items applied to the order. It can include up to 500 items.", - "items": { - "$ref": "#/components/schemas/OrderCalculatedItem" - }, - "nullable": true - } - }, - "nullable": true + "$ref": "#/components/schemas/OrderCalculated" }, "channel": { "title": "RedemptionChannel", @@ -39300,177 +37191,7 @@ "nullable": true }, "order": { - "title": "RedemptionEntryOrder", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", - "nullable": true - }, - "source_id": { - "type": "string", - "nullable": true, - "description": "Unique source ID of an existing order that will be linked to the redemption of this request." - }, - "status": { - "type": "string", - "description": "The order status.", - "enum": [ - "CREATED", - "PAID", - "CANCELED", - "FULFILLED" - ], - "nullable": true - }, - "amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "initial_amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "discount_amount": { - "type": "integer", - "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_amount": { - "type": "integer", - "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "applied_discount_amount": { - "type": "integer", - "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_applied_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", - "nullable": true - }, - "total_applied_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", - "nullable": true - }, - "metadata": { - "title": "RedemptionEntryOrderMetadata", - "type": "object", - "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "order", - "enum": [ - "order" - ], - "nullable": true - }, - "created_at": { - "type": "string", - "example": "2021-12-22T10:13:06.487Z", - "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", - "format": "date-time", - "nullable": true - }, - "updated_at": { - "type": "string", - "nullable": true, - "example": "2021-12-22T10:14:45.316Z", - "format": "date-time", - "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." - }, - "customer_id": { - "type": "string", - "nullable": true, - "description": "Unique customer ID of the customer making the purchase.", - "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" - }, - "referrer_id": { - "type": "string", - "nullable": true, - "description": "Unique referrer ID.", - "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" - }, - "customer": { - "title": "RedemptionEntryOrderCustomer", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "A unique identifier of an existing customer.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "customer", - "enum": [ - "customer" - ], - "nullable": true - } - }, - "nullable": true - }, - "referrer": { - "title": "RedemptionEntryOrderReferrer", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "A unique identifier of an existing customer.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "customer", - "enum": [ - "customer" - ], - "nullable": true - } - }, - "nullable": true - }, - "redemptions": { - "title": "RedemptionEntryOrderRedemptionsEntry", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/OrderRedemptionsEntry" - }, - "nullable": true - }, - "items": { - "title": "RedemptionEntryOrderItems", - "type": "array", - "description": "Array of items applied to the order. It can include up to 500 items.", - "items": { - "$ref": "#/components/schemas/OrderCalculatedItem" - }, - "nullable": true - } - }, - "nullable": true + "$ref": "#/components/schemas/OrderCalculated" }, "channel": { "title": "RedemptionEntryChannel", @@ -40400,141 +38121,7 @@ "nullable": true }, "order": { - "title": "RedemptionRollbackOrder", - "nullable": true, - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", - "nullable": true - }, - "source_id": { - "type": "string", - "nullable": true, - "description": "Unique source ID of an existing order that will be linked to the redemption of this request." - }, - "status": { - "type": "string", - "description": "The order status.", - "enum": [ - "CREATED", - "PAID", - "CANCELED", - "FULFILLED" - ], - "nullable": true - }, - "amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "initial_amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "discount_amount": { - "type": "integer", - "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_amount": { - "type": "integer", - "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "applied_discount_amount": { - "type": "integer", - "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_applied_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", - "nullable": true - }, - "total_applied_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", - "nullable": true - }, - "metadata": { - "title": "RedemptionRollbackOrderMetadata", - "type": "object", - "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "order", - "enum": [ - "order" - ], - "nullable": true - }, - "created_at": { - "type": "string", - "example": "2021-12-22T10:13:06.487Z", - "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", - "format": "date-time", - "nullable": true - }, - "updated_at": { - "type": "string", - "nullable": true, - "example": "2021-12-22T10:14:45.316Z", - "format": "date-time", - "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." - }, - "customer_id": { - "type": "string", - "nullable": true, - "description": "Unique customer ID of the customer making the purchase.", - "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" - }, - "referrer_id": { - "type": "string", - "nullable": true, - "description": "Unique referrer ID.", - "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" - }, - "customer": { - "$ref": "#/components/schemas/CustomerId" - }, - "referrer": { - "$ref": "#/components/schemas/ReferrerId" - }, - "redemptions": { - "title": "RedemptionRollbackOrderRedemptionsEntry", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/OrderRedemptionsEntry" - }, - "nullable": true - }, - "items": { - "title": "RedemptionRollbackOrderItems", - "type": "array", - "description": "Array of items applied to the order. It can include up to 500 items.", - "items": { - "$ref": "#/components/schemas/OrderCalculatedItem" - }, - "nullable": true - } - } + "$ref": "#/components/schemas/OrderCalculated" }, "channel": { "title": "RedemptionRollbackChannel", @@ -40613,7 +38200,9 @@ "nullable": true } }, - "required": [] + "required": [ + "order" + ] }, "ReferralProgram": { "title": "ReferralProgram", @@ -43880,194 +41469,7 @@ "$ref": "#/components/schemas/RedeemableResult" }, "order": { - "title": "QualificationsRedeemableOrder", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", - "nullable": true - }, - "source_id": { - "type": "string", - "nullable": true, - "description": "Unique source ID of an existing order that will be linked to the redemption of this request." - }, - "status": { - "type": "string", - "description": "The order status.", - "enum": [ - "CREATED", - "PAID", - "CANCELED", - "FULFILLED" - ], - "nullable": true - }, - "amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "initial_amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "discount_amount": { - "type": "integer", - "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_amount": { - "type": "integer", - "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "applied_discount_amount": { - "type": "integer", - "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_applied_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", - "nullable": true - }, - "total_applied_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", - "nullable": true - }, - "metadata": { - "title": "QualificationsRedeemableOrderMetadata", - "type": "object", - "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "order", - "enum": [ - "order" - ], - "nullable": true - }, - "created_at": { - "type": "string", - "example": "2021-12-22T10:13:06.487Z", - "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", - "format": "date-time", - "nullable": true - }, - "updated_at": { - "type": "string", - "nullable": true, - "example": "2021-12-22T10:14:45.316Z", - "format": "date-time", - "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." - }, - "customer_id": { - "type": "string", - "nullable": true, - "description": "Unique customer ID of the customer making the purchase.", - "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" - }, - "referrer_id": { - "type": "string", - "nullable": true, - "description": "Unique referrer ID.", - "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" - }, - "customer": { - "$ref": "#/components/schemas/CustomerId" - }, - "referrer": { - "$ref": "#/components/schemas/ReferrerId" - }, - "redemptions": { - "title": "QualificationsRedeemableOrderRedemptionsEntry", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/OrderRedemptionsEntry" - }, - "nullable": true - }, - "items": { - "title": "QualificationsRedeemableOrderItems", - "type": "array", - "description": "Array of items applied to the order. It can include up to 500 items.", - "items": { - "title": "QualificationsRedeemableOrderItemsItem", - "allOf": [ - { - "$ref": "#/components/schemas/OrderCalculatedItem" - }, - { - "type": "object", - "properties": { - "application_details": { - "title": "QualificationsRedeemableOrderItemsItemApplicationDetails", - "type": "array", - "description": "Array containing details about the items that are replaced and the items that are replacements for discounts with the `REPLACE_ITEMS` effect.", - "items": { - "title": "QualificationsRedeemableOrderItemsItemApplicationDetailsItem", - "type": "object", - "description": "Object representing item replacement.", - "properties": { - "source_index": { - "type": "integer", - "description": "Index number of the source item that is replaced. The enumeration starts from `0`, which represents the first item in the request, e.g., if the replaced item is passed as the second in the request, `source_index` equals `3`.", - "minimum": 0 - }, - "source_applied_quantity": { - "type": "integer", - "description": "Number of source units that are replaced.", - "maximum": -1 - }, - "source_applied_quantity_amount": { - "type": "integer", - "description": "Amount equal to the price of the units that are replaced. Determines the change of the amount of the source item quantity.", - "maximum": 0 - }, - "target_index": { - "type": "integer", - "description": "Index number of the target item that is a replacement of the source item. The enumeration continues the values for the order items, e.g. if there are three items in the request, `target_index` equals `3`, as enumeration starts from `0`." - }, - "target_applied_quantity": { - "type": "integer", - "description": "Number of added target units that are replacements." - }, - "target_applied_quantity_amount": { - "type": "integer", - "description": "Amount equal to the price of the units that are replacements. Determines the change in the amount of the target item quantity." - }, - "target_applied_discount_amount": { - "type": "integer", - "description": "Discount amount applied to the target item with regard to the replacement. Equals the `target_applied_quantity_amount` minus `source_applied_quantity_amount`." - } - } - } - } - } - } - ] - }, - "nullable": true - } - }, - "nullable": true + "$ref": "#/components/schemas/OrderCalculated" }, "validation_rule_id": { "type": "string", @@ -44858,194 +42260,7 @@ "$ref": "#/components/schemas/RedeemableResult" }, "order": { - "title": "QualificationsRedeemableBaseOrder", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", - "nullable": true - }, - "source_id": { - "type": "string", - "nullable": true, - "description": "Unique source ID of an existing order that will be linked to the redemption of this request." - }, - "status": { - "type": "string", - "description": "The order status.", - "enum": [ - "CREATED", - "PAID", - "CANCELED", - "FULFILLED" - ], - "nullable": true - }, - "amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "initial_amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "discount_amount": { - "type": "integer", - "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_amount": { - "type": "integer", - "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "applied_discount_amount": { - "type": "integer", - "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_applied_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", - "nullable": true - }, - "total_applied_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", - "nullable": true - }, - "metadata": { - "title": "QualificationsRedeemableBaseOrderMetadata", - "type": "object", - "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "order", - "enum": [ - "order" - ], - "nullable": true - }, - "created_at": { - "type": "string", - "example": "2021-12-22T10:13:06.487Z", - "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", - "format": "date-time", - "nullable": true - }, - "updated_at": { - "type": "string", - "nullable": true, - "example": "2021-12-22T10:14:45.316Z", - "format": "date-time", - "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." - }, - "customer_id": { - "type": "string", - "nullable": true, - "description": "Unique customer ID of the customer making the purchase.", - "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" - }, - "referrer_id": { - "type": "string", - "nullable": true, - "description": "Unique referrer ID.", - "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" - }, - "customer": { - "$ref": "#/components/schemas/CustomerId" - }, - "referrer": { - "$ref": "#/components/schemas/ReferrerId" - }, - "redemptions": { - "title": "QualificationsRedeemableBaseOrderRedemptionsEntry", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/OrderRedemptionsEntry" - }, - "nullable": true - }, - "items": { - "title": "QualificationsRedeemableBaseOrderItems", - "type": "array", - "description": "Array of items applied to the order. It can include up to 500 items.", - "items": { - "title": "QualificationsRedeemableBaseOrderItemsItem", - "allOf": [ - { - "$ref": "#/components/schemas/OrderCalculatedItem" - }, - { - "type": "object", - "properties": { - "application_details": { - "title": "QualificationsRedeemableBaseOrderItemsItemApplicationDetails", - "type": "array", - "description": "Array containing details about the items that are replaced and the items that are replacements for discounts with the `REPLACE_ITEMS` effect.", - "items": { - "title": "QualificationsRedeemableBaseOrderItemsItemApplicationDetailsItem", - "type": "object", - "description": "Object representing item replacement.", - "properties": { - "source_index": { - "type": "integer", - "description": "Index number of the source item that is replaced. The enumeration starts from `0`, which represents the first item in the request, e.g., if the replaced item is passed as the second in the request, `source_index` equals `3`.", - "minimum": 0 - }, - "source_applied_quantity": { - "type": "integer", - "description": "Number of source units that are replaced.", - "maximum": -1 - }, - "source_applied_quantity_amount": { - "type": "integer", - "description": "Amount equal to the price of the units that are replaced. Determines the change of the amount of the source item quantity.", - "maximum": 0 - }, - "target_index": { - "type": "integer", - "description": "Index number of the target item that is a replacement of the source item. The enumeration continues the values for the order items, e.g. if there are three items in the request, `target_index` equals `3`, as enumeration starts from `0`." - }, - "target_applied_quantity": { - "type": "integer", - "description": "Number of added target units that are replacements." - }, - "target_applied_quantity_amount": { - "type": "integer", - "description": "Amount equal to the price of the units that are replacements. Determines the change in the amount of the target item quantity." - }, - "target_applied_discount_amount": { - "type": "integer", - "description": "Discount amount applied to the target item with regard to the replacement. Equals the `target_applied_quantity_amount` minus `source_applied_quantity_amount`." - } - } - } - } - } - } - ] - }, - "nullable": true - } - }, - "nullable": true + "$ref": "#/components/schemas/OrderCalculated" }, "validation_rule_id": { "type": "string", diff --git a/reference/readonly-sdks/python/OpenAPI.json b/reference/readonly-sdks/python/OpenAPI.json index 5a6a9655..e6c108b8 100644 --- a/reference/readonly-sdks/python/OpenAPI.json +++ b/reference/readonly-sdks/python/OpenAPI.json @@ -523,6 +523,9 @@ "description": "The metadata object stores all custom attributes assigned to the campaign. A set of key/value pairs that you can attach to a campaign object. It can be useful for storing additional information about the campaign in a structured format.", "nullable": true }, + "access_settings": { + "$ref": "#/components/schemas/AccessSettings" + }, "validation_rules": { "title": "CampaignsCreateRequestBodyValidationRules", "type": "array", @@ -1153,6 +1156,9 @@ "example": "cat_0b688929a2476386a7", "nullable": true }, + "access_settings": { + "$ref": "#/components/schemas/AccessSettings" + }, "activity_duration_after_publishing": { "type": "string", "description": "Defines the amount of time the vouchers will be active after publishing. The value is shown in the ISO 8601 format. For example, a voucher with the value of P24D will be valid for a duration of 24 days.", @@ -2475,151 +2481,7 @@ "nullable": true }, "order": { - "title": "ClientQualificationsCheckEligibilityResponseBodyOrder", - "type": "object", - "nullable": true, - "properties": { - "id": { - "type": "string", - "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", - "nullable": true - }, - "source_id": { - "type": "string", - "nullable": true, - "description": "Unique source ID of an existing order that will be linked to the redemption of this request." - }, - "status": { - "type": "string", - "description": "The order status.", - "enum": [ - "CREATED", - "PAID", - "CANCELED", - "FULFILLED" - ], - "nullable": true - }, - "amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "initial_amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "discount_amount": { - "type": "integer", - "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_amount": { - "type": "integer", - "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "applied_discount_amount": { - "type": "integer", - "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_applied_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", - "nullable": true - }, - "total_applied_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", - "nullable": true - }, - "metadata": { - "title": "ClientQualificationsCheckEligibilityResponseBodyOrderMetadata", - "type": "object", - "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "order", - "enum": [ - "order" - ], - "nullable": true - }, - "created_at": { - "type": "string", - "example": "2021-12-22T10:13:06.487Z", - "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", - "format": "date-time", - "nullable": true - }, - "updated_at": { - "type": "string", - "nullable": true, - "example": "2021-12-22T10:14:45.316Z", - "format": "date-time", - "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." - }, - "customer_id": { - "type": "string", - "nullable": true, - "description": "Unique customer ID of the customer making the purchase.", - "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" - }, - "referrer_id": { - "type": "string", - "nullable": true, - "description": "Unique referrer ID.", - "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" - }, - "customer": { - "$ref": "#/components/schemas/CustomerId" - }, - "referrer": { - "$ref": "#/components/schemas/ReferrerId" - }, - "redemptions": { - "title": "ClientQualificationsCheckEligibilityResponseBodyOrderRedemptions", - "type": "object", - "nullable": true - }, - "items": { - "title": "ClientQualificationsCheckEligibilityResponseBodyOrderItems", - "type": "array", - "description": "Array of items applied to the order. It can include up to 500 items.", - "items": { - "title": "ClientQualificationsCheckEligibilityResponseBodyOrderItemsItem", - "allOf": [ - { - "$ref": "#/components/schemas/OrderCalculatedItem" - }, - { - "type": "object", - "properties": { - "application_details": { - "$ref": "#/components/schemas/ApplicationDetails" - } - } - } - ] - }, - "nullable": true - } - } + "$ref": "#/components/schemas/OrderCalculated" }, "stacking_rules": { "$ref": "#/components/schemas/StackingRules" @@ -2748,152 +2610,7 @@ "$ref": "#/components/schemas/Redemption" }, "order": { - "title": "ClientRedemptionsRedeemResponseBodyOrder", - "description": "Contains the order details associated with the redemption.", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", - "nullable": true - }, - "source_id": { - "type": "string", - "nullable": true, - "description": "Unique source ID of an existing order that will be linked to the redemption of this request." - }, - "status": { - "type": "string", - "description": "The order status.", - "enum": [ - "CREATED", - "PAID", - "CANCELED", - "FULFILLED" - ], - "nullable": true - }, - "amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "initial_amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "discount_amount": { - "type": "integer", - "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_amount": { - "type": "integer", - "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "applied_discount_amount": { - "type": "integer", - "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_applied_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", - "nullable": true - }, - "total_applied_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", - "nullable": true - }, - "metadata": { - "title": "ClientRedemptionsRedeemResponseBodyOrderMetadata", - "type": "object", - "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "order", - "enum": [ - "order" - ], - "nullable": true - }, - "created_at": { - "type": "string", - "example": "2021-12-22T10:13:06.487Z", - "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", - "format": "date-time", - "nullable": true - }, - "updated_at": { - "type": "string", - "nullable": true, - "example": "2021-12-22T10:14:45.316Z", - "format": "date-time", - "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." - }, - "customer_id": { - "type": "string", - "nullable": true, - "description": "Unique customer ID of the customer making the purchase.", - "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" - }, - "referrer_id": { - "type": "string", - "nullable": true, - "description": "Unique referrer ID.", - "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" - }, - "customer": { - "$ref": "#/components/schemas/CustomerId" - }, - "referrer": { - "$ref": "#/components/schemas/ReferrerId" - }, - "redemptions": { - "title": "ClientRedemptionsRedeemResponseBodyOrderRedemptions", - "type": "object", - "nullable": true - }, - "items": { - "title": "ClientRedemptionsRedeemResponseBodyOrderItems", - "type": "array", - "description": "Array of items applied to the order. It can include up to 500 items.", - "items": { - "title": "ClientRedemptionsRedeemResponseBodyOrderItemsItem", - "allOf": [ - { - "$ref": "#/components/schemas/OrderCalculatedItem" - }, - { - "type": "object", - "properties": { - "application_details": { - "$ref": "#/components/schemas/ApplicationDetails" - } - } - } - ] - }, - "nullable": true - } - }, - "nullable": true + "$ref": "#/components/schemas/OrderCalculated" }, "inapplicable_redeemables": { "title": "ClientRedemptionsRedeemResponseBodyInapplicableRedeemables", @@ -3059,173 +2776,7 @@ "nullable": true }, "order": { - "title": "ClientValidationsValidateResponseBodyRedeemablesItemOrder", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", - "nullable": true - }, - "source_id": { - "type": "string", - "nullable": true, - "description": "Unique source ID of an existing order that will be linked to the redemption of this request." - }, - "status": { - "type": "string", - "description": "The order status.", - "enum": [ - "CREATED", - "PAID", - "CANCELED", - "FULFILLED" - ], - "nullable": true - }, - "amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "initial_amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "discount_amount": { - "type": "integer", - "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_amount": { - "type": "integer", - "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "applied_discount_amount": { - "type": "integer", - "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_applied_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", - "nullable": true - }, - "total_applied_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", - "nullable": true - }, - "metadata": { - "title": "ClientValidationsValidateResponseBodyRedeemablesItemOrderMetadata", - "type": "object", - "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "order", - "enum": [ - "order" - ], - "nullable": true - }, - "created_at": { - "type": "string", - "example": "2021-12-22T10:13:06.487Z", - "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", - "format": "date-time", - "nullable": true - }, - "updated_at": { - "type": "string", - "nullable": true, - "example": "2021-12-22T10:14:45.316Z", - "format": "date-time", - "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." - }, - "customer_id": { - "type": "string", - "nullable": true, - "description": "Unique customer ID of the customer making the purchase.", - "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" - }, - "referrer_id": { - "type": "string", - "nullable": true, - "description": "Unique referrer ID.", - "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" - }, - "customer": { - "title": "ClientValidationsValidateResponseBodyRedeemablesItemOrderCustomer", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "A unique identifier of an existing customer.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "customer", - "enum": [ - "customer" - ], - "nullable": true - } - }, - "required": [] - }, - "referrer": { - "title": "ClientValidationsValidateResponseBodyRedeemablesItemOrderReferrer", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "A unique identifier of an existing customer.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "customer", - "enum": [ - "customer" - ], - "nullable": true - } - }, - "required": [] - }, - "redemptions": { - "title": "ClientValidationsValidateResponseBodyRedeemablesItemOrderRedemptions", - "type": "object", - "nullable": true - }, - "items": { - "title": "ClientValidationsValidateResponseBodyRedeemablesItemOrderItems", - "type": "array", - "description": "Array of items applied to the order. It can include up to 500 items.", - "items": { - "$ref": "#/components/schemas/OrderCalculatedItem" - }, - "nullable": true - } - } + "$ref": "#/components/schemas/OrderCalculated" }, "applicable_to": { "$ref": "#/components/schemas/ApplicableToResultList" @@ -3448,151 +2999,7 @@ "nullable": true }, "order": { - "title": "ClientValidationsValidateResponseBodyOrder", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", - "nullable": true - }, - "source_id": { - "type": "string", - "nullable": true, - "description": "Unique source ID of an existing order that will be linked to the redemption of this request." - }, - "status": { - "type": "string", - "description": "The order status.", - "enum": [ - "CREATED", - "PAID", - "CANCELED", - "FULFILLED" - ], - "nullable": true - }, - "amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "initial_amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "discount_amount": { - "type": "integer", - "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_amount": { - "type": "integer", - "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "applied_discount_amount": { - "type": "integer", - "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_applied_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", - "nullable": true - }, - "total_applied_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", - "nullable": true - }, - "metadata": { - "title": "ClientValidationsValidateResponseBodyOrderMetadata", - "type": "object", - "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "order", - "enum": [ - "order" - ], - "nullable": true - }, - "created_at": { - "type": "string", - "example": "2021-12-22T10:13:06.487Z", - "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", - "format": "date-time", - "nullable": true - }, - "updated_at": { - "type": "string", - "nullable": true, - "example": "2021-12-22T10:14:45.316Z", - "format": "date-time", - "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." - }, - "customer_id": { - "type": "string", - "nullable": true, - "description": "Unique customer ID of the customer making the purchase.", - "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" - }, - "referrer_id": { - "type": "string", - "nullable": true, - "description": "Unique referrer ID.", - "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" - }, - "customer": { - "$ref": "#/components/schemas/CustomerId" - }, - "referrer": { - "$ref": "#/components/schemas/ReferrerId" - }, - "redemptions": { - "title": "ClientValidationsValidateResponseBodyOrderRedemptions", - "type": "object", - "nullable": true - }, - "items": { - "title": "ClientValidationsValidateResponseBodyOrderItems", - "type": "array", - "description": "Array of items applied to the order. It can include up to 500 items.", - "items": { - "title": "ClientValidationsValidateResponseBodyOrderItemsItem", - "allOf": [ - { - "$ref": "#/components/schemas/OrderCalculatedItem" - }, - { - "type": "object", - "properties": { - "application_details": { - "$ref": "#/components/schemas/ApplicationDetails" - } - } - } - ] - }, - "nullable": true - } - }, - "nullable": true + "$ref": "#/components/schemas/OrderCalculated" }, "tracking_id": { "type": "string", @@ -5727,6 +5134,9 @@ "description": "The metadata object stores all custom attributes assigned to the campaign. A set of key/value pairs that you can attach to a campaign object. It can be useful for storing additional information about the campaign in a structured format.", "nullable": true }, + "access_settings": { + "$ref": "#/components/schemas/AccessSettings" + }, "validation_rules": { "title": "LoyaltiesCreateCampaignRequestBodyValidationRules", "type": "array", @@ -9981,176 +9391,7 @@ "nullable": true }, "order": { - "title": "LoyaltiesMembersRedemptionRedeemResponseBodyOrder", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", - "nullable": true - }, - "source_id": { - "type": "string", - "nullable": true, - "description": "Unique source ID of an existing order that will be linked to the redemption of this request." - }, - "status": { - "type": "string", - "description": "The order status.", - "enum": [ - "CREATED", - "PAID", - "CANCELED", - "FULFILLED" - ], - "nullable": true - }, - "amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "initial_amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "discount_amount": { - "type": "integer", - "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_amount": { - "type": "integer", - "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "applied_discount_amount": { - "type": "integer", - "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_applied_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", - "nullable": true - }, - "total_applied_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", - "nullable": true - }, - "metadata": { - "title": "LoyaltiesMembersRedemptionRedeemResponseBodyOrderMetadata", - "type": "object", - "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "order", - "enum": [ - "order" - ], - "nullable": true - }, - "created_at": { - "type": "string", - "example": "2021-12-22T10:13:06.487Z", - "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", - "format": "date-time", - "nullable": true - }, - "updated_at": { - "type": "string", - "nullable": true, - "example": "2021-12-22T10:14:45.316Z", - "format": "date-time", - "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." - }, - "customer_id": { - "type": "string", - "nullable": true, - "description": "Unique customer ID of the customer making the purchase.", - "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" - }, - "referrer_id": { - "type": "string", - "nullable": true, - "description": "Unique referrer ID.", - "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" - }, - "customer": { - "title": "LoyaltiesMembersRedemptionRedeemResponseBodyOrderCustomer", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "A unique identifier of an existing customer.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "customer", - "enum": [ - "customer" - ], - "nullable": true - } - }, - "required": [], - "nullable": true - }, - "referrer": { - "title": "LoyaltiesMembersRedemptionRedeemResponseBodyOrderReferrer", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "A unique identifier of an existing customer.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "customer", - "enum": [ - "customer" - ], - "nullable": true - } - }, - "required": [], - "nullable": true - }, - "redemptions": { - "title": "LoyaltiesMembersRedemptionRedeemResponseBodyOrderRedemptions", - "type": "object", - "nullable": true - }, - "items": { - "title": "LoyaltiesMembersRedemptionRedeemResponseBodyOrderItems", - "type": "array", - "description": "Array of items applied to the order. It can include up to 500 items.", - "items": { - "$ref": "#/components/schemas/OrderCalculatedItem" - }, - "nullable": true - } - }, - "nullable": true + "$ref": "#/components/schemas/OrderCalculated" }, "channel": { "title": "LoyaltiesMembersRedemptionRedeemResponseBodyChannel", @@ -11969,6 +11210,9 @@ "example": "cat_0b688929a2476386a7", "nullable": true }, + "access_settings": { + "$ref": "#/components/schemas/AccessSettings" + }, "activity_duration_after_publishing": { "type": "string", "description": "Defines the amount of time the vouchers will be active after publishing. The value is shown in the ISO 8601 format. For example, a voucher with the value of P24D will be valid for a duration of 24 days.", @@ -16768,25 +16012,7 @@ "type": "array", "description": "Contains array of order objects.", "items": { - "title": "OrdersListResponseBodyOrdersItem", - "allOf": [ - { - "$ref": "#/components/schemas/OrderCalculated" - }, - { - "type": "object", - "properties": { - "items": { - "title": "OrdersListResponseBodyOrdersItemItems", - "type": "array", - "description": "Array of items applied to the order. It can include up to 500 items.", - "items": { - "$ref": "#/components/schemas/OrderCalculatedItem" - } - } - } - } - ] + "$ref": "#/components/schemas/OrderCalculated" }, "nullable": true }, @@ -21719,138 +20945,7 @@ "nullable": true }, "order": { - "title": "QualificationsCheckEligibilityResponseBodyOrder", - "type": "object", - "nullable": true, - "properties": { - "id": { - "type": "string", - "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", - "nullable": true - }, - "source_id": { - "type": "string", - "nullable": true, - "description": "Unique source ID of an existing order that will be linked to the redemption of this request." - }, - "status": { - "type": "string", - "description": "The order status.", - "enum": [ - "CREATED", - "PAID", - "CANCELED", - "FULFILLED" - ], - "nullable": true - }, - "amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "initial_amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "discount_amount": { - "type": "integer", - "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_amount": { - "type": "integer", - "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "applied_discount_amount": { - "type": "integer", - "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_applied_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", - "nullable": true - }, - "total_applied_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", - "nullable": true - }, - "metadata": { - "title": "QualificationsCheckEligibilityResponseBodyOrderMetadata", - "type": "object", - "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "order", - "enum": [ - "order" - ], - "nullable": true - }, - "created_at": { - "type": "string", - "example": "2021-12-22T10:13:06.487Z", - "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", - "format": "date-time", - "nullable": true - }, - "updated_at": { - "type": "string", - "nullable": true, - "example": "2021-12-22T10:14:45.316Z", - "format": "date-time", - "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." - }, - "customer_id": { - "type": "string", - "nullable": true, - "description": "Unique customer ID of the customer making the purchase.", - "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" - }, - "referrer_id": { - "type": "string", - "nullable": true, - "description": "Unique referrer ID.", - "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" - }, - "customer": { - "$ref": "#/components/schemas/CustomerId" - }, - "referrer": { - "$ref": "#/components/schemas/ReferrerId" - }, - "redemptions": { - "title": "QualificationsCheckEligibilityResponseBodyOrderRedemptions", - "type": "object", - "nullable": true - }, - "items": { - "title": "QualificationsCheckEligibilityResponseBodyOrderItems", - "type": "array", - "description": "Array of items applied to the order. It can include up to 500 items.", - "items": { - "$ref": "#/components/schemas/OrderCalculatedItem" - }, - "nullable": true - } - } + "$ref": "#/components/schemas/OrderCalculated" }, "stacking_rules": { "$ref": "#/components/schemas/StackingRules" @@ -21987,174 +21082,7 @@ "nullable": true }, "order": { - "title": "RedemptionsGetResponseBodyOrder", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", - "nullable": true - }, - "source_id": { - "type": "string", - "nullable": true, - "description": "Unique source ID of an existing order that will be linked to the redemption of this request." - }, - "status": { - "type": "string", - "description": "The order status.", - "enum": [ - "CREATED", - "PAID", - "CANCELED", - "FULFILLED" - ], - "nullable": true - }, - "amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "initial_amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "discount_amount": { - "type": "integer", - "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_amount": { - "type": "integer", - "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "applied_discount_amount": { - "type": "integer", - "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_applied_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", - "nullable": true - }, - "total_applied_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", - "nullable": true - }, - "metadata": { - "title": "RedemptionsGetResponseBodyOrderMetadata", - "type": "object", - "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "order", - "enum": [ - "order" - ], - "nullable": true - }, - "created_at": { - "type": "string", - "example": "2021-12-22T10:13:06.487Z", - "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", - "format": "date-time", - "nullable": true - }, - "updated_at": { - "type": "string", - "nullable": true, - "example": "2021-12-22T10:14:45.316Z", - "format": "date-time", - "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." - }, - "customer_id": { - "type": "string", - "nullable": true, - "description": "Unique customer ID of the customer making the purchase.", - "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" - }, - "referrer_id": { - "type": "string", - "nullable": true, - "description": "Unique referrer ID.", - "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" - }, - "customer": { - "title": "RedemptionsGetResponseBodyOrderCustomer", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "A unique identifier of an existing customer.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "customer", - "enum": [ - "customer" - ], - "nullable": true - } - }, - "nullable": true - }, - "referrer": { - "title": "RedemptionsGetResponseBodyOrderReferrer", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "A unique identifier of an existing customer.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "customer", - "enum": [ - "customer" - ], - "nullable": true - } - }, - "nullable": true - }, - "redemptions": { - "title": "RedemptionsGetResponseBodyOrderRedemptions", - "type": "object", - "nullable": true - }, - "items": { - "title": "RedemptionsGetResponseBodyOrderItems", - "type": "array", - "description": "Array of items applied to the order. It can include up to 500 items.", - "items": { - "$ref": "#/components/schemas/OrderCalculatedItem" - }, - "nullable": true - } - }, - "nullable": true + "$ref": "#/components/schemas/OrderCalculated" }, "channel": { "title": "RedemptionsGetResponseBodyChannel", @@ -22886,171 +21814,7 @@ "nullable": true }, "order": { - "title": "RedemptionsListResponseBodyRedemptionsItemOrder", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", - "nullable": true - }, - "source_id": { - "type": "string", - "nullable": true, - "description": "Unique source ID of an existing order that will be linked to the redemption of this request." - }, - "status": { - "type": "string", - "description": "The order status.", - "enum": [ - "CREATED", - "PAID", - "CANCELED", - "FULFILLED" - ], - "nullable": true - }, - "amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "initial_amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "discount_amount": { - "type": "integer", - "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_amount": { - "type": "integer", - "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "applied_discount_amount": { - "type": "integer", - "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_applied_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", - "nullable": true - }, - "total_applied_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", - "nullable": true - }, - "metadata": { - "title": "RedemptionsListResponseBodyRedemptionsItemOrderMetadata", - "type": "object", - "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "order", - "enum": [ - "order" - ], - "nullable": true - }, - "created_at": { - "type": "string", - "example": "2021-12-22T10:13:06.487Z", - "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", - "format": "date-time", - "nullable": true - }, - "updated_at": { - "type": "string", - "nullable": true, - "example": "2021-12-22T10:14:45.316Z", - "format": "date-time", - "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." - }, - "customer_id": { - "type": "string", - "nullable": true, - "description": "Unique customer ID of the customer making the purchase.", - "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" - }, - "referrer_id": { - "type": "string", - "nullable": true, - "description": "Unique referrer ID.", - "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" - }, - "customer": { - "title": "RedemptionsListResponseBodyRedemptionsItemOrderCustomer", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "A unique identifier of an existing customer.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "customer", - "enum": [ - "customer" - ], - "nullable": true - } - } - }, - "referrer": { - "title": "RedemptionsListResponseBodyRedemptionsItemOrderReferrer", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "A unique identifier of an existing customer.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "customer", - "enum": [ - "customer" - ], - "nullable": true - } - } - }, - "redemptions": { - "title": "RedemptionsListResponseBodyRedemptionsItemOrderRedemptions", - "type": "object", - "nullable": true - }, - "items": { - "title": "RedemptionsListResponseBodyRedemptionsItemOrderItems", - "type": "array", - "description": "Array of items applied to the order. It can include up to 500 items.", - "items": { - "$ref": "#/components/schemas/OrderCalculatedItem" - }, - "nullable": true - } - } + "$ref": "#/components/schemas/OrderCalculated" }, "channel": { "title": "RedemptionsListResponseBodyRedemptionsItemChannel", @@ -23750,152 +22514,7 @@ "$ref": "#/components/schemas/Redemption" }, "order": { - "title": "RedemptionsRedeemResponseBodyOrder", - "description": "Contains the order details associated with the redemption.", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", - "nullable": true - }, - "source_id": { - "type": "string", - "nullable": true, - "description": "Unique source ID of an existing order that will be linked to the redemption of this request." - }, - "status": { - "type": "string", - "description": "The order status.", - "enum": [ - "CREATED", - "PAID", - "CANCELED", - "FULFILLED" - ], - "nullable": true - }, - "amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "initial_amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "discount_amount": { - "type": "integer", - "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_amount": { - "type": "integer", - "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "applied_discount_amount": { - "type": "integer", - "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_applied_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", - "nullable": true - }, - "total_applied_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", - "nullable": true - }, - "metadata": { - "title": "RedemptionsRedeemResponseBodyOrderMetadata", - "type": "object", - "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "order", - "enum": [ - "order" - ], - "nullable": true - }, - "created_at": { - "type": "string", - "example": "2021-12-22T10:13:06.487Z", - "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", - "format": "date-time", - "nullable": true - }, - "updated_at": { - "type": "string", - "nullable": true, - "example": "2021-12-22T10:14:45.316Z", - "format": "date-time", - "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." - }, - "customer_id": { - "type": "string", - "nullable": true, - "description": "Unique customer ID of the customer making the purchase.", - "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" - }, - "referrer_id": { - "type": "string", - "nullable": true, - "description": "Unique referrer ID.", - "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" - }, - "customer": { - "$ref": "#/components/schemas/CustomerId" - }, - "referrer": { - "$ref": "#/components/schemas/ReferrerId" - }, - "redemptions": { - "title": "RedemptionsRedeemResponseBodyOrderRedemptions", - "type": "object", - "nullable": true - }, - "items": { - "title": "RedemptionsRedeemResponseBodyOrderItems", - "type": "array", - "description": "Array of items applied to the order. It can include up to 500 items.", - "items": { - "title": "RedemptionsRedeemResponseBodyOrderItemsItem", - "allOf": [ - { - "$ref": "#/components/schemas/OrderCalculatedItem" - }, - { - "type": "object", - "properties": { - "application_details": { - "$ref": "#/components/schemas/ApplicationDetails" - } - } - } - ] - }, - "nullable": true - } - }, - "nullable": true + "$ref": "#/components/schemas/OrderCalculated" }, "inapplicable_redeemables": { "title": "RedemptionsRedeemResponseBodyInapplicableRedeemables", @@ -24087,138 +22706,7 @@ "nullable": true }, "order": { - "title": "RedemptionsRollbackCreateResponseBodyOrder", - "nullable": true, - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", - "nullable": true - }, - "source_id": { - "type": "string", - "nullable": true, - "description": "Unique source ID of an existing order that will be linked to the redemption of this request." - }, - "status": { - "type": "string", - "description": "The order status.", - "enum": [ - "CREATED", - "PAID", - "CANCELED", - "FULFILLED" - ], - "nullable": true - }, - "amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "initial_amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "discount_amount": { - "type": "integer", - "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_amount": { - "type": "integer", - "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "applied_discount_amount": { - "type": "integer", - "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_applied_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", - "nullable": true - }, - "total_applied_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", - "nullable": true - }, - "metadata": { - "title": "RedemptionsRollbackCreateResponseBodyOrderMetadata", - "type": "object", - "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "order", - "enum": [ - "order" - ], - "nullable": true - }, - "created_at": { - "type": "string", - "example": "2021-12-22T10:13:06.487Z", - "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", - "format": "date-time", - "nullable": true - }, - "updated_at": { - "type": "string", - "nullable": true, - "example": "2021-12-22T10:14:45.316Z", - "format": "date-time", - "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." - }, - "customer_id": { - "type": "string", - "nullable": true, - "description": "Unique customer ID of the customer making the purchase.", - "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" - }, - "referrer_id": { - "type": "string", - "nullable": true, - "description": "Unique referrer ID.", - "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" - }, - "customer": { - "$ref": "#/components/schemas/CustomerId" - }, - "referrer": { - "$ref": "#/components/schemas/ReferrerId" - }, - "redemptions": { - "title": "RedemptionsRollbackCreateResponseBodyOrderRedemptions", - "type": "object", - "nullable": true - }, - "items": { - "title": "RedemptionsRollbackCreateResponseBodyOrderItems", - "type": "array", - "description": "Array of items applied to the order. It can include up to 500 items.", - "items": { - "$ref": "#/components/schemas/OrderCalculatedItem" - }, - "nullable": true - } - } + "$ref": "#/components/schemas/OrderCalculated" }, "channel": { "title": "RedemptionsRollbackCreateResponseBodyChannel", @@ -24297,7 +22785,9 @@ "nullable": true } }, - "required": [], + "required": [ + "order" + ], "description": "Response body schema for **POST** `v1/redemptions/{redemptionId}/rollback`." }, "RedemptionsRollbacksCreateRequestBody": { @@ -25673,6 +24163,9 @@ "description": "The metadata object stores all custom attributes assigned to the campaign. A set of key/value pairs that you can attach to a campaign object. It can be useful for storing additional information about the campaign in a structured format.", "nullable": true }, + "access_settings": { + "$ref": "#/components/schemas/AccessSettings" + }, "voucher": { "title": "TemplatesCampaignsCampaignSetupCreateRequestBodyVoucher", "type": "object", @@ -27245,173 +25738,7 @@ "nullable": true }, "order": { - "title": "ValidationsValidateResponseBodyRedeemablesItemOrder", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", - "nullable": true - }, - "source_id": { - "type": "string", - "nullable": true, - "description": "Unique source ID of an existing order that will be linked to the redemption of this request." - }, - "status": { - "type": "string", - "description": "The order status.", - "enum": [ - "CREATED", - "PAID", - "CANCELED", - "FULFILLED" - ], - "nullable": true - }, - "amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "initial_amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "discount_amount": { - "type": "integer", - "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_amount": { - "type": "integer", - "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "applied_discount_amount": { - "type": "integer", - "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_applied_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", - "nullable": true - }, - "total_applied_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", - "nullable": true - }, - "metadata": { - "title": "ValidationsValidateResponseBodyRedeemablesItemOrderMetadata", - "type": "object", - "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "order", - "enum": [ - "order" - ], - "nullable": true - }, - "created_at": { - "type": "string", - "example": "2021-12-22T10:13:06.487Z", - "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", - "format": "date-time", - "nullable": true - }, - "updated_at": { - "type": "string", - "nullable": true, - "example": "2021-12-22T10:14:45.316Z", - "format": "date-time", - "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." - }, - "customer_id": { - "type": "string", - "nullable": true, - "description": "Unique customer ID of the customer making the purchase.", - "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" - }, - "referrer_id": { - "type": "string", - "nullable": true, - "description": "Unique referrer ID.", - "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" - }, - "customer": { - "title": "ValidationsValidateResponseBodyRedeemablesItemOrderCustomer", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "A unique identifier of an existing customer.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "customer", - "enum": [ - "customer" - ], - "nullable": true - } - }, - "required": [] - }, - "referrer": { - "title": "ValidationsValidateResponseBodyRedeemablesItemOrderReferrer", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "A unique identifier of an existing customer.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "customer", - "enum": [ - "customer" - ], - "nullable": true - } - }, - "required": [] - }, - "redemptions": { - "title": "ValidationsValidateResponseBodyRedeemablesItemOrderRedemptions", - "type": "object", - "nullable": true - }, - "items": { - "title": "ValidationsValidateResponseBodyRedeemablesItemOrderItems", - "type": "array", - "description": "Array of items applied to the order. It can include up to 500 items.", - "items": { - "$ref": "#/components/schemas/OrderCalculatedItem" - }, - "nullable": true - } - } + "$ref": "#/components/schemas/OrderCalculated" }, "applicable_to": { "$ref": "#/components/schemas/ApplicableToResultList" @@ -27634,151 +25961,7 @@ "nullable": true }, "order": { - "title": "ValidationsValidateResponseBodyOrder", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", - "nullable": true - }, - "source_id": { - "type": "string", - "nullable": true, - "description": "Unique source ID of an existing order that will be linked to the redemption of this request." - }, - "status": { - "type": "string", - "description": "The order status.", - "enum": [ - "CREATED", - "PAID", - "CANCELED", - "FULFILLED" - ], - "nullable": true - }, - "amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "initial_amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "discount_amount": { - "type": "integer", - "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_amount": { - "type": "integer", - "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "applied_discount_amount": { - "type": "integer", - "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_applied_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", - "nullable": true - }, - "total_applied_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", - "nullable": true - }, - "metadata": { - "title": "ValidationsValidateResponseBodyOrderMetadata", - "type": "object", - "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "order", - "enum": [ - "order" - ], - "nullable": true - }, - "created_at": { - "type": "string", - "example": "2021-12-22T10:13:06.487Z", - "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", - "format": "date-time", - "nullable": true - }, - "updated_at": { - "type": "string", - "nullable": true, - "example": "2021-12-22T10:14:45.316Z", - "format": "date-time", - "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." - }, - "customer_id": { - "type": "string", - "nullable": true, - "description": "Unique customer ID of the customer making the purchase.", - "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" - }, - "referrer_id": { - "type": "string", - "nullable": true, - "description": "Unique referrer ID.", - "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" - }, - "customer": { - "$ref": "#/components/schemas/CustomerId" - }, - "referrer": { - "$ref": "#/components/schemas/ReferrerId" - }, - "redemptions": { - "title": "ValidationsValidateResponseBodyOrderRedemptions", - "type": "object", - "nullable": true - }, - "items": { - "title": "ValidationsValidateResponseBodyOrderItems", - "type": "array", - "description": "Array of items applied to the order. It can include up to 500 items.", - "items": { - "title": "ValidationsValidateResponseBodyOrderItemsItem", - "allOf": [ - { - "$ref": "#/components/schemas/OrderCalculatedItem" - }, - { - "type": "object", - "properties": { - "application_details": { - "$ref": "#/components/schemas/ApplicationDetails" - } - } - } - ] - }, - "nullable": true - } - }, - "nullable": true + "$ref": "#/components/schemas/OrderCalculated" }, "tracking_id": { "type": "string", @@ -29962,6 +28145,69 @@ "type": "string", "format": "hostname" }, + "AccessSettings": { + "title": "AccessSettings", + "type": "object", + "description": "Assigns or unassigns an area or store to the campaign.\n\n**NOTE**: this object can be sent if the Areas and Stores enterprise feature is enabled. Contact [Voucherify Sales](https://www.voucherify.io/contact-sales) to learn more.", + "properties": { + "assign": { + "title": "AccessSettingsAssign", + "type": "object", + "description": "Assigns the campaign to an area or a store. Provide the area and/or store IDs in the respective arrays. If a campaign changes assignments between areas or stores, unassign it from the area. For example, if a campaign is assigned to Area-01, but it must be now assigned to Store-01 within this area, you have to unassign the campaign from Area-01 and assign to Store-01 only.\n\nIf you want to assign the campaign to stores only, you do not have to send the area ID.", + "properties": { + "areas_ids": { + "title": "AccessSettingsAssignAreasIds", + "type": "array", + "description": "List all area IDs to which the campaign will be assigned.", + "items": { + "title": "AccessSettingsAssignAreasIdsItem", + "type": "string" + }, + "nullable": true + }, + "area_stores_ids": { + "title": "AccessSettingsAssignAreaStoresIds", + "type": "array", + "description": "List all store IDs to which the campaign will be assigned.", + "items": { + "title": "AccessSettingsAssignAreaStoresIdsItem", + "type": "string" + }, + "nullable": true + } + }, + "nullable": true + }, + "unassign": { + "title": "AccessSettingsUnassign", + "type": "object", + "description": "Unassigns the campaign from an area or a store. Provide the area and/or store IDs in the respective arrays. If a campaign changes assignments between areas or stores, unassign it first. For example, if a campaign is assigned to Area-01, but it must be now assigned to Store-01 within this area, you have to unassign the campaign from Area-01 and assigned to Store-01 only.\n\nIf you want to assign the campaign to stores only, you do not have to send the area ID.", + "properties": { + "areas_ids": { + "title": "AccessSettingsUnassignAreasIds", + "type": "array", + "description": "List all area IDs from which the campaign will be unassigned.", + "items": { + "title": "AccessSettingsUnassignAreasIdsItem", + "type": "string" + }, + "nullable": true + }, + "area_stores_ids": { + "title": "AccessSettingsUnassignAreaStoresIds", + "type": "array", + "description": "List all store IDs to which the campaign will be unassigned.", + "items": { + "title": "AccessSettingsUnassignAreaStoresIdsItem", + "type": "string" + }, + "nullable": true + } + }, + "nullable": true + } + } + }, "AccessSettingsCampaignAssignmentsList": { "title": "AccessSettingsCampaignAssignmentsList", "type": "object", @@ -30169,49 +28415,6 @@ }, "required": [] }, - "ApplicationDetails": { - "title": "ApplicationDetails", - "type": "array", - "description": "Array containing details about the items that are replaced and the items that are replacements for discounts with the `REPLACE_ITEMS` effect.", - "items": { - "title": "ApplicationDetailsItem", - "type": "object", - "description": "Object representing item replacement.", - "properties": { - "source_index": { - "type": "integer", - "description": "Index number of the source item that is replaced. The enumeration starts from `0`, which represents the first item in the request, e.g., if the replaced item is passed as the second in the request, `source_index` equals `3`.", - "minimum": 0 - }, - "source_applied_quantity": { - "type": "integer", - "description": "Number of source units that are replaced.", - "maximum": -1 - }, - "source_applied_quantity_amount": { - "type": "integer", - "description": "Amount equal to the price of the units that are replaced. Determines the change of the amount of the source item quantity.", - "maximum": 0 - }, - "target_index": { - "type": "integer", - "description": "Index number of the target item that is a replacement of the source item. The enumeration continues the values for the order items, e.g. if there are three items in the request, `target_index` equals `3`, as enumeration starts from `0`." - }, - "target_applied_quantity": { - "type": "integer", - "description": "Number of added target units that are replacements." - }, - "target_applied_quantity_amount": { - "type": "integer", - "description": "Amount equal to the price of the units that are replacements. Determines the change in the amount of the target item quantity." - }, - "target_applied_discount_amount": { - "type": "integer", - "description": "Discount amount applied to the target item with regard to the replacement. Equals the `target_applied_quantity_amount` minus `source_applied_quantity_amount`." - } - } - } - }, "AsyncActionBase": { "title": "AsyncActionBase", "type": "object", @@ -35170,6 +33373,15 @@ "title": "OrderCalculatedRedemptions", "type": "object", "nullable": true + }, + "items": { + "title": "OrderCalculatedItems", + "type": "array", + "description": "Array of items applied to the order. It can include up 500 items.", + "items": { + "$ref": "#/components/schemas/OrderCalculatedItem" + }, + "nullable": true } } }, @@ -35358,6 +33570,9 @@ "type": "object", "description": "A set of custom key/value pairs that you can attach to an item object. It can be useful for storing additional information about the item in a structured format. It can be used to define business validation rules or discount formulas.", "nullable": true + }, + "application_details": { + "$ref": "#/components/schemas/ApplicationDetails" } }, "required": [] @@ -36743,176 +34958,7 @@ "nullable": true }, "order": { - "title": "RedemptionOrder", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", - "nullable": true - }, - "source_id": { - "type": "string", - "nullable": true, - "description": "Unique source ID of an existing order that will be linked to the redemption of this request." - }, - "status": { - "type": "string", - "description": "The order status.", - "enum": [ - "CREATED", - "PAID", - "CANCELED", - "FULFILLED" - ], - "nullable": true - }, - "amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "initial_amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "discount_amount": { - "type": "integer", - "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_amount": { - "type": "integer", - "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "applied_discount_amount": { - "type": "integer", - "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_applied_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", - "nullable": true - }, - "total_applied_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", - "nullable": true - }, - "metadata": { - "title": "RedemptionOrderMetadata", - "type": "object", - "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "order", - "enum": [ - "order" - ], - "nullable": true - }, - "created_at": { - "type": "string", - "example": "2021-12-22T10:13:06.487Z", - "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", - "format": "date-time", - "nullable": true - }, - "updated_at": { - "type": "string", - "nullable": true, - "example": "2021-12-22T10:14:45.316Z", - "format": "date-time", - "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." - }, - "customer_id": { - "type": "string", - "nullable": true, - "description": "Unique customer ID of the customer making the purchase.", - "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" - }, - "referrer_id": { - "type": "string", - "nullable": true, - "description": "Unique referrer ID.", - "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" - }, - "customer": { - "title": "RedemptionOrderCustomer", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "A unique identifier of an existing customer.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "customer", - "enum": [ - "customer" - ], - "nullable": true - } - }, - "required": [], - "nullable": true - }, - "referrer": { - "title": "RedemptionOrderReferrer", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "A unique identifier of an existing customer.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "customer", - "enum": [ - "customer" - ], - "nullable": true - } - }, - "required": [], - "nullable": true - }, - "redemptions": { - "title": "RedemptionOrderRedemptions", - "type": "object", - "nullable": true - }, - "items": { - "title": "RedemptionOrderItems", - "type": "array", - "description": "Array of items applied to the order. It can include up to 500 items.", - "items": { - "$ref": "#/components/schemas/OrderCalculatedItem" - }, - "nullable": true - } - }, - "nullable": true + "$ref": "#/components/schemas/OrderCalculated" }, "channel": { "title": "RedemptionChannel", @@ -37395,174 +35441,7 @@ "nullable": true }, "order": { - "title": "RedemptionEntryOrder", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", - "nullable": true - }, - "source_id": { - "type": "string", - "nullable": true, - "description": "Unique source ID of an existing order that will be linked to the redemption of this request." - }, - "status": { - "type": "string", - "description": "The order status.", - "enum": [ - "CREATED", - "PAID", - "CANCELED", - "FULFILLED" - ], - "nullable": true - }, - "amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "initial_amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "discount_amount": { - "type": "integer", - "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_amount": { - "type": "integer", - "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "applied_discount_amount": { - "type": "integer", - "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_applied_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", - "nullable": true - }, - "total_applied_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", - "nullable": true - }, - "metadata": { - "title": "RedemptionEntryOrderMetadata", - "type": "object", - "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "order", - "enum": [ - "order" - ], - "nullable": true - }, - "created_at": { - "type": "string", - "example": "2021-12-22T10:13:06.487Z", - "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", - "format": "date-time", - "nullable": true - }, - "updated_at": { - "type": "string", - "nullable": true, - "example": "2021-12-22T10:14:45.316Z", - "format": "date-time", - "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." - }, - "customer_id": { - "type": "string", - "nullable": true, - "description": "Unique customer ID of the customer making the purchase.", - "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" - }, - "referrer_id": { - "type": "string", - "nullable": true, - "description": "Unique referrer ID.", - "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" - }, - "customer": { - "title": "RedemptionEntryOrderCustomer", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "A unique identifier of an existing customer.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "customer", - "enum": [ - "customer" - ], - "nullable": true - } - }, - "nullable": true - }, - "referrer": { - "title": "RedemptionEntryOrderReferrer", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "A unique identifier of an existing customer.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "customer", - "enum": [ - "customer" - ], - "nullable": true - } - }, - "nullable": true - }, - "redemptions": { - "title": "RedemptionEntryOrderRedemptions", - "type": "object", - "nullable": true - }, - "items": { - "title": "RedemptionEntryOrderItems", - "type": "array", - "description": "Array of items applied to the order. It can include up to 500 items.", - "items": { - "$ref": "#/components/schemas/OrderCalculatedItem" - }, - "nullable": true - } - }, - "nullable": true + "$ref": "#/components/schemas/OrderCalculated" }, "channel": { "title": "RedemptionEntryChannel", @@ -38444,138 +36323,7 @@ "nullable": true }, "order": { - "title": "RedemptionRollbackOrder", - "nullable": true, - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", - "nullable": true - }, - "source_id": { - "type": "string", - "nullable": true, - "description": "Unique source ID of an existing order that will be linked to the redemption of this request." - }, - "status": { - "type": "string", - "description": "The order status.", - "enum": [ - "CREATED", - "PAID", - "CANCELED", - "FULFILLED" - ], - "nullable": true - }, - "amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "initial_amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "discount_amount": { - "type": "integer", - "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_amount": { - "type": "integer", - "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "applied_discount_amount": { - "type": "integer", - "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_applied_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", - "nullable": true - }, - "total_applied_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", - "nullable": true - }, - "metadata": { - "title": "RedemptionRollbackOrderMetadata", - "type": "object", - "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "order", - "enum": [ - "order" - ], - "nullable": true - }, - "created_at": { - "type": "string", - "example": "2021-12-22T10:13:06.487Z", - "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", - "format": "date-time", - "nullable": true - }, - "updated_at": { - "type": "string", - "nullable": true, - "example": "2021-12-22T10:14:45.316Z", - "format": "date-time", - "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." - }, - "customer_id": { - "type": "string", - "nullable": true, - "description": "Unique customer ID of the customer making the purchase.", - "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" - }, - "referrer_id": { - "type": "string", - "nullable": true, - "description": "Unique referrer ID.", - "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" - }, - "customer": { - "$ref": "#/components/schemas/CustomerId" - }, - "referrer": { - "$ref": "#/components/schemas/ReferrerId" - }, - "redemptions": { - "title": "RedemptionRollbackOrderRedemptions", - "type": "object", - "nullable": true - }, - "items": { - "title": "RedemptionRollbackOrderItems", - "type": "array", - "description": "Array of items applied to the order. It can include up to 500 items.", - "items": { - "$ref": "#/components/schemas/OrderCalculatedItem" - }, - "nullable": true - } - } + "$ref": "#/components/schemas/OrderCalculated" }, "channel": { "title": "RedemptionRollbackChannel", @@ -38654,7 +36402,9 @@ "nullable": true } }, - "required": [] + "required": [ + "order" + ] }, "ReferralProgram": { "title": "ReferralProgram", @@ -41284,6 +39034,49 @@ "APPLY_FROM_MOST_EXPENSIVE" ] }, + "ApplicationDetails": { + "title": "ApplicationDetails", + "type": "array", + "description": "Array containing details about the items that are replaced and the items that are replacements for discounts with the `REPLACE_ITEMS` effect.", + "items": { + "title": "ApplicationDetailsItem", + "type": "object", + "description": "Object representing item replacement.", + "properties": { + "source_index": { + "type": "integer", + "description": "Index number of the source item that is replaced. The enumeration starts from `0`, which represents the first item in the request, e.g., if the replaced item is passed as the second in the request, `source_index` equals `3`.", + "minimum": 0 + }, + "source_applied_quantity": { + "type": "integer", + "description": "Number of source units that are replaced.", + "maximum": -1 + }, + "source_applied_quantity_amount": { + "type": "integer", + "description": "Amount equal to the price of the units that are replaced. Determines the change of the amount of the source item quantity.", + "maximum": 0 + }, + "target_index": { + "type": "integer", + "description": "Index number of the target item that is a replacement of the source item. The enumeration continues the values for the order items, e.g. if there are three items in the request, `target_index` equals `3`, as enumeration starts from `0`." + }, + "target_applied_quantity": { + "type": "integer", + "description": "Number of added target units that are replacements." + }, + "target_applied_quantity_amount": { + "type": "integer", + "description": "Amount equal to the price of the units that are replacements. Determines the change in the amount of the target item quantity." + }, + "target_applied_discount_amount": { + "type": "integer", + "description": "Discount amount applied to the target item with regard to the replacement. Equals the `target_applied_quantity_amount` minus `source_applied_quantity_amount`." + } + } + } + }, "AreaStoreCampaignAssignment": { "title": "AreaStoreCampaignAssignment", "type": "object", @@ -41912,151 +39705,7 @@ "$ref": "#/components/schemas/RedeemableResult" }, "order": { - "title": "QualificationsRedeemableOrder", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", - "nullable": true - }, - "source_id": { - "type": "string", - "nullable": true, - "description": "Unique source ID of an existing order that will be linked to the redemption of this request." - }, - "status": { - "type": "string", - "description": "The order status.", - "enum": [ - "CREATED", - "PAID", - "CANCELED", - "FULFILLED" - ], - "nullable": true - }, - "amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "initial_amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "discount_amount": { - "type": "integer", - "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_amount": { - "type": "integer", - "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "applied_discount_amount": { - "type": "integer", - "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_applied_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", - "nullable": true - }, - "total_applied_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", - "nullable": true - }, - "metadata": { - "title": "QualificationsRedeemableOrderMetadata", - "type": "object", - "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "order", - "enum": [ - "order" - ], - "nullable": true - }, - "created_at": { - "type": "string", - "example": "2021-12-22T10:13:06.487Z", - "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", - "format": "date-time", - "nullable": true - }, - "updated_at": { - "type": "string", - "nullable": true, - "example": "2021-12-22T10:14:45.316Z", - "format": "date-time", - "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." - }, - "customer_id": { - "type": "string", - "nullable": true, - "description": "Unique customer ID of the customer making the purchase.", - "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" - }, - "referrer_id": { - "type": "string", - "nullable": true, - "description": "Unique referrer ID.", - "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" - }, - "customer": { - "$ref": "#/components/schemas/CustomerId" - }, - "referrer": { - "$ref": "#/components/schemas/ReferrerId" - }, - "redemptions": { - "title": "QualificationsRedeemableOrderRedemptions", - "type": "object", - "nullable": true - }, - "items": { - "title": "QualificationsRedeemableOrderItems", - "type": "array", - "description": "Array of items applied to the order. It can include up to 500 items.", - "items": { - "title": "QualificationsRedeemableOrderItemsItem", - "allOf": [ - { - "$ref": "#/components/schemas/OrderCalculatedItem" - }, - { - "type": "object", - "properties": { - "application_details": { - "$ref": "#/components/schemas/ApplicationDetails" - } - } - } - ] - }, - "nullable": true - } - }, - "nullable": true + "$ref": "#/components/schemas/OrderCalculated" }, "validation_rule_id": { "type": "string", @@ -42841,151 +40490,7 @@ "$ref": "#/components/schemas/RedeemableResult" }, "order": { - "title": "QualificationsRedeemableBaseOrder", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", - "nullable": true - }, - "source_id": { - "type": "string", - "nullable": true, - "description": "Unique source ID of an existing order that will be linked to the redemption of this request." - }, - "status": { - "type": "string", - "description": "The order status.", - "enum": [ - "CREATED", - "PAID", - "CANCELED", - "FULFILLED" - ], - "nullable": true - }, - "amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "initial_amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "discount_amount": { - "type": "integer", - "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_amount": { - "type": "integer", - "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "applied_discount_amount": { - "type": "integer", - "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_applied_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", - "nullable": true - }, - "total_applied_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", - "nullable": true - }, - "metadata": { - "title": "QualificationsRedeemableBaseOrderMetadata", - "type": "object", - "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "order", - "enum": [ - "order" - ], - "nullable": true - }, - "created_at": { - "type": "string", - "example": "2021-12-22T10:13:06.487Z", - "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", - "format": "date-time", - "nullable": true - }, - "updated_at": { - "type": "string", - "nullable": true, - "example": "2021-12-22T10:14:45.316Z", - "format": "date-time", - "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." - }, - "customer_id": { - "type": "string", - "nullable": true, - "description": "Unique customer ID of the customer making the purchase.", - "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" - }, - "referrer_id": { - "type": "string", - "nullable": true, - "description": "Unique referrer ID.", - "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" - }, - "customer": { - "$ref": "#/components/schemas/CustomerId" - }, - "referrer": { - "$ref": "#/components/schemas/ReferrerId" - }, - "redemptions": { - "title": "QualificationsRedeemableBaseOrderRedemptions", - "type": "object", - "nullable": true - }, - "items": { - "title": "QualificationsRedeemableBaseOrderItems", - "type": "array", - "description": "Array of items applied to the order. It can include up to 500 items.", - "items": { - "title": "QualificationsRedeemableBaseOrderItemsItem", - "allOf": [ - { - "$ref": "#/components/schemas/OrderCalculatedItem" - }, - { - "type": "object", - "properties": { - "application_details": { - "$ref": "#/components/schemas/ApplicationDetails" - } - } - } - ] - }, - "nullable": true - } - }, - "nullable": true + "$ref": "#/components/schemas/OrderCalculated" }, "validation_rule_id": { "type": "string", diff --git a/reference/readonly-sdks/ruby/OpenAPI.json b/reference/readonly-sdks/ruby/OpenAPI.json index 3db0181a..e6611b0e 100644 --- a/reference/readonly-sdks/ruby/OpenAPI.json +++ b/reference/readonly-sdks/ruby/OpenAPI.json @@ -523,6 +523,9 @@ "description": "The metadata object stores all custom attributes assigned to the campaign. A set of key/value pairs that you can attach to a campaign object. It can be useful for storing additional information about the campaign in a structured format.", "nullable": true }, + "access_settings": { + "$ref": "#/components/schemas/AccessSettings" + }, "validation_rules": { "title": "CampaignsCreateRequestBodyValidationRules", "type": "array", @@ -1153,6 +1156,9 @@ "example": "cat_0b688929a2476386a7", "nullable": true }, + "access_settings": { + "$ref": "#/components/schemas/AccessSettings" + }, "activity_duration_after_publishing": { "type": "string", "description": "Defines the amount of time the vouchers will be active after publishing. The value is shown in the ISO 8601 format. For example, a voucher with the value of P24D will be valid for a duration of 24 days.", @@ -2475,154 +2481,7 @@ "nullable": true }, "order": { - "title": "ClientQualificationsCheckEligibilityResponseBodyOrder", - "type": "object", - "nullable": true, - "properties": { - "id": { - "type": "string", - "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", - "nullable": true - }, - "source_id": { - "type": "string", - "nullable": true, - "description": "Unique source ID of an existing order that will be linked to the redemption of this request." - }, - "status": { - "type": "string", - "description": "The order status.", - "enum": [ - "CREATED", - "PAID", - "CANCELED", - "FULFILLED" - ], - "nullable": true - }, - "amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "initial_amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "discount_amount": { - "type": "integer", - "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_amount": { - "type": "integer", - "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "applied_discount_amount": { - "type": "integer", - "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_applied_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", - "nullable": true - }, - "total_applied_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", - "nullable": true - }, - "metadata": { - "title": "ClientQualificationsCheckEligibilityResponseBodyOrderMetadata", - "type": "object", - "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "order", - "enum": [ - "order" - ], - "nullable": true - }, - "created_at": { - "type": "string", - "example": "2021-12-22T10:13:06.487Z", - "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", - "format": "date-time", - "nullable": true - }, - "updated_at": { - "type": "string", - "nullable": true, - "example": "2021-12-22T10:14:45.316Z", - "format": "date-time", - "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." - }, - "customer_id": { - "type": "string", - "nullable": true, - "description": "Unique customer ID of the customer making the purchase.", - "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" - }, - "referrer_id": { - "type": "string", - "nullable": true, - "description": "Unique referrer ID.", - "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" - }, - "customer": { - "$ref": "#/components/schemas/CustomerId" - }, - "referrer": { - "$ref": "#/components/schemas/ReferrerId" - }, - "redemptions": { - "title": "ClientQualificationsCheckEligibilityResponseBodyOrderRedemptionsEntry", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/OrderRedemptionsEntry" - }, - "nullable": true - }, - "items": { - "title": "ClientQualificationsCheckEligibilityResponseBodyOrderItems", - "type": "array", - "description": "Array of items applied to the order. It can include up to 500 items.", - "items": { - "title": "ClientQualificationsCheckEligibilityResponseBodyOrderItemsItem", - "allOf": [ - { - "$ref": "#/components/schemas/OrderCalculatedItem" - }, - { - "type": "object", - "properties": { - "application_details": { - "$ref": "#/components/schemas/ApplicationDetails" - } - } - } - ] - }, - "nullable": true - } - } + "$ref": "#/components/schemas/OrderCalculated" }, "stacking_rules": { "$ref": "#/components/schemas/StackingRules" @@ -2751,155 +2610,7 @@ "$ref": "#/components/schemas/Redemption" }, "order": { - "title": "ClientRedemptionsRedeemResponseBodyOrder", - "description": "Contains the order details associated with the redemption.", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", - "nullable": true - }, - "source_id": { - "type": "string", - "nullable": true, - "description": "Unique source ID of an existing order that will be linked to the redemption of this request." - }, - "status": { - "type": "string", - "description": "The order status.", - "enum": [ - "CREATED", - "PAID", - "CANCELED", - "FULFILLED" - ], - "nullable": true - }, - "amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "initial_amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "discount_amount": { - "type": "integer", - "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_amount": { - "type": "integer", - "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "applied_discount_amount": { - "type": "integer", - "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_applied_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", - "nullable": true - }, - "total_applied_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", - "nullable": true - }, - "metadata": { - "title": "ClientRedemptionsRedeemResponseBodyOrderMetadata", - "type": "object", - "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "order", - "enum": [ - "order" - ], - "nullable": true - }, - "created_at": { - "type": "string", - "example": "2021-12-22T10:13:06.487Z", - "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", - "format": "date-time", - "nullable": true - }, - "updated_at": { - "type": "string", - "nullable": true, - "example": "2021-12-22T10:14:45.316Z", - "format": "date-time", - "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." - }, - "customer_id": { - "type": "string", - "nullable": true, - "description": "Unique customer ID of the customer making the purchase.", - "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" - }, - "referrer_id": { - "type": "string", - "nullable": true, - "description": "Unique referrer ID.", - "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" - }, - "customer": { - "$ref": "#/components/schemas/CustomerId" - }, - "referrer": { - "$ref": "#/components/schemas/ReferrerId" - }, - "redemptions": { - "title": "ClientRedemptionsRedeemResponseBodyOrderRedemptionsEntry", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/OrderRedemptionsEntry" - }, - "nullable": true - }, - "items": { - "title": "ClientRedemptionsRedeemResponseBodyOrderItems", - "type": "array", - "description": "Array of items applied to the order. It can include up to 500 items.", - "items": { - "title": "ClientRedemptionsRedeemResponseBodyOrderItemsItem", - "allOf": [ - { - "$ref": "#/components/schemas/OrderCalculatedItem" - }, - { - "type": "object", - "properties": { - "application_details": { - "$ref": "#/components/schemas/ApplicationDetails" - } - } - } - ] - }, - "nullable": true - } - }, - "nullable": true + "$ref": "#/components/schemas/OrderCalculated" }, "inapplicable_redeemables": { "title": "ClientRedemptionsRedeemResponseBodyInapplicableRedeemables", @@ -3065,176 +2776,7 @@ "nullable": true }, "order": { - "title": "ClientValidationsValidateResponseBodyRedeemablesItemOrder", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", - "nullable": true - }, - "source_id": { - "type": "string", - "nullable": true, - "description": "Unique source ID of an existing order that will be linked to the redemption of this request." - }, - "status": { - "type": "string", - "description": "The order status.", - "enum": [ - "CREATED", - "PAID", - "CANCELED", - "FULFILLED" - ], - "nullable": true - }, - "amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "initial_amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "discount_amount": { - "type": "integer", - "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_amount": { - "type": "integer", - "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "applied_discount_amount": { - "type": "integer", - "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_applied_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", - "nullable": true - }, - "total_applied_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", - "nullable": true - }, - "metadata": { - "title": "ClientValidationsValidateResponseBodyRedeemablesItemOrderMetadata", - "type": "object", - "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "order", - "enum": [ - "order" - ], - "nullable": true - }, - "created_at": { - "type": "string", - "example": "2021-12-22T10:13:06.487Z", - "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", - "format": "date-time", - "nullable": true - }, - "updated_at": { - "type": "string", - "nullable": true, - "example": "2021-12-22T10:14:45.316Z", - "format": "date-time", - "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." - }, - "customer_id": { - "type": "string", - "nullable": true, - "description": "Unique customer ID of the customer making the purchase.", - "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" - }, - "referrer_id": { - "type": "string", - "nullable": true, - "description": "Unique referrer ID.", - "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" - }, - "customer": { - "title": "ClientValidationsValidateResponseBodyRedeemablesItemOrderCustomer", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "A unique identifier of an existing customer.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "customer", - "enum": [ - "customer" - ], - "nullable": true - } - }, - "required": [] - }, - "referrer": { - "title": "ClientValidationsValidateResponseBodyRedeemablesItemOrderReferrer", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "A unique identifier of an existing customer.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "customer", - "enum": [ - "customer" - ], - "nullable": true - } - }, - "required": [] - }, - "redemptions": { - "title": "ClientValidationsValidateResponseBodyRedeemablesItemOrderRedemptionsEntry", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/OrderRedemptionsEntry" - }, - "nullable": true - }, - "items": { - "title": "ClientValidationsValidateResponseBodyRedeemablesItemOrderItems", - "type": "array", - "description": "Array of items applied to the order. It can include up to 500 items.", - "items": { - "$ref": "#/components/schemas/OrderCalculatedItem" - }, - "nullable": true - } - } + "$ref": "#/components/schemas/OrderCalculated" }, "applicable_to": { "$ref": "#/components/schemas/ApplicableToResultList" @@ -3457,154 +2999,7 @@ "nullable": true }, "order": { - "title": "ClientValidationsValidateResponseBodyOrder", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", - "nullable": true - }, - "source_id": { - "type": "string", - "nullable": true, - "description": "Unique source ID of an existing order that will be linked to the redemption of this request." - }, - "status": { - "type": "string", - "description": "The order status.", - "enum": [ - "CREATED", - "PAID", - "CANCELED", - "FULFILLED" - ], - "nullable": true - }, - "amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "initial_amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "discount_amount": { - "type": "integer", - "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_amount": { - "type": "integer", - "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "applied_discount_amount": { - "type": "integer", - "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_applied_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", - "nullable": true - }, - "total_applied_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", - "nullable": true - }, - "metadata": { - "title": "ClientValidationsValidateResponseBodyOrderMetadata", - "type": "object", - "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "order", - "enum": [ - "order" - ], - "nullable": true - }, - "created_at": { - "type": "string", - "example": "2021-12-22T10:13:06.487Z", - "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", - "format": "date-time", - "nullable": true - }, - "updated_at": { - "type": "string", - "nullable": true, - "example": "2021-12-22T10:14:45.316Z", - "format": "date-time", - "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." - }, - "customer_id": { - "type": "string", - "nullable": true, - "description": "Unique customer ID of the customer making the purchase.", - "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" - }, - "referrer_id": { - "type": "string", - "nullable": true, - "description": "Unique referrer ID.", - "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" - }, - "customer": { - "$ref": "#/components/schemas/CustomerId" - }, - "referrer": { - "$ref": "#/components/schemas/ReferrerId" - }, - "redemptions": { - "title": "ClientValidationsValidateResponseBodyOrderRedemptionsEntry", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/OrderRedemptionsEntry" - }, - "nullable": true - }, - "items": { - "title": "ClientValidationsValidateResponseBodyOrderItems", - "type": "array", - "description": "Array of items applied to the order. It can include up to 500 items.", - "items": { - "title": "ClientValidationsValidateResponseBodyOrderItemsItem", - "allOf": [ - { - "$ref": "#/components/schemas/OrderCalculatedItem" - }, - { - "type": "object", - "properties": { - "application_details": { - "$ref": "#/components/schemas/ApplicationDetails" - } - } - } - ] - }, - "nullable": true - } - }, - "nullable": true + "$ref": "#/components/schemas/OrderCalculated" }, "tracking_id": { "type": "string", @@ -5773,6 +5168,9 @@ "description": "The metadata object stores all custom attributes assigned to the campaign. A set of key/value pairs that you can attach to a campaign object. It can be useful for storing additional information about the campaign in a structured format.", "nullable": true }, + "access_settings": { + "$ref": "#/components/schemas/AccessSettings" + }, "validation_rules": { "title": "LoyaltiesCreateCampaignRequestBodyValidationRules", "type": "array", @@ -10027,179 +9425,7 @@ "nullable": true }, "order": { - "title": "LoyaltiesMembersRedemptionRedeemResponseBodyOrder", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", - "nullable": true - }, - "source_id": { - "type": "string", - "nullable": true, - "description": "Unique source ID of an existing order that will be linked to the redemption of this request." - }, - "status": { - "type": "string", - "description": "The order status.", - "enum": [ - "CREATED", - "PAID", - "CANCELED", - "FULFILLED" - ], - "nullable": true - }, - "amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "initial_amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "discount_amount": { - "type": "integer", - "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_amount": { - "type": "integer", - "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "applied_discount_amount": { - "type": "integer", - "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_applied_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", - "nullable": true - }, - "total_applied_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", - "nullable": true - }, - "metadata": { - "title": "LoyaltiesMembersRedemptionRedeemResponseBodyOrderMetadata", - "type": "object", - "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "order", - "enum": [ - "order" - ], - "nullable": true - }, - "created_at": { - "type": "string", - "example": "2021-12-22T10:13:06.487Z", - "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", - "format": "date-time", - "nullable": true - }, - "updated_at": { - "type": "string", - "nullable": true, - "example": "2021-12-22T10:14:45.316Z", - "format": "date-time", - "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." - }, - "customer_id": { - "type": "string", - "nullable": true, - "description": "Unique customer ID of the customer making the purchase.", - "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" - }, - "referrer_id": { - "type": "string", - "nullable": true, - "description": "Unique referrer ID.", - "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" - }, - "customer": { - "title": "LoyaltiesMembersRedemptionRedeemResponseBodyOrderCustomer", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "A unique identifier of an existing customer.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "customer", - "enum": [ - "customer" - ], - "nullable": true - } - }, - "required": [], - "nullable": true - }, - "referrer": { - "title": "LoyaltiesMembersRedemptionRedeemResponseBodyOrderReferrer", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "A unique identifier of an existing customer.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "customer", - "enum": [ - "customer" - ], - "nullable": true - } - }, - "required": [], - "nullable": true - }, - "redemptions": { - "title": "LoyaltiesMembersRedemptionRedeemResponseBodyOrderRedemptionsEntry", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/OrderRedemptionsEntry" - }, - "nullable": true - }, - "items": { - "title": "LoyaltiesMembersRedemptionRedeemResponseBodyOrderItems", - "type": "array", - "description": "Array of items applied to the order. It can include up to 500 items.", - "items": { - "$ref": "#/components/schemas/OrderCalculatedItem" - }, - "nullable": true - } - }, - "nullable": true + "$ref": "#/components/schemas/OrderCalculated" }, "channel": { "title": "LoyaltiesMembersRedemptionRedeemResponseBodyChannel", @@ -12024,6 +11250,9 @@ "example": "cat_0b688929a2476386a7", "nullable": true }, + "access_settings": { + "$ref": "#/components/schemas/AccessSettings" + }, "activity_duration_after_publishing": { "type": "string", "description": "Defines the amount of time the vouchers will be active after publishing. The value is shown in the ISO 8601 format. For example, a voucher with the value of P24D will be valid for a duration of 24 days.", @@ -17008,25 +16237,7 @@ "type": "array", "description": "Contains array of order objects.", "items": { - "title": "OrdersListResponseBodyOrdersItem", - "allOf": [ - { - "$ref": "#/components/schemas/OrderCalculated" - }, - { - "type": "object", - "properties": { - "items": { - "title": "OrdersListResponseBodyOrdersItemItems", - "type": "array", - "description": "Array of items applied to the order. It can include up to 500 items.", - "items": { - "$ref": "#/components/schemas/OrderCalculatedItem" - } - } - } - } - ] + "$ref": "#/components/schemas/OrderCalculated" }, "nullable": true }, @@ -21962,141 +21173,7 @@ "nullable": true }, "order": { - "title": "QualificationsCheckEligibilityResponseBodyOrder", - "type": "object", - "nullable": true, - "properties": { - "id": { - "type": "string", - "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", - "nullable": true - }, - "source_id": { - "type": "string", - "nullable": true, - "description": "Unique source ID of an existing order that will be linked to the redemption of this request." - }, - "status": { - "type": "string", - "description": "The order status.", - "enum": [ - "CREATED", - "PAID", - "CANCELED", - "FULFILLED" - ], - "nullable": true - }, - "amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "initial_amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "discount_amount": { - "type": "integer", - "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_amount": { - "type": "integer", - "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "applied_discount_amount": { - "type": "integer", - "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_applied_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", - "nullable": true - }, - "total_applied_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", - "nullable": true - }, - "metadata": { - "title": "QualificationsCheckEligibilityResponseBodyOrderMetadata", - "type": "object", - "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "order", - "enum": [ - "order" - ], - "nullable": true - }, - "created_at": { - "type": "string", - "example": "2021-12-22T10:13:06.487Z", - "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", - "format": "date-time", - "nullable": true - }, - "updated_at": { - "type": "string", - "nullable": true, - "example": "2021-12-22T10:14:45.316Z", - "format": "date-time", - "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." - }, - "customer_id": { - "type": "string", - "nullable": true, - "description": "Unique customer ID of the customer making the purchase.", - "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" - }, - "referrer_id": { - "type": "string", - "nullable": true, - "description": "Unique referrer ID.", - "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" - }, - "customer": { - "$ref": "#/components/schemas/CustomerId" - }, - "referrer": { - "$ref": "#/components/schemas/ReferrerId" - }, - "redemptions": { - "title": "QualificationsCheckEligibilityResponseBodyOrderRedemptionsEntry", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/OrderRedemptionsEntry" - }, - "nullable": true - }, - "items": { - "title": "QualificationsCheckEligibilityResponseBodyOrderItems", - "type": "array", - "description": "Array of items applied to the order. It can include up to 500 items.", - "items": { - "$ref": "#/components/schemas/OrderCalculatedItem" - }, - "nullable": true - } - } + "$ref": "#/components/schemas/OrderCalculated" }, "stacking_rules": { "$ref": "#/components/schemas/StackingRules" @@ -22233,177 +21310,7 @@ "nullable": true }, "order": { - "title": "RedemptionsGetResponseBodyOrder", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", - "nullable": true - }, - "source_id": { - "type": "string", - "nullable": true, - "description": "Unique source ID of an existing order that will be linked to the redemption of this request." - }, - "status": { - "type": "string", - "description": "The order status.", - "enum": [ - "CREATED", - "PAID", - "CANCELED", - "FULFILLED" - ], - "nullable": true - }, - "amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "initial_amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "discount_amount": { - "type": "integer", - "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_amount": { - "type": "integer", - "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "applied_discount_amount": { - "type": "integer", - "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_applied_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", - "nullable": true - }, - "total_applied_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", - "nullable": true - }, - "metadata": { - "title": "RedemptionsGetResponseBodyOrderMetadata", - "type": "object", - "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "order", - "enum": [ - "order" - ], - "nullable": true - }, - "created_at": { - "type": "string", - "example": "2021-12-22T10:13:06.487Z", - "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", - "format": "date-time", - "nullable": true - }, - "updated_at": { - "type": "string", - "nullable": true, - "example": "2021-12-22T10:14:45.316Z", - "format": "date-time", - "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." - }, - "customer_id": { - "type": "string", - "nullable": true, - "description": "Unique customer ID of the customer making the purchase.", - "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" - }, - "referrer_id": { - "type": "string", - "nullable": true, - "description": "Unique referrer ID.", - "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" - }, - "customer": { - "title": "RedemptionsGetResponseBodyOrderCustomer", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "A unique identifier of an existing customer.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "customer", - "enum": [ - "customer" - ], - "nullable": true - } - }, - "nullable": true - }, - "referrer": { - "title": "RedemptionsGetResponseBodyOrderReferrer", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "A unique identifier of an existing customer.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "customer", - "enum": [ - "customer" - ], - "nullable": true - } - }, - "nullable": true - }, - "redemptions": { - "title": "RedemptionsGetResponseBodyOrderRedemptionsEntry", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/OrderRedemptionsEntry" - }, - "nullable": true - }, - "items": { - "title": "RedemptionsGetResponseBodyOrderItems", - "type": "array", - "description": "Array of items applied to the order. It can include up to 500 items.", - "items": { - "$ref": "#/components/schemas/OrderCalculatedItem" - }, - "nullable": true - } - }, - "nullable": true + "$ref": "#/components/schemas/OrderCalculated" }, "channel": { "title": "RedemptionsGetResponseBodyChannel", @@ -23135,174 +22042,7 @@ "nullable": true }, "order": { - "title": "RedemptionsListResponseBodyRedemptionsItemOrder", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", - "nullable": true - }, - "source_id": { - "type": "string", - "nullable": true, - "description": "Unique source ID of an existing order that will be linked to the redemption of this request." - }, - "status": { - "type": "string", - "description": "The order status.", - "enum": [ - "CREATED", - "PAID", - "CANCELED", - "FULFILLED" - ], - "nullable": true - }, - "amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "initial_amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "discount_amount": { - "type": "integer", - "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_amount": { - "type": "integer", - "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "applied_discount_amount": { - "type": "integer", - "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_applied_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", - "nullable": true - }, - "total_applied_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", - "nullable": true - }, - "metadata": { - "title": "RedemptionsListResponseBodyRedemptionsItemOrderMetadata", - "type": "object", - "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "order", - "enum": [ - "order" - ], - "nullable": true - }, - "created_at": { - "type": "string", - "example": "2021-12-22T10:13:06.487Z", - "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", - "format": "date-time", - "nullable": true - }, - "updated_at": { - "type": "string", - "nullable": true, - "example": "2021-12-22T10:14:45.316Z", - "format": "date-time", - "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." - }, - "customer_id": { - "type": "string", - "nullable": true, - "description": "Unique customer ID of the customer making the purchase.", - "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" - }, - "referrer_id": { - "type": "string", - "nullable": true, - "description": "Unique referrer ID.", - "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" - }, - "customer": { - "title": "RedemptionsListResponseBodyRedemptionsItemOrderCustomer", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "A unique identifier of an existing customer.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "customer", - "enum": [ - "customer" - ], - "nullable": true - } - } - }, - "referrer": { - "title": "RedemptionsListResponseBodyRedemptionsItemOrderReferrer", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "A unique identifier of an existing customer.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "customer", - "enum": [ - "customer" - ], - "nullable": true - } - } - }, - "redemptions": { - "title": "RedemptionsListResponseBodyRedemptionsItemOrderRedemptionsEntry", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/OrderRedemptionsEntry" - }, - "nullable": true - }, - "items": { - "title": "RedemptionsListResponseBodyRedemptionsItemOrderItems", - "type": "array", - "description": "Array of items applied to the order. It can include up to 500 items.", - "items": { - "$ref": "#/components/schemas/OrderCalculatedItem" - }, - "nullable": true - } - } + "$ref": "#/components/schemas/OrderCalculated" }, "channel": { "title": "RedemptionsListResponseBodyRedemptionsItemChannel", @@ -24002,155 +22742,7 @@ "$ref": "#/components/schemas/Redemption" }, "order": { - "title": "RedemptionsRedeemResponseBodyOrder", - "description": "Contains the order details associated with the redemption.", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", - "nullable": true - }, - "source_id": { - "type": "string", - "nullable": true, - "description": "Unique source ID of an existing order that will be linked to the redemption of this request." - }, - "status": { - "type": "string", - "description": "The order status.", - "enum": [ - "CREATED", - "PAID", - "CANCELED", - "FULFILLED" - ], - "nullable": true - }, - "amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "initial_amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "discount_amount": { - "type": "integer", - "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_amount": { - "type": "integer", - "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "applied_discount_amount": { - "type": "integer", - "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_applied_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", - "nullable": true - }, - "total_applied_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", - "nullable": true - }, - "metadata": { - "title": "RedemptionsRedeemResponseBodyOrderMetadata", - "type": "object", - "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "order", - "enum": [ - "order" - ], - "nullable": true - }, - "created_at": { - "type": "string", - "example": "2021-12-22T10:13:06.487Z", - "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", - "format": "date-time", - "nullable": true - }, - "updated_at": { - "type": "string", - "nullable": true, - "example": "2021-12-22T10:14:45.316Z", - "format": "date-time", - "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." - }, - "customer_id": { - "type": "string", - "nullable": true, - "description": "Unique customer ID of the customer making the purchase.", - "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" - }, - "referrer_id": { - "type": "string", - "nullable": true, - "description": "Unique referrer ID.", - "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" - }, - "customer": { - "$ref": "#/components/schemas/CustomerId" - }, - "referrer": { - "$ref": "#/components/schemas/ReferrerId" - }, - "redemptions": { - "title": "RedemptionsRedeemResponseBodyOrderRedemptionsEntry", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/OrderRedemptionsEntry" - }, - "nullable": true - }, - "items": { - "title": "RedemptionsRedeemResponseBodyOrderItems", - "type": "array", - "description": "Array of items applied to the order. It can include up to 500 items.", - "items": { - "title": "RedemptionsRedeemResponseBodyOrderItemsItem", - "allOf": [ - { - "$ref": "#/components/schemas/OrderCalculatedItem" - }, - { - "type": "object", - "properties": { - "application_details": { - "$ref": "#/components/schemas/ApplicationDetails" - } - } - } - ] - }, - "nullable": true - } - }, - "nullable": true + "$ref": "#/components/schemas/OrderCalculated" }, "inapplicable_redeemables": { "title": "RedemptionsRedeemResponseBodyInapplicableRedeemables", @@ -24342,141 +22934,7 @@ "nullable": true }, "order": { - "title": "RedemptionsRollbackCreateResponseBodyOrder", - "nullable": true, - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", - "nullable": true - }, - "source_id": { - "type": "string", - "nullable": true, - "description": "Unique source ID of an existing order that will be linked to the redemption of this request." - }, - "status": { - "type": "string", - "description": "The order status.", - "enum": [ - "CREATED", - "PAID", - "CANCELED", - "FULFILLED" - ], - "nullable": true - }, - "amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "initial_amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "discount_amount": { - "type": "integer", - "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_amount": { - "type": "integer", - "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "applied_discount_amount": { - "type": "integer", - "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_applied_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", - "nullable": true - }, - "total_applied_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", - "nullable": true - }, - "metadata": { - "title": "RedemptionsRollbackCreateResponseBodyOrderMetadata", - "type": "object", - "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "order", - "enum": [ - "order" - ], - "nullable": true - }, - "created_at": { - "type": "string", - "example": "2021-12-22T10:13:06.487Z", - "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", - "format": "date-time", - "nullable": true - }, - "updated_at": { - "type": "string", - "nullable": true, - "example": "2021-12-22T10:14:45.316Z", - "format": "date-time", - "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." - }, - "customer_id": { - "type": "string", - "nullable": true, - "description": "Unique customer ID of the customer making the purchase.", - "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" - }, - "referrer_id": { - "type": "string", - "nullable": true, - "description": "Unique referrer ID.", - "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" - }, - "customer": { - "$ref": "#/components/schemas/CustomerId" - }, - "referrer": { - "$ref": "#/components/schemas/ReferrerId" - }, - "redemptions": { - "title": "RedemptionsRollbackCreateResponseBodyOrderRedemptionsEntry", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/OrderRedemptionsEntry" - }, - "nullable": true - }, - "items": { - "title": "RedemptionsRollbackCreateResponseBodyOrderItems", - "type": "array", - "description": "Array of items applied to the order. It can include up to 500 items.", - "items": { - "$ref": "#/components/schemas/OrderCalculatedItem" - }, - "nullable": true - } - } + "$ref": "#/components/schemas/OrderCalculated" }, "channel": { "title": "RedemptionsRollbackCreateResponseBodyChannel", @@ -24555,7 +23013,9 @@ "nullable": true } }, - "required": [], + "required": [ + "order" + ], "description": "Response body schema for **POST** `v1/redemptions/{redemptionId}/rollback`." }, "RedemptionsRollbacksCreateRequestBody": { @@ -25931,6 +24391,9 @@ "description": "The metadata object stores all custom attributes assigned to the campaign. A set of key/value pairs that you can attach to a campaign object. It can be useful for storing additional information about the campaign in a structured format.", "nullable": true }, + "access_settings": { + "$ref": "#/components/schemas/AccessSettings" + }, "voucher": { "title": "TemplatesCampaignsCampaignSetupCreateRequestBodyVoucher", "type": "object", @@ -27503,176 +25966,7 @@ "nullable": true }, "order": { - "title": "ValidationsValidateResponseBodyRedeemablesItemOrder", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", - "nullable": true - }, - "source_id": { - "type": "string", - "nullable": true, - "description": "Unique source ID of an existing order that will be linked to the redemption of this request." - }, - "status": { - "type": "string", - "description": "The order status.", - "enum": [ - "CREATED", - "PAID", - "CANCELED", - "FULFILLED" - ], - "nullable": true - }, - "amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "initial_amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "discount_amount": { - "type": "integer", - "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_amount": { - "type": "integer", - "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "applied_discount_amount": { - "type": "integer", - "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_applied_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", - "nullable": true - }, - "total_applied_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", - "nullable": true - }, - "metadata": { - "title": "ValidationsValidateResponseBodyRedeemablesItemOrderMetadata", - "type": "object", - "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "order", - "enum": [ - "order" - ], - "nullable": true - }, - "created_at": { - "type": "string", - "example": "2021-12-22T10:13:06.487Z", - "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", - "format": "date-time", - "nullable": true - }, - "updated_at": { - "type": "string", - "nullable": true, - "example": "2021-12-22T10:14:45.316Z", - "format": "date-time", - "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." - }, - "customer_id": { - "type": "string", - "nullable": true, - "description": "Unique customer ID of the customer making the purchase.", - "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" - }, - "referrer_id": { - "type": "string", - "nullable": true, - "description": "Unique referrer ID.", - "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" - }, - "customer": { - "title": "ValidationsValidateResponseBodyRedeemablesItemOrderCustomer", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "A unique identifier of an existing customer.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "customer", - "enum": [ - "customer" - ], - "nullable": true - } - }, - "required": [] - }, - "referrer": { - "title": "ValidationsValidateResponseBodyRedeemablesItemOrderReferrer", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "A unique identifier of an existing customer.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "customer", - "enum": [ - "customer" - ], - "nullable": true - } - }, - "required": [] - }, - "redemptions": { - "title": "ValidationsValidateResponseBodyRedeemablesItemOrderRedemptionsEntry", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/OrderRedemptionsEntry" - }, - "nullable": true - }, - "items": { - "title": "ValidationsValidateResponseBodyRedeemablesItemOrderItems", - "type": "array", - "description": "Array of items applied to the order. It can include up to 500 items.", - "items": { - "$ref": "#/components/schemas/OrderCalculatedItem" - }, - "nullable": true - } - } + "$ref": "#/components/schemas/OrderCalculated" }, "applicable_to": { "$ref": "#/components/schemas/ApplicableToResultList" @@ -27895,154 +26189,7 @@ "nullable": true }, "order": { - "title": "ValidationsValidateResponseBodyOrder", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", - "nullable": true - }, - "source_id": { - "type": "string", - "nullable": true, - "description": "Unique source ID of an existing order that will be linked to the redemption of this request." - }, - "status": { - "type": "string", - "description": "The order status.", - "enum": [ - "CREATED", - "PAID", - "CANCELED", - "FULFILLED" - ], - "nullable": true - }, - "amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "initial_amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "discount_amount": { - "type": "integer", - "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_amount": { - "type": "integer", - "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "applied_discount_amount": { - "type": "integer", - "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_applied_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", - "nullable": true - }, - "total_applied_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", - "nullable": true - }, - "metadata": { - "title": "ValidationsValidateResponseBodyOrderMetadata", - "type": "object", - "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "order", - "enum": [ - "order" - ], - "nullable": true - }, - "created_at": { - "type": "string", - "example": "2021-12-22T10:13:06.487Z", - "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", - "format": "date-time", - "nullable": true - }, - "updated_at": { - "type": "string", - "nullable": true, - "example": "2021-12-22T10:14:45.316Z", - "format": "date-time", - "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." - }, - "customer_id": { - "type": "string", - "nullable": true, - "description": "Unique customer ID of the customer making the purchase.", - "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" - }, - "referrer_id": { - "type": "string", - "nullable": true, - "description": "Unique referrer ID.", - "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" - }, - "customer": { - "$ref": "#/components/schemas/CustomerId" - }, - "referrer": { - "$ref": "#/components/schemas/ReferrerId" - }, - "redemptions": { - "title": "ValidationsValidateResponseBodyOrderRedemptionsEntry", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/OrderRedemptionsEntry" - }, - "nullable": true - }, - "items": { - "title": "ValidationsValidateResponseBodyOrderItems", - "type": "array", - "description": "Array of items applied to the order. It can include up to 500 items.", - "items": { - "title": "ValidationsValidateResponseBodyOrderItemsItem", - "allOf": [ - { - "$ref": "#/components/schemas/OrderCalculatedItem" - }, - { - "type": "object", - "properties": { - "application_details": { - "$ref": "#/components/schemas/ApplicationDetails" - } - } - } - ] - }, - "nullable": true - } - }, - "nullable": true + "$ref": "#/components/schemas/OrderCalculated" }, "tracking_id": { "type": "string", @@ -30226,6 +28373,69 @@ "type": "string", "format": "hostname" }, + "AccessSettings": { + "title": "AccessSettings", + "type": "object", + "description": "Assigns or unassigns an area or store to the campaign.\n\n**NOTE**: this object can be sent if the Areas and Stores enterprise feature is enabled. Contact [Voucherify Sales](https://www.voucherify.io/contact-sales) to learn more.", + "properties": { + "assign": { + "title": "AccessSettingsAssign", + "type": "object", + "description": "Assigns the campaign to an area or a store. Provide the area and/or store IDs in the respective arrays. If a campaign changes assignments between areas or stores, unassign it from the area. For example, if a campaign is assigned to Area-01, but it must be now assigned to Store-01 within this area, you have to unassign the campaign from Area-01 and assign to Store-01 only.\n\nIf you want to assign the campaign to stores only, you do not have to send the area ID.", + "properties": { + "areas_ids": { + "title": "AccessSettingsAssignAreasIds", + "type": "array", + "description": "List all area IDs to which the campaign will be assigned.", + "items": { + "title": "AccessSettingsAssignAreasIdsItem", + "type": "string" + }, + "nullable": true + }, + "area_stores_ids": { + "title": "AccessSettingsAssignAreaStoresIds", + "type": "array", + "description": "List all store IDs to which the campaign will be assigned.", + "items": { + "title": "AccessSettingsAssignAreaStoresIdsItem", + "type": "string" + }, + "nullable": true + } + }, + "nullable": true + }, + "unassign": { + "title": "AccessSettingsUnassign", + "type": "object", + "description": "Unassigns the campaign from an area or a store. Provide the area and/or store IDs in the respective arrays. If a campaign changes assignments between areas or stores, unassign it first. For example, if a campaign is assigned to Area-01, but it must be now assigned to Store-01 within this area, you have to unassign the campaign from Area-01 and assigned to Store-01 only.\n\nIf you want to assign the campaign to stores only, you do not have to send the area ID.", + "properties": { + "areas_ids": { + "title": "AccessSettingsUnassignAreasIds", + "type": "array", + "description": "List all area IDs from which the campaign will be unassigned.", + "items": { + "title": "AccessSettingsUnassignAreasIdsItem", + "type": "string" + }, + "nullable": true + }, + "area_stores_ids": { + "title": "AccessSettingsUnassignAreaStoresIds", + "type": "array", + "description": "List all store IDs to which the campaign will be unassigned.", + "items": { + "title": "AccessSettingsUnassignAreaStoresIdsItem", + "type": "string" + }, + "nullable": true + } + }, + "nullable": true + } + } + }, "AccessSettingsCampaignAssignmentsList": { "title": "AccessSettingsCampaignAssignmentsList", "type": "object", @@ -30433,49 +28643,6 @@ }, "required": [] }, - "ApplicationDetails": { - "title": "ApplicationDetails", - "type": "array", - "description": "Array containing details about the items that are replaced and the items that are replacements for discounts with the `REPLACE_ITEMS` effect.", - "items": { - "title": "ApplicationDetailsItem", - "type": "object", - "description": "Object representing item replacement.", - "properties": { - "source_index": { - "type": "integer", - "description": "Index number of the source item that is replaced. The enumeration starts from `0`, which represents the first item in the request, e.g., if the replaced item is passed as the second in the request, `source_index` equals `3`.", - "minimum": 0 - }, - "source_applied_quantity": { - "type": "integer", - "description": "Number of source units that are replaced.", - "maximum": -1 - }, - "source_applied_quantity_amount": { - "type": "integer", - "description": "Amount equal to the price of the units that are replaced. Determines the change of the amount of the source item quantity.", - "maximum": 0 - }, - "target_index": { - "type": "integer", - "description": "Index number of the target item that is a replacement of the source item. The enumeration continues the values for the order items, e.g. if there are three items in the request, `target_index` equals `3`, as enumeration starts from `0`." - }, - "target_applied_quantity": { - "type": "integer", - "description": "Number of added target units that are replacements." - }, - "target_applied_quantity_amount": { - "type": "integer", - "description": "Amount equal to the price of the units that are replacements. Determines the change in the amount of the target item quantity." - }, - "target_applied_discount_amount": { - "type": "integer", - "description": "Discount amount applied to the target item with regard to the replacement. Equals the `target_applied_quantity_amount` minus `source_applied_quantity_amount`." - } - } - } - }, "AsyncActionBase": { "title": "AsyncActionBase", "type": "object", @@ -35719,6 +33886,15 @@ "$ref": "#/components/schemas/OrderRedemptionsEntry" }, "nullable": true + }, + "items": { + "title": "OrderCalculatedItems", + "type": "array", + "description": "Array of items applied to the order. It can include up 500 items.", + "items": { + "$ref": "#/components/schemas/OrderCalculatedItem" + }, + "nullable": true } } }, @@ -35907,6 +34083,9 @@ "type": "object", "description": "A set of custom key/value pairs that you can attach to an item object. It can be useful for storing additional information about the item in a structured format. It can be used to define business validation rules or discount formulas.", "nullable": true + }, + "application_details": { + "$ref": "#/components/schemas/ApplicationDetails" } }, "required": [] @@ -37355,179 +35534,7 @@ "nullable": true }, "order": { - "title": "RedemptionOrder", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", - "nullable": true - }, - "source_id": { - "type": "string", - "nullable": true, - "description": "Unique source ID of an existing order that will be linked to the redemption of this request." - }, - "status": { - "type": "string", - "description": "The order status.", - "enum": [ - "CREATED", - "PAID", - "CANCELED", - "FULFILLED" - ], - "nullable": true - }, - "amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "initial_amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "discount_amount": { - "type": "integer", - "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_amount": { - "type": "integer", - "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "applied_discount_amount": { - "type": "integer", - "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_applied_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", - "nullable": true - }, - "total_applied_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", - "nullable": true - }, - "metadata": { - "title": "RedemptionOrderMetadata", - "type": "object", - "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "order", - "enum": [ - "order" - ], - "nullable": true - }, - "created_at": { - "type": "string", - "example": "2021-12-22T10:13:06.487Z", - "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", - "format": "date-time", - "nullable": true - }, - "updated_at": { - "type": "string", - "nullable": true, - "example": "2021-12-22T10:14:45.316Z", - "format": "date-time", - "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." - }, - "customer_id": { - "type": "string", - "nullable": true, - "description": "Unique customer ID of the customer making the purchase.", - "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" - }, - "referrer_id": { - "type": "string", - "nullable": true, - "description": "Unique referrer ID.", - "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" - }, - "customer": { - "title": "RedemptionOrderCustomer", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "A unique identifier of an existing customer.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "customer", - "enum": [ - "customer" - ], - "nullable": true - } - }, - "required": [], - "nullable": true - }, - "referrer": { - "title": "RedemptionOrderReferrer", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "A unique identifier of an existing customer.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "customer", - "enum": [ - "customer" - ], - "nullable": true - } - }, - "required": [], - "nullable": true - }, - "redemptions": { - "title": "RedemptionOrderRedemptionsEntry", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/OrderRedemptionsEntry" - }, - "nullable": true - }, - "items": { - "title": "RedemptionOrderItems", - "type": "array", - "description": "Array of items applied to the order. It can include up to 500 items.", - "items": { - "$ref": "#/components/schemas/OrderCalculatedItem" - }, - "nullable": true - } - }, - "nullable": true + "$ref": "#/components/schemas/OrderCalculated" }, "channel": { "title": "RedemptionChannel", @@ -38010,177 +36017,7 @@ "nullable": true }, "order": { - "title": "RedemptionEntryOrder", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", - "nullable": true - }, - "source_id": { - "type": "string", - "nullable": true, - "description": "Unique source ID of an existing order that will be linked to the redemption of this request." - }, - "status": { - "type": "string", - "description": "The order status.", - "enum": [ - "CREATED", - "PAID", - "CANCELED", - "FULFILLED" - ], - "nullable": true - }, - "amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "initial_amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "discount_amount": { - "type": "integer", - "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_amount": { - "type": "integer", - "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "applied_discount_amount": { - "type": "integer", - "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_applied_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", - "nullable": true - }, - "total_applied_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", - "nullable": true - }, - "metadata": { - "title": "RedemptionEntryOrderMetadata", - "type": "object", - "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "order", - "enum": [ - "order" - ], - "nullable": true - }, - "created_at": { - "type": "string", - "example": "2021-12-22T10:13:06.487Z", - "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", - "format": "date-time", - "nullable": true - }, - "updated_at": { - "type": "string", - "nullable": true, - "example": "2021-12-22T10:14:45.316Z", - "format": "date-time", - "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." - }, - "customer_id": { - "type": "string", - "nullable": true, - "description": "Unique customer ID of the customer making the purchase.", - "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" - }, - "referrer_id": { - "type": "string", - "nullable": true, - "description": "Unique referrer ID.", - "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" - }, - "customer": { - "title": "RedemptionEntryOrderCustomer", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "A unique identifier of an existing customer.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "customer", - "enum": [ - "customer" - ], - "nullable": true - } - }, - "nullable": true - }, - "referrer": { - "title": "RedemptionEntryOrderReferrer", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "A unique identifier of an existing customer.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "customer", - "enum": [ - "customer" - ], - "nullable": true - } - }, - "nullable": true - }, - "redemptions": { - "title": "RedemptionEntryOrderRedemptionsEntry", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/OrderRedemptionsEntry" - }, - "nullable": true - }, - "items": { - "title": "RedemptionEntryOrderItems", - "type": "array", - "description": "Array of items applied to the order. It can include up to 500 items.", - "items": { - "$ref": "#/components/schemas/OrderCalculatedItem" - }, - "nullable": true - } - }, - "nullable": true + "$ref": "#/components/schemas/OrderCalculated" }, "channel": { "title": "RedemptionEntryChannel", @@ -39062,141 +36899,7 @@ "nullable": true }, "order": { - "title": "RedemptionRollbackOrder", - "nullable": true, - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", - "nullable": true - }, - "source_id": { - "type": "string", - "nullable": true, - "description": "Unique source ID of an existing order that will be linked to the redemption of this request." - }, - "status": { - "type": "string", - "description": "The order status.", - "enum": [ - "CREATED", - "PAID", - "CANCELED", - "FULFILLED" - ], - "nullable": true - }, - "amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "initial_amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "discount_amount": { - "type": "integer", - "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_amount": { - "type": "integer", - "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "applied_discount_amount": { - "type": "integer", - "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_applied_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", - "nullable": true - }, - "total_applied_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", - "nullable": true - }, - "metadata": { - "title": "RedemptionRollbackOrderMetadata", - "type": "object", - "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "order", - "enum": [ - "order" - ], - "nullable": true - }, - "created_at": { - "type": "string", - "example": "2021-12-22T10:13:06.487Z", - "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", - "format": "date-time", - "nullable": true - }, - "updated_at": { - "type": "string", - "nullable": true, - "example": "2021-12-22T10:14:45.316Z", - "format": "date-time", - "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." - }, - "customer_id": { - "type": "string", - "nullable": true, - "description": "Unique customer ID of the customer making the purchase.", - "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" - }, - "referrer_id": { - "type": "string", - "nullable": true, - "description": "Unique referrer ID.", - "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" - }, - "customer": { - "$ref": "#/components/schemas/CustomerId" - }, - "referrer": { - "$ref": "#/components/schemas/ReferrerId" - }, - "redemptions": { - "title": "RedemptionRollbackOrderRedemptionsEntry", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/OrderRedemptionsEntry" - }, - "nullable": true - }, - "items": { - "title": "RedemptionRollbackOrderItems", - "type": "array", - "description": "Array of items applied to the order. It can include up to 500 items.", - "items": { - "$ref": "#/components/schemas/OrderCalculatedItem" - }, - "nullable": true - } - } + "$ref": "#/components/schemas/OrderCalculated" }, "channel": { "title": "RedemptionRollbackChannel", @@ -39275,7 +36978,9 @@ "nullable": true } }, - "required": [] + "required": [ + "order" + ] }, "ReferralProgram": { "title": "ReferralProgram", @@ -41909,6 +39614,49 @@ "APPLY_FROM_MOST_EXPENSIVE" ] }, + "ApplicationDetails": { + "title": "ApplicationDetails", + "type": "array", + "description": "Array containing details about the items that are replaced and the items that are replacements for discounts with the `REPLACE_ITEMS` effect.", + "items": { + "title": "ApplicationDetailsItem", + "type": "object", + "description": "Object representing item replacement.", + "properties": { + "source_index": { + "type": "integer", + "description": "Index number of the source item that is replaced. The enumeration starts from `0`, which represents the first item in the request, e.g., if the replaced item is passed as the second in the request, `source_index` equals `3`.", + "minimum": 0 + }, + "source_applied_quantity": { + "type": "integer", + "description": "Number of source units that are replaced.", + "maximum": -1 + }, + "source_applied_quantity_amount": { + "type": "integer", + "description": "Amount equal to the price of the units that are replaced. Determines the change of the amount of the source item quantity.", + "maximum": 0 + }, + "target_index": { + "type": "integer", + "description": "Index number of the target item that is a replacement of the source item. The enumeration continues the values for the order items, e.g. if there are three items in the request, `target_index` equals `3`, as enumeration starts from `0`." + }, + "target_applied_quantity": { + "type": "integer", + "description": "Number of added target units that are replacements." + }, + "target_applied_quantity_amount": { + "type": "integer", + "description": "Amount equal to the price of the units that are replacements. Determines the change in the amount of the target item quantity." + }, + "target_applied_discount_amount": { + "type": "integer", + "description": "Discount amount applied to the target item with regard to the replacement. Equals the `target_applied_quantity_amount` minus `source_applied_quantity_amount`." + } + } + } + }, "AreaStoreCampaignAssignment": { "title": "AreaStoreCampaignAssignment", "type": "object", @@ -42537,154 +40285,7 @@ "$ref": "#/components/schemas/RedeemableResult" }, "order": { - "title": "QualificationsRedeemableOrder", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", - "nullable": true - }, - "source_id": { - "type": "string", - "nullable": true, - "description": "Unique source ID of an existing order that will be linked to the redemption of this request." - }, - "status": { - "type": "string", - "description": "The order status.", - "enum": [ - "CREATED", - "PAID", - "CANCELED", - "FULFILLED" - ], - "nullable": true - }, - "amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "initial_amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "discount_amount": { - "type": "integer", - "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_amount": { - "type": "integer", - "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "applied_discount_amount": { - "type": "integer", - "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_applied_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", - "nullable": true - }, - "total_applied_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", - "nullable": true - }, - "metadata": { - "title": "QualificationsRedeemableOrderMetadata", - "type": "object", - "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "order", - "enum": [ - "order" - ], - "nullable": true - }, - "created_at": { - "type": "string", - "example": "2021-12-22T10:13:06.487Z", - "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", - "format": "date-time", - "nullable": true - }, - "updated_at": { - "type": "string", - "nullable": true, - "example": "2021-12-22T10:14:45.316Z", - "format": "date-time", - "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." - }, - "customer_id": { - "type": "string", - "nullable": true, - "description": "Unique customer ID of the customer making the purchase.", - "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" - }, - "referrer_id": { - "type": "string", - "nullable": true, - "description": "Unique referrer ID.", - "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" - }, - "customer": { - "$ref": "#/components/schemas/CustomerId" - }, - "referrer": { - "$ref": "#/components/schemas/ReferrerId" - }, - "redemptions": { - "title": "QualificationsRedeemableOrderRedemptionsEntry", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/OrderRedemptionsEntry" - }, - "nullable": true - }, - "items": { - "title": "QualificationsRedeemableOrderItems", - "type": "array", - "description": "Array of items applied to the order. It can include up to 500 items.", - "items": { - "title": "QualificationsRedeemableOrderItemsItem", - "allOf": [ - { - "$ref": "#/components/schemas/OrderCalculatedItem" - }, - { - "type": "object", - "properties": { - "application_details": { - "$ref": "#/components/schemas/ApplicationDetails" - } - } - } - ] - }, - "nullable": true - } - }, - "nullable": true + "$ref": "#/components/schemas/OrderCalculated" }, "validation_rule_id": { "type": "string", @@ -43469,154 +41070,7 @@ "$ref": "#/components/schemas/RedeemableResult" }, "order": { - "title": "QualificationsRedeemableBaseOrder", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.", - "nullable": true - }, - "source_id": { - "type": "string", - "nullable": true, - "description": "Unique source ID of an existing order that will be linked to the redemption of this request." - }, - "status": { - "type": "string", - "description": "The order status.", - "enum": [ - "CREATED", - "PAID", - "CANCELED", - "FULFILLED" - ], - "nullable": true - }, - "amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "initial_amount": { - "type": "integer", - "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "discount_amount": { - "type": "integer", - "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "total_amount": { - "type": "integer", - "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "applied_discount_amount": { - "type": "integer", - "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).", - "nullable": true - }, - "items_applied_discount_amount": { - "type": "integer", - "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`", - "nullable": true - }, - "total_applied_discount_amount": { - "type": "integer", - "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`", - "nullable": true - }, - "metadata": { - "title": "QualificationsRedeemableBaseOrderMetadata", - "type": "object", - "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.", - "nullable": true - }, - "object": { - "type": "string", - "description": "The type of the object represented by JSON.", - "default": "order", - "enum": [ - "order" - ], - "nullable": true - }, - "created_at": { - "type": "string", - "example": "2021-12-22T10:13:06.487Z", - "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.", - "format": "date-time", - "nullable": true - }, - "updated_at": { - "type": "string", - "nullable": true, - "example": "2021-12-22T10:14:45.316Z", - "format": "date-time", - "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format." - }, - "customer_id": { - "type": "string", - "nullable": true, - "description": "Unique customer ID of the customer making the purchase.", - "example": "cust_7iUa6ICKyU6gH40dBU25kQU1" - }, - "referrer_id": { - "type": "string", - "nullable": true, - "description": "Unique referrer ID.", - "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix" - }, - "customer": { - "$ref": "#/components/schemas/CustomerId" - }, - "referrer": { - "$ref": "#/components/schemas/ReferrerId" - }, - "redemptions": { - "title": "QualificationsRedeemableBaseOrderRedemptionsEntry", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/OrderRedemptionsEntry" - }, - "nullable": true - }, - "items": { - "title": "QualificationsRedeemableBaseOrderItems", - "type": "array", - "description": "Array of items applied to the order. It can include up to 500 items.", - "items": { - "title": "QualificationsRedeemableBaseOrderItemsItem", - "allOf": [ - { - "$ref": "#/components/schemas/OrderCalculatedItem" - }, - { - "type": "object", - "properties": { - "application_details": { - "$ref": "#/components/schemas/ApplicationDetails" - } - } - } - ] - }, - "nullable": true - } - }, - "nullable": true + "$ref": "#/components/schemas/OrderCalculated" }, "validation_rule_id": { "type": "string", diff --git a/scripts/prepare-open-api-for-sdk/index.ts b/scripts/prepare-open-api-for-sdk/index.ts index 6d654af8..fd6ac240 100644 --- a/scripts/prepare-open-api-for-sdk/index.ts +++ b/scripts/prepare-open-api-for-sdk/index.ts @@ -5,7 +5,7 @@ import minimist from "minimist"; import colors from "colors"; import { parseNullsToNullableObjects, removeStoplightTag } from "./utils"; import originalOpenAPIContent from "../../reference/OpenAPI.json"; -import _ from "lodash"; +import _, { omit } from "lodash"; let openAPIContent = originalOpenAPIContent; import { removedNotUsedParameters } from "./removed-not-used-parameters"; @@ -91,10 +91,7 @@ const main = async (languageOptions: LanguageOptions) => { }); ////////////////////////////////////////////////////////////////////////////// removeStoplightTag(openAPIContent); - openAPIContent = removeUnwantedProperties(openAPIContent, [ - "readmeTitle", - "access_settings", //@todo remove when fixed - ]); + openAPIContent = removeUnwantedProperties(openAPIContent, ["readmeTitle"]); openAPIContent.components.schemas = removeUnwantedProperties( openAPIContent.components.schemas, ["title"], @@ -195,6 +192,24 @@ const main = async (languageOptions: LanguageOptions) => { //ValidationRuleRules fix for Readme – should stay forever openAPIContent.components.schemas.ValidationRuleRules.additionalProperties.properties.rules.$ref = "#/components/schemas/ValidationRuleRules"; + //Do not add breaking change on application_details + openAPIContent.components.schemas.OrderCalculated.properties["items"] = { + type: "array", + description: + "Array of items applied to the order. It can include up 500 items.", + items: { + $ref: "#/components/schemas/OrderCalculatedItem", + }, + nullable: true, + }; + openAPIContent.components.schemas.OrderCalculatedItem.properties[ + "application_details" + ] = { + $ref: "#/components/schemas/ApplicationDetails", + }; + openAPIContent.components.schemas = fixOrderCalculated( + openAPIContent.components.schemas, + ); ////////////////////////////////////////////////////////////////////////////// openAPIContent = addMissingDefaults(openAPIContent); const { paths, newSchemas } = getPathsWithoutDeprecated( @@ -284,7 +299,7 @@ const main = async (languageOptions: LanguageOptions) => { }, paths: pathsWithFixedResponses, }); - + //////////////// newOpenApiFile.components.schemas.LoyaltiesMembersPointsExpirationListResponseBody.properties.data.items = newOpenApiFile.components.schemas.LoyaltyPointsBucket; newOpenApiFile.components.schemas.LoyaltyCardTransaction.properties.details.properties.balance = @@ -522,6 +537,47 @@ const moveSchemasOnTheBack = (schemas: any, schemasNames: string[]) => ({ ..._.pick(schemas, schemasNames), }); +const fixOrderCalculated = (object: any) => { + if (Array.isArray(object)) { + return object.map((value) => fixOrderCalculated(value)); + } + if (object instanceof Object) { + if ( + object.properties?.order?.allOf?.find( + (e) => e?.$ref === "#/components/schemas/OrderCalculated", + ) + ) { + object.properties.order.allOf = object.properties?.order?.allOf.filter( + (e) => !e?.properties?.items, + ); + if (object.properties.order.allOf.length === 1) { + object.properties.order = object.properties.order.allOf[0]; + } + } + if ( + object.properties?.orders?.items?.allOf?.find( + (e) => e?.$ref === "#/components/schemas/OrderCalculated", + ) + ) { + object.properties.orders.items.allOf = + object.properties?.orders.items?.allOf.filter( + (e) => !e?.properties?.items, + ); + if (object.properties.orders.items.allOf.length === 1) { + object.properties.orders.items = + object.properties.orders.items.allOf[0]; + } + } + return Object.fromEntries( + Object.entries(object).map((keyAndEntry) => { + const [key, entry] = keyAndEntry; + return [key, fixOrderCalculated(entry)]; + }), + ); + } + return object; +}; + if (!("language" in options)) { console.log(colors.red("invalid arguments, missing language parameter")); } else if ( From b9104d0fb51cf4db72ee6ab1510eacd982cf983d Mon Sep 17 00:00:00 2001 From: p-woznikowski Date: Thu, 19 Dec 2024 17:51:27 +0100 Subject: [PATCH 23/23] Changelog, auto-gen files --- changelog/OPEN-API.md | 4 ++++ reference/readonly-sdks/java/OpenAPI.json | 18 +++++++++++++++--- reference/readonly-sdks/php/OpenAPI.json | 18 +++++++++++++++--- reference/readonly-sdks/python/OpenAPI.json | 18 +++++++++++++++--- reference/readonly-sdks/ruby/OpenAPI.json | 18 +++++++++++++++--- 5 files changed, 64 insertions(+), 12 deletions(-) diff --git a/changelog/OPEN-API.md b/changelog/OPEN-API.md index b5a72f40..12256390 100644 --- a/changelog/OPEN-API.md +++ b/changelog/OPEN-API.md @@ -4,6 +4,10 @@ Older changes in [DEPRECATED.md](deprecated/DEPRECATED.md) +## 2024-12-19 + +Added `application_details` property to Qualifications, Validations, and Redemptions, and the associated `ApplicationDetails` schema + ## 2024-12-12 - Removed `bundle_rules` from the `ValidationRuleBase` schema – the feature is not released yet diff --git a/reference/readonly-sdks/java/OpenAPI.json b/reference/readonly-sdks/java/OpenAPI.json index 3e4f51eb..904624d8 100644 --- a/reference/readonly-sdks/java/OpenAPI.json +++ b/reference/readonly-sdks/java/OpenAPI.json @@ -15863,7 +15863,7 @@ "items": { "title": "OrdersCreateResponseBodyItems", "type": "array", - "description": "Array of items applied to the order. It can include up 500 items.", + "description": "Array of items applied to the order. It can include up to 500 items.", "items": { "$ref": "#/components/schemas/OrderCalculatedItem" }, @@ -16114,7 +16114,7 @@ "items": { "title": "OrdersGetResponseBodyItems", "type": "array", - "description": "Array of items applied to the order. It can include up 500 items.", + "description": "Array of items applied to the order. It can include up to 500 items.", "items": { "$ref": "#/components/schemas/OrderCalculatedItem" }, @@ -16415,7 +16415,7 @@ "items": { "title": "OrdersUpdateResponseBodyItems", "type": "array", - "description": "Array of items applied to the order. It can include up 500 items.", + "description": "Array of items applied to the order. It can include up to 500 items.", "items": { "$ref": "#/components/schemas/OrderCalculatedItem" }, @@ -23033,6 +23033,18 @@ "allOf": [ { "$ref": "#/components/schemas/OrderCalculated" + }, + { + "type": "object", + "properties": { + "items": { + "type": "array", + "description": "Array of items applied to the order. It can include up to 500 items.", + "items": { + "$ref": "#/components/schemas/OrderCalculatedItem" + } + } + } } ] } diff --git a/reference/readonly-sdks/php/OpenAPI.json b/reference/readonly-sdks/php/OpenAPI.json index 7a4ac6ac..328962b0 100644 --- a/reference/readonly-sdks/php/OpenAPI.json +++ b/reference/readonly-sdks/php/OpenAPI.json @@ -16286,7 +16286,7 @@ "items": { "title": "OrdersCreateResponseBodyItems", "type": "array", - "description": "Array of items applied to the order. It can include up 500 items.", + "description": "Array of items applied to the order. It can include up to 500 items.", "items": { "$ref": "#/components/schemas/OrderCalculatedItem" }, @@ -16587,7 +16587,7 @@ "items": { "title": "OrdersGetResponseBodyItems", "type": "array", - "description": "Array of items applied to the order. It can include up 500 items.", + "description": "Array of items applied to the order. It can include up to 500 items.", "items": { "$ref": "#/components/schemas/OrderCalculatedItem" }, @@ -16888,7 +16888,7 @@ "items": { "title": "OrdersUpdateResponseBodyItems", "type": "array", - "description": "Array of items applied to the order. It can include up 500 items.", + "description": "Array of items applied to the order. It can include up to 500 items.", "items": { "$ref": "#/components/schemas/OrderCalculatedItem" }, @@ -23836,6 +23836,18 @@ "allOf": [ { "$ref": "#/components/schemas/OrderCalculated" + }, + { + "type": "object", + "properties": { + "items": { + "type": "array", + "description": "Array of items applied to the order. It can include up to 500 items.", + "items": { + "$ref": "#/components/schemas/OrderCalculatedItem" + } + } + } } ] } diff --git a/reference/readonly-sdks/python/OpenAPI.json b/reference/readonly-sdks/python/OpenAPI.json index 9a531ae2..e6c108b8 100644 --- a/reference/readonly-sdks/python/OpenAPI.json +++ b/reference/readonly-sdks/python/OpenAPI.json @@ -15675,7 +15675,7 @@ "items": { "title": "OrdersCreateResponseBodyItems", "type": "array", - "description": "Array of items applied to the order. It can include up 500 items.", + "description": "Array of items applied to the order. It can include up to 500 items.", "items": { "$ref": "#/components/schemas/OrderCalculatedItem" }, @@ -15923,7 +15923,7 @@ "items": { "title": "OrdersGetResponseBodyItems", "type": "array", - "description": "Array of items applied to the order. It can include up 500 items.", + "description": "Array of items applied to the order. It can include up to 500 items.", "items": { "$ref": "#/components/schemas/OrderCalculatedItem" }, @@ -16221,7 +16221,7 @@ "items": { "title": "OrdersUpdateResponseBodyItems", "type": "array", - "description": "Array of items applied to the order. It can include up 500 items.", + "description": "Array of items applied to the order. It can include up to 500 items.", "items": { "$ref": "#/components/schemas/OrderCalculatedItem" }, @@ -22839,6 +22839,18 @@ "allOf": [ { "$ref": "#/components/schemas/OrderCalculated" + }, + { + "type": "object", + "properties": { + "items": { + "type": "array", + "description": "Array of items applied to the order. It can include up to 500 items.", + "items": { + "$ref": "#/components/schemas/OrderCalculatedItem" + } + } + } } ] } diff --git a/reference/readonly-sdks/ruby/OpenAPI.json b/reference/readonly-sdks/ruby/OpenAPI.json index e2d8e38a..e6611b0e 100644 --- a/reference/readonly-sdks/ruby/OpenAPI.json +++ b/reference/readonly-sdks/ruby/OpenAPI.json @@ -15897,7 +15897,7 @@ "items": { "title": "OrdersCreateResponseBodyItems", "type": "array", - "description": "Array of items applied to the order. It can include up 500 items.", + "description": "Array of items applied to the order. It can include up to 500 items.", "items": { "$ref": "#/components/schemas/OrderCalculatedItem" }, @@ -16148,7 +16148,7 @@ "items": { "title": "OrdersGetResponseBodyItems", "type": "array", - "description": "Array of items applied to the order. It can include up 500 items.", + "description": "Array of items applied to the order. It can include up to 500 items.", "items": { "$ref": "#/components/schemas/OrderCalculatedItem" }, @@ -16449,7 +16449,7 @@ "items": { "title": "OrdersUpdateResponseBodyItems", "type": "array", - "description": "Array of items applied to the order. It can include up 500 items.", + "description": "Array of items applied to the order. It can include up to 500 items.", "items": { "$ref": "#/components/schemas/OrderCalculatedItem" }, @@ -23067,6 +23067,18 @@ "allOf": [ { "$ref": "#/components/schemas/OrderCalculated" + }, + { + "type": "object", + "properties": { + "items": { + "type": "array", + "description": "Array of items applied to the order. It can include up to 500 items.", + "items": { + "$ref": "#/components/schemas/OrderCalculatedItem" + } + } + } } ] }