XeroAPI / xero-php-oauth2

Xero PHP SDK for oAuth 2 generated from Xero API OpenAPI Spec 3.0
MIT License
91 stars 65 forks source link

Kindly correct the documentation. #210

Closed nadeeravista closed 3 years ago

nadeeravista commented 3 years ago

updateOrCreateInvoices

The following line should be a PHP array. Or else it will never work. Always give Error 17

$invoices = { "Invoices": [ { "Type": "ACCREC", "Contact": { "ContactID": "430fa14a-f945-44d3-9f97-5df5e28441b8" }, "LineItems": [ { "Description": "Acme Tires", "Quantity": 2, "UnitAmount": 20, "AccountCode": "200", "TaxType": "NONE", "LineAmount": 40 } ], "Date": "2019-03-11", "DueDate": "2018-12-10", "Reference": "Website Design", "Status": "AUTHORISED" } ] };

Link to gitlab

SidneyAllen commented 3 years ago

Hi @nadeeravista - we are working on new SDK documentation. At the moment we have our Accounting APIs in this new format. All methods are listed with code examples of how to use the methods.

Our code examples are object oriented and don't use raw json for payloads when creating or updating objects.

https://xeroapi.github.io/xero-php-oauth2/docs/v2/accounting/index.html#api-Accounting-updateOrCreateInvoices

Hope this helps.

nadeeravista commented 3 years ago

Thanks for the link for the API documentation. The link you sent me resolved the issue.