I have created a connection (works well) and now I'm setting-up the Invoice
. When I debug it, at one of the lines it generates an error with the object not set to a reference.
Invoice inv = new Invoice();
inv.Date = DateTime.Now.Date;
inv.DueDate = DateTime.Now.Date.AddDays(30);
inv.Type = Xero.Api.Core.Model.Types.InvoiceType.AccountsReceivable;
inv.Status = Xero.Api.Core.Model.Status.InvoiceStatus.Draft;
inv.LineAmountTypes = Xero.Api.Core.Model.Types.LineAmountType.Inclusive; //ERROR HERE
inv.Contact.Name = tbCustomer.Text;
inv.LineItems = new List<LineItem>();