-
Notifications
You must be signed in to change notification settings - Fork 379
Melaniewpaulinak/add fulfillment event #454
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
Conversation
|
||
def save(self): | ||
status = self.attributes['status'] | ||
if status not in ['label_printed', 'label_purchased', 'attempted_delivery', 'ready_for_pickup', 'picked_up', 'confirmed', 'in_transit', 'out_for_delivery', 'delivered', 'failure']: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unsure if hardcoding a list of accepted status' is the best way to go about this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As for whether to hard code them: Are these likely to change in the future at all/frequently? And is there another way to reference them?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No other way to reference status as far as I know
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I didn't think so, but wanted to ask. I would maybe just assign a variable for the array but otherwise if that's the only option, that's the only option 🤷
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me
WHY are these changes introduced?
Fixes #361
WHAT is this pull request doing?
Introducing new resource FulfillmentEvent that maps to the fulfillment_event api https://shopify.dev/docs/admin-api/rest/reference/shipping-and-fulfillment/fulfillmentevent
Checklist