Webiant Logo Webiant Logo
  1. No results found.

    Try your search with a different keyword or use * as a wildcard.

SampleOrder.cs

using Newtonsoft.Json;
using Nop.Core.Domain.Orders;
using Nop.Core.Domain.Payments;
using Nop.Core.Domain.Shipping;
using Newtonsoft.Json.Converters;

namespace Nop.Services.Installation.SampleData;

/// 
/// Represents a sample order
/// 
public partial class SampleOrder
{
    /// 
    /// Gets or sets a value indicating whether a customer chose "pick up in store" shipping option
    /// 
    public bool PickupInStore { get; set; }

    /// 
    /// Gets or sets the payment method system name
    /// 
    public string PaymentMethodSystemName { get; set; }

    /// 
    /// Gets or sets the customer currency code (at the moment of order placing)
    /// 
    public string CustomerCurrencyCode { get; set; }

    /// 
    /// Gets or sets the currency rate
    /// 
    public decimal CurrencyRate { get; set; }

    /// 
    /// Gets or sets the VAT number (the European Union Value Added Tax)
    /// 
    public string VatNumber { get; set; } = string.Empty;

    /// 
    /// Gets or sets the order subtotal (include tax)
    /// 
    public decimal OrderSubtotalInclTax { get; set; }

    /// 
    /// Gets or sets the order subtotal (exclude tax)
    /// 
    public decimal OrderSubtotalExclTax { get; set; }

    /// 
    /// Gets or sets the order subtotal discount (include tax)
    /// 
    public decimal OrderSubTotalDiscountInclTax { get; set; } = decimal.Zero;

    /// 
    /// Gets or sets the order subtotal discount (exclude tax)
    /// 
    public decimal OrderSubTotalDiscountExclTax { get; set; } = decimal.Zero;

    /// 
    /// Gets or sets the order shipping (include tax)
    /// 
    public decimal OrderShippingInclTax { get; set; } = decimal.Zero;

    /// 
    /// Gets or sets the order shipping (exclude tax)
    /// 
    public decimal OrderShippingExclTax { get; set; } = decimal.Zero;

    /// 
    /// Gets or sets the payment method additional fee (incl tax)
    /// 
    public decimal PaymentMethodAdditionalFeeInclTax { get; set; } = decimal.Zero;

    /// 
    /// Gets or sets the payment method additional fee (exclude tax)
    /// 
    public decimal PaymentMethodAdditionalFeeExclTax { get; set; } = decimal.Zero;

    /// 
    /// Gets or sets the tax rates
    /// 
    public string TaxRates { get; set; }

    /// 
    /// Gets or sets the order tax
    /// 
    public decimal OrderTax { get; set; } = decimal.Zero;

    /// 
    /// Gets or sets the order discount (applied to order total)
    /// 
    public decimal OrderDiscount { get; set; } = decimal.Zero;

    /// 
    /// Gets or sets the order total
    /// 
    public decimal OrderTotal { get; set; }

    /// 
    /// Gets or sets the refunded amount
    /// 
    public decimal RefundedAmount { get; set; } = decimal.Zero;

    /// 
    /// Gets or sets the checkout attribute description
    /// 
    public string CheckoutAttributeDescription { get; set; } = string.Empty;

    /// 
    /// Gets or sets the checkout attributes in XML format
    /// 
    public string CheckoutAttributesXml { get; set; } = string.Empty;

    /// 
    /// Gets or sets the affiliate identifier
    /// 
    public int AffiliateId { get; set; }

    /// 
    /// Gets or sets the customer IP address
    /// 
    public string CustomerIp { get; set; }

    /// 
    /// Gets or sets a value indicating whether storing of credit card number is allowed
    /// 
    public bool AllowStoringCreditCardNumber { get; set; }

    /// 
    /// Gets or sets the card type
    /// 
    public string CardType { get; set; } = string.Empty;

    /// 
    /// Gets or sets the card name
    /// 
    public string CardName { get; set; } = string.Empty;

    /// 
    /// Gets or sets the card number
    /// 
    public string CardNumber { get; set; } = string.Empty;

    /// 
    /// Gets or sets the masked credit card number
    /// 
    public string MaskedCreditCardNumber { get; set; } = string.Empty;

    /// 
    /// Gets or sets the card CVV2
    /// 
    public string CardCvv2 { get; set; } = string.Empty;

    /// 
    /// Gets or sets the card expiration month
    /// 
    public string CardExpirationMonth { get; set; } = string.Empty;

    /// 
    /// Gets or sets the card expiration year
    /// 
    public string CardExpirationYear { get; set; } = string.Empty;

    /// 
    /// Gets or sets the authorization transaction identifier
    /// 
    public string AuthorizationTransactionId { get; set; } = string.Empty;

    /// 
    /// Gets or sets the authorization transaction code
    /// 
    public string AuthorizationTransactionCode { get; set; } = string.Empty;

    /// 
    /// Gets or sets the authorization transaction result
    /// 
    public string AuthorizationTransactionResult { get; set; } = string.Empty;

    /// 
    /// Gets or sets the capture transaction identifier
    /// 
    public string CaptureTransactionId { get; set; } = string.Empty;

    /// 
    /// Gets or sets the capture transaction result
    /// 
    public string CaptureTransactionResult { get; set; } = string.Empty;

    /// 
    /// Gets or sets the subscription transaction identifier
    /// 
    public string SubscriptionTransactionId { get; set; } = string.Empty;

