我已经创建了一个连接(运行良好),现在我正在设置Invoice
。当我对其进行调试时,在其中一行中,它会产生错误,并且该对象未设置为引用。
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>();