Last active
April 15, 2019 07:13
-
-
Save WirecardMobileServices/090f9df0ba8166010ea00b3ffa57b410 to your computer and use it in GitHub Desktop.
Product Changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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