// // Copyright (c) Smart Energia. All rights reserved. // namespace Download_Faturas { using System.Text.Json.Serialization; #pragma warning disable CS8618, SA1300, SA1402 /// /// Root object class representing the invoice JSON structure. /// public class Rootobject { /// /// Gets or sets the version. /// public string version { get; set; } /// /// Gets or sets the MD5 hash. /// public string md5 { get; set; } /// /// Gets or sets the provider. /// public string provider { get; set; } /// /// Gets or sets the provider data. /// public Providerdata providerData { get; set; } /// /// Gets or sets the location number. /// public string locationNumber { get; set; } /// /// Gets or sets the subclass. /// public string subclass { get; set; } /// /// Gets or sets the subgroup. /// public string subgroup { get; set; } /// /// Gets or sets the customer. /// public Customer customer { get; set; } /// /// Gets or sets the losses. /// public float losses { get; set; } /// /// Gets or sets the total charges. /// public float totalCharges { get; set; } /// /// Gets or sets the tariff modality. /// public string tariffModality { get; set; } /// /// Gets or sets the dates. /// public Dates dates { get; set; } /// /// Gets or sets the measured items. /// public Measureditem[] measuredItems { get; set; } /// /// Gets or sets the items. /// public Item[] items { get; set; } } /// /// Provider data class representing provider information. /// public class Providerdata { /// /// Gets or sets the name. /// public Name name { get; set; } /// /// Gets or sets the CNPJ. /// public Cnpj cnpj { get; set; } } /// /// Class representing the name information. /// public class Name { /// /// Gets or sets the value. /// public string value { get; set; } /// /// Gets or sets the confidence. /// public string confidence { get; set; } } /// /// Class representing the CNPJ information. /// public class Cnpj { /// /// Gets or sets the value. /// public string value { get; set; } /// /// Gets or sets the confidence. /// public string confidence { get; set; } } /// /// Customer class representing customer information. /// public class Customer { /// /// Gets or sets the CNPJ. /// public string cnpj { get; set; } /// /// Gets or sets the name. /// public string name { get; set; } /// /// Gets or sets the address. /// public Address address { get; set; } } /// /// Address class representing customer address information. /// public class Address { /// /// Gets or sets the street and number. /// public string streetAndNumber { get; set; } /// /// Gets or sets the city. /// public string city { get; set; } /// /// Gets or sets the state. /// public string state { get; set; } /// /// Gets or sets the zip code. /// public string zipCode { get; set; } /// /// Gets or sets the district. /// public string district { get; set; } } /// /// Dates class representing various date information. /// public class Dates { /// /// Gets or sets the due date. /// public DateTime due { get; set; } /// /// Gets or sets the issue month. /// public DateTime month { get; set; } /// /// Gets or sets the reading information. /// public Reading reading { get; set; } } /// /// Reading class representing reading period information. /// public class Reading { /// /// Gets or sets the start of the reading period. /// [JsonConverter(typeof(DefaultDateTimeConverter))] public DateTime periodFrom { get; set; } /// /// Gets or sets the end of the reading period. /// [JsonConverter(typeof(DefaultDateTimeConverter))] public DateTime periodUntil { get; set; } } /// /// Measured item class representing measured item information. /// public class Measureditem { /// /// Gets or sets the type. /// public string type { get; set; } /// /// Gets or sets the kind. /// public string kind { get; set; } /// /// Gets or sets the period. /// public string period { get; set; } /// /// Gets or sets the texts. /// public string[] texts { get; set; } /// /// Gets or sets the measured values. /// [JsonConverter(typeof(FloatArrayOrSingleConverter))] public float[] measured { get; set; } } /// /// Item class representing invoice item information. /// public class Item { /// /// Gets or sets the item type. /// public string type { get; set; } /// /// Gets or sets the kind. /// public string kind { get; set; } /// /// Gets or sets the period. /// public string period { get; set; } /// /// Gets or sets the billed amount. /// public float billed { get; set; } /// /// Gets or sets the rate. /// public float? rate { get; set; } /// /// Gets or sets the charge. /// public float charge { get; set; } /// /// Gets or sets the TUSD rate. /// public float tusdRate { get; set; } /// /// Gets or sets the TE rate. /// public float teRate { get; set; } /// /// Gets or sets the texts. /// public string[] texts { get; set; } /// /// Gets or sets the basic rate. /// public float basicRate { get; set; } /// /// Gets or sets the contract. /// public float contract { get; set; } /// /// Gets or sets the name. /// public string name { get; set; } /// /// Gets or sets the taxable amount. /// public float? taxable { get; set; } /// /// Gets or sets a value indicating whether the item is summable. /// public bool summable { get; set; } } #pragma warning restore CS8618, SA1300, SA1402 }