Long variation ID - #564
Open
ChesterEcwid wants to merge 5 commits into
Open
Conversation
ChesterEcwid
requested review from
gutorovas
and
a lite review from Copilot
September 14, 2026 17:14
There was a problem hiding this comment.
🟡 Changes recommended
Moderate findings remain in the custom-app combination ID and variation-ID DTO surfaces.
Get a fresh assessment by requesting another Copilot review.
Pull request overview
Updates combination and variation identifiers from Int to Long, including related test utilities and fixtures.
Changes:
- Migrates combination and variation IDs to
Long. - Adds Long-based random ID helpers.
- Updates affected test data and DTOs.
File summaries
| File | Change | Review |
|---|---|---|
src/test/kotlin/com/ecwid/apiclient/v3/util/RandomUtils.kt |
Adds Long random ID helpers. | — |
src/test/kotlin/com/ecwid/apiclient/v3/util/OrderUtils.kt |
Uses Long combination IDs. | — |
src/test/kotlin/com/ecwid/apiclient/v3/entity/CartsTest.kt |
Updates cart fixtures for Long IDs. | — |
src/main/kotlin/com/ecwid/apiclient/v3/dto/variation/result/FetchedVariation.kt |
Changes variation IDs to Long. | Moderate: variation request DTOs and CreateProductVariationResult.id remain Int (3 votes). |
src/main/kotlin/com/ecwid/apiclient/v3/dto/product/result/FetchedProduct.kt |
Changes default combination IDs to Long. | Moderate: custom-app default combination ID remains Int? (3 votes). |
src/main/kotlin/com/ecwid/apiclient/v3/dto/order/result/FetchedOrder.kt |
Changes combination IDs to Long. | — |
src/main/kotlin/com/ecwid/apiclient/v3/dto/order/request/UpdatedOrder.kt |
Changes combination IDs to Long. | — |
src/main/kotlin/com/ecwid/apiclient/v3/dto/cart/result/FetchedCart.kt |
Changes combination IDs to Long. | — |
src/main/kotlin/com/ecwid/apiclient/v3/dto/cart/result/CalculateOrderDetailsResult.kt |
Changes combination IDs to Long. | — |
src/main/kotlin/com/ecwid/apiclient/v3/dto/cart/request/OrderForCalculate.kt |
Changes combination IDs to Long. | — |
Review details
- Files reviewed: 10/10 changed files
- Comments generated: 2
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
gutorovas
approved these changes
Sep 14, 2026
gutorovas
self-requested a review
September 14, 2026 17:54
gutorovas
approved these changes
Sep 14, 2026
…get values exceeding int max and min
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.
This pull request updates several data models and related test utilities to use
Longinstead ofIntfor various identifier fields, particularly for combination and variation IDs. This change ensures compatibility with larger identifier values and improves consistency across the codebase. The update also introduces new random ID generation functions forLongvalues in the test utilities.Model updates for identifier types:
combinationIdfromInt?toLong?in the following data classes:OrderForCalculate.OrderItem,CalculateOrderDetailsResult.OrderItem,FetchedCart.OrderItem,UpdatedOrder.OrderItem, andFetchedOrder.OrderItem(src/main/kotlin/com/ecwid/apiclient/v3/dto/cart/request/OrderForCalculate.kt, [1];src/main/kotlin/com/ecwid/apiclient/v3/dto/cart/result/CalculateOrderDetailsResult.kt, [2];src/main/kotlin/com/ecwid/apiclient/v3/dto/cart/result/FetchedCart.kt, [3];src/main/kotlin/com/ecwid/apiclient/v3/dto/order/request/UpdatedOrder.kt, [4];src/main/kotlin/com/ecwid/apiclient/v3/dto/order/result/FetchedOrder.kt, [5]defaultCombinationIdfromInt?toLong?inFetchedProduct(src/main/kotlin/com/ecwid/apiclient/v3/dto/product/result/FetchedProduct.kt, src/main/kotlin/com/ecwid/apiclient/v3/dto/product/result/FetchedProduct.ktL123-R123)idfromInttoLonginFetchedVariation(src/main/kotlin/com/ecwid/apiclient/v3/dto/variation/result/FetchedVariation.kt, src/main/kotlin/com/ecwid/apiclient/v3/dto/variation/result/FetchedVariation.ktL12-R12)Test utility and test data updates:
randomLongId()andrandomLong()helper functions for generating randomLongIDs in tests (src/test/kotlin/com/ecwid/apiclient/v3/util/RandomUtils.kt, [1] [2]randomLongId()for fields now typed asLong(src/test/kotlin/com/ecwid/apiclient/v3/entity/CartsTest.kt, [1] [2];src/test/kotlin/com/ecwid/apiclient/v3/util/OrderUtils.kt, [3]