Hi,
I am able to add a discount to an individual check menu item by using the Simphony REST api
"Post a new round to a check"
POST {basePath}/checks/{checkRef}/round
How can I acheive the same using the C# SDK?
I have tried the following code:
But that applies the discount to the check and not the individual item on the check.
I have searched on the forum that someone used
to first select the menu item but that gave me an error saying "not found / not selected.
I am calling this code inside the Application_OpsMiEvent handler
Thanks in advance.
I am able to add a discount to an individual check menu item by using the Simphony REST api
"Post a new round to a check"
POST {basePath}/checks/{checkRef}/round
JSON:
"menuItems": [
{
"menuItemId": 123,
"definitionSequence": 1,
"name": "Item Name",
"quantity": 1,
"unitPrice": 1.00,
"priceSequence": 1,
"total": 1.00,
"seat": 1,
"surcharge": 0.0000,
"condiments": [] ,
"itemDiscounts": [
{
"discountId": 123,
"name": "string",
"seat": 0,
"total": 2,
"isAutomatic": true,
"extensions": [
{
"displayName": "string",
"appName": "string",
"dataName": "string",
"dataType": "string",
"data": "string",
"options": [
"printOnDisplay"
]
}
]
}
]
}
]
How can I acheive the same using the C# SDK?
I have tried the following code:
Code:
OpsContext.ProcessCommand(new OpsCommand(OpsCommandType.Discount) { Number = 123 });
But that applies the discount to the check and not the individual item on the check.
I have searched on the forum that someone used
Code:
OpsContext.ProcessCommand(new OpsCommand(OpsCommandType.DetailSelected) { Number = 1 });
to first select the menu item but that gave me an error saying "not found / not selected.
I am calling this code inside the Application_OpsMiEvent handler
Thanks in advance.