Skip to content

Instantly share code, notes, and snippets.

@wayne-o
Created June 8, 2021 13:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wayne-o/2aa2dfb98860f8fa8226c646e27e0975 to your computer and use it in GitHub Desktop.
Save wayne-o/2aa2dfb98860f8fa8226c646e27e0975 to your computer and use it in GitHub Desktop.
{
"atomic:operations": [
{
"op": "add",
"data": {
"type": "draft-order-items",
"attributes": {
"ticket-type": "20970000-75ac-8e55-08b6-08d9202fca35",
"requested-tickets": 1
},
"lid": "31512c7c-9160-4803-876f-eba3b6bbd69e",
"relationships": {
"draft-order": {
"data": {
"type": "draft-orders",
"lid": "8fe8aed0-205e-4ba4-9115-10e8b2624ae8"
}
}
}
},
"description": "create draft-order-items"
},
{
"op": "add",
"data": {
"type": "ticket-details",
"attributes": {
"price": 1,
"name": "asdasd",
"quantity": 1,
"event-instance-id": "20970000-75ac-8e55-2c6e-08d9202cde70",
"display-name": "asdasd"
},
"lid": "f00d9c8f-0bc1-4887-a8dc-909490a3d919"
},
"description": "create ticket-details"
},
{
"op": "update",
"description": "link ticket-details to draft-order-items",
"ref": {
"type": "draft-order-items",
"relationship": "ticket",
"lid": "31512c7c-9160-4803-876f-eba3b6bbd69e"
},
"data": {
"type": "ticket-details",
"lid": "f00d9c8f-0bc1-4887-a8dc-909490a3d919"
}
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment