Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test coverage #22

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,12 @@ And a list of type XeroContact is returned.

```
// Send Contact to Xero
Account myAccount = [SELECT Name, ... FROM Account];
XeroAPI.sendAccount(myAccount);

XeroContact newContact = new XeroContact();
myContact.EmailAddress = '[email protected]';
... // Add additional Invoice details based on the XeroContact wrapper

XeroAPI.sendContact(newContact);
```
You can view example JSON requests [here](http://developer.xero.com/documentation/api/contacts/)

Expand All @@ -91,7 +95,7 @@ newInvoice.Date_x = system.today();
... // Add additional Invoice details based on the XeroInvoice wrapper

// Send Invoice to Xero
XeroAPI.sendInvoice(XeroXmlUtility.serialize(newInvoice, 'Invoice'));
XeroAPI.sendInvoice(newInvoice);
```
You can view example JSON requests [here](http://developer.xero.com/documentation/api/invoices/)

Expand Down
2 changes: 1 addition & 1 deletion src/classes/XeroAPI.cls
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ public with sharing class XeroAPI {

// If success
if (isSuccess) {

System.debug(xeroInvoices);
return xeroInvoices[0];
}
// else, process the error
Expand Down
Loading