From 5e30cd10284de78c0edc91d161dd95714cee39b1 Mon Sep 17 00:00:00 2001 From: valkiriya Date: Thu, 20 Mar 2025 23:57:57 +0400 Subject: [PATCH 1/2] Add translations to FetchedSwatchColor --- .../apiclient/v3/dto/swatches/result/FetchedSwatchColor.kt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/kotlin/com/ecwid/apiclient/v3/dto/swatches/result/FetchedSwatchColor.kt b/src/main/kotlin/com/ecwid/apiclient/v3/dto/swatches/result/FetchedSwatchColor.kt index 1cda4abd6..4933187dc 100644 --- a/src/main/kotlin/com/ecwid/apiclient/v3/dto/swatches/result/FetchedSwatchColor.kt +++ b/src/main/kotlin/com/ecwid/apiclient/v3/dto/swatches/result/FetchedSwatchColor.kt @@ -2,10 +2,12 @@ package com.ecwid.apiclient.v3.dto.swatches.result import com.ecwid.apiclient.v3.dto.common.ApiFetchedDTO import com.ecwid.apiclient.v3.dto.common.ApiResultDTO +import com.ecwid.apiclient.v3.dto.common.LocalizedValueMap data class FetchedSwatchColor( val name: String = "", val hexCode: String = "", + val translations: LocalizedValueMap? = null, ) : ApiFetchedDTO, ApiResultDTO { override fun getModifyKind() = ApiFetchedDTO.ModifyKind.ReadOnly } From 3f6d8041a4d98e096527e048c1fbe20f7beee236 Mon Sep 17 00:00:00 2001 From: valkiriya Date: Fri, 21 Mar 2025 00:18:33 +0400 Subject: [PATCH 2/2] Allow nullable for FetchedSwatchColor::translations --- .../com/ecwid/apiclient/v3/rule/NullablePropertyRules.kt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/test/kotlin/com/ecwid/apiclient/v3/rule/NullablePropertyRules.kt b/src/test/kotlin/com/ecwid/apiclient/v3/rule/NullablePropertyRules.kt index f8807699f..974e0ff6b 100644 --- a/src/test/kotlin/com/ecwid/apiclient/v3/rule/NullablePropertyRules.kt +++ b/src/test/kotlin/com/ecwid/apiclient/v3/rule/NullablePropertyRules.kt @@ -23,6 +23,7 @@ import com.ecwid.apiclient.v3.dto.report.request.ReportRequest import com.ecwid.apiclient.v3.dto.report.result.FetchedReportAdviceResponse import com.ecwid.apiclient.v3.dto.report.result.FetchedReportResponse import com.ecwid.apiclient.v3.dto.storage.result.FetchedStorageData +import com.ecwid.apiclient.v3.dto.swatches.result.FetchedSwatchColor import com.ecwid.apiclient.v3.dto.variation.request.ProductVariationsRequest import com.ecwid.apiclient.v3.rule.NullablePropertyRule.AllowNullable import com.ecwid.apiclient.v3.rule.NullablePropertyRule.IgnoreNullable @@ -145,6 +146,8 @@ val otherNullablePropertyRules: List> = listOf( AllowNullable(FetchedReportResponse.FetchedAdditionalData.AdditionalCategoryData::categoryName), + AllowNullable(FetchedSwatchColor::translations), + AllowNullable(CreateBatchRequest::groupId), AllowNullable(CreateBatchRequestWithIds::groupId),