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
// Try and create an invoice - but using incorrect data. This should hopefully be rejected by the Xero API | |
Invoice invoiceToCreate = new Invoice | |
{ | |
Contact = contact, | |
Type = "ACCREC", | |
Date = DateTime.Today, | |
LineItems = new LineItems | |
{ | |
new LineItem | |
{ |
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
<Invoice> | |
<Type>ACCREC</Type> | |
<Contact> | |
<ContactID>8fbad9ef-d451-447e-ba2b-5bccc10acd9f</ContactID> | |
</Contact> | |
<Date>2011-09-22</Date> | |
... | |
</Invoice> |
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
static void Main(string[] args) | |
{ | |
IOAuthSession session = new XeroApi.OAuth.XeroApiPrivateSession( | |
"XeroAPI Mini App", | |
"YOUR-CONSUMER-KEY", | |
new X509Certificate2(@"D:\Your-Certificate.pfx", "your-pfx-password")); | |
Repository repository = new Repository(session); | |
Console.WriteLine("You're connected to " + repository.Organisation.Name); |
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
<Invoices> | |
<Invoice> | |
<Contact> | |
<ContactID>aacecb74-ef1e-44e0-ba52-0bc521639697</ContactID> | |
<ContactNumber>C290348</ContactNumber> | |
<Name>PC Complete</Name> | |
</Contact> | |
... | |
</Invoice> | |
</Invoices> |