Skip to content

Instantly share code, notes, and snippets.

@WirecardMobileServices
Last active April 15, 2019 07:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save WirecardMobileServices/090f9df0ba8166010ea00b3ffa57b410 to your computer and use it in GitHub Desktop.
Save WirecardMobileServices/090f9df0ba8166010ea00b3ffa57b410 to your computer and use it in GitHub Desktop.
Product Changes
// End of product changes process
ProductCatalogueProductChangeCompletion completion = ^(NSArray <WDProductCatalogueProduct *> *_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
WDProductsQuery *query = [[WDProductsQuery 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