From dff87204824583ce87b8a2c44bca40ad2fffff8b Mon Sep 17 00:00:00 2001 From: "anna.galochkina" Date: Fri, 24 Oct 2025 12:07:39 +0400 Subject: [PATCH 1/3] ECWID-172968 Orders/Cart: added membershipId field to DiscountInfo and updated nullable property rules --- .../com/ecwid/apiclient/v3/dto/cart/request/OrderForCalculate.kt | 1 + .../apiclient/v3/dto/cart/result/CalculateOrderDetailsResult.kt | 1 + .../com/ecwid/apiclient/v3/dto/order/result/FetchedOrder.kt | 1 + .../nullablepropertyrules/CalculateOrderDetailsResultRules.kt | 1 + .../v3/rule/nullablepropertyrules/OrderForCalculateRules.kt | 1 + 5 files changed, 5 insertions(+) diff --git a/src/main/kotlin/com/ecwid/apiclient/v3/dto/cart/request/OrderForCalculate.kt b/src/main/kotlin/com/ecwid/apiclient/v3/dto/cart/request/OrderForCalculate.kt index 3c7f775f..82d7f95e 100644 --- a/src/main/kotlin/com/ecwid/apiclient/v3/dto/cart/request/OrderForCalculate.kt +++ b/src/main/kotlin/com/ecwid/apiclient/v3/dto/cart/request/OrderForCalculate.kt @@ -41,6 +41,7 @@ data class OrderForCalculate( val description: String? = null, val appliesToProducts: List? = null, val appliesToItems: List? = null, + val membershipId: Int? = null, ) data class OrderItemDiscountInfo( diff --git a/src/main/kotlin/com/ecwid/apiclient/v3/dto/cart/result/CalculateOrderDetailsResult.kt b/src/main/kotlin/com/ecwid/apiclient/v3/dto/cart/result/CalculateOrderDetailsResult.kt index c902f942..24d0d611 100644 --- a/src/main/kotlin/com/ecwid/apiclient/v3/dto/cart/result/CalculateOrderDetailsResult.kt +++ b/src/main/kotlin/com/ecwid/apiclient/v3/dto/cart/result/CalculateOrderDetailsResult.kt @@ -99,6 +99,7 @@ data class CalculateOrderDetailsResult( val description: String? = null, val appliesToProducts: List? = null, val appliesToItems: List? = null, + val membershipId: Int? = null, ) data class OrderItemDiscountInfo( diff --git a/src/main/kotlin/com/ecwid/apiclient/v3/dto/order/result/FetchedOrder.kt b/src/main/kotlin/com/ecwid/apiclient/v3/dto/order/result/FetchedOrder.kt index 940970e1..73598596 100644 --- a/src/main/kotlin/com/ecwid/apiclient/v3/dto/order/result/FetchedOrder.kt +++ b/src/main/kotlin/com/ecwid/apiclient/v3/dto/order/result/FetchedOrder.kt @@ -143,6 +143,7 @@ data class FetchedOrder( val description: String? = null, val appliesToProducts: List? = null, val appliesToItems: List? = null, + val membershipId: Int? = null ) data class DiscountCouponInfo( diff --git a/src/test/kotlin/com/ecwid/apiclient/v3/rule/nullablepropertyrules/CalculateOrderDetailsResultRules.kt b/src/test/kotlin/com/ecwid/apiclient/v3/rule/nullablepropertyrules/CalculateOrderDetailsResultRules.kt index 37b71997..a1956839 100644 --- a/src/test/kotlin/com/ecwid/apiclient/v3/rule/nullablepropertyrules/CalculateOrderDetailsResultRules.kt +++ b/src/test/kotlin/com/ecwid/apiclient/v3/rule/nullablepropertyrules/CalculateOrderDetailsResultRules.kt @@ -27,6 +27,7 @@ val calculateOrderDetailsResultNullablePropertyRules: List> = l IgnoreNullable(OrderForCalculate.DiscountInfo::type), IgnoreNullable(OrderForCalculate.DiscountInfo::value), AllowNullable(OrderForCalculate.DiscountInfo::appliesToProducts), + AllowNullable(OrderForCalculate.DiscountInfo::membershipId), AllowNullable(OrderForCalculate.DiscountInfo::appliesToItems), AllowNullable(OrderForCalculate.HandlingFee::description), AllowNullable(OrderForCalculate.HandlingFee::name), From 35966df618db86f6cc4274b294ea5a86197ee970 Mon Sep 17 00:00:00 2001 From: "anna.galochkina" Date: Fri, 24 Oct 2025 12:14:08 +0400 Subject: [PATCH 2/3] ECWID-172968 Orders: added membershipId field to UpdatedOrder --- .../com/ecwid/apiclient/v3/dto/order/request/UpdatedOrder.kt | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/kotlin/com/ecwid/apiclient/v3/dto/order/request/UpdatedOrder.kt b/src/main/kotlin/com/ecwid/apiclient/v3/dto/order/request/UpdatedOrder.kt index 8a3dcb9f..83330d0c 100644 --- a/src/main/kotlin/com/ecwid/apiclient/v3/dto/order/request/UpdatedOrder.kt +++ b/src/main/kotlin/com/ecwid/apiclient/v3/dto/order/request/UpdatedOrder.kt @@ -120,6 +120,7 @@ data class UpdatedOrder( val description: String? = null, val appliesToProducts: List? = null, val appliesToItems: List? = null, + val membershipId: Int? = null ) data class DiscountCouponInfo( From 867050dfeab638ef683a276445036a984629e603 Mon Sep 17 00:00:00 2001 From: "anna.galochkina" Date: Fri, 24 Oct 2025 12:21:53 +0400 Subject: [PATCH 3/3] ECWID-172968 Orders: added membershipId field to FetchedOrder and updated nullable property rules --- src/main/kotlin/com/ecwid/apiclient/v3/converter/FetchedOrder.kt | 1 + .../apiclient/v3/rule/nullablepropertyrules/FetchedOrderRules.kt | 1 + 2 files changed, 2 insertions(+) diff --git a/src/main/kotlin/com/ecwid/apiclient/v3/converter/FetchedOrder.kt b/src/main/kotlin/com/ecwid/apiclient/v3/converter/FetchedOrder.kt index 8f5daa56..27e06ccb 100644 --- a/src/main/kotlin/com/ecwid/apiclient/v3/converter/FetchedOrder.kt +++ b/src/main/kotlin/com/ecwid/apiclient/v3/converter/FetchedOrder.kt @@ -116,6 +116,7 @@ fun FetchedOrder.DiscountInfo.toUpdated(): UpdatedOrder.DiscountInfo { description = description, appliesToProducts = appliesToProducts, appliesToItems = appliesToItems, + membershipId = membershipId, ) } diff --git a/src/test/kotlin/com/ecwid/apiclient/v3/rule/nullablepropertyrules/FetchedOrderRules.kt b/src/test/kotlin/com/ecwid/apiclient/v3/rule/nullablepropertyrules/FetchedOrderRules.kt index 37b345b1..5e854f8b 100644 --- a/src/test/kotlin/com/ecwid/apiclient/v3/rule/nullablepropertyrules/FetchedOrderRules.kt +++ b/src/test/kotlin/com/ecwid/apiclient/v3/rule/nullablepropertyrules/FetchedOrderRules.kt @@ -44,6 +44,7 @@ val fetchedOrderNullablePropertyRules: List> = listOf IgnoreNullable(FetchedOrder.DiscountInfo::type), IgnoreNullable(FetchedOrder.DiscountInfo::value), AllowNullable(FetchedOrder.DiscountInfo::appliesToProducts), + AllowNullable(FetchedOrder.DiscountInfo::membershipId), AllowNullable(FetchedOrder.DiscountInfo::appliesToItems), AllowNullable(FetchedOrder.ExtraFieldsInfo::customerInputType), AllowNullable(FetchedOrder.ExtraFieldsInfo::id),