Skip to content

Commit 3494239

Browse files
authored
Merge pull request #480 from Ecwid/swatch-color-translations
Add translations to FetchedSwatchColor
2 parents 5a8616c + 3f6d804 commit 3494239

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

src/main/kotlin/com/ecwid/apiclient/v3/dto/swatches/result/FetchedSwatchColor.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,12 @@ package com.ecwid.apiclient.v3.dto.swatches.result
22

33
import com.ecwid.apiclient.v3.dto.common.ApiFetchedDTO
44
import com.ecwid.apiclient.v3.dto.common.ApiResultDTO
5+
import com.ecwid.apiclient.v3.dto.common.LocalizedValueMap
56

67
data class FetchedSwatchColor(
78
val name: String = "",
89
val hexCode: String = "",
10+
val translations: LocalizedValueMap? = null,
911
) : ApiFetchedDTO, ApiResultDTO {
1012
override fun getModifyKind() = ApiFetchedDTO.ModifyKind.ReadOnly
1113
}

src/test/kotlin/com/ecwid/apiclient/v3/rule/NullablePropertyRules.kt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ import com.ecwid.apiclient.v3.dto.report.request.ReportRequest
2323
import com.ecwid.apiclient.v3.dto.report.result.FetchedReportAdviceResponse
2424
import com.ecwid.apiclient.v3.dto.report.result.FetchedReportResponse
2525
import com.ecwid.apiclient.v3.dto.storage.result.FetchedStorageData
26+
import com.ecwid.apiclient.v3.dto.swatches.result.FetchedSwatchColor
2627
import com.ecwid.apiclient.v3.dto.variation.request.ProductVariationsRequest
2728
import com.ecwid.apiclient.v3.rule.NullablePropertyRule.AllowNullable
2829
import com.ecwid.apiclient.v3.rule.NullablePropertyRule.IgnoreNullable
@@ -145,6 +146,8 @@ val otherNullablePropertyRules: List<NullablePropertyRule<*, *>> = listOf(
145146

146147
AllowNullable(FetchedReportResponse.FetchedAdditionalData.AdditionalCategoryData::categoryName),
147148

149+
AllowNullable(FetchedSwatchColor::translations),
150+
148151
AllowNullable(CreateBatchRequest::groupId),
149152
AllowNullable(CreateBatchRequestWithIds::groupId),
150153

0 commit comments

Comments
 (0)