Skip to content

docs(promotions): PROMO-869 split promotion models into Draft, Patch … #968

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

Merged
merged 1 commit into from
Jun 17, 2025

Conversation

BC-SEven
Copy link
Contributor

@BC-SEven BC-SEven commented Jun 4, 2025

…and Saved as each state has different expectations on what props are required

DEVDOCS-6407

What changed?

Refactor promotion models to separate them into "Draft", "Patch" and "Saved" models to be used depending on context.
Here we can correct expectations for the SavedPromotions so id is always available. And for patch payloads where no properties are required.

Release notes draft

No behaviour changes here

Anything else?

ping @bigcommerce/team-promotions

@BC-SEven BC-SEven marked this pull request as ready for review June 5, 2025 07:01
@BC-SEven BC-SEven force-pushed the PROMO-869 branch 3 times, most recently from be4416d to cb43845 Compare June 13, 2025 05:23
Copy link
Contributor

@bc-terra bc-terra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! Ready from my end.

…ch and Saved as each state has different expectations on what props are required
@BC-SEven BC-SEven merged commit 3c7c043 into main Jun 17, 2025
3 checks passed
@BC-SEven BC-SEven deleted the PROMO-869 branch June 17, 2025 01:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants