square / square/connect-api-specification

ProductType is missing RESTAURANT

Open
#157 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Mustache
Stars
76
Forks
36
Avg merge
3h 14m
Merged PRs (30d)
1

Description

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"
}

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in the OpenAPI specification by locating the ProductType enum referenced by device.code.paired webhook data. Confirm how enum values are represented in the spec, add RESTAURANT if appropriate, and validate the specification with the repository's available checks; the enum should accept the reported webhook value.

Written by the indexing model from the issue text.

Assessment

Tech stack
openapi
Domain
api
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.