Last active
October 22, 2015 19:00
-
-
Save allenmichael/a07818f37e3d62dba6e0 to your computer and use it in GitHub Desktop.
Get a Instock Notifications Collection and use LINQ to locate all notifications with a ProductCode matching what you specify and log the email address of the user owning that notification.
This file contains hidden or 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
var instockResource = new Mozu.Api.Resources.Commerce.InStockNotificationSubscriptionResource(_apiContext); | |
var notifications = instockResource.GetInStockNotificationSubscriptionsAsync().Result; | |
var notificationsForProduct = notifications.Items.Where(x => x.ProductCode == "MS-BTL-002-1"); | |
foreach(var notification in notificationsForProduct) | |
{ | |
Console.WriteLine(notification.Email); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment