diff --git a/src/main/kotlin/com/ecwid/apiclient/v3/converter/FetchedCombination.kt b/src/main/kotlin/com/ecwid/apiclient/v3/converter/FetchedCombination.kt index 263a34ed7..e0ad601f8 100644 --- a/src/main/kotlin/com/ecwid/apiclient/v3/converter/FetchedCombination.kt +++ b/src/main/kotlin/com/ecwid/apiclient/v3/converter/FetchedCombination.kt @@ -9,6 +9,7 @@ fun FetchedVariation.toUpdated(): UpdatedVariation { sku = sku, quantity = quantity, + locationInventory = locationInventory, outOfStockVisibilityBehaviour = outOfStockVisibilityBehaviour, unlimited = unlimited, warningLimit = warningLimit, diff --git a/src/main/kotlin/com/ecwid/apiclient/v3/converter/FetchedProduct.kt b/src/main/kotlin/com/ecwid/apiclient/v3/converter/FetchedProduct.kt index f4108b95c..c18d73858 100644 --- a/src/main/kotlin/com/ecwid/apiclient/v3/converter/FetchedProduct.kt +++ b/src/main/kotlin/com/ecwid/apiclient/v3/converter/FetchedProduct.kt @@ -15,6 +15,7 @@ fun FetchedProduct.toUpdated(): UpdatedProduct { enabled = enabled, quantity = quantity, + locationInventory = locationInventory, outOfStockVisibilityBehaviour = outOfStockVisibilityBehaviour, unlimited = unlimited, warningLimit = warningLimit, diff --git a/src/main/kotlin/com/ecwid/apiclient/v3/dto/product/request/UpdatedProduct.kt b/src/main/kotlin/com/ecwid/apiclient/v3/dto/product/request/UpdatedProduct.kt index f14384154..994e4b8e4 100644 --- a/src/main/kotlin/com/ecwid/apiclient/v3/dto/product/request/UpdatedProduct.kt +++ b/src/main/kotlin/com/ecwid/apiclient/v3/dto/product/request/UpdatedProduct.kt @@ -15,6 +15,7 @@ data class UpdatedProduct( val enabled: Boolean? = null, val quantity: Int? = null, + val locationInventory: Map? = null, val outOfStockVisibilityBehaviour: OutOfStockVisibilityBehaviour? = null, val unlimited: Boolean? = null, val warningLimit: Int? = null, diff --git a/src/main/kotlin/com/ecwid/apiclient/v3/dto/product/result/FetchedProduct.kt b/src/main/kotlin/com/ecwid/apiclient/v3/dto/product/result/FetchedProduct.kt index 36a142b15..80356f44f 100644 --- a/src/main/kotlin/com/ecwid/apiclient/v3/dto/product/result/FetchedProduct.kt +++ b/src/main/kotlin/com/ecwid/apiclient/v3/dto/product/result/FetchedProduct.kt @@ -25,6 +25,7 @@ data class FetchedProduct( val enabled: Boolean? = null, val quantity: Int? = null, + val locationInventory: Map? = null, val outOfStockVisibilityBehaviour: OutOfStockVisibilityBehaviour? = null, val unlimited: Boolean? = null, val inStock: Boolean? = null, diff --git a/src/main/kotlin/com/ecwid/apiclient/v3/dto/variation/request/UpdatedVariation.kt b/src/main/kotlin/com/ecwid/apiclient/v3/dto/variation/request/UpdatedVariation.kt index 2cd9505d9..6e02c915e 100644 --- a/src/main/kotlin/com/ecwid/apiclient/v3/dto/variation/request/UpdatedVariation.kt +++ b/src/main/kotlin/com/ecwid/apiclient/v3/dto/variation/request/UpdatedVariation.kt @@ -22,6 +22,7 @@ data class UpdatedVariation( val wholesalePrices: List? = null, val quantity: Int? = null, + val locationInventory: Map? = null, val outOfStockVisibilityBehaviour: OutOfStockVisibilityBehaviour? = null, val unlimited: Boolean? = null, val warningLimit: Int? = null, diff --git a/src/main/kotlin/com/ecwid/apiclient/v3/dto/variation/result/FetchedVariation.kt b/src/main/kotlin/com/ecwid/apiclient/v3/dto/variation/result/FetchedVariation.kt index c3e3f3e63..e7952ece1 100644 --- a/src/main/kotlin/com/ecwid/apiclient/v3/dto/variation/result/FetchedVariation.kt +++ b/src/main/kotlin/com/ecwid/apiclient/v3/dto/variation/result/FetchedVariation.kt @@ -35,6 +35,7 @@ data class FetchedVariation( val wholesalePrices: List? = null, val quantity: Int? = null, + val locationInventory: Map? = null, val outOfStockVisibilityBehaviour: OutOfStockVisibilityBehaviour? = null, val unlimited: Boolean? = null, val inStock: Boolean? = null, diff --git a/src/test/kotlin/com/ecwid/apiclient/v3/rule/NullablePropertyRules.kt b/src/test/kotlin/com/ecwid/apiclient/v3/rule/NullablePropertyRules.kt index e4b86bcd0..55799c894 100644 --- a/src/test/kotlin/com/ecwid/apiclient/v3/rule/NullablePropertyRules.kt +++ b/src/test/kotlin/com/ecwid/apiclient/v3/rule/NullablePropertyRules.kt @@ -12,8 +12,6 @@ import com.ecwid.apiclient.v3.dto.order.result.DeletedOrder import com.ecwid.apiclient.v3.dto.payment.PaymentAppRequest import com.ecwid.apiclient.v3.dto.product.request.ProductInventoryUpdateRequest import com.ecwid.apiclient.v3.dto.product.request.ProductUpdateRequest -import com.ecwid.apiclient.v3.dto.product.request.UpdatedProduct -import com.ecwid.apiclient.v3.dto.product.result.FetchedProduct import com.ecwid.apiclient.v3.dto.product.result.GetProductFiltersResult import com.ecwid.apiclient.v3.dto.product.result.ProductInventoryUpdateResult import com.ecwid.apiclient.v3.dto.profile.request.StoreProfileRequest @@ -47,14 +45,6 @@ val otherNullablePropertyRules: List> = listOf( AllowNullable(GetProductFiltersResult.ProductFilters::onsale), AllowNullable(GetProductFiltersResult.ProductFilters::options), AllowNullable(GetProductFiltersResult.ProductFilters::price), - AllowNullable(FetchedProduct.ShippingPreparationTime::pickupPreparationTimeForInStockItemInMinutes), - AllowNullable(FetchedProduct.ShippingPreparationTime::shippingPreparationTimeForInStockItemDays), - AllowNullable(FetchedProduct.ShippingPreparationTime::shippingPreparationTimeForOutOfStockItemDays), - AllowNullable(FetchedProduct.ShippingPreparationTime::localDeliveryPreparationTimeForInStockItemInMinutes), - AllowNullable(FetchedProduct.ProductOption.ChoiceBased::defaultChoice), - AllowNullable(FetchedProduct.ProductOption.CheckboxOption::defaultChoice), - - AllowNullable(UpdatedProduct.ProductOption::required), AllowNullable(FetchedLatestStats::productCount), AllowNullable(FetchedLatestStats::categoryCount), @@ -79,8 +69,6 @@ val otherNullablePropertyRules: List> = listOf( IgnoreNullable(ProductInventoryUpdateResult::warning), AllowNullable(FetchedStorageData::value), - AllowNullable(FetchedProduct::minPurchaseQuantity), - AllowNullable(FetchedProduct::maxPurchaseQuantity), AllowNullable(ReportRequest::startedFrom), AllowNullable(ReportRequest::endedAt), diff --git a/src/test/kotlin/com/ecwid/apiclient/v3/rule/nullablepropertyrules/FetchedProductRules.kt b/src/test/kotlin/com/ecwid/apiclient/v3/rule/nullablepropertyrules/FetchedProductRules.kt index 7a5c6a669..721d01b2c 100644 --- a/src/test/kotlin/com/ecwid/apiclient/v3/rule/nullablepropertyrules/FetchedProductRules.kt +++ b/src/test/kotlin/com/ecwid/apiclient/v3/rule/nullablepropertyrules/FetchedProductRules.kt @@ -145,5 +145,14 @@ val fetchedProductNullablePropertyRules: List> = list IgnoreNullable(FetchedProduct.SubscriptionSettings::displayedOneTimePurchaseMarkupPercent), IgnoreNullable(FetchedProduct.SubscriptionSettings::displayedOneTimePurchaseMarkupPercentFormatted), AllowNullable(FetchedProduct.SubscriptionSettings::oneTimePurchasePrice), - IgnoreNullable(FetchedProduct.SubscriptionSettings::oneTimePurchasePriceFormatted) + IgnoreNullable(FetchedProduct.SubscriptionSettings::oneTimePurchasePriceFormatted), + AllowNullable(FetchedProduct.ShippingPreparationTime::pickupPreparationTimeForInStockItemInMinutes), + AllowNullable(FetchedProduct.ShippingPreparationTime::shippingPreparationTimeForInStockItemDays), + AllowNullable(FetchedProduct.ShippingPreparationTime::shippingPreparationTimeForOutOfStockItemDays), + AllowNullable(FetchedProduct.ShippingPreparationTime::localDeliveryPreparationTimeForInStockItemInMinutes), + AllowNullable(FetchedProduct.ProductOption.ChoiceBased::defaultChoice), + AllowNullable(FetchedProduct.ProductOption.CheckboxOption::defaultChoice), + AllowNullable(FetchedProduct::minPurchaseQuantity), + AllowNullable(FetchedProduct::maxPurchaseQuantity), + AllowNullable(FetchedProduct::locationInventory), ) diff --git a/src/test/kotlin/com/ecwid/apiclient/v3/rule/nullablepropertyrules/FetchedVariationRules.kt b/src/test/kotlin/com/ecwid/apiclient/v3/rule/nullablepropertyrules/FetchedVariationRules.kt index c1ba0ed9d..522da0f40 100644 --- a/src/test/kotlin/com/ecwid/apiclient/v3/rule/nullablepropertyrules/FetchedVariationRules.kt +++ b/src/test/kotlin/com/ecwid/apiclient/v3/rule/nullablepropertyrules/FetchedVariationRules.kt @@ -64,5 +64,6 @@ val fetchedVariationTypeNullablePropertyRules: List> IgnoreNullable(FetchedVariation.SubscriptionSettings::displayedOneTimePurchaseMarkupPercent), IgnoreNullable(FetchedVariation.SubscriptionSettings::displayedOneTimePurchaseMarkupPercentFormatted), AllowNullable(FetchedVariation.SubscriptionSettings::oneTimePurchasePrice), - IgnoreNullable(FetchedVariation.SubscriptionSettings::oneTimePurchasePriceFormatted) + IgnoreNullable(FetchedVariation.SubscriptionSettings::oneTimePurchasePriceFormatted), + AllowNullable(FetchedVariation::locationInventory), )