Skip to content

Commit 02c350a

Browse files
authored
Merge pull request #529 from Ecwid/ECWID-172968
ECWID-172968 Order Editor: "On card total" discounts limited by customer groups stop working after any edits are made
2 parents 8128f3a + 867050d commit 02c350a

File tree

8 files changed

+8
-0
lines changed

8 files changed

+8
-0
lines changed

src/main/kotlin/com/ecwid/apiclient/v3/converter/FetchedOrder.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ fun FetchedOrder.DiscountInfo.toUpdated(): UpdatedOrder.DiscountInfo {
116116
description = description,
117117
appliesToProducts = appliesToProducts,
118118
appliesToItems = appliesToItems,
119+
membershipId = membershipId,
119120
)
120121
}
121122

src/main/kotlin/com/ecwid/apiclient/v3/dto/cart/request/OrderForCalculate.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ data class OrderForCalculate(
4141
val description: String? = null,
4242
val appliesToProducts: List<Int>? = null,
4343
val appliesToItems: List<Long>? = null,
44+
val membershipId: Int? = null,
4445
)
4546

4647
data class OrderItemDiscountInfo(

src/main/kotlin/com/ecwid/apiclient/v3/dto/cart/result/CalculateOrderDetailsResult.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ data class CalculateOrderDetailsResult(
9999
val description: String? = null,
100100
val appliesToProducts: List<Int>? = null,
101101
val appliesToItems: List<Long>? = null,
102+
val membershipId: Int? = null,
102103
)
103104

104105
data class OrderItemDiscountInfo(

src/main/kotlin/com/ecwid/apiclient/v3/dto/order/request/UpdatedOrder.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ data class UpdatedOrder(
120120
val description: String? = null,
121121
val appliesToProducts: List<Int>? = null,
122122
val appliesToItems: List<Long>? = null,
123+
val membershipId: Int? = null
123124
)
124125

125126
data class DiscountCouponInfo(

src/main/kotlin/com/ecwid/apiclient/v3/dto/order/result/FetchedOrder.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,7 @@ data class FetchedOrder(
143143
val description: String? = null,
144144
val appliesToProducts: List<Int>? = null,
145145
val appliesToItems: List<Long>? = null,
146+
val membershipId: Int? = null
146147
)
147148

148149
data class DiscountCouponInfo(

src/test/kotlin/com/ecwid/apiclient/v3/rule/nullablepropertyrules/CalculateOrderDetailsResultRules.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ val calculateOrderDetailsResultNullablePropertyRules: List<NullablePropertyRule<
2727
IgnoreNullable(CalculateOrderDetailsResult.DiscountInfo::type),
2828
IgnoreNullable(CalculateOrderDetailsResult.DiscountInfo::value),
2929
AllowNullable(CalculateOrderDetailsResult.DiscountInfo::appliesToProducts),
30+
AllowNullable(CalculateOrderDetailsResult.DiscountInfo::membershipId),
3031
AllowNullable(CalculateOrderDetailsResult.DiscountInfo::appliesToItems),
3132
IgnoreNullable(CalculateOrderDetailsResult.HandlingFeeInfo::description),
3233
IgnoreNullable(CalculateOrderDetailsResult.HandlingFeeInfo::name),

src/test/kotlin/com/ecwid/apiclient/v3/rule/nullablepropertyrules/FetchedOrderRules.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ val fetchedOrderNullablePropertyRules: List<NullablePropertyRule<*, *>> = listOf
4444
IgnoreNullable(FetchedOrder.DiscountInfo::type),
4545
IgnoreNullable(FetchedOrder.DiscountInfo::value),
4646
AllowNullable(FetchedOrder.DiscountInfo::appliesToProducts),
47+
AllowNullable(FetchedOrder.DiscountInfo::membershipId),
4748
AllowNullable(FetchedOrder.DiscountInfo::appliesToItems),
4849
AllowNullable(FetchedOrder.ExtraFieldsInfo::customerInputType),
4950
AllowNullable(FetchedOrder.ExtraFieldsInfo::id),

src/test/kotlin/com/ecwid/apiclient/v3/rule/nullablepropertyrules/OrderForCalculateRules.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ val orderForCalculateNullablePropertyRules: List<NullablePropertyRule<*, *>> = l
5555
IgnoreNullable(OrderForCalculate.DiscountInfo::type),
5656
IgnoreNullable(OrderForCalculate.DiscountInfo::value),
5757
AllowNullable(OrderForCalculate.DiscountInfo::appliesToProducts),
58+
AllowNullable(OrderForCalculate.DiscountInfo::membershipId),
5859
AllowNullable(OrderForCalculate.DiscountInfo::appliesToItems),
5960
AllowNullable(OrderForCalculate.HandlingFee::description),
6061
AllowNullable(OrderForCalculate.HandlingFee::name),

0 commit comments

Comments
 (0)