Closed whoamizq closed 1 year ago
Yea, this was how inventory quantities used to be changed prior to shopify's changes with multi inventory setups.
Now you have to use the updateInventoryLevel method if you want to update inventory. You should be able to pull the inventory item id off of the variant to make that call.
public ShopifyInventoryLevel updateInventoryLevel(final String inventoryItemId, final String locationId,
final long quantity)
I'll leave this open so we can mark that available inventory on the variant as deprecated to avoid the confusion.
Is there are any way to GET variant's inventory item levels?
When you do a GET to a variant
getVariant(final String variantId)
The inventory level is an aggregate of the levels across all locations.
As for this endpoint , we do not have that functionality yet built in to the sdk.
But using this method didn't work? shopifySdk.updateVariant()