Skip to content

WishlistUpdateRequest

// RB2 Core Connect
namespace CoreConnect.Commerce.Customer;
/// <summary>
/// Remove wishlist lineitem request
/// </summary>
public record RemoveWishlistLineItemRequest
{
public RemoveWishlistLineItemRequest(List<string> lineItemIds, string? shoppingListId, List<string>? productIds, List<long>? variantIds)
{
LineItemIds = lineItemIds;
ShoppingListId = shoppingListId;
ProductIds = productIds;
VariantIds = variantIds;
}
public List<string> LineItemIds { get; set; }
public string? ShoppingListId { get; set; }
public List<long>? VariantIds { get; set; }
public List<string>? ProductIds { get; set; }
}
public record AddWishlistLineItemRequest
{
public AddWishlistLineItemRequest(IList<WishListAddUpdateAction> addActions, string? shoppingListId)
{
AddActions = addActions;
ShoppingListId = shoppingListId;
}
public IList<WishListAddUpdateAction> AddActions { get; set; }
public string? ShoppingListId { get; set; }
}
public record WishListAddUpdateAction
{
public WishListAddUpdateAction(string action, string productId, int variantId, int quantity, Dictionary<string, string>? extraLineItemInfo)
{
Action = action;
ProductId = productId;
VariantId = variantId;
Quantity = quantity;
ExtraLineItemInfo = extraLineItemInfo;
}
public string Action { get; set; }
public string ProductId { get; set; }
public int VariantId { get; set; }
public int Quantity { get; set; }
public Dictionary<string, string>? ExtraLineItemInfo { get; set; }
}
public record WishListRemoveUpdateAction
{
public WishListRemoveUpdateAction(string lineItemId)
{
LineItemId = lineItemId;
}
public string LineItemId { get; set; }
}