Skip to content

Commit

Permalink
ECWID-131152 - add locationInventory
Browse files Browse the repository at this point in the history
  • Loading branch information
mplain committed Dec 8, 2023
1 parent a63ecd9 commit 8262553
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 1 deletion.
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 @@ -154,4 +154,5 @@ val fetchedProductNullablePropertyRules: List<NullablePropertyRule<*, *>> = list
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 8262553

Please sign in to comment.