Skip to content

Update order DTOs#119

Merged
gwinn merged 1 commit into
retailcrm:masterfrom
gwinn:master
May 11, 2026
Merged

Update order DTOs#119
gwinn merged 1 commit into
retailcrm:masterfrom
gwinn:master

Conversation

@gwinn
Copy link
Copy Markdown
Member

@gwinn gwinn commented May 11, 2026

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.

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`.
@gwinn gwinn merged commit fb26036 into retailcrm:master May 11, 2026
9 checks passed
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.

1 participant