From 88d6dde44c21c0a38dbb2780796afd70999d8305 Mon Sep 17 00:00:00 2001 From: p-zielinski <82354717+p-zielinski@users.noreply.github.com> Date: Wed, 11 Oct 2023 17:19:36 +0200 Subject: [PATCH] descriptions --- reference/OpenAPI.json | 511 ++++++++++++++++++++++++----------------- 1 file changed, 294 insertions(+), 217 deletions(-) diff --git a/reference/OpenAPI.json b/reference/OpenAPI.json index 8ee9e9b87..6546fe88b 100644 --- a/reference/OpenAPI.json +++ b/reference/OpenAPI.json @@ -39282,10 +39282,12 @@ "limit": { "type": "integer", "minimum": 1, - "multipleOf": 100 + "multipleOf": 100, + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100 items." }, "page": { - "type": "integer" + "type": "integer", + "description": "Which page of results to return." }, "order": { "type": "string", @@ -39294,7 +39296,8 @@ "-created_at", "updated_at", "-updated_at" - ] + ], + "description": "Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order." } } }, @@ -39308,10 +39311,12 @@ "limit": { "type": "integer", "minimum": 1, - "multipleOf": 100 + "multipleOf": 100, + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100 items." }, "page": { - "type": "integer" + "type": "integer", + "description": "Which page of results to return." } } }, @@ -39332,22 +39337,26 @@ "type": "string", "enum": [ "list" - ] + ], + "description": "The type of object represented by JSON. This object stores information about loyalty tiers in a dictionary." }, "data_ref": { "type": "string", "enum": [ "data" - ] + ], + "description": "Identifies the name of the attribute that contains the array of loyalty tier objects." }, "data": { "type": "array", + "description": "This is an object representing a loyalty tier. Loyalty tiers are used to create a loyalty program with different levels of membership and varied earning rules and rewards based on customer’s tiers.", "items": { "$ref": "#/components/schemas/LoyaltyTier" } }, "total": { - "type": "integer" + "type": "integer", + "description": "Total number of loyalty tier objects." } }, "required": [ @@ -39368,13 +39377,15 @@ "type": "string", "enum": [ "list" - ] + ], + "description": "The type of object represented by JSON. This object stores information about loyalty tiers in a dictionary." }, "data_ref": { "type": "string", "enum": [ "data" - ] + ], + "description": "Identifies the name of the attribute that contains the array of loyalty tier objects." }, "data": { "type": "array", @@ -39383,7 +39394,8 @@ } }, "total": { - "type": "integer" + "type": "integer", + "description": "Total number of loyalty tier objects." } }, "required": [ @@ -39440,22 +39452,26 @@ "type": "string", "enum": [ "list" - ] + ], + "description": "The type of object represented by JSON. This object stores information about earning rules in a dictionary." }, "data_ref": { "type": "string", "enum": [ "data" - ] + ], + "description": "Identifies the name of the attribute that contains the array of earning rule objects." }, "data": { "type": "array", + "description": "Contains array of earning rule objects.", "items": { "$ref": "#/components/schemas/EarningRule" } }, "total": { - "type": "integer" + "type": "integer", + "description": "Total number of earning rule objects." } }, "required": [ @@ -39473,39 +39489,38 @@ "type": "object", "properties": { "name": { - "type": "string" + "type": "string", + "description": "Loyalty Tier name." }, "metadata": { - "type": "object" + "type": "object", + "description": "The metadata object stores all custom attributes assigned to the loyalty tier. A set of key/value pairs that you can attach to a loyalty tier object. It can be useful for storing additional information about the loyalty tier in a structured format.\n\n" }, "earning_rules": { "type": "object", "additionalProperties": { - "anyOf": [{ - "$ref": "#/components/schemas/MappingMultiply" - },{ - "$ref": "#/components/schemas/MappingFixed" - }] - } + "$ref": "#/components/schemas/MappingPoints" + }, + "description": "Contains a list of earning rule IDs and their points mapping for the given earning rule." }, "rewards": { "type": "object", "additionalProperties": { - "anyOf": [{ - "$ref": "#/components/schemas/MappingMultiply" - },{ - "$ref": "#/components/schemas/MappingFixed" - }] - } + "$ref": "#/components/schemas/MappingPoints" + }, + "description": "Contains a list of reward IDs and their points mapping for the given reward." }, "points": { "type": "object", + "description": "Defines range of loyalty tier in points.", "properties": { "from": { - "type": "integer" + "type": "integer", + "description": "Bottom points threshold value." }, "to": { - "type": "integer" + "type": "integer", + "description": "Top points threshold value." } } } @@ -39523,65 +39538,69 @@ "type": "object", "properties": { "id": { - "type": "string" + "type": "string", + "description": "Unique loyalty tier ID." }, "name": { - "type": "string" + "type": "string", + "description": "Loyalty Tier name." }, "campaign_id": { - "type": "string" + "type": "string", + "description": "Unique parent campaign ID." }, "metadata": { "type": [ "object", "null" - ] + ], + "description": "The metadata object stores all custom attributes assigned to the loyalty tier. A set of key/value pairs that you can attach to a loyalty tier object. It can be useful for storing additional information about the loyalty tier in a structured format." }, "created_at": { "type": "string", - "format": "date-time" + "format": "date-time", + "description": "Timestamp representing the date and time when the loyalty tier was created in ISO 8601 format." }, "updated_at": { "type": [ "string", "null" ], - "format": "date-time" + "format": "date-time", + "description": "Timestamp representing the date and time when the loyalty tier was updated in ISO 8601 format." }, "earning_rules": { "type": "object", "additionalProperties": { - "anyOf": [{ - "$ref": "#/components/schemas/MappingMultiply" - },{ - "$ref": "#/components/schemas/MappingFixed" - }] - } + "$ref": "#/components/schemas/MappingPoints" + }, + "description": "Contains a list of earning rule IDs and their points mapping for the given earning rule." }, "rewards": { "type": "object", "additionalProperties": { - "anyOf": [{ - "$ref": "#/components/schemas/MappingMultiply" - },{ - "$ref": "#/components/schemas/MappingFixed" - }] - } + "$ref": "#/components/schemas/MappingPoints" + }, + "description": "Contains a list of reward IDs and their points mapping for the given reward." }, "config": { "type": "object", "required": [ "points" ], + "description": "Defines loyalty tier range in points.", "properties": { "points": { "type": "object", + "description": "Defines range of loyalty tier in points.", "properties": { "from": { - "type": "integer" + "type": "integer", + "description": "Bottom points threshold value." }, "to": { - "type": "integer" + "type": "integer", + "description": "Top points threshold value." } } } @@ -39589,17 +39608,21 @@ }, "points": { "type": "object", + "description": "Defines range of loyalty tier in points.", "properties": { "from": { - "type": "integer" + "type": "integer", + "description": "Bottom points threshold value." }, "to": { - "type": "integer" + "type": "integer", + "description": "Top points threshold value." } } }, "expiration": { "type": "object", + "description": "Defines loyalty tier expiration date.", "properties": { "customer_id": { "type": "string" @@ -39638,7 +39661,8 @@ "type": "string", "enum": [ "loyalty_tier" - ] + ], + "description": "The type of object represented by JSON. This object stores information about the loyalty." } }, "required": [ @@ -39663,10 +39687,12 @@ "type": "string", "enum": [ "MULTIPLY" - ] + ], + "description": "Type of calculation." }, "multiplier": { - "type": "number" + "type": "number", + "description": "Multiplication factor used to multiply the points to obtain the mapped points." } } }, @@ -39681,10 +39707,12 @@ "type": "string", "enum": [ "CUSTOM" - ] + ], + "description": "Type of calculation.\n\n" }, "points": { - "type": "integer" + "type": "integer", + "description": "Fixed number of points to be applied." } } }, @@ -39693,25 +39721,32 @@ "type": "object", "properties": { "id": { - "type": "string" + "type": "string", + "description": "Unique reward assignment ID, assigned by Voucherify." }, "reward_id": { - "type": "string" + "type": "string", + "description": "Associated reward ID." }, "related_object_id": { - "type": "string" + "type": "string", + "description": "Related object ID to which the reward was assigned." }, "related_object_type": { - "type": "string" + "type": "string", + "description": "Related object type to which the reward was assigned." }, "parameters": { "type": "object", + "description": "Defines the cost of the reward.", "properties": { "loyalty": { "type": "object", + "description": "Defines the equivalent points value of the reward.", "properties": { "points": { - "type": "integer" + "type": "integer", + "description": "The number of points required to redeem the reward." } }, "required": [ @@ -39721,13 +39756,18 @@ } }, "created_at": { - "type": "string" + "type": "string", + "description": "Timestamp representing the date and time when the reward assignment was created in ISO 8601 format.", + "format": "date-time" }, "updated_at": { - "type": "string" + "type": "string", + "description": "Timestamp representing the date and time when the reward assignment was updated in ISO 8601 format.", + "format": "date-time" }, "object": { - "type": "string" + "type": "string", + "description": "The type of object represented by the JSON. This object stores information about the reward assignment." } }, "required": [ @@ -39738,44 +39778,55 @@ ] }, "Reward": { - "title": "Reward", "allOf": [ { "type": "object", "properties": { "id": { - "type": "string" + "type": "string", + "description": "Unique reward ID, assigned by Voucherify." }, "name": { - "type": "string" + "type": "string", + "description": "Reward name." }, "stock": { - "type": "integer" + "type": "integer", + "description": "Configurable for material rewards. The number of units of the product that you want to share as reward." }, "redeemed": { - "type": "integer" + "type": "integer", + "description": "Defines the number of already invoked (successful) reward redemptions." }, "attributes": { "type": "object", + "description": "These properties are configurable for material rewards.", "properties": { "image_url": { - "type": "string" + "type": "string", + "description": "The HTTPS URL pointing to the .png or .jpg file." }, "description": { - "type": "string" + "type": "string", + "description": "An arbitrary string that you can attach to a material reward." } } }, "created_at": { - "type": "string" + "type": "string", + "format": "date-time", + "description": "Timestamp representing the date and time when the reward was created in ISO 8601 format." }, "updated_at": { - "type": "string" + "type": "string", + "format": "date-time", + "description": "Timestamp representing the date and time when the reward was updated in ISO 8601 format." }, "object": { "type": "string", "default": "reward", - "pattern": "reward" + "pattern": "reward", + "description": "The type of object represented by the JSON. This object stores information about the reward." } }, "required": [ @@ -39789,6 +39840,174 @@ } ] }, + "RewardType": { + "title": "Reward Type", + "anyOf": [ + { + "$ref": "#/components/schemas/RewardTypeCampaign" + }, + { + "$ref": "#/components/schemas/RewardTypeCoin" + }, + { + "$ref": "#/components/schemas/RewardTypeCoin" + } + ] + }, + "MappingPoints": { + "anyOf": [ + { + "$ref": "#/components/schemas/MappingMultiply" + }, + { + "$ref": "#/components/schemas/MappingFixed" + } + ] + }, + "RewardTypeCoin": { + "title": "Reward Type Coin", + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "COIN" + ], + "description": "Reward type." + }, + "parameters": { + "type": "object", + "required": [ + "coin" + ], + "description": "Defines how the reward is generated.", + "properties": { + "coin": { + "type": "object", + "required": [ + "exchange_ratio" + ], + "description": "Defines the ratio by mapping the number of loyalty points in points_ratio to a predefined cash amount in exchange_ratio.", + "properties": { + "exchange_ratio": { + "type": "number", + "description": "The cash equivalent of the points defined in the points_ratio property." + }, + "points_ratio": { + "type": "integer", + "description": "The number of loyalty points that will map to the predefined cash amount defined by the exchange_ratio property." + } + } + } + } + } + }, + "required": [ + "type", + "parameters" + ] + }, + "RewardTypeMaterial": { + "title": "Reward Type Material", + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "MATERIAL" + ], + "description": "Reward type." + }, + "parameters": { + "type": "object", + "required": [ + "product" + ], + "description": "Defines how the reward is generated.", + "properties": { + "product": { + "type": "object", + "required": [ + "id", + "sku" + ], + "description": "Contains information about the product given as a reward.", + "properties": { + "id": { + "type": "string", + "description": "Unique product ID, assigned by Voucherify." + }, + "sku": { + "type": [ + "string", + "null" + ], + "description": "Unique SKU ID, assigned by Voucherify, of the SKU given as a reward." + } + } + } + } + } + }, + "required": [ + "type", + "parameters" + ] + }, + "RewardTypeCampaign": { + "title": "Reward Type Campaign", + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "CAMPAIGN" + ], + "description": "Reward type." + }, + "parameters": { + "type": "object", + "required": [ + "campaign" + ], + "description": "Defines how the reward is generated.", + "properties": { + "campaign": { + "type": "object", + "required": [ + "id", + "type" + ], + "description": "Objects stores information about the campaign related to the reward.", + "properties": { + "id": { + "type": "string", + "description": "Unique campaign ID, assigned by Voucherify." + }, + "balance": { + "type": "integer", + "description": "The incremental amout to be added to the current balance on the gift card. Value is multiplied by 100 to precisely represent 2 decimal places. For example, $100 amount is written as 10000." + }, + "type": { + "type": "string", + "enum": [ + "DISCOUNT_COUPONS", + "PROMOTION", + "GIFT_VOUCHERS", + "REFERRAL_PROGRAM" + ], + "description": "Campaign type." + } + } + } + } + } + }, + "required": [ + "type", + "parameters" + ] + }, "LoyaltiesGetEarningRuleResponseBody": { "$ref": "#/components/schemas/EarningRule" }, @@ -41285,148 +41504,6 @@ "user_id" ] }, - "RewardTypeCoin": { - "title": "Reward Type Coin", - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "COIN" - ] - }, - "parameters": { - "type": "object", - "required": [ - "coin" - ], - "properties": { - "coin": { - "type": "object", - "required": [ - "exchange_ratio" - ], - "properties": { - "exchange_ratio": { - "type": "number" - }, - "points_ratio": { - "type": "integer" - } - } - } - } - } - }, - "required": [ - "type", - "parameters" - ] - }, - "RewardTypeMaterial": { - "title": "Reward Type Material", - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "MATERIAL" - ] - }, - "parameters": { - "type": "object", - "required": [ - "product" - ], - "properties": { - "product": { - "type": "object", - "required": [ - "id", - "sku" - ], - "properties": { - "id": { - "type": "string" - }, - "sku": { - "type": [ - "string", - "null" - ] - } - } - } - } - } - }, - "required": [ - "type", - "parameters" - ] - }, - "RewardTypeCampaign": { - "title": "Reward Type Campaign", - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "CAMPAIGN" - ] - }, - "parameters": { - "type": "object", - "required": [ - "campaign" - ], - "properties": { - "campaign": { - "type": "object", - "required": [ - "id", - "type" - ], - "properties": { - "id": { - "type": "string" - }, - "balance": { - "type": "integer" - }, - "type": { - "type": "string", - "enum": [ - "DISCOUNT_COUPONS", - "PROMOTION", - "GIFT_VOUCHERS", - "REFERRAL_PROGRAM" - ] - } - } - } - } - } - }, - "required": [ - "type", - "parameters" - ] - }, - "RewardType": { - "title": "Reward Type", - "anyOf": [ - { - "$ref": "#/components/schemas/RewardTypeCampaign" - }, - { - "$ref": "#/components/schemas/RewardTypeCoin" - }, - { - "$ref": "#/components/schemas/RewardTypeCoin" - } - ] - }, "LoyaltiesAddOrRemoveCardBalanceResponseBody": { "title": "Loyalties Add Or Remove Card Balance Response Body", "type": "object",