question

amanrathi avatar image
amanrathi asked David Marginian Deactivated answered

Getting null ItemStock object

Hi


I am using inventory connector to get the inventory item details in my android based clover application. But to get the item quantity I found the itemStock every time null.


I am using following code:


var item = mInventoryConnector.getItemWithCategories(itemId)

var quantitiy = item.itemStock.quantity


Error:

java.lang.NullPointerException: itm.itemStock must not be null



I want the amount of item in stock quantity. Please suggest if I am missing anything.

Clover Android SDKsemi-integrationsInventory
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
David Marginian avatar image
David Marginian Deactivated answered

How was this item created? If you use the REST API to retrieve the item and expand itemStock is it also null? Have you tried updating the itemStock for that item?

10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Welcome to the
Clover Developer Community