connect-api-specification
connect-api-specification copied to clipboard
ProductType is missing RESTAURANT
I'm getting device.code.paired webhook requests where the data.object.device_code.product_type is "RESTAURANT". The spec only has "TERMINAL_API" as an enum for ProductType.
(I hope this is helpful. I LOVE that you guys publish this api spec--I generated a swift API from it to use with my Vapor 4 backend. Awesome!!!)
{
"created_at": "2021-01-27T21:12:22.326Z",
"data": {
"id": "XXXXXXXXXXXX",
"object": {
"device_code": {
"code": "XXXXXXXXXXX",
"created_at": "2021-01-27T21:11:53.000Z",
"device_id": "DEVICE_INSTALLATION_ID:XXXXXXXXXXX",
"id": "XXXXXXXXXXX",
"location_id": "XXXXXXXXXXX",
"name": "iPad5",
"paired_at": "2021-01-27T21:12:16.000Z",
"product_type": "RESTAURANT",
"status": "PAIRED",
"status_changed_at": "2021-01-27T21:12:16.000Z"
}
},
"type": "device.code"
},
"event_id": "XXXXXXXXXXXXXXXXXXXXXXXXXX",
"location_id": "XXXXXXXXXXX",
"merchant_id": "XXXXXXXXXXX",
"type": "device.code.paired"
}
Thanks for sharing, I'll relay to the team. Note this shouldn't break any of our current SDKs as we should use strings instead of enums so that things like this won't break.