Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Product Changes
// End of product changes process
ProductCatalogueProductChangeCompletion completion = ^(NSArray <WDAcceptProductCatalogueProduct *>*_Nullable updatedProducts,
NSArray <NSString *>*_Nullable deletedProducts, NSError* _Nullable error) {
//updatedProducts contains the details of all products that were updated
//deletedProducts contains the product IDs of deleted products - these are no longer available for sale
//The simplest search will just yield all reasults for the product catalogue
WDAcceptProductsQuery *query = [[WDAcceptProductsQuery alloc] initWithCatalogueId:@"My Product Catalogue" // Your product catalogue Id
date:[NSDate date]]; // The date since when to get the changes = the date when the client last received the inventory data
//retrieve product changes
[sdk.inventoryManager productsChanges:query // Query products changes
completion:completion]; // Product changes process end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment