Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ECWID-134977 OE2: if an advanced discount is used for a product and m… #394

Merged
merged 3 commits into from
Apr 25, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,9 @@ fun FetchedOrder.DiscountInfo.toUpdated(): UpdatedOrder.DiscountInfo {
type = type,
base = base,
orderTotal = orderTotal,
description = description
description = description,
appliesToProducts = appliesToProducts,
appliesToItems = appliesToItems,
)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,9 @@ data class UpdatedOrder(
val type: DiscountType? = null,
val base: DiscountBase? = null,
val orderTotal: Double? = null,
val description: String? = null
val description: String? = null,
val appliesToProducts: Set<Int?>? = null,
val appliesToItems: Set<Long>? = null,
)

data class DiscountCouponInfo(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
package com.ecwid.apiclient.v3.dto.order.result

import com.ecwid.apiclient.v3.dto.common.*
import com.ecwid.apiclient.v3.dto.common.ApiFetchedDTO
import com.ecwid.apiclient.v3.dto.common.ApiFetchedDTO.ModifyKind
import com.ecwid.apiclient.v3.dto.common.ExtendedOrderTax
import com.ecwid.apiclient.v3.dto.common.OrderedStringToListStringMap
import com.ecwid.apiclient.v3.dto.common.OrderedStringToStringMap
import com.ecwid.apiclient.v3.dto.order.enums.*
import com.ecwid.apiclient.v3.dto.order.request.UpdatedOrder
import java.util.*
Expand Down Expand Up @@ -125,7 +128,9 @@ data class FetchedOrder(
val type: DiscountType? = null,
val base: DiscountBase? = null,
val orderTotal: Double? = null,
val description: String? = null
val description: String? = null,
val appliesToProducts: Set<Int?>? = null,
val appliesToItems: Set<Long>? = null,
)

data class DiscountCouponInfo(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ val fetchedOrderNullablePropertyRules: List<NullablePropertyRule<*, *>> = listOf
IgnoreNullable(FetchedOrder.DiscountInfo::orderTotal),
IgnoreNullable(FetchedOrder.DiscountInfo::type),
IgnoreNullable(FetchedOrder.DiscountInfo::value),
AllowNullable(FetchedOrder.DiscountInfo::appliesToProducts),
AllowNullable(FetchedOrder.DiscountInfo::appliesToItems),
AllowNullable(FetchedOrder.ExtraFieldsInfo::customerInputType),
AllowNullable(FetchedOrder.ExtraFieldsInfo::id),
AllowNullable(FetchedOrder.ExtraFieldsInfo::orderBy),
Expand Down
Loading