using Newtonsoft.Json; namespace Nop.Plugin.Misc.Zettle.Domain.Api.Product; /// /// Represents the product details /// public class Product : ApiResponse { #region Properties /// /// Gets or sets the unique identifier as UUID version 1 /// [JsonProperty(PropertyName = "uuid")] public string Uuid { get; set; } /// /// Gets or sets the ETag /// [JsonProperty(PropertyName = "etag")] public string ETag { get; set; } /// /// Gets or sets the categories /// [JsonProperty(PropertyName = "categories")] public List Categories { get; set; } /// /// Gets or sets the name /// [JsonProperty(PropertyName = "name")] public string Name { get; set; } /// /// Gets or sets the identifier /// [JsonIgnore] public int Id { get; set; } /// /// Gets or sets the description /// [JsonProperty(PropertyName = "description")] public string Description { get; set; } /// /// Gets or sets the external reference /// [JsonProperty(PropertyName = "externalReference")] public string ExternalReference { get; set; } /// /// Gets or sets the unit name /// [JsonProperty(PropertyName = "unitName")] public string UnitName { get; set; } /// /// Gets or sets the VAT percentage /// [JsonProperty(PropertyName = "vatPercentage")] public decimal? VatPercentage { get; set; } /// /// Gets or sets the tax code /// [JsonProperty(PropertyName = "taxCode")] public string TaxCode { get; set; } /// /// Gets or sets the tax rates /// [JsonProperty(PropertyName = "taxRates")] public List TaxRates { get; set; } /// /// Gets or sets a value indicating whether the product is tax exempt /// [JsonProperty(PropertyName = "taxExempt")] public bool? TaxExempt { get; set; } /// /// Gets or sets a value indicating whether the product is create with default tax /// [JsonProperty(PropertyName = "createWithDefaultTax")] public bool? CreateWithDefaultTax { get; set; } /// /// Gets or sets the image lookup keys /// [JsonProperty(PropertyName = "imageLookupKeys")] public List ImageLookupKeys { get; set; } /// /// Gets or sets the presentation /// [JsonProperty(PropertyName = "presentation")] public ProductPresentation Presentation { get; set; } /// /// Gets or sets the variants /// [JsonProperty(PropertyName = "variants")] public List Variants { get; set; } /// /// Gets or sets the online product info /// [JsonProperty(PropertyName = "online")] public ProductOnlineInfo Online { get; set; } /// /// Gets or sets the variant option definitions /// [JsonProperty(PropertyName = "variantOptionDefinitions")] public ProductVariantDefinitions VariantOptionDefinitions { get; set; } /// /// Gets or sets the category /// [JsonProperty(PropertyName = "category")] public ProductCategory Category { get; set; } /// /// Gets or sets the metadata /// [JsonProperty(PropertyName = "metadata")] public ProductMetadata Metadata { get; set; } /// /// Gets or sets the unique identifier as UUID version 1 of a user who updated the product /// [JsonProperty(PropertyName = "updatedBy")] public string UpdatedBy { get; set; } /// /// Gets or sets the updated date /// [JsonProperty(PropertyName = "updated")] public DateTime? Updated { get; set; } /// /// Gets or sets the created date /// [JsonProperty(PropertyName = "created")] public DateTime? Created { get; set; } #endregion #region Nested classes /// /// Represents the product category details /// public class ProductCategory { /// /// Gets or sets the unique identifier as UUID version 1 /// [JsonProperty(PropertyName = "uuid")] public string Uuid { get; set; } /// /// Gets or sets the name /// [JsonProperty(PropertyName = "name")] public string Name { get; set; } } /// /// Represents the product presentation details /// public class ProductPresentation { /// /// Gets or sets the image URL /// [JsonProperty(PropertyName = "imageUrl")] public string ImageUrl { get; set; } /// /// Gets or sets the background color /// [JsonProperty(PropertyName = "backgroundColor")] public string BackgroundColor { get; set; } /// /// Gets or sets the text color /// [JsonProperty(PropertyName = "textColor")] public string TextColor { get; set; } } /// /// Represents the product variant details /// public class ProductVariant { #region Properties /// /// Gets or sets the unique identifier as UUID version 1 /// [JsonProperty(PropertyName = "uuid")] public string Uuid { get; set; } /// /// Gets or sets the name /// [JsonProperty(PropertyName = "name")] public string Name { get; set; } /// /// Gets or sets the description /// [JsonProperty(PropertyName = "description")] public string Description { get; set; } /// /// Gets or sets the SKU /// [JsonProperty(PropertyName = "sku")] public string Sku { get; set; } /// /// Gets or sets the barcode /// [JsonProperty(PropertyName = "barcode")] public string Barcode { get; set; } /// /// Gets or sets the VAT percentage /// [JsonProperty(PropertyName = "vatPercentage")] public decimal? VatPercentage { get; set; } /// /// Gets or sets the price /// [JsonProperty(PropertyName = "price")] public ProductPrice Price { get; set; } /// /// Gets or sets the cost price /// [JsonProperty(PropertyName = "costPrice")] public ProductPrice CostPrice { get; set; } /// /// Gets or sets the options /// [JsonProperty(PropertyName = "options")] public List Options { get; set; } /// /// Gets or sets the presentation /// [JsonProperty(PropertyName = "presentation")] public ProductPresentation Presentation { get; set; } #endregion #region Nested classes /// /// Represents the product price details /// public class ProductPrice { /// /// Gets or sets the amount /// [JsonProperty(PropertyName = "amount")] public int? Amount { get; set; } /// /// Gets or sets the currency id /// [JsonProperty(PropertyName = "currencyId")] public string CurrencyId { get; set; } } /// /// Represents the product variant option property details /// public class ProductVariantOption { /// /// Gets or sets the name /// [JsonProperty(PropertyName = "name")] public string Name { get; set; } /// /// Gets or sets the value /// [JsonProperty(PropertyName = "value")] public string Value { get; set; } } #endregion } /// /// Represents the product variant options details /// public class ProductVariantDefinitions { #region Properties /// /// Gets or sets the product variant options /// [JsonProperty(PropertyName = "definitions")] public List Definitions { get; set; } #endregion #region Nested classes /// /// Represents the product variant option details /// public class ProductVariantOptionDefinition { #region Properties /// /// Gets or sets the name /// [JsonProperty(PropertyName = "name")] public string Name { get; set; } /// /// Gets or sets the product variant option properties /// [JsonProperty(PropertyName = "properties")] public List Properties { get; set; } #endregion #region Nested classes /// /// Represents the product variant option property details /// public class ProductVariantOptionProperty { /// /// Gets or sets the value /// [JsonProperty(PropertyName = "value")] public string Value { get; set; } /// /// Gets or sets the image URL /// [JsonProperty(PropertyName = "imageUrl")] public string ImageUrl { get; set; } } #endregion } #endregion } /// /// Represents the product online info details /// public class ProductOnlineInfo { #region Properties /// /// Gets or sets the status /// [JsonProperty(PropertyName = "status")] public string Status { get; set; } /// /// Gets or sets the title /// [JsonProperty(PropertyName = "title")] public string Title { get; set; } /// /// Gets or sets the description /// [JsonProperty(PropertyName = "description")] public string Description { get; set; } /// /// Gets or sets the shipping details /// [JsonProperty(PropertyName = "shipping")] public ProductShippingInfo Shipping { get; set; } /// /// Gets or sets the presentation /// [JsonProperty(PropertyName = "presentation")] public ProductOnlinePresentation Presentation { get; set; } /// /// Gets or sets the SEO details /// [JsonProperty(PropertyName = "seo")] public ProductSeo Seo { get; set; } #endregion #region Nested classes /// /// Represents the product shipping details /// public class ProductShippingInfo { #region Properties /// /// Gets or sets the shipping pricing model /// [JsonProperty(PropertyName = "shippingPricingModel")] public string ShippingPricingModel { get; set; } /// /// Gets or sets the weight (in grams) /// [JsonProperty(PropertyName = "weightInGrams")] public int? WeightInGrams { get; set; } /// /// Gets or sets the weight info /// [JsonProperty(PropertyName = "weight")] public ProductWeight Weight { get; set; } #endregion #region Nested classes /// /// Represents the product weight details /// public class ProductWeight { /// /// Gets or sets the weight /// [JsonProperty(PropertyName = "weight")] public decimal? Weight { get; set; } /// /// Gets or sets the unit /// [JsonProperty(PropertyName = "unit")] public string Unit { get; set; } } #endregion } /// /// Represents the product online presentation details /// public class ProductOnlinePresentation { /// /// Gets or sets the display image URL /// [JsonProperty(PropertyName = "displayImageUrl")] public string DisplayImageUrl { get; set; } /// /// Gets or sets the additional image URLs /// [JsonProperty(PropertyName = "additionalImageUrls")] public List AdditionalImageUrls { get; set; } /// /// Gets or sets the media URLs /// [JsonProperty(PropertyName = "mediaUrls")] public List MediaUrls { get; set; } } /// /// Represents the product SEO details /// public class ProductSeo { /// /// Gets or sets the title /// [JsonProperty(PropertyName = "title")] public string Title { get; set; } /// /// Gets or sets the meta description /// [JsonProperty(PropertyName = "metaDescription")] public string MetaDescription { get; set; } /// /// Gets or sets the slug /// [JsonProperty(PropertyName = "slug")] public string Slug { get; set; } } #endregion } /// /// Represents the product metadata details /// public class ProductMetadata { #region Properties /// /// Gets or sets a value indicating whether the product is in POS /// [JsonProperty(PropertyName = "inPos")] public bool? InPos { get; set; } /// /// Gets or sets the source /// [JsonProperty(PropertyName = "source")] public ProductSource Source { get; set; } #endregion #region Nested classes /// /// Represents the product source details /// public class ProductSource { /// /// Gets or sets the name /// [JsonProperty(PropertyName = "name")] public string Name { get; set; } /// /// Gets or sets a value indicating whether the source of product is external /// [JsonProperty(PropertyName = "external")] public bool? External { get; set; } } #endregion } #endregion }