using CoreConnect.Commerce.Catalog;
using CoreConnect.Commerce.Core;
using CoreConnect.Commerce.Customer;
using HotChocolate.Types;
namespace CoreConnect.Commerce.Cart;
public class CartResponse : CartRequest
/// Gets or sets the customer id.
public string? CustomerId { get; set; }
/// Gets or sets the customer email.
public string? CustomerEmail { get; set; }
/// Gets or sets the country.
public string? Country { get; set; }
/// Gets or sets the shipping address
public CartAddress? ShippingAddress { get; set; }
/// Gets or sets the billing address
public CartAddress? BillingAddress { get; set; }
/// Gets or sets the line items.
public required IEnumerable<CartLineItem> LineItems { get; set; }
/// Gets or sets the ProductLineItems items.
public IEnumerable<ProductLineItem>? ProductLineItems { get; set; }
/// Gets or sets the created at.
public DateTime CreatedAt { get; set; }
/// Gets or sets the last modified at.
public DateTime LastModifiedAt { get; set; }
/// Gets or sets the tax total.
public required Money TaxTotal { get; set; }
/// Gets or sets the subtotal excl tax.
public required Money SubtotalExclTax { get; set; }
/// Gets or sets the subtotal incl tax.
public required Money SubtotalInclTax { get; set; }
/// Gets or sets the discount total.
public required Money DiscountTotal { get; set; }
/// Gets or sets the product discount total.
public Money? ProductDiscountTotal { get; set; }
/// Gets or sets the sale total.
public Money? SaleTotal { get; set; }
/// Gets or sets the shipping cost incl tax.
public Money? ShippingCostInclTax { get; set; }
/// Gets or sets the shipping cost excl tax.
public Money? ShippingCostExclTax { get; set; }
/// Id to identify anonymous user resources
public string? AnonymousId { get; set; }
public bool? ContentHasChanged { get; set; }
public string? ShippingMethod { get; set; }
public string? DeliveryComments { get; set; }
/// Customized according to different project business
[GraphQLType(typeof(AnyType))]
public Dictionary<string, object>? CustomFields { get; set; }
public BusinessUnit? BusinessUnit { get; set; }
public string? StoreKey { get; set; }
public string? Locale { get; set; }
public IEnumerable<CartApplicablePromotion>? ApplicablePromotions { get; set; }
public string? DiscountId { get; set; }
/// The sum of the items tax
public Money? TotalItemTax { get; set; }
public class CartLineItem
public required string Id { get; set; }
/// Gets or sets the quantity.
public long Quantity { get; set; }
/// Gets or sets the total price excl tax.
public required Money TotalPriceExclTax { get; set; }
/// Gets or sets the total.
public required Money TotalPriceInclTax { get; set; }
/// Gets or sets the total old price excl tax.
public required Money? TotalSalePriceExclTax { get; set; }
/// Gets or sets the total old price incl tax.
public required Money? TotalSalePriceInclTax { get; set; }
/// Gets or sets the ProductLineItem
public ProductLineItem? ProductLineItem { get; set; }
/// Gets or sets the Inventory Mode
public string? InventoryMode { get; set; }
/// Gets or sets the Tax Rate
public decimal? TaxRate { get; set; }
/// Customized according to different project business
[GraphQLType(typeof(AnyType))]
public ExpandoObject? Expand { get; set; }
[GraphQLType(typeof(AnyType))]
public Dictionary<string, object>? CustomFields { get; set; }
/// Gets or sets the promotion identifier.
public string? PromotionId { get; set; }
/// Gets or sets the promotion type.
public string? PromotionType { get; set; }
public class ProductLineItem
public required string Id { get; set; }
public required string ProductId { get; set; }
public required string Name { get; set; }
public required string Slug { get; set; }
public required ProductVariant Variant { get; set; }
public Money? PriceInclTax { get; set; }
public Money? PriceExclTax { get; set; }
public Money? SalePriceInclTax { get; set; }
public Money? SalePriceExclTax { get; set; }
public int Quantity { get; set; }
public IEnumerable<DiscountedLineItemPriceForQuantityCoreConnect>? DiscountedPricePerQuantity { get; set; }
public IEnumerable<MethodTaxRateCoreConnect>? perMethodTaxRate { get; set; }
public DateTime? AddedAt { get; set; }
public DateTime? LastModifiedAt { get; set; }
public Money? UnitPriceInclTax { get; set; }
public Money? UnitPriceExclTax { get; set; }
public Money? UnitSalePriceInclTax { get; set; }
public Money? UnitSalePriceExclTax { get; set; }
public IEnumerable<ProductVariant>? ProductVariants { get; set; }
public class MethodTaxRateCoreConnect
public string? Id { get; set; }
public class DiscountedLineItemPriceForQuantityCoreConnect
public string? Id { get; set; }
public class CartApplicablePromotion
public string? Type { get; set; }
public string? PromotionId { get; set; }
public IEnumerable<Product>? Products { get; set; }