/// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='basketId'> /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <BasketResponse> GetBasketAsync(this IShoppingBasketAPI operations, string basketId, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.GetBasketWithHttpMessagesAsync(basketId, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='basketId'> /// </param> /// <param name='request'> /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task UpdateItemQuantityAsync(this IShoppingBasketAPI operations, string basketId, AdjustQuantityRequest request = default(AdjustQuantityRequest), CancellationToken cancellationToken = default(CancellationToken)) { (await operations.UpdateItemQuantityWithHttpMessagesAsync(basketId, request, null, cancellationToken).ConfigureAwait(false)).Dispose(); }
/// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='basketId'> /// </param> /// <param name='request'> /// </param> public static void UpdateItemQuantity(this IShoppingBasketAPI operations, string basketId, AdjustQuantityRequest request = default(AdjustQuantityRequest)) { operations.UpdateItemQuantityAsync(basketId, request).GetAwaiter().GetResult(); }
/// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='request'> /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task CreateBasketAsync(this IShoppingBasketAPI operations, CreateBasketRequest request = default(CreateBasketRequest), CancellationToken cancellationToken = default(CancellationToken)) { (await operations.CreateBasketWithHttpMessagesAsync(request, null, cancellationToken).ConfigureAwait(false)).Dispose(); }
/// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='basketId'> /// </param> public static BasketResponse GetBasket(this IShoppingBasketAPI operations, string basketId) { return(operations.GetBasketAsync(basketId).GetAwaiter().GetResult()); }
/// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='request'> /// </param> public static void CreateBasket(this IShoppingBasketAPI operations, CreateBasketRequest request = default(CreateBasketRequest)) { operations.CreateBasketAsync(request).GetAwaiter().GetResult(); }
/// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='basketId'> /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task EmptyBasketAsync(this IShoppingBasketAPI operations, string basketId, CancellationToken cancellationToken = default(CancellationToken)) { (await operations.EmptyBasketWithHttpMessagesAsync(basketId, null, cancellationToken).ConfigureAwait(false)).Dispose(); }
/// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='basketId'> /// </param> public static void EmptyBasket(this IShoppingBasketAPI operations, string basketId) { operations.EmptyBasketAsync(basketId).GetAwaiter().GetResult(); }
/// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='basketId'> /// </param> /// <param name='request'> /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task RemoveItemAsync(this IShoppingBasketAPI operations, string basketId, RemoveItemRequest request = default(RemoveItemRequest), CancellationToken cancellationToken = default(CancellationToken)) { (await operations.RemoveItemWithHttpMessagesAsync(basketId, request, null, cancellationToken).ConfigureAwait(false)).Dispose(); }
/// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='basketId'> /// </param> /// <param name='request'> /// </param> public static void RemoveItem(this IShoppingBasketAPI operations, string basketId, RemoveItemRequest request = default(RemoveItemRequest)) { operations.RemoveItemAsync(basketId, request).GetAwaiter().GetResult(); }