2023-02-28 12:13:55 +01:00

114 lines
2.3 KiB
JSON

"transaction":
{
"id": "add-items-to-basket",
"arguments": [
{
"name": "user-id",
"type": "guid"
},
{
"name": "item-1-id",
"type": "string"
},
{
"name": "item-1-name",
"type": "string"
},
{
"name": "item-1-price",
"type": "unsignedInt"
},
{
"name": "item-1-available-stock",
"type": "unsignedInt"
},
{
"name": "item-2-id",
"type": "string"
},
{
"name": "item-2-name",
"type": "string"
},
{
"name": "item-2-price",
"type": "unsignedInt"
},
{
"name": "item-2-available-stock",
"type": "unsignedInt"
},
{
"name": "item-3-id",
"type": "string"
},
{
"name": "item-3-name",
"type": "string"
},
{
"name": "item-3-price",
"type": "unsignedInt"
},
{
"name": "item-3-available-stock",
"type": "unsignedInt"
},
],
"operations": [
{
"operationRefId": "catalog-get-items",
"id": "op-1",
},
{
"operationRefId": "basket-add-item",
"id": "op-2",
"providedValues": [
{
"key": "buyerId",
"value": "{{user-id}}"
},
{
"key": "item-1",
"value":
{
"id": "1",
"productId": "{{item-1-id}}",
"productName": "{{item-1-name}}",
"unitPrice": "{{item-1-price}}",
"oldUnitPrice": "{{item-1-price}}",
"quantity": "{{item-1-available-stock}}",
"pictureUrl": ""
},
},
{
"key": "item-2",
"value":
{
"id": "2",
"productId": "{{item-2-id}}",
"productName": "{{item-2-name}}",
"unitPrice": "{{item-2-price}}",
"oldUnitPrice": "{{item-2-price}}",
"quantity": "{{item-2-available-stock}}",
"pictureUrl": ""
},
},
{
"key": "item-3",
"value":
{
"id": "3",
"productId": "{{item-3-id}}",
"productName": "{{item-3-name}}",
"unitPrice": "{{item-3-price}}",
"oldUnitPrice": "{{item-3-price}}",
"quantity": "{{item-3-available-stock}}",
"pictureUrl": ""
}
}
]
}
]
}