namespace CoreConnect.Commerce.Cart;
/// The cart service Interface.
public interface ICartService
/// Gets the specified cart.
/// <param name="request">The request.</param>
/// <param name="context">The request context.</param>
/// <param name="cancellationToken">A cancellation token which can be used to cancel the operation.</param>
/// <returns>Commerce.Cart.Cart</returns>
Task<CartResponse> GetCart(CartRequest request, IRequestContext context, CancellationToken cancellationToken = default);
/// <param name="request">The request.</param>
/// <param name="context">The context.</param>
/// <param name="cancellationToken">The cancellation token.</param>
/// <returns>The cart</returns>
Task<CartResponse> CreateCart(CreateCartRequest request, IRequestContext context, CancellationToken cancellationToken = default);
/// Adds line items to the cart.
/// <param name="request">The request.</param>
/// <param name="context">The context.</param>
/// <param name="cancellationToken">The cancellation token.</param>
/// <returns>Commerce.Cart.Cart</returns>
Task<CartResponse> AddCartLineItems(AddCartLineItemsRequest request, IRequestContext context, CancellationToken cancellationToken = default);
/// Removes the cart line item.
/// <param name="request">The request.</param>
/// <param name="context">The context.</param>
/// <param name="cancellationToken">The cancellation token.</param>
/// <returns>Commerce.Cart.Cart</returns>
Task<CartResponse> RemoveCartLineItem(RemoveCartLineItemRequest request, IRequestContext context, CancellationToken cancellationToken);
/// Updates the cart line item.
/// <param name="request">The request.</param>
/// <param name="context">The context.</param>
/// <param name="cancellationToken">The cancellation token.</param>
/// <returns>Commerce.Cart.Cart</returns>
Task<CartResponse> UpdateCartLineItem(UpdateCartLineItemRequest request, IRequestContext context, CancellationToken cancellationToken);
/// <param name="request"></param>
/// <param name="context"></param>
/// <param name="cancellationToken"></param>
Task<CartResponse> CartUpdate(CartUpdateRequest request, IRequestContext context, CancellationToken cancellationToken);
/// <param name="sourceCartId"></param>
/// <param name="destinationCartId"></param>
/// <param name="useNewCart"></param>
/// <param name="cancellationToken"></param>
Task<string> MergeCarts(string sourceCartId, string destinationCartId, bool useNewCart, CancellationToken cancellationToken);
/// Removes multiples line items from a cart.
/// <param name="request">The request.</param>
/// <param name="context">The context.</param>
/// <param name="cancellationToken">The cancellation token.</param>
Task<CartResponse> RemoveCartLineItems(RemoveCartLineItemsRequest request, IRequestContext context, CancellationToken cancellationToken);
/// Removes all cart items.
/// <param name="request">The request.</param>
/// <param name="context">The context.</param>
/// <param name="cancellationToken">The cancellation token.</param>
Task<CartResponse> ClearCart(ClearCartRequest request, IRequestContext context, CancellationToken cancellationToken);
/// Gets the shipping methods.
/// <param name="request">The cart identifier.</param>
/// <param name="context">The context.</param>
/// <param name="cancellationToken"></param>
Task<IEnumerable<ShippingMethodResponse>> GetShippingMethods(ShippingMethodRequest request, IRequestContext context, CancellationToken cancellationToken = default);
/// Replaces a cart line item with the provided new cart item.
/// <param name="request"></param>
/// <param name="context"></param>
/// <param name="cancellationToken"></param>
Task<CartResponse> ReplaceCartLineItem(ReplaceCartLineItemRequest request, IRequestContext context, CancellationToken cancellationToken = default);
/// Apply discount codes to cart
/// <param name="request"></param>
/// <param name="context"></param>
/// <param name="cancellationToken"></param>
Task<CartResponse> ApplyDiscountCode(CartApplyDiscountCodeRequest request, IRequestContext context, CancellationToken cancellationToken);
/// Remove a DiscountCode from the Cart.
/// <param name="request"></param>
/// <param name="context"></param>
/// <param name="cancellationToken"></param>
Task<CartResponse> RemoveDiscountCode(CartRemoveDiscountCodeRequest request, IRequestContext context, CancellationToken cancellationToken);
/// Gets a discount code by id
/// <param name="request"></param>
/// <param name="cancellationToken"></param>
Task<string> GetDiscountById(CartGetDiscountByIdRequest request, CancellationToken cancellationToken);
/// Replaces the cart custom line item.
/// <param name="request">The request.</param>
/// <param name="context">The context.</param>
/// <param name="cancellationToken">The cancellation token.</param>
Task<CartResponse> ReplaceCartCustomLineItem(ReplaceCartCustomLineItemRequest request, IRequestContext context, CancellationToken cancellationToken);
/// Adds gift information
/// <param name="cartId"></param>
/// <param name="giftPayment"></param>
/// <param name="cancellationToken"></param>
Task AddGiftPaymentMethod(string cartId, ApplyGiftPaymentMethodResponse giftPayment, CancellationToken cancellationToken);