bold-commerce / go-shopify

Go client for the Shopify API
MIT License
328 stars 255 forks source link

AWS EventBridge Support missing #171

Open Tanish2002 opened 2 years ago

Tanish2002 commented 2 years ago

Shopify has support for AWS EventBridge(here), which can be used to integrate webhook delivery.

When trying to use the current Create method like this:-

resp, err := c.Webhook.Create(goshopify.Webhook{
    Address: "arn:aws:events:ap-south-1::event-source/aws.partner/shopify.com/xxxxxx7/somecustomrule",
    Topic:   "orders/create",
    Format:  "json",
})

The response received is address: is invalid

The official node api has a DeliveryMethod field

oliver006 commented 1 year ago

The official docs don't mention the DeliveryMethod field: https://shopify.dev/docs/api/admin-rest/2023-01/resources/webhook

Did you try adding a field to the Webhook struct and see if it works?