Delphi XERO provides some components to integrate with XERO Accounting.
This is a work in progress, but please use it and let us know any enhancements.
Basic usage of the API. This would return all customer invoices with the current date in the invoice date field.
procedure TXEROTest.GetInvoices; var XEROInvoices: TXEROInvoices; XEROAppDetails: TXEROAppDetails; XEROResponseText: TXEROResponseText; begin XEROInvoices := TXEROInvoices.Create(nil); XEROAppDetails := TXEROAppDetails.Create(nil); XEROResponseText := TXEROResponseText.Create(nil); try XEROAppDetails.Privatekey.Text := Privatekey; XEROAppDetails.Publickey.Text := Publickey; XEROAppDetails.ConsumerKey := ConsumerKey; XEROAppDetails.ConsumerSecret := ConsumerSecret; XEROInvoices.XEROAppDetails := XEROAppDetails; XEROInvoices.Response := XEROResponseText; XEROInvoices.Find(1, '', itAccRec, isUnspecified, '', '', '', Today); memoOutput.Lines.Text := XEROInvoices.Response.AsString; finally FreeAndNil(XEROInvoices); FreeAndNil(XEROAppDetails); FreeAndNil(XEROResponseText); end; end;
Log in to post a comment.
Basic usage of the API. This would return all customer invoices with the current date in the invoice date field.