Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Main entry point
public static async Task Run(string message, TraceWriter log)
{
log.Info($"Processing incoming barcode: {message}");
var incoming = IncomingBarcode.FromMessage(message);
var httpClient = await CreateKolonialHttpClientAsync();
var kolonialProduct = await GetKolonialProductAsync(httpClient, incoming.Barcode);
if(kolonialProduct == null)
log.Warning($"Product with barcode {incoming.Barcode} is not available at Kolonial.");
else
await AddProductToCartAsync (httpClient, kolonialProduct, log);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.