Skip to content

AddCartLineItemsRequest

// RB2 Core Connect
namespace CoreConnect.Commerce.Cart;
/// <summary>
/// The add cart line items request.
/// </summary>
public class AddCartLineItemsRequest : CartRequest
{
/// <summary>
/// Gets or sets the line items.
/// </summary>
public required IEnumerable<AddCartLineItemsRequestLineItem> LineItems { get; set; }
}
/// <summary>
/// The add cart line items request.
/// </summary>
public class AddCartLineItemsRequestLineItem
{
/// <summary>
/// Gets or sets the product id.
/// </summary>
public string? ProductId { get; set; }
/// <summary>
/// Gets or sets the variant id.
/// </summary>
public string? VariantId { get; set; }
/// <summary>
/// Gets or sets the quantity.
/// </summary>
public int? Quantity { get; set; }
/// <summary>
/// inventory channel key
/// </summary>
public string? ChannelKey { get; set; }
/// <summary>
/// Contains any aditional information about a lineItem.
/// </summary>
public Dictionary<string, string>? ExtraLineItemInfo { get; set; }
/// <summary>
/// DisplayData
/// </summary>
public DisplayData? DisplayData { get; set; }
/// <summary>
/// Gets or sets the promotion identifier
/// </summary>
public string? PromotionId { get; set; }
/// <summary>
/// Target information of the digital product such as target customer, email and message
/// </summary>
public DigitalProductTargetInformation? DigitalProductTargetInformation { get; set; }
}
public class DisplayData
{
public DisplayDataItem? Size { get; set; }
public DisplayDataItem? Colors { get; set; }
}
public class DisplayDataItem
{
public string? Label { get; set; }
public string? Value { get; set; }
}
public class DigitalProductTargetInformation
{
public string? Name { get; set; }
public string? Email { get; set; }
public string? Message { get; set; }
}