Skip to content

Commit 027b5f0

Browse files
committed
ECOM-260 Change highlightCompositeProductsOnStorefront from Boolean to enum
1 parent 88167e7 commit 027b5f0

File tree

4 files changed

+12
-3
lines changed

4 files changed

+12
-3
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
package com.ecwid.apiclient.v3.dto.profile.enums
2+
3+
enum class HighlightCompositeProductsOnStorefront {
4+
DISABLED,
5+
ALL,
6+
}

src/main/kotlin/com/ecwid/apiclient/v3/dto/profile/request/UpdatedStoreProfile.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import com.ecwid.apiclient.v3.dto.common.ApiUpdatedDTO
44
import com.ecwid.apiclient.v3.dto.common.ApiUpdatedDTO.ModifyKind
55
import com.ecwid.apiclient.v3.dto.common.LocalizedValueMap
66
import com.ecwid.apiclient.v3.dto.common.ProductCondition
7+
import com.ecwid.apiclient.v3.dto.profile.enums.HighlightCompositeProductsOnStorefront
78
import com.ecwid.apiclient.v3.dto.profile.enums.ProductFilterType
89
import com.ecwid.apiclient.v3.dto.profile.result.FetchedStoreProfile
910
import com.ecwid.apiclient.v3.jsontransformer.JsonFieldName
@@ -98,7 +99,7 @@ data class UpdatedStoreProfile(
9899
val googleRemarketingEnabled: Boolean? = null,
99100
val googleTagId: String? = null,
100101
val hideOutOfStockProductsInStorefront: Boolean? = null,
101-
val highlightCompositeProductsOnStorefront: Boolean? = null,
102+
val highlightCompositeProductsOnStorefront: HighlightCompositeProductsOnStorefront? = null,
102103
val orderCommentsCaption: String? = null,
103104
val orderCommentsEnabled: Boolean? = null,
104105
val orderCommentsRequired: Boolean? = null,

src/main/kotlin/com/ecwid/apiclient/v3/dto/profile/result/FetchedStoreProfile.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import com.ecwid.apiclient.v3.dto.common.ApiFetchedDTO.ModifyKind
55
import com.ecwid.apiclient.v3.dto.common.ApiResultDTO
66
import com.ecwid.apiclient.v3.dto.common.LocalizedValueMap
77
import com.ecwid.apiclient.v3.dto.common.ProductCondition
8+
import com.ecwid.apiclient.v3.dto.profile.enums.HighlightCompositeProductsOnStorefront
89
import com.ecwid.apiclient.v3.dto.profile.enums.ProductFilterType
910
import com.ecwid.apiclient.v3.dto.profile.request.UpdatedPaymentOption
1011
import com.ecwid.apiclient.v3.dto.profile.request.UpdatedStoreProfile
@@ -127,7 +128,7 @@ data class FetchedStoreProfile(
127128
val googleRemarketingEnabled: Boolean? = null,
128129
val googleTagId: String? = null,
129130
val hideOutOfStockProductsInStorefront: Boolean? = null,
130-
val highlightCompositeProductsOnStorefront: Boolean = false,
131+
val highlightCompositeProductsOnStorefront: HighlightCompositeProductsOnStorefront = HighlightCompositeProductsOnStorefront.DISABLED,
131132
val invoiceLogoUrl: String? = null,
132133
val openBagOnAddition: Boolean = false,
133134
val orderCommentsCaption: String? = null,

src/test/kotlin/com/ecwid/apiclient/v3/entity/StoreProfileTest.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package com.ecwid.apiclient.v3.entity
22

33
import com.ecwid.apiclient.v3.converter.toUpdated
44
import com.ecwid.apiclient.v3.dto.common.ProductCondition
5+
import com.ecwid.apiclient.v3.dto.profile.enums.HighlightCompositeProductsOnStorefront
56
import com.ecwid.apiclient.v3.dto.profile.enums.ProductFilterType
67
import com.ecwid.apiclient.v3.dto.profile.request.StoreProfileRequest
78
import com.ecwid.apiclient.v3.dto.profile.request.StoreProfileUpdateRequest
@@ -49,7 +50,7 @@ class StoreProfileTest : BaseEntityTest() {
4950
orderCommentsCaption = "orderCommentsCaption",
5051
orderCommentsRequired = true,
5152
hideOutOfStockProductsInStorefront = true,
52-
highlightCompositeProductsOnStorefront = true,
53+
highlightCompositeProductsOnStorefront = HighlightCompositeProductsOnStorefront.ALL,
5354
askCompanyName = true,
5455
favoritesEnabled = true,
5556
defaultProductSortOrder = UpdatedStoreProfile.ProductSortOrder.NAME_ASC,

0 commit comments

Comments
 (0)