Skip to content

Commit 06d69c2

Browse files
authored
Merge pull request #242 from XeroAPI/regen
Generation July 23rd
2 parents d9d48be + e99be37 commit 06d69c2

File tree

483 files changed

+1001
-32732
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

483 files changed

+1001
-32732
lines changed

README.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -589,6 +589,34 @@ try {
589589
---
590590
## SDK conventions
591591

592+
### Accessing HTTP Headers
593+
594+
Every function has with it a more verbose `WithHttpInfo` option in case you need to build logic around any request headers.
595+
596+
For example:
597+
* `getInvoices` -> `getInvoicesWithHttpInfo`
598+
* `getContacts` -> `getContactsWithHttpInfo`
599+
600+
This will return an array of 3 elements from the HTTP request.
601+
1. The object deserialized via the accounting object
602+
2. The HTTP status code
603+
3. The Response Headers
604+
605+
```php
606+
return [
607+
AccountingObjectSerializer::deserialize($content, '\XeroAPI\XeroPHP\Models\Accounting\Organisations', []),
608+
$response->getStatusCode(),
609+
$response->getHeaders()
610+
];
611+
```
612+
613+
```php
614+
$apiResponse = $apiInstance->getInvoicesWithHttpInfo($xeroTenantId, $if_modified_since, $where, $order, $ids, $invoice_numbers, $contact_ids, $statuses, $page,$include_archived, $created_by_my_app, $unitdp);
615+
echo '$apiResponse: ' . json_encode($apiResponse[2]);
616+
```
617+
618+
`$apiResponse: {"Content-Type":["application\/json; charset=utf-8"],"Content-Length":["2116"],"Server":["nginx"],"Xero-Correlation-Id":["9a8fb7f7-e3e6-4f66-a170-88effabe9f4e"],"X-AppMinLimit-Remaining":["9997"],"X-MinLimit-Remaining":["57"],"X-DayLimit-Remaining":["4954"],"Expires":["Fri, 23 Jul 2021 17:32:31 GMT"],"Cache-Control":["max-age=0, no-cache, no-store"],"Pragma":["no-cache"],"Date":["Fri, 23 Jul 2021 17:32:31 GMT"],"Connection":["keep-alive"],"X-Client-TLS-ver":["tls1.3"]}`
619+
592620
### JWT decoding and Signup with Xero
593621

594622
Looking to implement [Signup with Xero](https://developer.xero.com/documentation/oauth2/sign-in)? We've added built in decoding and verification for both Access tokens and ID token in xero-php-oauth2.

composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
"ext-json": "*",
2424
"ext-mbstring": "*",
2525
"guzzlehttp/guzzle": "^6.2 | ^7.0",
26+
"guzzlehttp/psr7": "^1.8",
2627
"league/oauth2-client": "^2.5.0",
2728
"firebase/php-jwt": "^5.0"
2829
},

doc/accounting/Api/AccountingApi.md

Lines changed: 0 additions & 12767 deletions
This file was deleted.

doc/accounting/Model/Account.md

Lines changed: 0 additions & 29 deletions
This file was deleted.

doc/accounting/Model/AccountType.md

Lines changed: 0 additions & 9 deletions
This file was deleted.

doc/accounting/Model/Accounts.md

Lines changed: 0 additions & 10 deletions
This file was deleted.

doc/accounting/Model/AccountsPayable.md

Lines changed: 0 additions & 11 deletions
This file was deleted.

doc/accounting/Model/AccountsReceivable.md

Lines changed: 0 additions & 11 deletions
This file was deleted.

doc/accounting/Model/Action.md

Lines changed: 0 additions & 11 deletions
This file was deleted.

doc/accounting/Model/Actions.md

Lines changed: 0 additions & 10 deletions
This file was deleted.

0 commit comments

Comments
 (0)