Skip to content

Commit 0995189

Browse files
hendrix-ecwidVitaliy Telizhenko
authored andcommitted
Added new out of stock behaviour field in product DTO
1 parent a8cc848 commit 0995189

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
@@ -15,6 +15,7 @@ fun FetchedProduct.toUpdated(): UpdatedProduct {
1515

1616
enabled = enabled,
1717
quantity = quantity,
18+
outOfStockVisibilityBehaviour = outOfStockVisibilityBehaviour,
1819
unlimited = unlimited,
1920
warningLimit = warningLimit,
2021

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
@@ -18,6 +18,7 @@ data class UpdatedProduct(
1818

1919
val enabled: Boolean? = null,
2020
val quantity: Int? = null,
21+
val outOfStockVisibilityBehaviour: OutOfStockVisibilityBehaviour? = null,
2122
val unlimited: Boolean? = null,
2223
val warningLimit: Int? = null,
2324

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
@@ -28,6 +28,7 @@ data class FetchedProduct(
2828

2929
val enabled: Boolean? = null,
3030
val quantity: Int? = null,
31+
val outOfStockVisibilityBehaviour: OutOfStockVisibilityBehaviour? = null,
3132
val unlimited: Boolean? = null,
3233
val inStock: Boolean? = null,
3334
val warningLimit: 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
@@ -46,6 +46,7 @@ val fetchedProductNullablePropertyRules: List<NullablePropertyRule<*, *>> = list
4646
IgnoreNullable(FetchedProduct::priceInProductList),
4747
IgnoreNullable(FetchedProduct::productClassId),
4848
IgnoreNullable(FetchedProduct::quantity),
49+
IgnoreNullable(FetchedProduct::outOfStockVisibilityBehaviour),
4950
IgnoreNullable(FetchedProduct::relatedProducts),
5051
IgnoreNullable(FetchedProduct::ribbon),
5152
IgnoreNullable(FetchedProduct::ribbonTranslated),

0 commit comments

Comments
 (0)