FruitBank/Presentation/Nop.Web/Models/ShoppingCart/EstimateShippingModel.cs

64 lines
1.6 KiB
C#
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

using Microsoft.AspNetCore.Mvc.Rendering;
using Nop.Web.Framework.Models;
namespace Nop.Web.Models.ShoppingCart;
public partial record EstimateShippingModel : BaseNopModel
{
public EstimateShippingModel()
{
AvailableCountries = new List<SelectListItem>();
AvailableStates = new List<SelectListItem>();
}
public int RequestDelay { get; set; }
public bool Enabled { get; set; }
public int? CountryId { get; set; }
public int? StateProvinceId { get; set; }
public string ZipPostalCode { get; set; }
public bool UseCity { get; set; }
public string City { get; set; }
public IList<SelectListItem> AvailableCountries { get; set; }
public IList<SelectListItem> AvailableStates { get; set; }
}
public partial record EstimateShippingResultModel : BaseNopModel
{
public EstimateShippingResultModel()
{
ShippingOptions = new List<ShippingOptionModel>();
Errors = new List<string>();
}
public IList<ShippingOptionModel> ShippingOptions { get; set; }
public bool Success => !Errors.Any();
public IList<string> Errors { get; set; }
#region Nested Classes
public partial record ShippingOptionModel : BaseNopModel
{
public string Name { get; set; }
public string ShippingRateComputationMethodSystemName { get; set; }
public string Description { get; set; }
public string Price { get; set; }
public decimal Rate { get; set; }
public string DeliveryDateFormat { get; set; }
public int DisplayOrder { get; set; }
public bool Selected { get; set; }
}
#endregion
}