Update order DTOs#119
Merged
Merged
Conversation
Updated DTOs:
* `ProductStatusesResponse.ProductStatuses` now uses `[]ProductStatus` for `/api/v5/reference/product-statuses` responses.
* `OrdersFilter` now supports `Segment`, `CustomerType`, `ProductSearchType`, `StatusHistorySequence`, `DeliveryStates`, `DeliveryExternalID`, `CompanyName`, `DeliveryAddressNotes`, `ProductGroups`, `ReceiptOrderStatus`, `MGChannels`, `TasksCounts`, `Tags`, and `AttachedTags` for `/api/v5/orders`.
* `Company` now includes `AvgMarginSumm`, `MarginSumm`, `TotalSumm`, `AverageSumm`, `OrdersCount`, and `CostSumm` for `/api/v5/orders` and `/api/v5/orders/{externalId}` responses.
* `Offer` now includes `DisplayName` for order item offer payloads.
* `LinkedOrder.ExternalID` now uses the JSON field `externalId`.
Tests:
* Added coverage for new `/api/v5/orders` filter parameters.
* Added coverage for updated `/api/v5/orders` response DTO fields.
* Added coverage for updated `/api/v5/orders/{externalId}` response DTO fields.
* Updated `/api/v5/reference/product-statuses` coverage to assert array-based `productStatuses` payloads.
Backward compatibility:
* Potentially breaking: `ProductStatusesResponse.ProductStatuses` changed from `map[string]ProductStatus` to `[]ProductStatus` to match the documented `productStatuses[]` response shape.
* Potentially breaking: `LinkedOrder.ExternalID` now serializes and deserializes as `externalId` instead of the previous incorrect `externalID`.
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.
Updated DTOs:
ProductStatusesResponse.ProductStatusesnow uses[]ProductStatusfor/api/v5/reference/product-statusesresponses.OrdersFilternow supportsSegment,CustomerType,ProductSearchType,StatusHistorySequence,DeliveryStates,DeliveryExternalID,CompanyName,DeliveryAddressNotes,ProductGroups,ReceiptOrderStatus,MGChannels,TasksCounts,Tags, andAttachedTagsfor/api/v5/orders.Companynow includesAvgMarginSumm,MarginSumm,TotalSumm,AverageSumm,OrdersCount, andCostSummfor/api/v5/ordersand/api/v5/orders/{externalId}responses.Offernow includesDisplayNamefor order item offer payloads.LinkedOrder.ExternalIDnow uses the JSON fieldexternalId.Tests:
/api/v5/ordersfilter parameters./api/v5/ordersresponse DTO fields./api/v5/orders/{externalId}response DTO fields./api/v5/reference/product-statusescoverage to assert array-basedproductStatusespayloads.Backward compatibility:
ProductStatusesResponse.ProductStatuseschanged frommap[string]ProductStatusto[]ProductStatusto match the documentedproductStatuses[]response shape.LinkedOrder.ExternalIDnow serializes and deserializes asexternalIdinstead of the previous incorrectexternalID.