Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ecwid 131152 #360

Merged
merged 2 commits into from
Dec 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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),
)