Order fulfillment event is using the wrong resource parser
antonioparisi opened this issue · 1 comments
antonioparisi commented
hi there,
trying to get a order's fulfillment event using:
{:ok, response} = Shopify.session |> Shopify.Order.Fulfillment.Event.find(order_id, fulfillment_id, event_id)
but it's using the Shopify.Event
as resource, which is wrong. Since the response should be something similar to this:
https://help.shopify.com/en/api/reference/shipping_and_fulfillment/fulfillmentevent#show
{
"fulfillment_event": {
"id": 944956392,
"fulfillment_id": 255858046,
"status": "in_transit",
"message": null,
"happened_at": "2018-07-05T12:58:55-04:00",
"city": null,
"province": null,
"country": null,
"zip": null,
"address1": null,
"latitude": null,
"longitude": null,
"shop_id": 690933842,
"created_at": "2018-07-05T12:58:55-04:00",
"updated_at": "2018-07-05T12:58:55-04:00",
"estimated_delivery_at": null,
"order_id": 450789469,
"admin_graphql_api_id": "gid://shopify/FulfillmentEvent/944956392"
}
}
and what I'm getting is:
{:ok, response} = Shopify.session |> Shopify.Order.Fulfillment.Event.find(order_id, fulfillment_id, event_id)
{:ok,
%Shopify.Response{
code: 200,
data: [
%Shopify.Event{
arguments: nil,
body: nil,
created_at: "2018-09-17T19:39:27+01:00",
description: nil,
id: 111111111,
message: nil,
path: nil,
subject_id: nil,
subject_type: nil,
verb: nil
}
]
}}
Ninigi commented
Thanks, good catch!