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

[WIP] [FIX] Fix URL generation for Fulfillment #635

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 8 additions & 0 deletions shopify/resources/fulfillment.py
Expand Up @@ -5,6 +5,14 @@
class Fulfillment(ShopifyResource):
_prefix_source = "/orders/$order_id/"

@classmethod
def _prefix(cls, options={}):
order_id = options.get("order_id")
if order_id:
return "%s/orders/%s" % (cls.site, order_id)
else:
return cls.site

def cancel(self):
self._load_attributes_from_response(self.post("cancel"))

Expand Down