Skip to content

Commit 91ceac0

Browse files
authored
Merge pull request #229 from Ecwid/OrderQuantitylimits-addMinMaxApi
ECWID-102900 Order quantity limits for products: storefront
2 parents bef9c36 + 7a99cf5 commit 91ceac0

4 files changed

Lines changed: 8 additions & 0 deletions

File tree

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,8 @@ fun FetchedProduct.toUpdated(): UpdatedProduct {
6262
productCondition = productCondition,
6363
externalReferenceId = externalReferenceId,
6464
customsHsTariffCode = customsHsTariffCode,
65+
minPurchaseQuantity = minPurchaseQuantity,
66+
maxPurchaseQuantity = maxPurchaseQuantity,
6567
)
6668
}
6769

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,8 @@ data class UpdatedProduct(
6262
val productCondition: ProductCondition? = null,
6363
val externalReferenceId: String? = null,
6464
val customsHsTariffCode: String? = null,
65+
val minPurchaseQuantity: Int? = null,
66+
val maxPurchaseQuantity: Int? = null,
6567
) : ApiUpdatedDTO {
6668

6769
data class Ribbon(

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,8 @@ data class FetchedProduct(
9292
val productCondition: ProductCondition = ProductCondition.NEW,
9393
val externalReferenceId: String? = null,
9494
val customsHsTariffCode: String? = null,
95+
val minPurchaseQuantity: Int? = null,
96+
val maxPurchaseQuantity: Int? = null,
9597
) : ApiFetchedDTO {
9698

9799
data class BorderInfo(

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,8 @@ val otherNullablePropertyRules: List<NullablePropertyRule<*, *>> = listOf(
6868
IgnoreNullable(ProductInventoryUpdateResult::warning),
6969

7070
AllowNullable(FetchedStorageData::value),
71+
AllowNullable(FetchedProduct::minPurchaseQuantity),
72+
AllowNullable(FetchedProduct::maxPurchaseQuantity),
7173
)
7274

7375
val nullablePropertyRules: List<NullablePropertyRule<*, *>> = listOf(

0 commit comments

Comments
 (0)