Umgeschrieben auf Sevdesk
This commit is contained in:
@@ -1,4 +0,0 @@
|
||||
namespace ConsoleApp3.DataContracts
|
||||
{
|
||||
public record Employee(string Name, int Number);
|
||||
}
|
||||
@@ -2,44 +2,558 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Xml.Linq;
|
||||
|
||||
namespace ConsoleApp3.DataContracts
|
||||
{
|
||||
internal class Invoice
|
||||
{
|
||||
[JsonProperty("id")] public string Id { get; set; }
|
||||
//[JsonProperty("organizationId")] public string OrganizationId { get; set; }
|
||||
[JsonProperty("createdDate")] public string CreatedDate { get; set; }
|
||||
[JsonProperty("updatedDate")] public string UpdatedDate { get; set; }
|
||||
[JsonProperty("version")] public decimal Version { get; set; }
|
||||
[JsonProperty("language")] public string Language { get; set; }
|
||||
[JsonProperty("archived")] public bool Archived { get; set; }
|
||||
[JsonProperty("voucherStatus")] public string VoucherStatus { get; set; }
|
||||
[JsonProperty("voucherNumber")] public string VoucherNumber { get; set; }
|
||||
[JsonProperty("voucherDate")] public string VoucherDate { get; set; }
|
||||
[JsonProperty("dueDate")] public string DueDate { get; set; }
|
||||
[JsonProperty("address")] public InvoiceAddress Address { get; set; }
|
||||
[JsonProperty("lineItems")] public List<InvoiceLineItem> LineItems { get; set; }
|
||||
[JsonProperty("totalPrice")] public TotalPrice TotalPrice { get; set; }
|
||||
[JsonProperty("taxConditions")] public TaxConditions TaxConditions { get; set; }
|
||||
[JsonProperty("shippingConditions")] public ShippingConditions ShippingConditions { get; set; }
|
||||
[JsonProperty(PropertyName ="id")]
|
||||
public int? Id { get; set; }
|
||||
|
||||
[JsonProperty(PropertyName = "objectName")]
|
||||
public string ObjectName { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
[DataMember(Name = "invoiceNumber", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "invoiceNumber")]
|
||||
public string InvoiceNumber { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// the contact the invoice belongs to
|
||||
/// </summary>
|
||||
/// <value>the contact the invoice belongs to</value>
|
||||
[DataMember(Name = "contact", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "contact")]
|
||||
public ModelContact Contact { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// the date the invoice was created
|
||||
/// </summary>
|
||||
/// <value>the date the invoice was created</value>
|
||||
[DataMember(Name = "create", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "create")]
|
||||
public DateTime? Create { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// the date the invoice was last updated
|
||||
/// </summary>
|
||||
/// <value>the date the invoice was last updated</value>
|
||||
[DataMember(Name = "update", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "update")]
|
||||
public DateTime? Update { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// the date of the invoice
|
||||
/// </summary>
|
||||
/// <value>the date of the invoice</value>
|
||||
[DataMember(Name = "invoiceDate", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "invoiceDate")]
|
||||
public DateTime? InvoiceDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// header/subject of the invoice
|
||||
/// </summary>
|
||||
/// <value>header/subject of the invoice</value>
|
||||
[DataMember(Name = "header", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "header")]
|
||||
public string Header { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// head text of the invoice
|
||||
/// </summary>
|
||||
/// <value>head text of the invoice</value>
|
||||
[DataMember(Name = "headText", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "headText")]
|
||||
public string HeadText { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// foot text of the invoice
|
||||
/// </summary>
|
||||
/// <value>foot text of the invoice</value>
|
||||
[DataMember(Name = "footText", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "footText")]
|
||||
public string FootText { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// time left for paying the invoice, use format dd.MM.yyyy or number for number of days left
|
||||
/// </summary>
|
||||
/// <value>time left for paying the invoice, use format dd.MM.yyyy or number for number of days left</value>
|
||||
[DataMember(Name = "timeToPay", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "timeToPay")]
|
||||
public DateTime? TimeToPay { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
/*[DataMember(Name = "discountTime", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "discountTime")]
|
||||
public DateTime? DiscountTime { get; set; }
|
||||
*/
|
||||
/// <summary>
|
||||
/// the discount value in '%'
|
||||
/// </summary>
|
||||
/// <value>the discount value in '%'</value>
|
||||
[DataMember(Name = "discount", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "discount")]
|
||||
public float? Discount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// the name in the address, equals the contacts name
|
||||
/// </summary>
|
||||
/// <value>the name in the address, equals the contacts name</value>
|
||||
[DataMember(Name = "addressName", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "addressName")]
|
||||
public string AddressName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// the street in the address, equals the contacts street
|
||||
/// </summary>
|
||||
/// <value>the street in the address, equals the contacts street</value>
|
||||
[DataMember(Name = "addressStreet", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "addressStreet")]
|
||||
public string AddressStreet { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// the zip-code in the address, equals the contacts zip
|
||||
/// </summary>
|
||||
/// <value>the zip-code in the address, equals the contacts zip</value>
|
||||
[DataMember(Name = "addressZip", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "addressZip")]
|
||||
public string AddressZip { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// the city in the address, equals the contacts city
|
||||
/// </summary>
|
||||
/// <value>the city in the address, equals the contacts city</value>
|
||||
[DataMember(Name = "addressCity", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "addressCity")]
|
||||
public string AddressCity { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// the country in the address, equals the contacts country
|
||||
/// </summary>
|
||||
/// <value>the country in the address, equals the contacts country</value>
|
||||
[DataMember(Name = "addressCountry", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "addressCountry")]
|
||||
public ModelStaticCountry AddressCountry { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// time left for paying the invoice, use format DD.MM.YYYY or number for number of days left
|
||||
/// </summary>
|
||||
/// <value>time left for paying the invoice, use format DD.MM.YYYY or number for number of days left</value>
|
||||
[DataMember(Name = "payDate", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "payDate")]
|
||||
public DateTime? PayDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// SevUser who created the invoice
|
||||
/// </summary>
|
||||
/// <value>SevUser who created the invoice</value>
|
||||
[DataMember(Name = "createUser", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "createUser")]
|
||||
public ModelSevUser CreateUser { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// sevClient is the unique id every customer has and is used in nearly all operations
|
||||
/// </summary>
|
||||
/// <value>sevClient is the unique id every customer has and is used in nearly all operations</value>
|
||||
[DataMember(Name = "sevClient", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "sevClient")]
|
||||
public Object SevClient { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// delivery date of the goods from the invoice, please use dd.MM.yyyy
|
||||
/// </summary>
|
||||
/// <value>delivery date of the goods from the invoice, please use dd.MM.yyyy</value>
|
||||
[DataMember(Name = "deliveryDate", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "deliveryDate")]
|
||||
public DateTime? DeliveryDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// status of the invoice
|
||||
/// </summary>
|
||||
/// <value>status of the invoice</value>
|
||||
[DataMember(Name = "status", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "status")]
|
||||
public EInvoiceStatus Status { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
/*[DataMember(Name = "smallSettlement", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "smallSettlement")]
|
||||
public bool? SmallSettlement { get; set; }
|
||||
*/
|
||||
/// <summary>
|
||||
/// SevUser who created the invoice and therefore is the contact person
|
||||
/// </summary>
|
||||
/// <value>SevUser who created the invoice and therefore is the contact person</value>
|
||||
[DataMember(Name = "contactPerson", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "contactPerson")]
|
||||
public ModelSevUser ContactPerson { get; set; } = new ModelSevUser()
|
||||
{
|
||||
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
/// tax rate used when adding a value added tax regulation
|
||||
/// </summary>
|
||||
/// <value>tax rate used when adding a value added tax regulation</value>
|
||||
[DataMember(Name = "taxRate", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "taxRate")]
|
||||
public float? TaxRate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// additional text when adding a value added tax regulation
|
||||
/// </summary>
|
||||
/// <value>additional text when adding a value added tax regulation</value>
|
||||
[DataMember(Name = "taxText", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "taxText")]
|
||||
public string TaxText { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// dunning level of the invoice
|
||||
/// </summary>
|
||||
/// <value>dunning level of the invoice</value>
|
||||
[DataMember(Name = "dunningLevel", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "dunningLevel")]
|
||||
public int? DunningLevel { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// name of the contacts address
|
||||
/// </summary>
|
||||
/// <value>name of the contacts address</value>
|
||||
[DataMember(Name = "addressParentName", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "addressParentName")]
|
||||
public string AddressParentName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// a reference to the contacts address
|
||||
/// </summary>
|
||||
/// <value>a reference to the contacts address</value>
|
||||
[DataMember(Name = "addressContactRef", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "addressContactRef")]
|
||||
public ModelContactAddress AddressContactRef { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
[DataMember(Name = "taxType", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "taxType")]
|
||||
public string TaxType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
[DataMember(Name = "paymentMethod", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "paymentMethod")]
|
||||
public ModelPaymentMethod PaymentMethod { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
[DataMember(Name = "costCentre", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "costCentre")]
|
||||
public ModelCostCentre CostCentre { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
[DataMember(Name = "sendDate", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "sendDate")]
|
||||
public DateTime? SendDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
[DataMember(Name = "origin", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "origin")]
|
||||
public Object Origin { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// type of the invoice
|
||||
/// </summary>
|
||||
/// <value>type of the invoice</value>
|
||||
[DataMember(Name = "invoiceType", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "invoiceType")]
|
||||
public string InvoiceType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
[DataMember(Name = "accountIntervall", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "accountIntervall")]
|
||||
public int? AccountIntervall { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
[DataMember(Name = "accountLastInvoice", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "accountLastInvoice")]
|
||||
public DateTime? AccountLastInvoice { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
[DataMember(Name = "accountNextInvoice", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "accountNextInvoice")]
|
||||
public DateTime? AccountNextInvoice { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
[DataMember(Name = "reminderTotal", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "reminderTotal")]
|
||||
public float? ReminderTotal { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
[DataMember(Name = "reminderDebit", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "reminderDebit")]
|
||||
public float? ReminderDebit { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
[DataMember(Name = "reminderDeadline", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "reminderDeadline")]
|
||||
public DateTime? ReminderDeadline { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
[DataMember(Name = "reminderCharge", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "reminderCharge")]
|
||||
public float? ReminderCharge { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
[DataMember(Name = "addressParentName2", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "addressParentName2")]
|
||||
public string AddressParentName2 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
[DataMember(Name = "addressName2", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "addressName2")]
|
||||
public string AddressName2 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
[DataMember(Name = "taxSet", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "taxSet")]
|
||||
public ModelTaxSet TaxSet { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
[DataMember(Name = "addressGender", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "addressGender")]
|
||||
public string AddressGender { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
[DataMember(Name = "accountEndDate", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "accountEndDate")]
|
||||
public DateTime? AccountEndDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
[DataMember(Name = "address", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "address")]
|
||||
public string Address { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
[DataMember(Name = "currency", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "currency")]
|
||||
public string Currency { get; set; } = "EUR";
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
[DataMember(Name = "sumNet", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "sumNet")]
|
||||
public float? SumNet { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
[DataMember(Name = "sumTax", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "sumTax")]
|
||||
public float? SumTax { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
[DataMember(Name = "sumGross", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "sumGross")]
|
||||
public float? SumGross { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
[DataMember(Name = "sumDiscounts", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "sumDiscounts")]
|
||||
public float? SumDiscounts { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
[DataMember(Name = "sumNetForeignCurrency", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "sumNetForeignCurrency")]
|
||||
public float? SumNetForeignCurrency { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
[DataMember(Name = "sumTaxForeignCurrency", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "sumTaxForeignCurrency")]
|
||||
public float? SumTaxForeignCurrency { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
[DataMember(Name = "sumGrossForeignCurrency", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "sumGrossForeignCurrency")]
|
||||
public float? SumGrossForeignCurrency { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
[DataMember(Name = "sumDiscountsForeignCurrency", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "sumDiscountsForeignCurrency")]
|
||||
public float? SumDiscountsForeignCurrency { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
[DataMember(Name = "sumNetAccounting", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "sumNetAccounting")]
|
||||
public float? SumNetAccounting { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
[DataMember(Name = "sumTaxAccounting", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "sumTaxAccounting")]
|
||||
public float? SumTaxAccounting { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
[DataMember(Name = "sumGrossAccounting", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "sumGrossAccounting")]
|
||||
public float? SumGrossAccounting { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
[DataMember(Name = "entryType", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "entryType")]
|
||||
public ModelEntryType EntryType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
[DataMember(Name = "costumerInternalNote", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "costumerInternalNote")]
|
||||
public string CostumerInternalNote { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
[DataMember(Name = "showNet", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "showNet")]
|
||||
public int ShowNet { get; set; } = 0;
|
||||
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
[DataMember(Name = "enshrined", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "enshrined")]
|
||||
public bool? Enshrined { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
[DataMember(Name = "sendType", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "sendType")]
|
||||
public string SendType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
[DataMember(Name = "deliveryDateUntil", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "deliveryDateUntil")]
|
||||
public DateTime? DeliveryDateUntil { get; set; }
|
||||
|
||||
[DataMember(Name = "mapAll", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "mapAll")]
|
||||
public bool MapAll { get; set; } = true;
|
||||
|
||||
}
|
||||
|
||||
public class ShippingConditions
|
||||
enum EInvoiceStatus
|
||||
{
|
||||
[JsonProperty("shippingDate")] public string shippingDate { get; set; } = "2023-04-22T00:00:00.000+02:00";
|
||||
[JsonProperty("shippingType")] public string shippingType { get; set; } = "delivery";
|
||||
DEACTIVE = 50,
|
||||
DRAFT = 100,
|
||||
OPEN = 200,
|
||||
PAYED = 1000
|
||||
}
|
||||
|
||||
public class TaxConditions
|
||||
{
|
||||
[JsonProperty("taxType")] public string TaxType { get; set; } = "net";
|
||||
}
|
||||
|
||||
public class TotalPrice
|
||||
{
|
||||
[JsonProperty("currency")] public string Currency { get; set; } = "EUR";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ConsoleApp3.DataContracts
|
||||
{
|
||||
internal class InvoiceAddress
|
||||
{
|
||||
[JsonProperty("contactId")] public string ContactId { get; set; }
|
||||
|
||||
[JsonProperty("name")] public string Name { get; set; }
|
||||
|
||||
[JsonProperty("supplement")] public string Supplement { get; set; }
|
||||
|
||||
[JsonProperty("street")] public string Street { get; set; }
|
||||
|
||||
[JsonProperty("city")] public string City { get; set; }
|
||||
|
||||
[JsonProperty("zip")] public string Zip { get; set; }
|
||||
|
||||
[JsonProperty("countryCode")] public string CountryCode { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,33 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ConsoleApp3.DataContracts
|
||||
{
|
||||
public record InvoiceItem
|
||||
{
|
||||
internal InvoiceItem(string invoiceId, string customer, DateTime date, Employee employee, int account,
|
||||
string description, decimal amountHours, decimal price)
|
||||
{
|
||||
InvoiceId = invoiceId;
|
||||
Customer = customer;
|
||||
Date = date;
|
||||
Employee = employee;
|
||||
Account = account;
|
||||
Description = description;
|
||||
AmountHours = amountHours;
|
||||
Price = price;
|
||||
}
|
||||
|
||||
public string InvoiceId { get; }
|
||||
public string Customer { get; }
|
||||
public DateTime Date { get; }
|
||||
public Employee Employee { get; }
|
||||
public int Account { get; }
|
||||
public string Description { get; }
|
||||
public decimal AmountHours { get; }
|
||||
public decimal Price { get; }
|
||||
}
|
||||
}
|
||||
@@ -1,21 +0,0 @@
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ConsoleApp3.DataContracts
|
||||
{
|
||||
internal class InvoiceLineItem
|
||||
{
|
||||
[JsonProperty("type")] public string Type { get; set; }
|
||||
[JsonProperty("name")] public string Name { get; set; }
|
||||
[JsonProperty("description")] public string Description { get; set; }
|
||||
[JsonProperty("quantity")] public decimal Quantity { get; set; }
|
||||
[JsonProperty("unitName")] public string UnitName { get; set; }
|
||||
[JsonProperty("unitPrice")] public InvoiceLineUnitPrice UnitPrice { get; set; }
|
||||
[JsonProperty("discountPercentage")] public decimal DiscountPercentage { get; set; }
|
||||
[JsonProperty("lineItemAmount")] public decimal LineItemAmount { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace ConsoleApp3.DataContracts
|
||||
{
|
||||
public class InvoiceLineUnitPrice
|
||||
{
|
||||
[JsonProperty("currency")] public string Currency { get; set; }
|
||||
|
||||
[JsonProperty("netAmount")] public decimal NetAmount { get; set; }
|
||||
|
||||
[JsonProperty("grossAmount")] public decimal GrossAmount { get; set; }
|
||||
|
||||
[JsonProperty("taxRatePercentage")] public decimal TaxRatePercentage { get; set; }
|
||||
}
|
||||
}
|
||||
67
ConsoleApp3/DataContracts/InvoicePosSave.cs
Normal file
67
ConsoleApp3/DataContracts/InvoicePosSave.cs
Normal file
@@ -0,0 +1,67 @@
|
||||
using Newtonsoft.Json;
|
||||
using OpenQA.Selenium.DevTools.V112.DOM;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ConsoleApp3.DataContracts
|
||||
{
|
||||
[DataContract]
|
||||
internal class InvoicePosSave
|
||||
{
|
||||
[DataMember(Name = "id", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "id")]
|
||||
public int? Id { get; set; }
|
||||
|
||||
[DataMember(Name = "objectName", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "objectName")]
|
||||
public string ObjectName { get; set; } = "InvoicePos";
|
||||
|
||||
[DataMember(Name = "mapAll", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "mapAll")]
|
||||
public bool MapAll { get; set; } = true;
|
||||
|
||||
[DataMember(Name = "quantity", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "quantity")]
|
||||
public uint Quantity { get; set; }
|
||||
|
||||
[DataMember(Name = "price", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "price")]
|
||||
public decimal Price { get; set; }
|
||||
|
||||
[DataMember(Name = "name", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "name")]
|
||||
public string Name { get; set; } = "";
|
||||
|
||||
[DataMember(Name = "unity", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "unity")]
|
||||
public ModelUnity Unity { get; set; } = new ModelUnity();
|
||||
|
||||
[DataMember(Name = "positionNumber", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "positionNumber")]
|
||||
public uint PositionNumber { get; set; }
|
||||
|
||||
[DataMember(Name = "text", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "text")]
|
||||
public string? Text { get; set; }
|
||||
|
||||
[DataMember(Name = "discount", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "discount")]
|
||||
public int Discount { get; set; } = 0;
|
||||
|
||||
[DataMember(Name = "taxRate", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "taxRate")]
|
||||
public uint TaxRate { get; set; } = 19;
|
||||
|
||||
[DataMember(Name = "priceGross", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "priceGross")]
|
||||
public decimal PriceGross { get; set; }
|
||||
|
||||
[DataMember(Name = "priceTax", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "priceTax")]
|
||||
public int PriceTax { get; set; } = 19;
|
||||
}
|
||||
}
|
||||
12
ConsoleApp3/DataContracts/Invoices.cs
Normal file
12
ConsoleApp3/DataContracts/Invoices.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
// See https://aka.ms/new-console-template for more information
|
||||
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace ConsoleApp3.DataContracts
|
||||
{
|
||||
internal class Invoices
|
||||
{
|
||||
[JsonProperty("objects")] public Invoice[] Invoice { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
110
ConsoleApp3/DataContracts/ModelCategory.cs
Normal file
110
ConsoleApp3/DataContracts/ModelCategory.cs
Normal file
@@ -0,0 +1,110 @@
|
||||
using Newtonsoft.Json;
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
namespace ConsoleApp3.DataContracts
|
||||
{
|
||||
[DataContract]
|
||||
public class ModelCategory
|
||||
{
|
||||
[DataMember(Name = "create", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "create")]
|
||||
public DateTime? Create { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// date the category was last updated
|
||||
/// </summary>
|
||||
/// <value>date the category was last updated</value>
|
||||
[DataMember(Name = "update", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "update")]
|
||||
public DateTime? Update { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
[DataMember(Name = "parent", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "parent")]
|
||||
public ModelCategory Parent { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
[DataMember(Name = "name", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "name")]
|
||||
public string Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
[DataMember(Name = "objectType", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "objectType")]
|
||||
public string ObjectType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
[DataMember(Name = "priority", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "priority")]
|
||||
public int? Priority { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
[DataMember(Name = "code", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "code")]
|
||||
public string Code { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
[DataMember(Name = "color", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "color")]
|
||||
public string Color { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
[DataMember(Name = "sevClient", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "sevClient")]
|
||||
public Object SevClient { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
[DataMember(Name = "postingAccount", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "postingAccount")]
|
||||
public string PostingAccount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
[DataMember(Name = "type", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "type")]
|
||||
public string Type { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
[DataMember(Name = "translationCode", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "translationCode")]
|
||||
public string TranslationCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
[DataMember(Name = "entryType", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "entryType")]
|
||||
public ModelEntryType EntryType { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
232
ConsoleApp3/DataContracts/ModelContact.cs
Normal file
232
ConsoleApp3/DataContracts/ModelContact.cs
Normal file
@@ -0,0 +1,232 @@
|
||||
using Newtonsoft.Json;
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
namespace ConsoleApp3.DataContracts
|
||||
{
|
||||
[DataContract]
|
||||
public class ModelContact
|
||||
{
|
||||
[DataMember(Name = "id", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "id")]
|
||||
public int Id { get; set; }
|
||||
|
||||
[DataMember(Name = "objectName", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "objectName")]
|
||||
public string ObjectName { get; set; } = "";
|
||||
/// <summary>
|
||||
/// the contact address
|
||||
/// </summary>
|
||||
/// <value>the contact address</value>
|
||||
[DataMember(Name = "address", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "address")]
|
||||
public ModelContactAddress Address { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// the creation date of the contact
|
||||
/// </summary>
|
||||
/// <value>the creation date of the contact</value>
|
||||
[DataMember(Name = "create", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "create")]
|
||||
public DateTime? Create { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// date, the contact was last updated
|
||||
/// </summary>
|
||||
/// <value>date, the contact was last updated</value>
|
||||
[DataMember(Name = "update", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "update")]
|
||||
public DateTime? Update { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// name of the contact
|
||||
/// </summary>
|
||||
/// <value>name of the contact</value>
|
||||
[DataMember(Name = "name", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "name")]
|
||||
public string Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// status of the contact
|
||||
/// </summary>
|
||||
/// <value>status of the contact</value>
|
||||
[DataMember(Name = "status", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "status")]
|
||||
public int? Status { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// customer number of the contact
|
||||
/// </summary>
|
||||
/// <value>customer number of the contact</value>
|
||||
[DataMember(Name = "customerNumber", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "customerNumber")]
|
||||
public int? CustomerNumber { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
[DataMember(Name = "parent", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "parent")]
|
||||
public ModelContact Parent { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// surname of the contact
|
||||
/// </summary>
|
||||
/// <value>surname of the contact</value>
|
||||
[DataMember(Name = "surename", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "surename")]
|
||||
public string Surename { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// family name of the contact
|
||||
/// </summary>
|
||||
/// <value>family name of the contact</value>
|
||||
[DataMember(Name = "familyname", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "familyname")]
|
||||
public string Familyname { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// title of the contact
|
||||
/// </summary>
|
||||
/// <value>title of the contact</value>
|
||||
[DataMember(Name = "titel", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "titel")]
|
||||
public string Titel { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// category of the contact
|
||||
/// </summary>
|
||||
/// <value>category of the contact</value>
|
||||
[DataMember(Name = "category", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "category")]
|
||||
public ModelCategory Category { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// description of the contact
|
||||
/// </summary>
|
||||
/// <value>description of the contact</value>
|
||||
[DataMember(Name = "description", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "description")]
|
||||
public string Description { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// any academic title of the contact
|
||||
/// </summary>
|
||||
/// <value>any academic title of the contact</value>
|
||||
[DataMember(Name = "academicTitle", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "academicTitle")]
|
||||
public string AcademicTitle { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// gender of the contact
|
||||
/// </summary>
|
||||
/// <value>gender of the contact</value>
|
||||
[DataMember(Name = "gender", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "gender")]
|
||||
public string Gender { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// sevClient is the unique id every customer has and is used in nearly all operations
|
||||
/// </summary>
|
||||
/// <value>sevClient is the unique id every customer has and is used in nearly all operations</value>
|
||||
[DataMember(Name = "sevClient", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "sevClient")]
|
||||
public Object SevClient { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// second name of the contact
|
||||
/// </summary>
|
||||
/// <value>second name of the contact</value>
|
||||
[DataMember(Name = "name2", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "name2")]
|
||||
public string Name2 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// birthday of the contact
|
||||
/// </summary>
|
||||
/// <value>birthday of the contact</value>
|
||||
[DataMember(Name = "birthday", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "birthday")]
|
||||
public DateTime? Birthday { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// vat number of the contact
|
||||
/// </summary>
|
||||
/// <value>vat number of the contact</value>
|
||||
[DataMember(Name = "vatNumber", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "vatNumber")]
|
||||
public string VatNumber { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// bank account of the contact
|
||||
/// </summary>
|
||||
/// <value>bank account of the contact</value>
|
||||
[DataMember(Name = "bankAccount", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "bankAccount")]
|
||||
public string BankAccount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// bank number of the contact
|
||||
/// </summary>
|
||||
/// <value>bank number of the contact</value>
|
||||
[DataMember(Name = "bankNumber", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "bankNumber")]
|
||||
public string BankNumber { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// desired payment method of the customer
|
||||
/// </summary>
|
||||
/// <value>desired payment method of the customer</value>
|
||||
[DataMember(Name = "paymentMethod", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "paymentMethod")]
|
||||
public ModelPaymentMethod PaymentMethod { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
[DataMember(Name = "entryType", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "entryType")]
|
||||
public ModelEntryType EntryType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// default cashback time of the contact
|
||||
/// </summary>
|
||||
/// <value>default cashback time of the contact</value>
|
||||
[DataMember(Name = "defaultCashbackTime", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "defaultCashbackTime")]
|
||||
public int? DefaultCashbackTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// default cashback percentage of the contact
|
||||
/// </summary>
|
||||
/// <value>default cashback percentage of the contact</value>
|
||||
[DataMember(Name = "defaultCashbackPercent", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "defaultCashbackPercent")]
|
||||
public int? DefaultCashbackPercent { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// default time to pay of the contact
|
||||
/// </summary>
|
||||
/// <value>default time to pay of the contact</value>
|
||||
[DataMember(Name = "defaultTimeToPay", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "defaultTimeToPay")]
|
||||
public int? DefaultTimeToPay { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// tax number of the contact
|
||||
/// </summary>
|
||||
/// <value>tax number of the contact</value>
|
||||
[DataMember(Name = "taxNumber", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "taxNumber")]
|
||||
public string TaxNumber { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// tax office of the contact
|
||||
/// </summary>
|
||||
/// <value>tax office of the contact</value>
|
||||
[DataMember(Name = "taxOffice", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "taxOffice")]
|
||||
public string TaxOffice { get; set; }
|
||||
}
|
||||
}
|
||||
114
ConsoleApp3/DataContracts/ModelContactAddress.cs
Normal file
114
ConsoleApp3/DataContracts/ModelContactAddress.cs
Normal file
@@ -0,0 +1,114 @@
|
||||
using Newtonsoft.Json;
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
namespace ConsoleApp3.DataContracts
|
||||
{
|
||||
[DataContract]
|
||||
public class ModelContactAddress
|
||||
{
|
||||
/// <summary>
|
||||
/// the creation date of the contact
|
||||
/// </summary>
|
||||
/// <value>the creation date of the contact</value>
|
||||
[DataMember(Name = "create", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "create")]
|
||||
public DateTime? Create { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// date, the contact was last updated
|
||||
/// </summary>
|
||||
/// <value>date, the contact was last updated</value>
|
||||
[DataMember(Name = "update", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "update")]
|
||||
public DateTime? Update { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// the contact the address belongs to
|
||||
/// </summary>
|
||||
/// <value>the contact the address belongs to</value>
|
||||
[DataMember(Name = "contact", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "contact")]
|
||||
public ModelContact Contact { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
[DataMember(Name = "street", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "street")]
|
||||
public string Street { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// zip of the city/village
|
||||
/// </summary>
|
||||
/// <value>zip of the city/village</value>
|
||||
[DataMember(Name = "zip", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "zip")]
|
||||
public string Zip { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
[DataMember(Name = "city", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "city")]
|
||||
public string City { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
[DataMember(Name = "country", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "country")]
|
||||
public ModelStaticCountry Country { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// category of the address
|
||||
/// </summary>
|
||||
/// <value>category of the address</value>
|
||||
[DataMember(Name = "category", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "category")]
|
||||
public ModelCategory Category { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
[DataMember(Name = "name", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "name")]
|
||||
public string Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// sevClient is the unique id every customer has and is used in nearly all operations
|
||||
/// </summary>
|
||||
/// <value>sevClient is the unique id every customer has and is used in nearly all operations</value>
|
||||
[DataMember(Name = "sevClient", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "sevClient")]
|
||||
public Object SevClient { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
[DataMember(Name = "name2", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "name2")]
|
||||
public string Name2 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
[DataMember(Name = "name3", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "name3")]
|
||||
public string Name3 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
[DataMember(Name = "name4", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "name4")]
|
||||
public string Name4 { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
62
ConsoleApp3/DataContracts/ModelCostCentre.cs
Normal file
62
ConsoleApp3/DataContracts/ModelCostCentre.cs
Normal file
@@ -0,0 +1,62 @@
|
||||
using Newtonsoft.Json;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Xml.Linq;
|
||||
|
||||
namespace ConsoleApp3.DataContracts
|
||||
{
|
||||
[DataContract]
|
||||
public class ModelCostCentre
|
||||
{
|
||||
[DataMember(Name = "create", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "create")]
|
||||
public DateTime? Create { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// date the cost centre was last updated
|
||||
/// </summary>
|
||||
/// <value>date the cost centre was last updated</value>
|
||||
[DataMember(Name = "update", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "update")]
|
||||
public DateTime? Update { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// sevClient is the unique id every customer has and is used in nearly all operations
|
||||
/// </summary>
|
||||
/// <value>sevClient is the unique id every customer has and is used in nearly all operations</value>
|
||||
[DataMember(Name = "sevClient", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "sevClient")]
|
||||
public Object SevClient { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
[DataMember(Name = "number", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "number")]
|
||||
public string Number { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
[DataMember(Name = "name", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "name")]
|
||||
public string Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
[DataMember(Name = "color", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "color")]
|
||||
public string Color { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
[DataMember(Name = "postingAccount", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "postingAccount")]
|
||||
public string PostingAccount { get; set; }
|
||||
}
|
||||
}
|
||||
37
ConsoleApp3/DataContracts/ModelEntryType.cs
Normal file
37
ConsoleApp3/DataContracts/ModelEntryType.cs
Normal file
@@ -0,0 +1,37 @@
|
||||
using Newtonsoft.Json;
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
namespace ConsoleApp3.DataContracts
|
||||
{
|
||||
[DataContract]
|
||||
public class ModelEntryType
|
||||
{
|
||||
[DataMember(Name = "create", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "create")]
|
||||
public DateTime? Create { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// date the entry type was last updated
|
||||
/// </summary>
|
||||
/// <value>date the entry type was last updated</value>
|
||||
[DataMember(Name = "update", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "update")]
|
||||
public DateTime? Update { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// sevClient is the unique id every customer has and is used in nearly all operations
|
||||
/// </summary>
|
||||
/// <value>sevClient is the unique id every customer has and is used in nearly all operations</value>
|
||||
[DataMember(Name = "sevClient", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "sevClient")]
|
||||
public Object SevClient { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
[DataMember(Name = "name", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "name")]
|
||||
public string Name { get; set; }
|
||||
}
|
||||
}
|
||||
50
ConsoleApp3/DataContracts/ModelPaymentMethod.cs
Normal file
50
ConsoleApp3/DataContracts/ModelPaymentMethod.cs
Normal file
@@ -0,0 +1,50 @@
|
||||
using Newtonsoft.Json;
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
namespace ConsoleApp3.DataContracts
|
||||
{
|
||||
[DataContract]
|
||||
public class ModelPaymentMethod
|
||||
{
|
||||
/// <summary>
|
||||
/// date the payment method was created
|
||||
/// </summary>
|
||||
/// <value>date the payment method was created</value>
|
||||
[DataMember(Name = "create", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "create")]
|
||||
public DateTime? Create { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// date the payment method was last updated
|
||||
/// </summary>
|
||||
/// <value>date the payment method was last updated</value>
|
||||
[DataMember(Name = "update", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "update")]
|
||||
public DateTime? Update { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// sevClient is the unique id every customer has and is used in nearly all operations
|
||||
/// </summary>
|
||||
/// <value>sevClient is the unique id every customer has and is used in nearly all operations</value>
|
||||
[DataMember(Name = "sevClient", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "sevClient")]
|
||||
public Object SevClient { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
[DataMember(Name = "name", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "name")]
|
||||
public string Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
[DataMember(Name = "text", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "text")]
|
||||
public string Text { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
22
ConsoleApp3/DataContracts/ModelRechnung.cs
Normal file
22
ConsoleApp3/DataContracts/ModelRechnung.cs
Normal file
@@ -0,0 +1,22 @@
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ConsoleApp3.DataContracts
|
||||
{
|
||||
[DataContract]
|
||||
internal class ModelRechnung
|
||||
{
|
||||
[DataMember(Name = "invoice", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "invoice")]
|
||||
public Invoice Invoice { get; set; }
|
||||
|
||||
[DataMember(Name = "invoicePosSave", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "invoicePosSave")]
|
||||
public InvoicePosSave[] InvoicePosSaves { get; set; }
|
||||
}
|
||||
}
|
||||
26
ConsoleApp3/DataContracts/ModelSevUser.cs
Normal file
26
ConsoleApp3/DataContracts/ModelSevUser.cs
Normal file
@@ -0,0 +1,26 @@
|
||||
using Newtonsoft.Json;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Xml.Linq;
|
||||
|
||||
namespace ConsoleApp3.DataContracts
|
||||
{
|
||||
[DataContract]
|
||||
public class ModelSevUser
|
||||
{
|
||||
[DataMember(Name = "id", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "id")]
|
||||
public int Id { get; set; } = 995002;
|
||||
|
||||
[DataMember(Name = "objectName", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "objectName")]
|
||||
public string objectName { get; set; } = "SevUser";
|
||||
|
||||
/// <summary>
|
||||
/// This information is not visible for you
|
||||
/// </summary>
|
||||
/// <value>This information is not visible for you</value>
|
||||
[DataMember(Name = "hidden", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "hidden")]
|
||||
public string Hidden { get; set; }
|
||||
}
|
||||
}
|
||||
66
ConsoleApp3/DataContracts/ModelStaticCountry.cs
Normal file
66
ConsoleApp3/DataContracts/ModelStaticCountry.cs
Normal file
@@ -0,0 +1,66 @@
|
||||
using Newtonsoft.Json;
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
namespace ConsoleApp3.DataContracts
|
||||
{
|
||||
[DataContract]
|
||||
public class ModelStaticCountry
|
||||
{
|
||||
[DataMember(Name = "id", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "id")]
|
||||
public int Id { get; set; }
|
||||
|
||||
[DataMember(Name = "objectName", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "objectName")]
|
||||
public string ObjectName { get; set; } = "StaticCountry";
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
[DataMember(Name = "code", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "code")]
|
||||
public string Code { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
[DataMember(Name = "name", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "name")]
|
||||
public string Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
[DataMember(Name = "nameEn", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "nameEn")]
|
||||
public string NameEn { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
[DataMember(Name = "translationCode", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "translationCode")]
|
||||
public string TranslationCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
[DataMember(Name = "locale", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "locale")]
|
||||
public string Locale { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
[DataMember(Name = "priority", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "priority")]
|
||||
public int? Priority { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
123
ConsoleApp3/DataContracts/ModelTaxSet.cs
Normal file
123
ConsoleApp3/DataContracts/ModelTaxSet.cs
Normal file
@@ -0,0 +1,123 @@
|
||||
using Newtonsoft.Json;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Xml.Linq;
|
||||
|
||||
namespace ConsoleApp3.DataContracts
|
||||
{
|
||||
[DataContract]
|
||||
public class ModelTaxSet
|
||||
{
|
||||
/// <summary>
|
||||
/// date the tax set was created
|
||||
/// </summary>
|
||||
/// <value>date the tax set was created</value>
|
||||
[DataMember(Name = "create", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "create")]
|
||||
public DateTime? Create { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// date the tax set was last updated
|
||||
/// </summary>
|
||||
/// <value>date the tax set was last updated</value>
|
||||
[DataMember(Name = "update", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "update")]
|
||||
public DateTime? Update { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// sevClient is the unique id every customer has and is used in nearly all operations
|
||||
/// </summary>
|
||||
/// <value>sevClient is the unique id every customer has and is used in nearly all operations</value>
|
||||
[DataMember(Name = "sevClient", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "sevClient")]
|
||||
public Object SevClient { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
[DataMember(Name = "text", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "text")]
|
||||
public string Text { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
[DataMember(Name = "taxRate", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "taxRate")]
|
||||
public float? TaxRate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
[DataMember(Name = "code", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "code")]
|
||||
public float? Code { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
[DataMember(Name = "displayText", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "displayText")]
|
||||
public string DisplayText { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
[DataMember(Name = "vatReportFieldNet", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "vatReportFieldNet")]
|
||||
public string VatReportFieldNet { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
[DataMember(Name = "vatReportFieldTax", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "vatReportFieldTax")]
|
||||
public string VatReportFieldTax { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
[DataMember(Name = "accountingExportVatField", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "accountingExportVatField")]
|
||||
public string AccountingExportVatField { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
[DataMember(Name = "showInvoice", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "showInvoice")]
|
||||
public bool? ShowInvoice { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
[DataMember(Name = "showDebitVoucher", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "showDebitVoucher")]
|
||||
public bool? ShowDebitVoucher { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
[DataMember(Name = "showCreditVoucher", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "showCreditVoucher")]
|
||||
public bool? ShowCreditVoucher { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
[DataMember(Name = "onlyForVatDec", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "onlyForVatDec")]
|
||||
public bool? OnlyForVatDec { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
17
ConsoleApp3/DataContracts/ModelUnity.cs
Normal file
17
ConsoleApp3/DataContracts/ModelUnity.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
using Newtonsoft.Json;
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
namespace ConsoleApp3.DataContracts
|
||||
{
|
||||
[DataContract]
|
||||
public class ModelUnity
|
||||
{
|
||||
[DataMember(Name = "id", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "id")]
|
||||
public int Id { get; set; } = 1;
|
||||
|
||||
[DataMember(Name = "objectName", EmitDefaultValue = false)]
|
||||
[JsonProperty(PropertyName = "objectName")]
|
||||
public string ObjectName { get; set; } = "Unity";
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user