Interface IInventoryService
-
- All Superinterfaces:
IInterface
- All Known Implementing Classes:
IInventoryService.Default
,IInventoryService.Stub
public interface IInventoryService extends IInterface
An interface for interacting with the Clover inventory service. The inventory service is a bound AIDL service. Bind to this service as follows:Intent serviceIntent = new Intent(InventoryIntent.ACTION_INVENTORY_SERVICE_V3); serviceIntent.putExtra(Intents.EXTRA_ACCOUNT, CloverAccount.getAccount(context)); serviceIntent.putExtra(Intents.EXTRA_VERSION, 3); context.bindService(serviceIntent);
You may also interact with this service through the
InventoryConnector
class, which handles binding and asynchronous invocation of service methods.Prefer the
InventoryContract
over the getter methods in this class, the contract offers better performance and is not subject to large inventory limitations that can cause the getter methods here to fail.This service is backed by a local database which is synced to cloud. Thus changes made by calling methods here will be reflected on all of a merchant's devices and on the web.
Typically a merchant customizes their inventory either by importing data from a spreadsheet or manually entering their inventory data on the web or through the Clover Inventory app.
Invoking methods through this service generally requires INVENTORY_R and/or INVENTORY_W permission. See Clover app permissions
Items
The basic unit of a merchant's inventory is the
Item
. Items could be goods such as shoes and socks, or services such as a haircut. Merchants that simply take payments on their devices may have no inventory items at all.Discounts
A
Discount
may be associated with an entire Order subtotal or an individual Item. Discounts are named and given either a percentage value or fixed amount. Discounts appear as choices in Clover Register and are printed on bills.Tax Rates
A
TaxRate
is used to add taxes to an Order when computing the total. Default tax rates are applied to all items that do not override the defaults. An Item may override the default tax rates and be associated with specific (or no) tax rates.Categories
Categories alter the user interface of the Clover Register app. Items appear in the Clover Register app within categories they are members of. Items may be associated with no, one or many categories. Items are displayed in Clover Register in the order in which they are added to a category. Categories are displayed in Register using the sort order value for each category. Categories are designed only to be use for anything other modifying the user experience of Register, for a more generic organization mechanism see the section on Tags.
Modifier Groups and Modifiers
Modifiers are used by Clover Register to make adjustments to associated items. A modifier may or may not increase the price of an item. For example a Burger item may be associated with the Condiment modifier group which contains mayo (no charge) and avocado (additional $2.00). A modifier group may specify that an exact number of modifiers be selected when an item is selected in Clover Register. Modifiers are printed on bills and order receipts.
Item Groups (aka Item with variants), Attributes and Options
Item Groups help merchants create and manage large groups of related items. This is described to merchants as an 'Item with variants'. For example a merchants may sell a t-shirt that is available in numerous various sizes and colors. Each of the t-shirt variations is an item and belongs to the t-shirt item group. Once an item group is created it appears in Register as a single button and tapping it brings up a choice of which variation is to be sold. Before adding items to an item group you first need to create the item group, then create attributes ('size', 'color') and then options for each attribute ('small', 'blue'), then associate options with an item and then associate items with an item group. The name of an item which is a member of an item group is automatically generated by the Clover server as a combination of the item group name and the name of all the options associated with that item. It cannot be changed. If the item group name is changed, or if an option name is changed, then the item names will be automatically regenerated. An item can only be a member of a single item group and once it is part of an item group it can never be removed or moved to another item group, it can only be deleted.
Tags (aka Labels)
Similarly to how they are described by wikipedia, tags are an informal way of establishing a relationship. Tags currently may be associated with items and printers. When an tag is associated with both an item and a printer that establishes a special relationship that results in those items being printed out on the associated printer when printing an order. Other than that special case there is no effect when an item is associated with a tag. Developers may use tags to establish a relationship meaningful for their needs.
OrderFees
An
OrderFee
is any type of additional fee, which could be associated with an entire Order subtotal. OrderFees are named and given either a percentage value or fixed amount. Order fees could be set default to be applied automatically to an Order. OrderFees appear as choices in Clover Register/Clover Dining and are printed on bills.- See Also:
InventoryConnector
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
IInventoryService.Default
Default implementation for IInventoryService.static class
IInventoryService.Stub
Local-side IPC implementation stub class.
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description void
addItemToCategory(String itemId, String categoryId, ResultStatus resultStatus)
Adds an item to a category.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.-
Methods inherited from interface android.os.IInterface
asBinder
-
-
-
-
Method Detail
-
getItems
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.- Throws:
RemoteException
-
getItemsWithCategories
List<Item> getItemsWithCategories(ResultStatus resultStatus) throws RemoteException
Deprecated.See note on {@link #getItems(ResultStatus).- Throws:
RemoteException
-
getItemIds
List<String> getItemIds(ResultStatus resultStatus) throws RemoteException
Deprecated.See note on {@link #getItems(ResultStatus).- Throws:
RemoteException
-
getItem
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.- Throws:
RemoteException
-
getItemWithCategories
Item getItemWithCategories(String itemId, ResultStatus resultStatus) throws RemoteException
Same asgetItem(String, ResultStatus)
but also includes the list of categories to which the item belongs.- Throws:
RemoteException
-
createItem
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.- Throws:
RemoteException
-
updateItem
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.- Throws:
RemoteException
-
deleteItem
void deleteItem(String itemId, ResultStatus resultStatus) throws RemoteException
Deletes an existing item.- Throws:
RemoteException
-
getCategories
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.- Throws:
RemoteException
-
createCategory
Category createCategory(Category category, ResultStatus resultStatus) throws RemoteException
Adds a new category.- Throws:
RemoteException
-
updateCategory
void updateCategory(Category category, ResultStatus resultStatus) throws RemoteException
Updates an existing category.- Throws:
RemoteException
-
deleteCategory
void deleteCategory(String categoryId, ResultStatus resultStatus) throws RemoteException
Deletes an existing category.- Throws:
RemoteException
-
addItemToCategory
void addItemToCategory(String itemId, String categoryId, ResultStatus resultStatus) throws RemoteException
Adds an item to a category.- Throws:
RemoteException
-
removeItemFromCategory
void removeItemFromCategory(String itemId, String categoryId, ResultStatus resultStatus) throws RemoteException
Removes an item from a category.- Throws:
RemoteException
-
moveItemInCategoryLayout
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.- Throws:
RemoteException
-
getModifierGroups
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.- Throws:
RemoteException
-
createModifierGroup
ModifierGroup createModifierGroup(ModifierGroup group, ResultStatus resultStatus) throws RemoteException
Adds a new modifier group.- Throws:
RemoteException
-
updateModifierGroup
void updateModifierGroup(ModifierGroup group, ResultStatus resultStatus) throws RemoteException
Updates an existing modifier group.- Throws:
RemoteException
-
deleteModifierGroup
void deleteModifierGroup(String groupId, ResultStatus resultStatus) throws RemoteException
Deletes an existing modifier group.- Throws:
RemoteException
-
assignModifierGroupToItem
void assignModifierGroupToItem(String modifierGroupId, String itemId, ResultStatus resultStatus) throws RemoteException
Associates a modifier group with an item.- Throws:
RemoteException
-
removeModifierGroupFromItem
void removeModifierGroupFromItem(String modifierGroupId, String itemId, ResultStatus resultStatus) throws RemoteException
Removes a modifier group association from an item.- Throws:
RemoteException
-
getModifiers
List<Modifier> getModifiers(String modifierGroupId, ResultStatus resultStatus) throws RemoteException
Retrieve the list of modifiers belonging to a modifier group.- Throws:
RemoteException
-
createModifier
Modifier createModifier(String modifierGroupId, Modifier modifier, ResultStatus resultStatus) throws RemoteException
Adds a new modifier.- Throws:
RemoteException
-
updateModifier
void updateModifier(Modifier modifier, ResultStatus resultStatus) throws RemoteException
Updates an existing modifier.- Throws:
RemoteException
-
deleteModifier
void deleteModifier(String modifierId, ResultStatus resultStatus) throws RemoteException
Deletes an existing modifier.- Throws:
RemoteException
-
getTaxRatesForItem
List<TaxRate> getTaxRatesForItem(String itemId, ResultStatus resultStatus) throws RemoteException
Retrieve the list of tax rates for an item.- Throws:
RemoteException
-
assignTaxRatesToItem
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.- Throws:
RemoteException
-
removeTaxRatesFromItem
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.- Throws:
RemoteException
-
getTaxRates
List<TaxRate> getTaxRates(ResultStatus resultStatus) throws RemoteException
Gets all defined tax rates for the merchant.- Throws:
RemoteException
-
getTaxRate
TaxRate getTaxRate(String taxRateId, ResultStatus resultStatus) throws RemoteException
Gets a single tax rate identified by its unique ID.- Throws:
RemoteException
-
createTaxRate
TaxRate createTaxRate(TaxRate taxRate, ResultStatus resultStatus) throws RemoteException
Creates a new tax rate.- Throws:
RemoteException
-
updateTaxRate
void updateTaxRate(TaxRate taxRate, ResultStatus resultStatus) throws RemoteException
Updates an existing tax rate.- Throws:
RemoteException
-
deleteTaxRate
void deleteTaxRate(String taxRateId, ResultStatus resultStatus) throws RemoteException
Deletes a tax rate.- Throws:
RemoteException
-
getDiscounts
List<Discount> getDiscounts(ResultStatus resultStatus) throws RemoteException
Retrieve the list of discounts.- Throws:
RemoteException
-
getDiscount
Discount getDiscount(String discountId, ResultStatus resultStatus) throws RemoteException
Gets a single discount identified by its unique ID.- Throws:
RemoteException
-
createDiscount
Discount createDiscount(Discount discount, ResultStatus resultStatus) throws RemoteException
Adds a new discount.- Throws:
RemoteException
-
updateDiscount
void updateDiscount(Discount discount, ResultStatus resultStatus) throws RemoteException
Updates an existing discount.- Throws:
RemoteException
-
deleteDiscount
void deleteDiscount(String discountId, ResultStatus resultStatus) throws RemoteException
Deletes a discount.- Throws:
RemoteException
-
getModifierGroupsForItem
List<ModifierGroup> getModifierGroupsForItem(String itemId, ResultStatus resultStatus) throws RemoteException
Retrieve the list of modifier groups for a particular item.- Throws:
RemoteException
-
getTags
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.- Throws:
RemoteException
-
getTag
Tag getTag(String tagId, ResultStatus resultStatus) throws RemoteException
Gets a single tag identified by its unique ID.- Throws:
RemoteException
-
createTag
Tag createTag(Tag tag, ResultStatus resultStatus) throws RemoteException
Creates a new tag.- Throws:
RemoteException
-
updateTag
void updateTag(Tag tag, ResultStatus resultStatus) throws RemoteException
Updates an existing tag.- Throws:
RemoteException
-
deleteTag
void deleteTag(String tagId, ResultStatus resultStatus) throws RemoteException
Deletes a tag.- Throws:
RemoteException
-
getTagsForItem
List<Tag> getTagsForItem(String itemId, ResultStatus resultStatus) throws RemoteException
Retrieve the list of tags for an item.- Throws:
RemoteException
-
assignTagsToItem
void assignTagsToItem(String itemId, List<String> tags, ResultStatus resultStatus) throws RemoteException
Assign a list of tags (identified by their unique ID) to an item.- Throws:
RemoteException
-
removeTagsFromItem
void removeTagsFromItem(String itemId, List<String> tags, ResultStatus resultStatus) throws RemoteException
Remove a list of tags (identified by their unique ID) from an item.- Throws:
RemoteException
-
getTagsForPrinter
List<Tag> getTagsForPrinter(String printerMac, ResultStatus resultStatus) throws RemoteException
Retrieve the list of tags for a printer.- Throws:
RemoteException
-
assignTagsToPrinter
void assignTagsToPrinter(String printerUid, List<String> tags, ResultStatus resultStatus) throws RemoteException
Assign a list of tags (identified by their unique ID) to a printer.- Throws:
RemoteException
-
removeTagsFromPrinter
void removeTagsFromPrinter(String printerUid, List<String> tags, ResultStatus resultStatus) throws RemoteException
Remove a list of tags (identified by their unique ID) from a printer.- Throws:
RemoteException
-
assignItemsToTag
void assignItemsToTag(String tagId, List<String> items, ResultStatus resultStatus) throws RemoteException
Assign a list of items (identified by their unique ID) to a tag.- Throws:
RemoteException
-
removeItemsFromTag
void removeItemsFromTag(String tagId, List<String> items, ResultStatus resultStatus) throws RemoteException
Remove a list of items (identified by their unique ID) from a tag.- Throws:
RemoteException
-
updateModifierSortOrder
void updateModifierSortOrder(String modifierGroupId, List<String> modifierIds, ResultStatus resultStatus) throws RemoteException
Update modifier sort order for a modifier group.- Throws:
RemoteException
-
updateItemStock
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.- Throws:
RemoteException
-
removeItemStock
void removeItemStock(String itemId, ResultStatus resultStatus) throws RemoteException
Remove stock count for an item.- Throws:
RemoteException
-
getAttributes
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 }
- Throws:
RemoteException
-
getAttribute
Attribute getAttribute(String attributeId, ResultStatus resultStatus) throws RemoteException
Gets a single attribute identified by its unique ID.- Throws:
RemoteException
-
createAttribute
Attribute createAttribute(Attribute attribute, ResultStatus resultStatus) throws RemoteException
Creates a new attribute.- Throws:
RemoteException
-
updateAttribute
void updateAttribute(Attribute attribute, ResultStatus resultStatus) throws RemoteException
Updates an existing attribute.- Throws:
RemoteException
-
deleteAttribute
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.- Throws:
RemoteException
-
getOptions
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.
- Throws:
RemoteException
-
getOption
Option getOption(String optionId, ResultStatus resultStatus) throws RemoteException
Gets a single option identified by its unique ID.- Throws:
RemoteException
-
createOption
Option createOption(Option option, ResultStatus resultStatus) throws RemoteException
Creates a new option.- Throws:
RemoteException
-
updateOption
void updateOption(Option option, ResultStatus resultStatus) throws RemoteException
Updates an existing option.- Throws:
RemoteException
-
deleteOption
void deleteOption(String optionId, ResultStatus resultStatus) throws RemoteException
Deletes an option and removes all the associations between that option and items.- Throws:
RemoteException
-
getOptionsForItem
List<Option> getOptionsForItem(String itemId, ResultStatus resultStatus) throws RemoteException
Retrieve the list of options for an item.- Throws:
RemoteException
-
assignOptionsToItem
void assignOptionsToItem(String itemId, List<String> optionIds, ResultStatus resultStatus) throws RemoteException
Associate the given options with an item.- Throws:
RemoteException
-
removeOptionsFromItem
void removeOptionsFromItem(String itemId, List<String> optionIds, ResultStatus resultStatus) throws RemoteException
Remove the association between the given options and an item.- Throws:
RemoteException
-
getItemGroup
ItemGroup getItemGroup(String itemGroupId, ResultStatus resultStatus) throws RemoteException
Gets a single item group identified by its unique ID.- Throws:
RemoteException
-
createItemGroup
ItemGroup createItemGroup(ItemGroup itemGroup, ResultStatus resultStatus) throws RemoteException
Creates a new item group.- Throws:
RemoteException
-
updateItemGroup
void updateItemGroup(ItemGroup itemGroup, ResultStatus resultStatus) throws RemoteException
Updates an existing item group.- Throws:
RemoteException
-
deleteItemGroup
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.- Throws:
RemoteException
-
updateItemStockQuantity
void updateItemStockQuantity(String itemId, double quantity, ResultStatus resultStatus) throws RemoteException
Update stock for an item.- Throws:
RemoteException
-
updateModifierGroupSortOrders
void updateModifierGroupSortOrders(List<ModifierGroup> groups, ResultStatus resultStatus) throws RemoteException
Updates the sort orders for a list of modifier groups.- Throws:
RemoteException
-
getTaxRatesExcludedForItem
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- Throws:
RemoteException
-
bulkAssignColorToItems
void bulkAssignColorToItems(List<String> itemIds, String colorHexCode, ResultStatus resultStatus) throws RemoteException
Assign given color to list of items.- Throws:
RemoteException
-
updateCategorySortOrders
void updateCategorySortOrders(List<Category> categories, ResultStatus resultStatus) throws RemoteException
Update category sort orders.- Throws:
RemoteException
-
updateCategoryItems
void updateCategoryItems(String categoryId, List<String> itemIds, ResultStatus resultStatus) throws RemoteException
Updates all items of a category.- Throws:
RemoteException
-
deleteItems
void deleteItems(List<String> itemIds, ResultStatus resultStatus) throws RemoteException
Bulk delete items.- Throws:
RemoteException
-
deleteCategories
void deleteCategories(List<String> categoryIds, ResultStatus resultStatus) throws RemoteException
Bulk delete categories.- Throws:
RemoteException
-
deleteModifierGroups
void deleteModifierGroups(List<String> groupIds, ResultStatus resultStatus) throws RemoteException
Bulk delete modifier groups.- Throws:
RemoteException
-
deleteTags
void deleteTags(List<String> tagIds, ResultStatus resultStatus) throws RemoteException
Bulk delete tags.- Throws:
RemoteException
-
getItemsForModifierGroup
List<Item> getItemsForModifierGroup(String modifierGroupId, ResultStatus resultStatus) throws RemoteException
Retrieve list of items that use the specified Modifier Group- Throws:
RemoteException
-
assignCategoriesToItem
void assignCategoriesToItem(String itemId, List<String> categoryIds, ResultStatus resultStatus) throws RemoteException
Associates categories with an item.- Throws:
RemoteException
-
removeCategoriesFromItem
void removeCategoriesFromItem(String itemId, List<String> categoryIds, ResultStatus resultStatus) throws RemoteException
Removes categories association from an item.- Throws:
RemoteException
-
getOrderFees
List<OrderFee> getOrderFees(ResultStatus resultStatus) throws RemoteException
Retrieve the list of order fees.- Throws:
RemoteException
-
getOrderFee
OrderFee getOrderFee(String orderFeeId, ResultStatus resultStatus) throws RemoteException
Gets a single order fee identified by its unique ID.- Throws:
RemoteException
-
createOrderFee
OrderFee createOrderFee(OrderFee orderFee, ResultStatus resultStatus) throws RemoteException
Adds a new order fee.- Throws:
RemoteException
-
updateOrderFee
void updateOrderFee(OrderFee orderFee, ResultStatus resultStatus) throws RemoteException
Updates an existing order fee.- Throws:
RemoteException
-
deleteOrderFee
void deleteOrderFee(String orderFeeId, ResultStatus resultStatus) throws RemoteException
Deletes an order fee.- Throws:
RemoteException
-
-