Skip to content

Commit 2940033

Browse files
committed
ECWID-141547 add discountsAllowed field to product entities
1 parent b3e2b21 commit 2940033

4 files changed

Lines changed: 4 additions & 0 deletions

File tree

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ fun FetchedProduct.toUpdated(): UpdatedProduct {
5555

5656
media = media?.toUpdated(),
5757

58+
discountsAllowed = discountsAllowed,
5859
subtitle = subtitle,
5960
ribbon = ribbon?.toUpdated(),
6061
ribbonTranslated = ribbonTranslated,

src/main/kotlin/com/ecwid/apiclient/v3/dto/product/request/UpdatedProduct.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ data class UpdatedProduct(
5555

5656
val media: ProductMedia? = null,
5757

58+
val discountsAllowed: Boolean? = null,
5859
val subtitle: String? = null,
5960
val ribbon: Ribbon? = null,
6061
val ribbonTranslated: LocalizedValueMap? = null,

src/main/kotlin/com/ecwid/apiclient/v3/dto/product/result/FetchedProduct.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@ data class FetchedProduct(
121121
val defaultCombinationId: Int? = null, // TODO implement combinations support
122122
val combinations: List<FetchedVariation>? = null, // TODO implement combinations support
123123
val isGiftCard: Boolean? = null, // TODO from ECWID-67826: this flag is read-only. API for creating gift cards in the plans (BACKLOG-4157)
124+
val discountsAllowed: Boolean? = null,
124125
val subtitle: String? = null,
125126
val ribbon: Ribbon? = null,
126127
val ribbonTranslated: LocalizedValueMap? = null,

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ val fetchedProductNullablePropertyRules: List<NullablePropertyRule<*, *>> = list
4242
IgnoreNullable(FetchedProduct::description),
4343
IgnoreNullable(FetchedProduct::descriptionTranslated),
4444
IgnoreNullable(FetchedProduct::dimensions),
45+
AllowNullable(FetchedProduct::discountsAllowed),
4546
IgnoreNullable(FetchedProduct::enabled),
4647
IgnoreNullable(FetchedProduct::favorites),
4748
IgnoreNullable(FetchedProduct::files),

0 commit comments

Comments
 (0)