    /// 
    /// Gets or sets the paid date and time
    /// 
    public DateTime? PaidDateUtc { get; set; } = DateTime.UtcNow;

    /// 
    /// Gets or sets the shipping method
    /// 
    public string ShippingMethod { get; set; } = string.Empty;

    /// 
    /// Gets or sets the shipping rate computation method identifier or the pickup point provider identifier (if PickupInStore is true)
    /// 
    public string ShippingRateComputationMethodSystemName { get; set; } = string.Empty;

    /// 
    /// Gets or sets the serialized CustomValues (values from ProcessPaymentRequest)
    /// 
    public string CustomValuesXml { get; set; } = string.Empty;

    /// 
    /// Gets or sets the custom order number without prefix
    /// 
    public string CustomOrderNumber { get; set; } = string.Empty;

    /// 
    /// Gets or sets order items
    /// 
    public List OrderItems { get; set; } = new();

    /// 
    /// Gets or sets order notes
    /// 
    public List OrderNotes { get; set; } = new();

    /// 
    /// Gets or sets the order status
    /// 
    [JsonConverter(typeof(StringEnumConverter))]
    public OrderStatus OrderStatus { get; set; }

    /// 
    /// Gets or sets the payment status
    /// 
    [JsonConverter(typeof(StringEnumConverter))]
    public PaymentStatus PaymentStatus { get; set; }

    /// 
    /// Gets or sets the shipping status
    /// 
    [JsonConverter(typeof(StringEnumConverter))]
    public ShippingStatus ShippingStatus { get; set; }

    /// 
    /// Gets or sets the customer email
    /// 
    public string CustomerEmail { get; set; }

    /// 
    /// Gets or sets sample shipments 
    /// 
    public List Shipments { get; set; } = new();

    #region Nested class

    /// 
    /// Represents a sample order item
    /// 
    public partial class SampleOrderItem
    {
        /// 
        /// Gets or sets the quantity
        /// 
        public int Quantity { get; set; }

        /// 
        /// Gets or sets the unit price in primary store currency (include tax)
        /// 
        public decimal UnitPriceInclTax { get; set; } = decimal.Zero;

        /// 
        /// Gets or sets the unit price in primary store currency (exclude tax)
        /// 
        public decimal UnitPriceExclTax { get; set; } = decimal.Zero;

        /// 
        /// Gets or sets the price in primary store currency (include tax)
        /// 
        public decimal PriceInclTax { get; set; } = decimal.Zero;

        /// 
        /// Gets or sets the price in primary store currency (exclude tax)
        /// 
        public decimal PriceExclTax { get; set; } = decimal.Zero;

        /// 
        /// Gets or sets the discount amount (include tax)
        /// 
        public decimal DiscountAmountInclTax { get; set; } = decimal.Zero;

        /// 
        /// Gets or sets the discount amount (exclude tax)
        /// 
        public decimal DiscountAmountExclTax { get; set; } = decimal.Zero;

        /// 
        /// Gets or sets the original cost of this order item (when an order was placed), qty 1
        /// 
        public decimal OriginalProductCost { get; set; } = decimal.Zero;

        /// 
        /// Gets or sets the attribute description
        /// 
        public string AttributeDescription { get; set; } = string.Empty;

        /// 
        /// Gets or sets the product attributes in XML format
        /// 
        public string AttributesXml { get; set; }

        /// 
        /// Gets or sets the download count
        /// 
        public int DownloadCount { get; set; }

        /// 
        /// Gets or sets a value indicating whether download is activated
        /// 
        public bool IsDownloadActivated { get; set; }

        /// 
        /// Gets or sets a license download identifier (in case this is a downloadable product)
        /// 
        public int? LicenseDownloadId { get; set; } = 0;

        /// 
        /// Gets or sets the total weight of one item
        /// It's nullable for compatibility with the previous version of nopCommerce where was no such property
        /// 
        public decimal? ItemWeight { get; set; }

        /// 
        /// Gets or sets the rental product start date (null if it's not a rental product)
        /// 
        public DateTime? RentalStartDateUtc { get; set; }

        /// 
        /// Gets or sets the rental product end date (null if it's not a rental product)
        /// 
        public DateTime? RentalEndDateUtc { get; set; }

        /// 
        /// Gets or sets the product name
        /// 
        public string ProductName { get; set; }
    }

    /// 
    /// Represents a sample shipment
    /// 
    public partial class SampleShipment
    {
        /// 
        /// Gets or sets the tracking number of this shipment
        /// 
        public string TrackingNumber { get; set; } = string.Empty;

        /// 
        /// Gets or sets the total weight of this shipment
        /// It's nullable for compatibility with the previous version of nopCommerce where was no such property
        /// 
        public decimal? TotalWeight { get; set; }

        /// 
        /// Gets or sets the admin comment
        /// 
        public string AdminComment { get; set; } = string.Empty;

        /// 
        /// Gets or sets sample shipment items
        /// 
        public List ShipmentItems { get; set; } = new();
    }

    /// 
    /// Represents a sample shipment item
    /// 
    public partial class SampleShipmentItem
    {
        /// 
        /// Gets or sets the product name
        /// 
        public string ProductName { get; set; }

        /// 
        /// Gets or sets the quantity
        /// 
        public int Quantity { get; set; }
    }

    #endregion
}