Skip to content

Commit 9cb69a3

Browse files
committed
CBE: add support for the new batteryIncluded field in the public API for the product
1 parent 583bea1 commit 9cb69a3

5 files changed

Lines changed: 4 additions & 0 deletions

File tree

.DS_Store

-2 KB
Binary file not shown.

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ fun FetchedProduct.toUpdated(): UpdatedProduct {
7272
minPurchaseQuantity = minPurchaseQuantity,
7373
maxPurchaseQuantity = maxPurchaseQuantity,
7474
reviewsCollectingAllowed = reviewsCollectingAllowed,
75+
batteryIncluded = batteryIncluded,
7576
)
7677
}
7778

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
@@ -72,6 +72,7 @@ data class UpdatedProduct(
7272
val minPurchaseQuantity: Int? = null,
7373
val maxPurchaseQuantity: Int? = null,
7474
val reviewsCollectingAllowed: Boolean? = null,
75+
val batteryIncluded: Boolean? = null,
7576
) : ApiUpdatedDTO {
7677

7778
data class Ribbon(

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
@@ -140,6 +140,7 @@ data class FetchedProduct(
140140
val minPurchaseQuantity: Int? = null,
141141
val maxPurchaseQuantity: Int? = null,
142142
val reviewsCollectingAllowed: Boolean? = null,
143+
val batteryIncluded: Boolean? = null,
143144
val rating: Double? = null,
144145
val reviewsModerated: Int? = null,
145146
val reviewsPublished: Int? = null,

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
@@ -73,6 +73,7 @@ val fetchedProductNullablePropertyRules: List<NullablePropertyRule<*, *>> = list
7373
AllowNullable(FetchedProduct::rating),
7474
IgnoreNullable(FetchedProduct::relatedProducts),
7575
AllowNullable(FetchedProduct::reviewsCollectingAllowed),
76+
AllowNullable(FetchedProduct::batteryIncluded),
7677
AllowNullable(FetchedProduct::reviewsModerated),
7778
AllowNullable(FetchedProduct::reviewsPublished),
7879
IgnoreNullable(FetchedProduct::ribbon),

0 commit comments

Comments
 (0)