Skip to content

Commit eb17625

Browse files
committed
Adding new field productSkus to related products
1 parent bd5e8ba commit eb17625

4 files changed

Lines changed: 4 additions & 0 deletions

File tree

src/main/kotlin/com/ecwid/apiclient/v3/converter/FetchedProduct.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,7 @@ private fun FetchedProduct.AttributeValue.toUpdated() = UpdatedProduct.Attribute
183183

184184
private fun FetchedProduct.RelatedProducts.toUpdated() = UpdatedProduct.RelatedProducts(
185185
productIds = productIds,
186+
productSkus = productSkus,
186187
relatedCategory = relatedCategory?.toUpdated()
187188
)
188189

src/main/kotlin/com/ecwid/apiclient/v3/dto/product/request/UpdatedProduct.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -314,6 +314,7 @@ data class UpdatedProduct(
314314

315315
data class RelatedProducts(
316316
val productIds: List<Int>? = null,
317+
val productSkus: List<String>? = null,
317318
val relatedCategory: RelatedCategory? = null
318319
)
319320

src/main/kotlin/com/ecwid/apiclient/v3/dto/product/result/FetchedProduct.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,7 @@ data class FetchedProduct(
237237

238238
data class RelatedProducts(
239239
val productIds: List<Int>? = null,
240+
val productSkus: List<String>? = null,
240241
val relatedCategory: RelatedCategory? = null
241242
)
242243

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ val fetchedProductNullablePropertyRules: List<NullablePropertyRule<*, *>> = list
100100
IgnoreNullable(FetchedProduct.RelatedCategory::productCount),
101101
IgnoreNullable(FetchedProduct.RelatedProducts::productIds),
102102
IgnoreNullable(FetchedProduct.RelatedProducts::relatedCategory),
103+
AllowNullable(FetchedProduct.RelatedProducts::productSkus),
103104
IgnoreNullable(FetchedProduct.Ribbon::color),
104105
IgnoreNullable(FetchedProduct.Ribbon::text),
105106
IgnoreNullable(FetchedProduct.ShippingSettings::disabledMethods),

0 commit comments

Comments
 (0)