Skip to content

Commit

Permalink
separate the coin reward assignment and campaign/material reward assi…
Browse files Browse the repository at this point in the history
…gnment
  • Loading branch information
weronika-kurczyna committed Oct 18, 2023
1 parent 78fa8f8 commit 37ebcdb
Showing 1 changed file with 76 additions and 26 deletions.
102 changes: 76 additions & 26 deletions reference/OpenAPI.json
Original file line number Diff line number Diff line change
Expand Up @@ -10452,28 +10452,6 @@
"enum": [
"campaign"
]
},
"parameters": {
"description": "Defines the cost of the reward.",
"type": "object",
"properties": {
"loyalty": {
"type": "object",
"description": "Defines the equivalent points value of the reward.",
"required": [
"points"
],
"properties": {
"points": {
"type": "integer",
"description": "The number of points required to redeem the reward."
}
}
}
},
"required": [
"loyalty"
]
}
},
"required": [
Expand Down Expand Up @@ -10539,8 +10517,54 @@
"object"
]
},
"reward_assignment_campaign_and_material_reward_parameters": {
"title": "Reward Assignment Campaign and MAterial Reward Parameters",
"type": "object",
"x-tags": [
"REWARDS API"
],
"properties": {
"parameters": {
"description": "Defines the cost of the reward.",
"type": "object",
"properties": {
"loyalty": {
"type": "object",
"description": "Defines the equivalent points value of the reward.",
"required": [
"points"
],
"properties": {
"points": {
"type": "integer",
"description": "The number of points required to redeem the reward."
}
}
}
},
"required": [
"loyalty"
]
}
},
"required": [
"parameters"
]
},
"reward_assignment": {
"title": "Reward Assignment",
"oneOf": [
{
"$ref": "#/components/schemas/reward_assignment_coin_reward"
},
{
"$ref": "#/components/schemas/reward_assignment_campaign_and_material_reward"
}
],
"type": "object"
},
"reward_assignment_coin_reward": {
"title": "Reward Assignment - Coin Reward",
"allOf": [
{
"$ref": "#/components/schemas/reward_assignment_identity"
Expand All @@ -10554,6 +10578,24 @@
],
"type": "object"
},
"reward_assignment_campaign_and_material_reward": {
"title": "Reward Assignment - Campaign and Material Reward",
"allOf": [
{
"$ref": "#/components/schemas/reward_assignment_identity"
},
{
"$ref": "#/components/schemas/reward_assignment_base"
},
{
"$ref": "#/components/schemas/reward_assignment_response_data"
},
{
"$ref": "#/components/schemas/reward_assignment_campaign_and_material_reward_parameters"
}
],
"type": "object"
},
"rewards_list_assignments_response_body": {
"type": "object",
"description": "Response body schema for **GET** `/rewards/{rewardID}/assignments`.",
Expand Down Expand Up @@ -10592,14 +10634,14 @@
"title": "Create Reward Assignment Request Body",
"oneOf": [
{
"$ref": "#/components/schemas/rewards_create_assignment_main_reward_request_body"
"$ref": "#/components/schemas/rewards_create_assignment_campaign_and_material_reward_request_body"
},
{
"$ref": "#/components/schemas/rewards_create_assignment_coin_reward_request_body"
}
]
},
"rewards_create_assignment_main_reward_request_body": {
"rewards_create_assignment_campaign_and_material_reward_request_body": {
"description": "Request body schema for **POST** `/rewards/{rewardID}/assignments`.",
"title": "Main Reward",
"properties": {
Expand Down Expand Up @@ -10635,16 +10677,24 @@
"rewards_create_assignment_coin_reward_request_body": {
"description": "Request body schema for **POST** `/rewards/{rewardID}/assignments`.",
"title": "Coin Reward",
"type": "object",
"properties": {
"campaign": {
"type": "string",
"description": "The campaign ID of the campaign to which the reward is to be assigned."
},
"validation_rules": {
"type": "array",
"items": {
"type": "string",
"maxLength": 1,
"minLength": 0
}
}
},
"required": [
"campaign"
],
"type": "object"
]
},
"5_obj_publication_object": {
"title": "Publication Object",
Expand Down

0 comments on commit 37ebcdb

Please sign in to comment.