Skip to content

Commit 7b1fba5

Browse files
authored
Merge pull request #434 from Ecwid/ECWID-148639
ECWID-148639 Product reviews: added new design settings
2 parents d718aab + 2cb1d53 commit 7b1fba5

3 files changed

Lines changed: 36 additions & 4 deletions

File tree

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

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -607,6 +607,9 @@ data class FetchedStoreProfile(
607607
@JsonFieldName("product_details_position_product_sku")
608608
val productDetailsPositionProductSku: Int? = null,
609609

610+
@JsonFieldName("product_details_position_review_section")
611+
val productDetailsPositionReviewSection: Int? = null,
612+
610613
@JsonFieldName("product_details_position_save_for_later")
611614
val productDetailsPositionSaveForLater: Int? = null,
612615

@@ -679,6 +682,15 @@ data class FetchedStoreProfile(
679682
@JsonFieldName("product_details_show_qty")
680683
val productDetailsShowQty: Boolean? = null,
681684

685+
@JsonFieldName("product_details_show_rating_section")
686+
val productDetailsShowRatingSection: Boolean? = null,
687+
688+
@JsonFieldName("product_details_show_reviews_section")
689+
val productDetailsShowReviewsSection: Boolean? = null,
690+
691+
@JsonFieldName("product_details_show_reviews_section_in_one_card_view")
692+
val productDetailsShowReviewsSectionInOneCardView: Boolean? = null,
693+
682694
@JsonFieldName("product_details_show_sale_price")
683695
val productDetailsShowSalePrice: Boolean? = null,
684696

@@ -769,6 +781,9 @@ data class FetchedStoreProfile(
769781
@JsonFieldName("product_list_price_behavior")
770782
val productListPriceBehaviour: String? = null,
771783

784+
@JsonFieldName("product_list_rating_section_behavior")
785+
val productListRatingSectionBehavior: String? = null,
786+
772787
@JsonFieldName("product_list_sku_behavior")
773788
val productListSKUBehaviour: String? = null,
774789

@@ -793,6 +808,15 @@ data class FetchedStoreProfile(
793808
@JsonFieldName("product_list_show_product_images")
794809
val productListShowProductImages: Boolean? = null,
795810

811+
@JsonFieldName("product_list_show_rating_in_one_star")
812+
val productListShowRatingInOneStar: Boolean? = null,
813+
814+
@JsonFieldName("product_list_show_rating_number_in_five_stars_view")
815+
val productListShowRatingNumberInFiveStarsView: Boolean? = null,
816+
817+
@JsonFieldName("product_list_show_reviews_count_in_five_stars_view")
818+
val productListShowReviewsCountInFiveStarsView: Boolean? = null,
819+
796820
@JsonFieldName("show_signin_link")
797821
val productListShowSignInLink: Boolean? = null,
798822

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,10 +84,10 @@ class StoreProfileTest : BaseEntityTest() {
8484
email = "email@example.com",
8585
street = "street",
8686
city = "city",
87-
countryCode = "RU",
87+
countryCode = "GE",
8888
postalCode = "postalCode",
8989
phone = "phone",
90-
stateOrProvinceCode = "73"
90+
stateOrProvinceCode = "TB"
9191
),
9292
formatsAndUnits = UpdatedStoreProfile.FormatsAndUnits(
9393
currency = "currency",
@@ -148,8 +148,8 @@ class StoreProfileTest : BaseEntityTest() {
148148
UpdatedStoreProfile.Zone(
149149
id = "zoneId",
150150
name = "Zone name",
151-
countryCodes = listOf("RU", "UA"),
152-
stateOrProvinceCodes = listOf("RU-73", "RU-77"),
151+
countryCodes = listOf("GE", "UA"),
152+
stateOrProvinceCodes = listOf("GE-AJ", "GE-TB"),
153153
postCodes = listOf("123456", "654321")
154154
)
155155
),

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ val fetchedStoreProfileNullablePropertyRules: List<NullablePropertyRule<*, *>> =
9393
AllowNullable(FetchedStoreProfile.DesignSettings::productDetailsPositionProductPrice),
9494
AllowNullable(FetchedStoreProfile.DesignSettings::productDetailsPositionProductLoyalty),
9595
AllowNullable(FetchedStoreProfile.DesignSettings::productDetailsPositionProductSku),
96+
AllowNullable(FetchedStoreProfile.DesignSettings::productDetailsPositionReviewSection),
9697
AllowNullable(FetchedStoreProfile.DesignSettings::productDetailsPositionSaveForLater),
9798
AllowNullable(FetchedStoreProfile.DesignSettings::productDetailsPositionShareButtons),
9899
AllowNullable(FetchedStoreProfile.DesignSettings::productDetailsPositionSubtitle),
@@ -117,6 +118,9 @@ val fetchedStoreProfileNullablePropertyRules: List<NullablePropertyRule<*, *>> =
117118
AllowNullable(FetchedStoreProfile.DesignSettings::productDetailsShowProductLoyalty),
118119
AllowNullable(FetchedStoreProfile.DesignSettings::productDetailsShowProductSku),
119120
AllowNullable(FetchedStoreProfile.DesignSettings::productDetailsShowQty),
121+
AllowNullable(FetchedStoreProfile.DesignSettings::productDetailsShowRatingSection),
122+
AllowNullable(FetchedStoreProfile.DesignSettings::productDetailsShowReviewsSection),
123+
AllowNullable(FetchedStoreProfile.DesignSettings::productDetailsShowReviewsSectionInOneCardView),
120124
AllowNullable(FetchedStoreProfile.DesignSettings::productDetailsShowSalePrice),
121125
AllowNullable(FetchedStoreProfile.DesignSettings::productDetailsShowSaveForLater),
122126
AllowNullable(FetchedStoreProfile.DesignSettings::productDetailsShowShareButtons),
@@ -147,6 +151,7 @@ val fetchedStoreProfileNullablePropertyRules: List<NullablePropertyRule<*, *>> =
147151
AllowNullable(FetchedStoreProfile.DesignSettings::productListImageSize),
148152
AllowNullable(FetchedStoreProfile.DesignSettings::productListNameBehaviour),
149153
AllowNullable(FetchedStoreProfile.DesignSettings::productListPriceBehaviour),
154+
AllowNullable(FetchedStoreProfile.DesignSettings::productListRatingSectionBehavior),
150155
AllowNullable(FetchedStoreProfile.DesignSettings::productListSKUBehaviour),
151156
AllowNullable(FetchedStoreProfile.DesignSettings::productListShowAdditionalImage),
152157
AllowNullable(FetchedStoreProfile.DesignSettings::productListShowBreadcrumbs),
@@ -155,6 +160,9 @@ val fetchedStoreProfileNullablePropertyRules: List<NullablePropertyRule<*, *>> =
155160
AllowNullable(FetchedStoreProfile.DesignSettings::productListShowOnSaleLabel),
156161
AllowNullable(FetchedStoreProfile.DesignSettings::productListShowPayWhatYouWantLabel),
157162
AllowNullable(FetchedStoreProfile.DesignSettings::productListShowProductImages),
163+
AllowNullable(FetchedStoreProfile.DesignSettings::productListShowRatingInOneStar),
164+
AllowNullable(FetchedStoreProfile.DesignSettings::productListShowRatingNumberInFiveStarsView),
165+
AllowNullable(FetchedStoreProfile.DesignSettings::productListShowReviewsCountInFiveStarsView),
158166
AllowNullable(FetchedStoreProfile.DesignSettings::productListShowSignInLink),
159167
AllowNullable(FetchedStoreProfile.DesignSettings::productListShowSoldOutLabel),
160168
AllowNullable(FetchedStoreProfile.DesignSettings::productListShowSortViewAsOptions),

0 commit comments

Comments
 (0)