Skip to content

Commit

Permalink
feat: add count orders method
Browse files Browse the repository at this point in the history
  • Loading branch information
joamag committed Dec 2, 2021
1 parent 4e6e9d2 commit 9c31ca6
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/shopify/order.py
Expand Up @@ -49,6 +49,11 @@ def get_order(self, id):
contents = self.get(url)
return contents["order"]

def count_orders(self, *args, **kwargs):
url = self.base_url + "admin/orders/count.json"
contents = self.get(url, **kwargs)
return contents["count"]

def transactions_order(self, id):
url = self.base_url + "admin/orders/%d/transactions.json" % id
contents = self.get(url)
Expand Down

0 comments on commit 9c31ca6

Please sign in to comment.