Class IInventoryService.Default
- java.lang.Object
-
- com.clover.sdk.v3.inventory.IInventoryService.Default
-
- All Implemented Interfaces:
IInterface
,IInventoryService
- Enclosing interface:
- IInventoryService
public static class IInventoryService.Default extends Object implements IInventoryService
Default implementation for IInventoryService.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.clover.sdk.v3.inventory.IInventoryService
IInventoryService.Default, IInventoryService.Stub
-
-
Constructor Summary
Constructors Constructor Description Default()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
addItemToCategory(String itemId, String categoryId, ResultStatus resultStatus)
Adds an item to a category.IBinder
asBinder()
void
assignCategoriesToItem(String itemId, List<String> categoryIds, ResultStatus resultStatus)
Associates categories with an item.void
assignItemsToTag(String tagId, List<String> items, ResultStatus resultStatus)
Assign a list of items (identified by their unique ID) to a tag.void
assignModifierGroupToItem(String modifierGroupId, String itemId, ResultStatus resultStatus)
Associates a modifier group with an item.void
assignOptionsToItem(String itemId, List<String> optionIds, ResultStatus resultStatus)
Associate the given options with an item.void
assignTagsToItem(String itemId, List<String> tags, ResultStatus resultStatus)
Assign a list of tags (identified by their unique ID) to an item.void
assignTagsToPrinter(String printerUid, List<String> tags, ResultStatus resultStatus)
Assign a list of tags (identified by their unique ID) to a printer.void
assignTaxRatesToItem(String itemId, List<String> taxRates, ResultStatus resultStatus)
Assign a list of tax rates (identified by their unique ID) to an item.void
bulkAssignColorToItems(List<String> itemIds, String colorHexCode, ResultStatus resultStatus)
Assign given color to list of items.Attribute
createAttribute(Attribute attribute, ResultStatus resultStatus)
Creates a new attribute.Category
createCategory(Category category, ResultStatus resultStatus)
Adds a new category.Discount
createDiscount(Discount discount, ResultStatus resultStatus)
Adds a new discount.Item
createItem(Item item, ResultStatus resultStatus)
Inserts a new item into the database.ItemGroup
createItemGroup(ItemGroup itemGroup, ResultStatus resultStatus)
Creates a new item group.Modifier
createModifier(String modifierGroupId, Modifier modifier, ResultStatus resultStatus)
Adds a new modifier.ModifierGroup
createModifierGroup(ModifierGroup group, ResultStatus resultStatus)
Adds a new modifier group.Option
createOption(Option option, ResultStatus resultStatus)
Creates a new option.OrderFee
createOrderFee(OrderFee orderFee, ResultStatus resultStatus)
Adds a new order fee.Tag
createTag(Tag tag, ResultStatus resultStatus)
Creates a new tag.TaxRate
createTaxRate(TaxRate taxRate, ResultStatus resultStatus)
Creates a new tax rate.void
deleteAttribute(String attributeId, ResultStatus resultStatus)
Deletes an attribute, deletes all the options in that attribute and removes all the associations between those options and items.void
deleteCategories(List<String> categoryIds, ResultStatus resultStatus)
Bulk delete categories.void
deleteCategory(String categoryId, ResultStatus resultStatus)
Deletes an existing category.void
deleteDiscount(String discountId, ResultStatus resultStatus)
Deletes a discount.void
deleteItem(String itemId, ResultStatus resultStatus)
Deletes an existing item.void
deleteItemGroup(String itemGroupId, ResultStatus resultStatus)
Deletes an item group, but does not delete the items in a group, they become items without an item group.void
deleteItems(List<String> itemIds, ResultStatus resultStatus)
Bulk delete items.void
deleteModifier(String modifierId, ResultStatus resultStatus)
Deletes an existing modifier.void
deleteModifierGroup(String groupId, ResultStatus resultStatus)
Deletes an existing modifier group.void
deleteModifierGroups(List<String> groupIds, ResultStatus resultStatus)
Bulk delete modifier groups.void
deleteOption(String optionId, ResultStatus resultStatus)
Deletes an option and removes all the associations between that option and items.void
deleteOrderFee(String orderFeeId, ResultStatus resultStatus)
Deletes an order fee.void
deleteTag(String tagId, ResultStatus resultStatus)
Deletes a tag.void
deleteTags(List<String> tagIds, ResultStatus resultStatus)
Bulk delete tags.void
deleteTaxRate(String taxRateId, ResultStatus resultStatus)
Deletes a tax rate.Attribute
getAttribute(String attributeId, ResultStatus resultStatus)
Gets a single attribute identified by its unique ID.List<Attribute>
getAttributes(ResultStatus resultStatus)
Gets all defined attributes for the merchant.List<Category>
getCategories(ResultStatus resultStatus)
Retrieve the list of categories.Discount
getDiscount(String discountId, ResultStatus resultStatus)
Gets a single discount identified by its unique ID.List<Discount>
getDiscounts(ResultStatus resultStatus)
Retrieve the list of discounts.Item
getItem(String itemId, ResultStatus resultStatus)
Retrieve an individual item using the item ID.ItemGroup
getItemGroup(String itemGroupId, ResultStatus resultStatus)
Gets a single item group identified by its unique ID.List<String>
getItemIds(ResultStatus resultStatus)
Deprecated.See note on {@link #getItems(ResultStatus).List<Item>
getItems(ResultStatus resultStatus)
Deprecated.Many merchants have a large inventory of items that cannot be retrieved in a single shot due to binder and memory limits.List<Item>
getItemsForModifierGroup(String modifierGroupId, ResultStatus resultStatus)
Retrieve list of items that use the specified Modifier GroupList<Item>
getItemsWithCategories(ResultStatus resultStatus)
Deprecated.See note on {@link #getItems(ResultStatus).Item
getItemWithCategories(String itemId, ResultStatus resultStatus)
Same asgetItem(String, ResultStatus)
but also includes the list of categories to which the item belongs.List<ModifierGroup>
getModifierGroups(ResultStatus resultStatus)
Retrieve the list of all modifier groups.List<ModifierGroup>
getModifierGroupsForItem(String itemId, ResultStatus resultStatus)
Retrieve the list of modifier groups for a particular item.List<Modifier>
getModifiers(String modifierGroupId, ResultStatus resultStatus)
Retrieve the list of modifiers belonging to a modifier group.Option
getOption(String optionId, ResultStatus resultStatus)
Gets a single option identified by its unique ID.List<Option>
getOptions(ResultStatus resultStatus)
Gets all defined options for the merchant.List<Option>
getOptionsForItem(String itemId, ResultStatus resultStatus)
Retrieve the list of options for an item.OrderFee
getOrderFee(String orderFeeId, ResultStatus resultStatus)
Gets a single order fee identified by its unique ID.List<OrderFee>
getOrderFees(ResultStatus resultStatus)
Retrieve the list of order fees.Tag
getTag(String tagId, ResultStatus resultStatus)
Gets a single tag identified by its unique ID.List<Tag>
getTags(ResultStatus resultStatus)
Gets all defined tags for the merchant.List<Tag>
getTagsForItem(String itemId, ResultStatus resultStatus)
Retrieve the list of tags for an item.List<Tag>
getTagsForPrinter(String printerMac, ResultStatus resultStatus)
Retrieve the list of tags for a printer.TaxRate
getTaxRate(String taxRateId, ResultStatus resultStatus)
Gets a single tax rate identified by its unique ID.List<TaxRate>
getTaxRates(ResultStatus resultStatus)
Gets all defined tax rates for the merchant.List<TaxRate>
getTaxRatesExcludedForItem(String orderTypeId, String itemId, ResultStatus resultStatus)
Retrieve the list of tax rates excluded for an item, given the order-type-idList<TaxRate>
getTaxRatesForItem(String itemId, ResultStatus resultStatus)
Retrieve the list of tax rates for an item.void
moveItemInCategoryLayout(String itemId, String categoryId, int direction, ResultStatus resultStatus)
Moves an item's position within an existing category.void
removeCategoriesFromItem(String itemId, List<String> categoryIds, ResultStatus resultStatus)
Removes categories association from an item.void
removeItemFromCategory(String itemId, String categoryId, ResultStatus resultStatus)
Removes an item from a category.void
removeItemsFromTag(String tagId, List<String> items, ResultStatus resultStatus)
Remove a list of items (identified by their unique ID) from a tag.void
removeItemStock(String itemId, ResultStatus resultStatus)
Remove stock count for an item.void
removeModifierGroupFromItem(String modifierGroupId, String itemId, ResultStatus resultStatus)
Removes a modifier group association from an item.void
removeOptionsFromItem(String itemId, List<String> optionIds, ResultStatus resultStatus)
Remove the association between the given options and an item.void
removeTagsFromItem(String itemId, List<String> tags, ResultStatus resultStatus)
Remove a list of tags (identified by their unique ID) from an item.void
removeTagsFromPrinter(String printerUid, List<String> tags, ResultStatus resultStatus)
Remove a list of tags (identified by their unique ID) from a printer.void
removeTaxRatesFromItem(String itemId, List<String> taxRates, ResultStatus resultStatus)
Remove a list of tax rates (identified by their unique ID) from an item.void
updateAttribute(Attribute attribute, ResultStatus resultStatus)
Updates an existing attribute.void
updateCategory(Category category, ResultStatus resultStatus)
Updates an existing category.void
updateCategoryItems(String categoryId, List<String> itemIds, ResultStatus resultStatus)
Updates all items of a category.void
updateCategorySortOrders(List<Category> categories, ResultStatus resultStatus)
Update category sort orders.void
updateDiscount(Discount discount, ResultStatus resultStatus)
Updates an existing discount.void
updateItem(Item item, ResultStatus resultStatus)
Updates an existing item.void
updateItemGroup(ItemGroup itemGroup, ResultStatus resultStatus)
Updates an existing item group.void
updateItemStock(String itemId, long stockCount, ResultStatus resultStatus)
Update stock count for an item.void
updateItemStockQuantity(String itemId, double quantity, ResultStatus resultStatus)
Update stock for an item.void
updateModifier(Modifier modifier, ResultStatus resultStatus)
Updates an existing modifier.void
updateModifierGroup(ModifierGroup group, ResultStatus resultStatus)
Updates an existing modifier group.void
updateModifierGroupSortOrders(List<ModifierGroup> groups, ResultStatus resultStatus)
Updates the sort orders for a list of modifier groups.void
updateModifierSortOrder(String modifierGroupId, List<String> modifierIds, ResultStatus resultStatus)
Update modifier sort order for a modifier group.void
updateOption(Option option, ResultStatus resultStatus)
Updates an existing option.void
updateOrderFee(OrderFee orderFee, ResultStatus resultStatus)
Updates an existing order fee.void
updateTag(Tag tag, ResultStatus resultStatus)
Updates an existing tag.void
updateTaxRate(TaxRate taxRate, ResultStatus resultStatus)
Updates an existing tax rate.
-
-
-
Method Detail
-
getItems
public List<Item> getItems(ResultStatus resultStatus) throws RemoteException
Deprecated.Many merchants have a large inventory of items that cannot be retrieved in a single shot due to binder and memory limits. As a precaution always use theInventoryContract
to retrieve the entire set of inventory items. This method will return a maximum of 500 items before returning a fault.- Specified by:
getItems
in interfaceIInventoryService
- Throws:
RemoteException
-
getItemsWithCategories
public List<Item> getItemsWithCategories(ResultStatus resultStatus) throws RemoteException
Deprecated.See note on {@link #getItems(ResultStatus).- Specified by:
getItemsWithCategories
in interfaceIInventoryService
- Throws:
RemoteException
-
getItemIds
public List<String> getItemIds(ResultStatus resultStatus) throws RemoteException
Deprecated.See note on {@link #getItems(ResultStatus).- Specified by:
getItemIds
in interfaceIInventoryService
- Throws:
RemoteException
-
getItem
public Item getItem(String itemId, ResultStatus resultStatus) throws RemoteException
Retrieve an individual item using the item ID. If the item is not in the local database, an attempt will be made to fetch the item from the server.- Specified by:
getItem
in interfaceIInventoryService
- Throws:
RemoteException
-
getItemWithCategories
public Item getItemWithCategories(String itemId, ResultStatus resultStatus) throws RemoteException
Same asgetItem(String, ResultStatus)
but also includes the list of categories to which the item belongs.- Specified by:
getItemWithCategories
in interfaceIInventoryService
- Throws:
RemoteException
-
createItem
public Item createItem(Item item, ResultStatus resultStatus) throws RemoteException
Inserts a new item into the database. If the client is in offline mode, the item will be inserted into the local cache and a request to create the new item on the server will be queued until the client is online again. Returns the newly created item as it exists in the local content provider/cache.- Specified by:
createItem
in interfaceIInventoryService
- Throws:
RemoteException
-
updateItem
public void updateItem(Item item, ResultStatus resultStatus) throws RemoteException
Updates an existing item. You may update the following fields: name (unless this item is in an item group), alternateName, price, priceWithoutVat, code, priceType, unitName, defaultTaxRates, cost, sku, hidden, isRevenue.- Specified by:
updateItem
in interfaceIInventoryService
- Throws:
RemoteException
-
deleteItem
public void deleteItem(String itemId, ResultStatus resultStatus) throws RemoteException
Deletes an existing item.- Specified by:
deleteItem
in interfaceIInventoryService
- Throws:
RemoteException
-
getCategories
public List<Category> getCategories(ResultStatus resultStatus) throws RemoteException
Retrieve the list of categories.Prefer to use the
InventoryContract
over this method since this method will fail for large result sets that exceed binder limitations.- Specified by:
getCategories
in interfaceIInventoryService
- Throws:
RemoteException
-
createCategory
public Category createCategory(Category category, ResultStatus resultStatus) throws RemoteException
Adds a new category.- Specified by:
createCategory
in interfaceIInventoryService
- Throws:
RemoteException
-
updateCategory
public void updateCategory(Category category, ResultStatus resultStatus) throws RemoteException
Updates an existing category.- Specified by:
updateCategory
in interfaceIInventoryService
- Throws:
RemoteException
-
deleteCategory
public void deleteCategory(String categoryId, ResultStatus resultStatus) throws RemoteException
Deletes an existing category.- Specified by:
deleteCategory
in interfaceIInventoryService
- Throws:
RemoteException
-
addItemToCategory
public void addItemToCategory(String itemId, String categoryId, ResultStatus resultStatus) throws RemoteException
Adds an item to a category.- Specified by:
addItemToCategory
in interfaceIInventoryService
- Throws:
RemoteException
-
removeItemFromCategory
public void removeItemFromCategory(String itemId, String categoryId, ResultStatus resultStatus) throws RemoteException
Removes an item from a category.- Specified by:
removeItemFromCategory
in interfaceIInventoryService
- Throws:
RemoteException
-
moveItemInCategoryLayout
public void moveItemInCategoryLayout(String itemId, String categoryId, int direction, ResultStatus resultStatus) throws RemoteException
Moves an item's position within an existing category. If 'direction' is negative, the item is moved to the left.- Specified by:
moveItemInCategoryLayout
in interfaceIInventoryService
- Throws:
RemoteException
-
getModifierGroups
public List<ModifierGroup> getModifierGroups(ResultStatus resultStatus) throws RemoteException
Retrieve the list of all modifier groups.Prefer to use the
InventoryContract
over this method since this method will fail for very large result sets that exceed binder limitations.Note that the returned ModifierGroup instances will not contain all the individual modifiers, invoke
#getModifiers(String)
to retrieve the individual modifiers for each particular ModifierGroup.- Specified by:
getModifierGroups
in interfaceIInventoryService
- Throws:
RemoteException
-
createModifierGroup
public ModifierGroup createModifierGroup(ModifierGroup group, ResultStatus resultStatus) throws RemoteException
Adds a new modifier group.- Specified by:
createModifierGroup
in interfaceIInventoryService
- Throws:
RemoteException
-
updateModifierGroup
public void updateModifierGroup(ModifierGroup group, ResultStatus resultStatus) throws RemoteException
Updates an existing modifier group.- Specified by:
updateModifierGroup
in interfaceIInventoryService
- Throws:
RemoteException
-
deleteModifierGroup
public void deleteModifierGroup(String groupId, ResultStatus resultStatus) throws RemoteException
Deletes an existing modifier group.- Specified by:
deleteModifierGroup
in interfaceIInventoryService
- Throws:
RemoteException
-
assignModifierGroupToItem
public void assignModifierGroupToItem(String modifierGroupId, String itemId, ResultStatus resultStatus) throws RemoteException
Associates a modifier group with an item.- Specified by:
assignModifierGroupToItem
in interfaceIInventoryService
- Throws:
RemoteException
-
removeModifierGroupFromItem
public void removeModifierGroupFromItem(String modifierGroupId, String itemId, ResultStatus resultStatus) throws RemoteException
Removes a modifier group association from an item.- Specified by:
removeModifierGroupFromItem
in interfaceIInventoryService
- Throws:
RemoteException
-
getModifiers
public List<Modifier> getModifiers(String modifierGroupId, ResultStatus resultStatus) throws RemoteException
Retrieve the list of modifiers belonging to a modifier group.- Specified by:
getModifiers
in interfaceIInventoryService
- Throws:
RemoteException
-
createModifier
public Modifier createModifier(String modifierGroupId, Modifier modifier, ResultStatus resultStatus) throws RemoteException
Adds a new modifier.- Specified by:
createModifier
in interfaceIInventoryService
- Throws:
RemoteException
-
updateModifier
public void updateModifier(Modifier modifier, ResultStatus resultStatus) throws RemoteException
Updates an existing modifier.- Specified by:
updateModifier
in interfaceIInventoryService
- Throws:
RemoteException
-
deleteModifier
public void deleteModifier(String modifierId, ResultStatus resultStatus) throws RemoteException
Deletes an existing modifier.- Specified by:
deleteModifier
in interfaceIInventoryService
- Throws:
RemoteException
-
getTaxRatesForItem
public List<TaxRate> getTaxRatesForItem(String itemId, ResultStatus resultStatus) throws RemoteException
Retrieve the list of tax rates for an item.- Specified by:
getTaxRatesForItem
in interfaceIInventoryService
- Throws:
RemoteException
-
assignTaxRatesToItem
public void assignTaxRatesToItem(String itemId, List<String> taxRates, ResultStatus resultStatus) throws RemoteException
Assign a list of tax rates (identified by their unique ID) to an item.- Specified by:
assignTaxRatesToItem
in interfaceIInventoryService
- Throws:
RemoteException
-
removeTaxRatesFromItem
public void removeTaxRatesFromItem(String itemId, List<String> taxRates, ResultStatus resultStatus) throws RemoteException
Remove a list of tax rates (identified by their unique ID) from an item.- Specified by:
removeTaxRatesFromItem
in interfaceIInventoryService
- Throws:
RemoteException
-
getTaxRates
public List<TaxRate> getTaxRates(ResultStatus resultStatus) throws RemoteException
Gets all defined tax rates for the merchant.- Specified by:
getTaxRates
in interfaceIInventoryService
- Throws:
RemoteException
-
getTaxRate
public TaxRate getTaxRate(String taxRateId, ResultStatus resultStatus) throws RemoteException
Gets a single tax rate identified by its unique ID.- Specified by:
getTaxRate
in interfaceIInventoryService
- Throws:
RemoteException
-
createTaxRate
public TaxRate createTaxRate(TaxRate taxRate, ResultStatus resultStatus) throws RemoteException
Creates a new tax rate.- Specified by:
createTaxRate
in interfaceIInventoryService
- Throws:
RemoteException
-
updateTaxRate
public void updateTaxRate(TaxRate taxRate, ResultStatus resultStatus) throws RemoteException
Updates an existing tax rate.- Specified by:
updateTaxRate
in interfaceIInventoryService
- Throws:
RemoteException
-
deleteTaxRate
public void deleteTaxRate(String taxRateId, ResultStatus resultStatus) throws RemoteException
Deletes a tax rate.- Specified by:
deleteTaxRate
in interfaceIInventoryService
- Throws:
RemoteException
-
getDiscounts
public List<Discount> getDiscounts(ResultStatus resultStatus) throws RemoteException
Retrieve the list of discounts.- Specified by:
getDiscounts
in interfaceIInventoryService
- Throws:
RemoteException
-
getDiscount
public Discount getDiscount(String discountId, ResultStatus resultStatus) throws RemoteException
Gets a single discount identified by its unique ID.- Specified by:
getDiscount
in interfaceIInventoryService
- Throws:
RemoteException
-
createDiscount
public Discount createDiscount(Discount discount, ResultStatus resultStatus) throws RemoteException
Adds a new discount.- Specified by:
createDiscount
in interfaceIInventoryService
- Throws:
RemoteException
-
updateDiscount
public void updateDiscount(Discount discount, ResultStatus resultStatus) throws RemoteException
Updates an existing discount.- Specified by:
updateDiscount
in interfaceIInventoryService
- Throws:
RemoteException
-
deleteDiscount
public void deleteDiscount(String discountId, ResultStatus resultStatus) throws RemoteException
Deletes a discount.- Specified by:
deleteDiscount
in interfaceIInventoryService
- Throws:
RemoteException
-
getModifierGroupsForItem
public List<ModifierGroup> getModifierGroupsForItem(String itemId, ResultStatus resultStatus) throws RemoteException
Retrieve the list of modifier groups for a particular item.- Specified by:
getModifierGroupsForItem
in interfaceIInventoryService
- Throws:
RemoteException
-
getTags
public List<Tag> getTags(ResultStatus resultStatus) throws RemoteException
Gets all defined tags for the merchant. This method will return a maximum of 500 values before returning a fault.- Specified by:
getTags
in interfaceIInventoryService
- Throws:
RemoteException
-
getTag
public Tag getTag(String tagId, ResultStatus resultStatus) throws RemoteException
Gets a single tag identified by its unique ID.- Specified by:
getTag
in interfaceIInventoryService
- Throws:
RemoteException
-
createTag
public Tag createTag(Tag tag, ResultStatus resultStatus) throws RemoteException
Creates a new tag.- Specified by:
createTag
in interfaceIInventoryService
- Throws:
RemoteException
-
updateTag
public void updateTag(Tag tag, ResultStatus resultStatus) throws RemoteException
Updates an existing tag.- Specified by:
updateTag
in interfaceIInventoryService
- Throws:
RemoteException
-
deleteTag
public void deleteTag(String tagId, ResultStatus resultStatus) throws RemoteException
Deletes a tag.- Specified by:
deleteTag
in interfaceIInventoryService
- Throws:
RemoteException
-
getTagsForItem
public List<Tag> getTagsForItem(String itemId, ResultStatus resultStatus) throws RemoteException
Retrieve the list of tags for an item.- Specified by:
getTagsForItem
in interfaceIInventoryService
- Throws:
RemoteException
-
assignTagsToItem
public void assignTagsToItem(String itemId, List<String> tags, ResultStatus resultStatus) throws RemoteException
Assign a list of tags (identified by their unique ID) to an item.- Specified by:
assignTagsToItem
in interfaceIInventoryService
- Throws:
RemoteException
-
removeTagsFromItem
public void removeTagsFromItem(String itemId, List<String> tags, ResultStatus resultStatus) throws RemoteException
Remove a list of tags (identified by their unique ID) from an item.- Specified by:
removeTagsFromItem
in interfaceIInventoryService
- Throws:
RemoteException
-
getTagsForPrinter
public List<Tag> getTagsForPrinter(String printerMac, ResultStatus resultStatus) throws RemoteException
Retrieve the list of tags for a printer.- Specified by:
getTagsForPrinter
in interfaceIInventoryService
- Throws:
RemoteException
-
assignTagsToPrinter
public void assignTagsToPrinter(String printerUid, List<String> tags, ResultStatus resultStatus) throws RemoteException
Assign a list of tags (identified by their unique ID) to a printer.- Specified by:
assignTagsToPrinter
in interfaceIInventoryService
- Throws:
RemoteException
-
removeTagsFromPrinter
public void removeTagsFromPrinter(String printerUid, List<String> tags, ResultStatus resultStatus) throws RemoteException
Remove a list of tags (identified by their unique ID) from a printer.- Specified by:
removeTagsFromPrinter
in interfaceIInventoryService
- Throws:
RemoteException
-
assignItemsToTag
public void assignItemsToTag(String tagId, List<String> items, ResultStatus resultStatus) throws RemoteException
Assign a list of items (identified by their unique ID) to a tag.- Specified by:
assignItemsToTag
in interfaceIInventoryService
- Throws:
RemoteException
-
removeItemsFromTag
public void removeItemsFromTag(String tagId, List<String> items, ResultStatus resultStatus) throws RemoteException
Remove a list of items (identified by their unique ID) from a tag.- Specified by:
removeItemsFromTag
in interfaceIInventoryService
- Throws:
RemoteException
-
updateModifierSortOrder
public void updateModifierSortOrder(String modifierGroupId, List<String> modifierIds, ResultStatus resultStatus) throws RemoteException
Update modifier sort order for a modifier group.- Specified by:
updateModifierSortOrder
in interfaceIInventoryService
- Throws:
RemoteException
-
updateItemStock
public void updateItemStock(String itemId, long stockCount, ResultStatus resultStatus) throws RemoteException
Update stock count for an item. This is the old way of updating stock that takes a long, the new way is updateItemStockQuantity and takes a double.- Specified by:
updateItemStock
in interfaceIInventoryService
- Throws:
RemoteException
-
removeItemStock
public void removeItemStock(String itemId, ResultStatus resultStatus) throws RemoteException
Remove stock count for an item.- Specified by:
removeItemStock
in interfaceIInventoryService
- Throws:
RemoteException
-
getAttributes
public List<Attribute> getAttributes(ResultStatus resultStatus) throws RemoteException
Gets all defined attributes for the merchant.Prefer to use the
InventoryContract
over this method.This method will return a maximum of 500 values before returning a fault.
Note that the returned Attribute instances will not contain all the individual options. To obtain the options for a particular attribute use the contract, for example:
try (Cursor c = getContentResolver() .query(InventoryContract.Option.contentForItemsUriWithAccount(acct), null, InventoryContract.Option.ATTRIBUTE_UUID + " = ?", new String[] { attribute.getId() }, null)) { // each row in the cursor is an option for the given attribute }
- Specified by:
getAttributes
in interfaceIInventoryService
- Throws:
RemoteException
-
getAttribute
public Attribute getAttribute(String attributeId, ResultStatus resultStatus) throws RemoteException
Gets a single attribute identified by its unique ID.- Specified by:
getAttribute
in interfaceIInventoryService
- Throws:
RemoteException
-
createAttribute
public Attribute createAttribute(Attribute attribute, ResultStatus resultStatus) throws RemoteException
Creates a new attribute.- Specified by:
createAttribute
in interfaceIInventoryService
- Throws:
RemoteException
-
updateAttribute
public void updateAttribute(Attribute attribute, ResultStatus resultStatus) throws RemoteException
Updates an existing attribute.- Specified by:
updateAttribute
in interfaceIInventoryService
- Throws:
RemoteException
-
deleteAttribute
public void deleteAttribute(String attributeId, ResultStatus resultStatus) throws RemoteException
Deletes an attribute, deletes all the options in that attribute and removes all the associations between those options and items.- Specified by:
deleteAttribute
in interfaceIInventoryService
- Throws:
RemoteException
-
getOptions
public List<Option> getOptions(ResultStatus resultStatus) throws RemoteException
Gets all defined options for the merchant.Prefer to use the
InventoryContract
over this method.This method will return a maximum of 500 values before returning a fault.
- Specified by:
getOptions
in interfaceIInventoryService
- Throws:
RemoteException
-
getOption
public Option getOption(String optionId, ResultStatus resultStatus) throws RemoteException
Gets a single option identified by its unique ID.- Specified by:
getOption
in interfaceIInventoryService
- Throws:
RemoteException
-
createOption
public Option createOption(Option option, ResultStatus resultStatus) throws RemoteException
Creates a new option.- Specified by:
createOption
in interfaceIInventoryService
- Throws:
RemoteException
-
updateOption
public void updateOption(Option option, ResultStatus resultStatus) throws RemoteException
Updates an existing option.- Specified by:
updateOption
in interfaceIInventoryService
- Throws:
RemoteException
-
deleteOption
public void deleteOption(String optionId, ResultStatus resultStatus) throws RemoteException
Deletes an option and removes all the associations between that option and items.- Specified by:
deleteOption
in interfaceIInventoryService
- Throws:
RemoteException
-
getOptionsForItem
public List<Option> getOptionsForItem(String itemId, ResultStatus resultStatus) throws RemoteException
Retrieve the list of options for an item.- Specified by:
getOptionsForItem
in interfaceIInventoryService
- Throws:
RemoteException
-
assignOptionsToItem
public void assignOptionsToItem(String itemId, List<String> optionIds, ResultStatus resultStatus) throws RemoteException
Associate the given options with an item.- Specified by:
assignOptionsToItem
in interfaceIInventoryService
- Throws:
RemoteException
-
removeOptionsFromItem
public void removeOptionsFromItem(String itemId, List<String> optionIds, ResultStatus resultStatus) throws RemoteException
Remove the association between the given options and an item.- Specified by:
removeOptionsFromItem
in interfaceIInventoryService
- Throws:
RemoteException
-
getItemGroup
public ItemGroup getItemGroup(String itemGroupId, ResultStatus resultStatus) throws RemoteException
Gets a single item group identified by its unique ID.- Specified by:
getItemGroup
in interfaceIInventoryService
- Throws:
RemoteException
-
createItemGroup
public ItemGroup createItemGroup(ItemGroup itemGroup, ResultStatus resultStatus) throws RemoteException
Creates a new item group.- Specified by:
createItemGroup
in interfaceIInventoryService
- Throws:
RemoteException
-
updateItemGroup
public void updateItemGroup(ItemGroup itemGroup, ResultStatus resultStatus) throws RemoteException
Updates an existing item group.- Specified by:
updateItemGroup
in interfaceIInventoryService
- Throws:
RemoteException
-
deleteItemGroup
public void deleteItemGroup(String itemGroupId, ResultStatus resultStatus) throws RemoteException
Deletes an item group, but does not delete the items in a group, they become items without an item group.- Specified by:
deleteItemGroup
in interfaceIInventoryService
- Throws:
RemoteException
-
updateItemStockQuantity
public void updateItemStockQuantity(String itemId, double quantity, ResultStatus resultStatus) throws RemoteException
Update stock for an item.- Specified by:
updateItemStockQuantity
in interfaceIInventoryService
- Throws:
RemoteException
-
updateModifierGroupSortOrders
public void updateModifierGroupSortOrders(List<ModifierGroup> groups, ResultStatus resultStatus) throws RemoteException
Updates the sort orders for a list of modifier groups.- Specified by:
updateModifierGroupSortOrders
in interfaceIInventoryService
- Throws:
RemoteException
-
getTaxRatesExcludedForItem
public List<TaxRate> getTaxRatesExcludedForItem(String orderTypeId, String itemId, ResultStatus resultStatus) throws RemoteException
Retrieve the list of tax rates excluded for an item, given the order-type-id- Specified by:
getTaxRatesExcludedForItem
in interfaceIInventoryService
- Throws:
RemoteException
-
bulkAssignColorToItems
public void bulkAssignColorToItems(List<String> itemIds, String colorHexCode, ResultStatus resultStatus) throws RemoteException
Assign given color to list of items.- Specified by:
bulkAssignColorToItems
in interfaceIInventoryService
- Throws:
RemoteException
-
updateCategorySortOrders
public void updateCategorySortOrders(List<Category> categories, ResultStatus resultStatus) throws RemoteException
Update category sort orders.- Specified by:
updateCategorySortOrders
in interfaceIInventoryService
- Throws:
RemoteException
-
updateCategoryItems
public void updateCategoryItems(String categoryId, List<String> itemIds, ResultStatus resultStatus) throws RemoteException
Updates all items of a category.- Specified by:
updateCategoryItems
in interfaceIInventoryService
- Throws:
RemoteException
-
deleteItems
public void deleteItems(List<String> itemIds, ResultStatus resultStatus) throws RemoteException
Bulk delete items.- Specified by:
deleteItems
in interfaceIInventoryService
- Throws:
RemoteException
-
deleteCategories
public void deleteCategories(List<String> categoryIds, ResultStatus resultStatus) throws RemoteException
Bulk delete categories.- Specified by:
deleteCategories
in interfaceIInventoryService
- Throws:
RemoteException
-
deleteModifierGroups
public void deleteModifierGroups(List<String> groupIds, ResultStatus resultStatus) throws RemoteException
Bulk delete modifier groups.- Specified by:
deleteModifierGroups
in interfaceIInventoryService
- Throws:
RemoteException
-
deleteTags
public void deleteTags(List<String> tagIds, ResultStatus resultStatus) throws RemoteException
Bulk delete tags.- Specified by:
deleteTags
in interfaceIInventoryService
- Throws:
RemoteException
-
getItemsForModifierGroup
public List<Item> getItemsForModifierGroup(String modifierGroupId, ResultStatus resultStatus) throws RemoteException
Retrieve list of items that use the specified Modifier Group- Specified by:
getItemsForModifierGroup
in interfaceIInventoryService
- Throws:
RemoteException
-
assignCategoriesToItem
public void assignCategoriesToItem(String itemId, List<String> categoryIds, ResultStatus resultStatus) throws RemoteException
Associates categories with an item.- Specified by:
assignCategoriesToItem
in interfaceIInventoryService
- Throws:
RemoteException
-
removeCategoriesFromItem
public void removeCategoriesFromItem(String itemId, List<String> categoryIds, ResultStatus resultStatus) throws RemoteException
Removes categories association from an item.- Specified by:
removeCategoriesFromItem
in interfaceIInventoryService
- Throws:
RemoteException
-
getOrderFees
public List<OrderFee> getOrderFees(ResultStatus resultStatus) throws RemoteException
Retrieve the list of order fees.- Specified by:
getOrderFees
in interfaceIInventoryService
- Throws:
RemoteException
-
getOrderFee
public OrderFee getOrderFee(String orderFeeId, ResultStatus resultStatus) throws RemoteException
Gets a single order fee identified by its unique ID.- Specified by:
getOrderFee
in interfaceIInventoryService
- Throws:
RemoteException
-
createOrderFee
public OrderFee createOrderFee(OrderFee orderFee, ResultStatus resultStatus) throws RemoteException
Adds a new order fee.- Specified by:
createOrderFee
in interfaceIInventoryService
- Throws:
RemoteException
-
updateOrderFee
public void updateOrderFee(OrderFee orderFee, ResultStatus resultStatus) throws RemoteException
Updates an existing order fee.- Specified by:
updateOrderFee
in interfaceIInventoryService
- Throws:
RemoteException
-
deleteOrderFee
public void deleteOrderFee(String orderFeeId, ResultStatus resultStatus) throws RemoteException
Deletes an order fee.- Specified by:
deleteOrderFee
in interfaceIInventoryService
- Throws:
RemoteException
-
asBinder
public IBinder asBinder()
- Specified by:
asBinder
in interfaceIInterface
-
-