コード例 #1
0
 def update_status(self, external_order_id, new_status):
     data = {"order": {"order_status": new_status}}
     res = Client.send(
         "PUT",
         "/api/stores/{}/orders/{}/status".format(self.store_key,
                                                  external_order_id), None,
         data)
     return res.json()
コード例 #2
0
 def create(self, values):
     data = {"orders": values}
     res = Client.send("POST",
                       "/api/stores/{}/orders".format(self.store_key), None,
                       data)
     return res.json()
コード例 #3
0
 def find_all(cls, params=None):
     res = Client.send("GET", "/api/orders", params)
     return res.json()
コード例 #4
0
 def find(cls, id):
     res = Client.send("GET", "/api/orders/{}".format(id))
     return res.json()
コード例 #5
0
 def find_by_all_store(self, params=None):
     res = Client.send("GET",
                       "/api/stores/{}/orders".format(self.store_key),
                       params)
     return res.json()
コード例 #6
0
 def find_by_store(self, external_store_id):
     res = Client.send(
         "GET", "/api/stores/{}/orders/{}".format(self.store_key,
                                                  external_store_id))
     return res.json()
コード例 #7
0
 def update_recipient(self, external_order_id, recipient_data):
     data = {"recipient": recipient_data}
     res = Client.send(
         "PUT", "/api/stores/{}/orders/{}/recipient".format(
             self.store_key, external_order_id), None, data)
     return res.json()