Created
October 27, 2020 16:41
-
-
Save SerKnight/7ab203ca68702b7a2205cdb5653e5293 to your computer and use it in GitHub Desktop.
example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var contact = new Contact(); | |
contact.Name = Name; | |
var line = new LineItem() { | |
Description = LineDescription, | |
Quantity = float.Parse(LineQuantity), | |
UnitAmount = float.Parse(LineUnitAmount), | |
AccountCode = LineAccountCode | |
}; | |
var lines = new List<LineItem>() { | |
line | |
}; | |
var invoice = new Invoice() { | |
Type = Invoice.TypeEnum.ACCREC, | |
Contact = contact, | |
Date = DateTime.Today, | |
DueDate = DateTime.Today.AddDays(30), | |
LineItems = lines | |
}; | |
var invoiceList = new List<Invoice>(); | |
invoiceList.Add(invoice); | |
var invoices = new Invoices(); | |
invoices._Invoices = invoiceList; | |
var AccountingApi = new AccountingApi(); | |
var response = await AccountingApi.CreateInvoicesAsync(accessToken, xeroTenantId, invoices); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment