Interface AdvancedInventoryItemService
- All Known Implementing Classes:
SuperUserAdvancedInventoryItemService,UserAdvancedInventoryItemService
public interface AdvancedInventoryItemService
Allows for modification of the inventory using the advanced API.
-
Method Summary
Modifier and TypeMethodDescriptionadjustInventoryItemQuantity(String inventoryItemId, int quantityDelta) Adjusts the quantity of theInventoryItemassociated with the specifiedItem.createInventoryItem(String userId, String itemId, int quantity, int priority) Creates a newInventoryItemfor the specifiedItem.voiddeleteInventoryItem(String inventoryItemId) Deletes anInventoryItemfrom the givenUser's inventory.getInventoryItem(String inventoryItemId) Returns theInventoryItemassociated with the specified id.getInventoryItems(int offset, int count, String userId) Returns a list ofInventoryItemobjects.getInventoryItems(int offset, int count, String userId, String query) Returns a list ofInventoryItemobjects.updateInventoryItem(String inventoryItemId, int quantity) Updates an inventory item with the supplied user id, item id, and quantity.
-
Method Details
-
getInventoryItem
Returns theInventoryItemassociated with the specified id.- Parameters:
inventoryItemId- the id of the as specified byInventoryItem.getId()- Returns:
- the
InventoryItemassociated with specified item
-
getInventoryItems
Returns a list ofInventoryItemobjects.- Parameters:
offset- the offsetcount- the countuserId- the user id to filter, pass null or empty to fetch all- Returns:
- the list of
InventoryIteminstances
-
getInventoryItems
Returns a list ofInventoryItemobjects.- Parameters:
offset- the offsetcount- the countuserId- the user id to filter, pass null or empty to fetch allquery- the search query- Returns:
- the list of
InventoryIteminstances
-
adjustInventoryItemQuantity
Adjusts the quantity of theInventoryItemassociated with the specifiedItem.- Parameters:
inventoryItemId- the value ofInventoryItem.getId()quantityDelta- the amount by which to adjust the quantity of theInventoryItem- Returns:
- the
InventoryItemas it was written to the database
-
createInventoryItem
Creates a newInventoryItemfor the specifiedItem.- Parameters:
userId- the user to own theInventoryItemitemId- theItem.getName()orItem.getId()to use.quantity- the initial quantitypriority- the priority slot- Returns:
- the
InventoryItemas it was written to the database
-
updateInventoryItem
Updates an inventory item with the supplied user id, item id, and quantity.- Parameters:
inventoryItemId- the inventory item idquantity- the quantity to set- Returns:
- the updated
InventoryItem
-
deleteInventoryItem
Deletes anInventoryItemfrom the givenUser's inventory.- Parameters:
inventoryItemId- theInventoryItem's id.
-