Add OrderState Admin API endpoints (CRUD + list + bulk delete) - #260
Closed
PrestaEdit wants to merge 2 commits into
Closed
PrestaEdit wants to merge 2 commits into
PrestaEdit wants to merge 2 commits into
Conversation
Add CRUD, paginated list and bulk-delete API Platform resources for the OrderState domain, mirroring the existing Contact/Title endpoints. The status icon upload is not exposed in this first version (the icon is set through a separate setFileInformation call on the command, not the constructor) and can be added as a follow-up. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Order states are soft-deleted (existing orders may reference them), so a deleted state still resolves on GET. Assert it disappears from the listing instead of expecting a 404. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Contributor
Author
Contributor
Author
|
Superseded by #417, which merges this endpoint with the rest of the domain, following the mutualisation asked for by the core team (one PR per domain rather than one per endpoint). The consolidated PR is green and lists what changed for this endpoint on the way in. Closing here to keep the review in one place. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
-
GET /order-states/{orderStateId}(scopeorder_state_read)-
POST /order-states(scopeorder_state_write)-
PATCH /order-states/{orderStateId}(scopeorder_state_write)-
DELETE /order-states/{orderStateId}(scopeorder_state_write)-
GET /order-statespaginated list (scopeorder_state_read)-
DELETE /order-states/bulk-delete(scopeorder_state_write)The status icon upload is intentionally not exposed in this first version (the icon is set through a separate
setFileInformationcall, not the command constructor) and can be added as a follow-up.OrderStateEndpointTest. Create an order state viaPOST /order-states(localizednames/templates,color, and the boolean flags), thenGET/PATCH/DELETEit, list viaGET /order-states, and remove several at once viaDELETE /order-states/bulk-deletewith{ orderStateIds }.Adds CRUD, paginated list and bulk-delete API Platform resources for the
OrderStatedomain, mirroring the existingContact/Titleendpoints. Create and update use distinct command mappings (AddOrderStateCommandexpectslocalizedNames/localizedTemplates,EditOrderStateCommandusesname/templatesetters). All underlying CQRS classes were verified to exist as of tag9.0.3, so this is compatible with the lower bound of the CI test matrix.