Skip to content

Commit

Permalink
Merge pull request #360 from Ecwid/ECWID-131152
Browse files Browse the repository at this point in the history
Ecwid 131152
  • Loading branch information
Alexis2004 authored Dec 22, 2023
2 parents 3dc3871 + 8262553 commit b787b99
Show file tree
Hide file tree
Showing 9 changed files with 18 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ fun FetchedVariation.toUpdated(): UpdatedVariation {
sku = sku,

quantity = quantity,
locationInventory = locationInventory,
outOfStockVisibilityBehaviour = outOfStockVisibilityBehaviour,
unlimited = unlimited,
warningLimit = warningLimit,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ fun FetchedProduct.toUpdated(): UpdatedProduct {

enabled = enabled,
quantity = quantity,
locationInventory = locationInventory,
outOfStockVisibilityBehaviour = outOfStockVisibilityBehaviour,
unlimited = unlimited,
warningLimit = warningLimit,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ data class UpdatedProduct(

val enabled: Boolean? = null,
val quantity: Int? = null,
val locationInventory: Map<String, Int>? = null,
val outOfStockVisibilityBehaviour: OutOfStockVisibilityBehaviour? = null,
val unlimited: Boolean? = null,
val warningLimit: Int? = null,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ data class FetchedProduct(

val enabled: Boolean? = null,
val quantity: Int? = null,
val locationInventory: Map<String, Int>? = null,
val outOfStockVisibilityBehaviour: OutOfStockVisibilityBehaviour? = null,
val unlimited: Boolean? = null,
val inStock: Boolean? = null,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ data class UpdatedVariation(
val wholesalePrices: List<WholesalePrice>? = null,

val quantity: Int? = null,
val locationInventory: Map<String, Int>? = null,
val outOfStockVisibilityBehaviour: OutOfStockVisibilityBehaviour? = null,
val unlimited: Boolean? = null,
val warningLimit: Int? = null,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ data class FetchedVariation(
val wholesalePrices: List<WholesalePrice>? = null,

val quantity: Int? = null,
val locationInventory: Map<String, Int>? = null,
val outOfStockVisibilityBehaviour: OutOfStockVisibilityBehaviour? = null,
val unlimited: Boolean? = null,
val inStock: Boolean? = null,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -47,14 +45,6 @@ val otherNullablePropertyRules: List<NullablePropertyRule<*, *>> = 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),
Expand All @@ -79,8 +69,6 @@ val otherNullablePropertyRules: List<NullablePropertyRule<*, *>> = listOf(
IgnoreNullable(ProductInventoryUpdateResult::warning),

AllowNullable(FetchedStorageData::value),
AllowNullable(FetchedProduct::minPurchaseQuantity),
AllowNullable(FetchedProduct::maxPurchaseQuantity),

AllowNullable(ReportRequest::startedFrom),
AllowNullable(ReportRequest::endedAt),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,5 +145,14 @@ val fetchedProductNullablePropertyRules: List<NullablePropertyRule<*, *>> = 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),
)
Original file line number Diff line number Diff line change
Expand Up @@ -64,5 +64,6 @@ val fetchedVariationTypeNullablePropertyRules: List<NullablePropertyRule<*, *>>
IgnoreNullable(FetchedVariation.SubscriptionSettings::displayedOneTimePurchaseMarkupPercent),
IgnoreNullable(FetchedVariation.SubscriptionSettings::displayedOneTimePurchaseMarkupPercentFormatted),
AllowNullable(FetchedVariation.SubscriptionSettings::oneTimePurchasePrice),
IgnoreNullable(FetchedVariation.SubscriptionSettings::oneTimePurchasePriceFormatted)
IgnoreNullable(FetchedVariation.SubscriptionSettings::oneTimePurchasePriceFormatted),
AllowNullable(FetchedVariation::locationInventory),
)

0 comments on commit b787b99

Please sign in to comment.