Skip to content

Commit

Permalink
ECWID-131152 - move FetchedProduct rules to a separate file
Browse files Browse the repository at this point in the history
  • Loading branch information
mplain committed Dec 8, 2023
1 parent ebd868c commit a63ecd9
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 13 deletions.
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,13 @@ 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),
)

0 comments on commit a63ecd9

Please sign in to comment.