Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
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 @@ -73,6 +73,7 @@ fun FetchedProduct.toUpdated(): UpdatedProduct {
maxPurchaseQuantity = maxPurchaseQuantity,
reviewsCollectingAllowed = reviewsCollectingAllowed,
batteryIncluded = batteryIncluded,
euGuaranteeLabelSettings = euGuaranteeLabelSettings?.toUpdated(),
)
}

Expand Down Expand Up @@ -251,3 +252,11 @@ fun FetchedProduct.LowestPriceSettings.toUpdated() = UpdatedProduct.LowestPriceS
lowestPriceEnabled = lowestPriceEnabled,
manualLowestPrice = manualLowestPrice
)

fun FetchedProduct.EuGuaranteeLabelSettings.toUpdated() = UpdatedProduct.EuGuaranteeLabelSettings(
modelNumber = modelNumber,
brand = brand,
guaranteeYears = guaranteeYears,
acknowledged = acknowledged,
enabled = enabled
)
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ data class UpdatedProduct(
val maxPurchaseQuantity: Int? = null,
val reviewsCollectingAllowed: Boolean? = null,
val batteryIncluded: Boolean? = null,
val euGuaranteeLabelSettings: EuGuaranteeLabelSettings? = null,
) : ApiUpdatedDTO {

data class Ribbon(
Expand Down Expand Up @@ -414,5 +415,13 @@ data class UpdatedProduct(
val manualLowestPrice: Double? = null,
)

data class EuGuaranteeLabelSettings(
val modelNumber: String? = null,
val brand: String? = null,
val guaranteeYears: Double? = null,
val acknowledged: Boolean? = null,
val enabled: Boolean? = null
)

override fun getModifyKind() = ModifyKind.ReadWrite(FetchedProduct::class)
}
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ data class FetchedProduct(
val reviewsModerated: Int? = null,
val reviewsPublished: Int? = null,
val compositeComponents: List<FetchedProductComponent>? = null,
val euGuaranteeLabelSettings: EuGuaranteeLabelSettings? = null,
) : ApiFetchedDTO, ApiResultDTO {

data class BorderInfo(
Expand Down Expand Up @@ -411,4 +412,12 @@ data class FetchedProduct(
val defaultDisplayedAutomaticLowestPrice: Double? = null,
val defaultDisplayedAutomaticLowestPriceFormatted: String? = null,
)

data class EuGuaranteeLabelSettings(
val modelNumber: String? = null,
val brand: String? = null,
val guaranteeYears: Double? = null,
val acknowledged: Boolean? = null,
val enabled: Boolean? = null
)
}
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ val fetchedProductNullablePropertyRules: List<NullablePropertyRule<*, *>> = list
IgnoreNullable(FetchedProduct::relatedProducts),
AllowNullable(FetchedProduct::reviewsCollectingAllowed),
AllowNullable(FetchedProduct::batteryIncluded),
AllowNullable(FetchedProduct::euGuaranteeLabelSettings),
AllowNullable(FetchedProduct::reviewsModerated),
AllowNullable(FetchedProduct::reviewsPublished),
IgnoreNullable(FetchedProduct::ribbon),
Expand Down Expand Up @@ -174,4 +175,9 @@ val fetchedProductNullablePropertyRules: List<NullablePropertyRule<*, *>> = list
AllowNullable(FetchedProduct::maxPurchaseQuantity),
AllowNullable(FetchedProduct::locationInventory),
AllowNullable(FetchedProduct::compositeComponents),
AllowNullable(FetchedProduct.EuGuaranteeLabelSettings::modelNumber),
AllowNullable(FetchedProduct.EuGuaranteeLabelSettings::brand),
AllowNullable(FetchedProduct.EuGuaranteeLabelSettings::guaranteeYears),
AllowNullable(FetchedProduct.EuGuaranteeLabelSettings::acknowledged),
AllowNullable(FetchedProduct.EuGuaranteeLabelSettings::enabled),
)
Loading