From a1424f30df8a9c6494e5315169a4874b0993b6b7 Mon Sep 17 00:00:00 2001 From: jkaliszuk Date: Mon, 20 Nov 2023 15:00:11 +0100 Subject: [PATCH] Finished CampaignResponse object. --- reference/OpenAPI.json | 84 ++++++++++++++++++++++++++++++++++-------- 1 file changed, 69 insertions(+), 15 deletions(-) diff --git a/reference/OpenAPI.json b/reference/OpenAPI.json index 1d0cbe792..0ca5f6d4f 100644 --- a/reference/OpenAPI.json +++ b/reference/OpenAPI.json @@ -7516,7 +7516,7 @@ "description": "Indicates whether the resource can be deleted." }, "category_id": { - "type": "string", + "type": [ "string", "null" ], "description": "Unique category ID that this campaign belongs to.", "example": "cat_0b688929a2476386a7" }, @@ -7594,7 +7594,7 @@ } }, "promotion": { - "$ref": "#/components/schemas/3_res_list_promotion_tiers_from_campaign" + "$ref": "#/components/schemas/PromotionTiersList" }, "validation_rules_assignments": { "$ref": "#/components/schemas/ValidationRulesAssignmentsList" @@ -7602,7 +7602,24 @@ "loyalty_tiers_expiration": { "$ref": "#/components/schemas/LoyaltyTiersExpirationAll" } - } + }, + "required": [ + "id", + "name", + "campaign_type", + "type", + "auto_join", + "join_once", + "use_voucher_metadata_schema", + "created_at", + "creation_status", + "vouchers_generation_status", + "protected", + "category_id", + "categories", + "object", + "metadata" + ] }, "CampaignVoucher": { "type": "object", @@ -7631,9 +7648,12 @@ "description": "Defines the redemption limits on vouchers.", "properties": { "quantity": { - "type": "integer", + "type": [ "integer", "null" ], "description": "How many times a voucher can be redeemed. A `null` value means unlimited." - } + }, + "required": [ + "quantity" + ] } }, "code_config": { @@ -7664,7 +7684,12 @@ "type": "integer", "description": "The initial count" } - } + }, + "required": [ + "length", + "charset", + "pattern" + ] }, "is_referral_code": { "type": "boolean", @@ -7696,7 +7721,13 @@ } } } - } + }, + "required": [ + "type", + "redemption", + "code_config", + "is_referral_code" + ] }, "CampaignLoyaltyCard": { "type": "object", @@ -7726,9 +7757,19 @@ "type": "integer", "description": "Value of rounding" } - } + }, + "required": [ + "period_type", + "period_value", + "rounding_type", + "rounding_value" + ] } - } + }, + "required": [ + "points", + "expiration_rules" + ] }, "2_loyalty_tiers_expiration_balance": { "title": "Balance", @@ -9529,7 +9570,8 @@ "description": "This is an object representing a promotion tier. Promotion tiers are always assigned to a campaign and cannot be used standalone.", "title": "Promotion Tier", "x-tags": [ - "PROMOTIONS API" + "PROMOTIONS API", + "CAMPAIGNS API" ], "properties": { "id": { @@ -9950,7 +9992,7 @@ } } }, - "3_res_list_promotion_tiers_from_campaign": { + "PromotionTiersList": { "type": "object", "description": "Promotion Tiers", "title": "Promotion Tiers", @@ -24066,7 +24108,10 @@ ], "description": "What triggers the tier to be valid for a customer. \n`IMMEDIATE`: After reaching the minimum required points. \n`NEXT_PERIOD`: When the next qualification period starts." } - } + }, + "required": [ + "type" + ] }, "expiration_date": { "type": "object", @@ -24121,9 +24166,18 @@ } } } - } + }, + "required": [ + "type", + "extend" + ] } - } + }, + "required": [ + "qualification_type", + "start_date", + "expiration_date" + ] }, "8_loyalty_tiers_expiration_balance_expiration_date_balance_drop": { "title": "Balance Drop", @@ -47075,7 +47129,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/3_res_list_promotion_tiers_from_campaign" + "$ref": "#/components/schemas/PromotionTiersList" }, "examples": { "Example": {