File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change 1
1
from ..base import ShopifyResource
2
+ import json
2
3
3
4
4
5
class Fulfillment (ShopifyResource ):
@@ -13,6 +14,24 @@ def complete(self):
13
14
def open (self ):
14
15
self ._load_attributes_from_response (self .post ("open" ))
15
16
17
+ def update_tracking (self , tracking_info , notify_customer ):
18
+ fulfill = FulfillmentV2 ()
19
+ fulfill .id = self .id
20
+ fulfill .update_tracking (tracking_info , notify_customer )
21
+
16
22
17
23
class FulfillmentOrders (ShopifyResource ):
18
24
_prefix_source = "/orders/$order_id/"
25
+
26
+ class FulfillmentV2 (ShopifyResource ):
27
+ _singular = 'fulfillment'
28
+ _plural = 'fulfillments'
29
+
30
+ def update_tracking (self , tracking_info , notify_customer ):
31
+ body = {
32
+ "fulfillment" : {
33
+ "tracking_info" : tracking_info ,
34
+ "notify_customer" : notify_customer
35
+ }
36
+ }
37
+ self ._load_attributes_from_response (self .post ("update_tracking" , json .dumps (body ).encode ()))
You can’t perform that action at this time.
0 commit comments