public async Task <List <CartItem> > GetCartItemsAsync(string cartId) { var cartUrl = SHOPPINGCART_URL.Replace("{cartId}", cartId); var request = new HttpRequestMessage(HttpMethod.Get, cartUrl); var cartResult = await Invoke <List <CartItemJson> >(request); var result = CartItem.From(cartResult); return(result); }
public async Task <List <CartItem> > GetCartItemsAsync(string cartId) { var cartUrl = SHOPPINGCART_URL.Replace("{cartId}", cartId); var request = new HttpRequestMessage(HttpMethod.Get, cartUrl); var cartResult = new List <CartItemJson>(); try { cartResult = await Invoke <List <CartItemJson> >(request); } catch (Exception e) { _logger.LogCritical(e, "Failed to get cart!"); } var result = CartItem.From(cartResult); return(result); }