Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Order fulfillment event is using the wrong resource parser #45

Closed
antonioparisi opened this issue Sep 17, 2018 · 1 comment
Closed

Order fulfillment event is using the wrong resource parser #45

antonioparisi opened this issue Sep 17, 2018 · 1 comment
Labels

Comments

@antonioparisi
Copy link

antonioparisi commented Sep 17, 2018

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
Copy link
Collaborator

Ninigi commented Sep 18, 2018

Thanks, good catch!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants