Skip to content

Commit db312b9

Browse files
authored
Merge pull request #528 from XeroAPI/json_parse_bug
fixing #484 json parse an empty body from a failed rate limit 429 call
2 parents 6d7a77c + c61ad92 commit db312b9

File tree

21 files changed

+289
-129
lines changed

21 files changed

+289
-129
lines changed

docs/accounting/index.html

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3662,7 +3662,6 @@
36623662
"type" : "number",
36633663
"description" : "The calculated tax amount based on the TaxType and LineAmount",
36643664
"format" : "double",
3665-
"readOnly" : true,
36663665
"example" : 0.0,
36673666
"x-is-money" : true
36683667
},
@@ -5796,7 +5795,7 @@
57965795
} else if (location.includes('php')){
57975796
sdkLang = 'php'
57985797
sdkName = 'xero-php-oauth2'
5799-
} else if (location.includes('dotnet')){
5798+
} else if (location.includes('xero-netstandard') || location.includes('csharp')){
58005799
sdkLang = 'dotnet'
58015800
sdkName = 'Xero-NetStandard'
58025801
} else if (location.includes('java')){
@@ -5820,7 +5819,7 @@
58205819
<nav id="scrollingNav">
58215820
<ul class="sidenav nav nav-list">
58225821
<li class="nav-header" data-group="Accounting"><strong>SDK: </strong><span id='sdk-name'></span></li>
5823-
<li class="nav-header" data-group="Accounting"><strong>VSN: </strong>4.11.2</li>
5822+
<li class="nav-header" data-group="Accounting"><strong>VSN: </strong>4.11.3</li>
58245823
<li class="nav-header" data-group="Accounting"><a href="#api-Accounting">Methods</a></li>
58255824
<li data-group="Accounting" data-name="createAccount" class="">
58265825
<a href="#api-Accounting-createAccount">createAccount</a>
@@ -20698,9 +20697,10 @@ <h3>Usage and SDK Samples</h3>
2069820697
const iDs = [&quot;00000000-0000-0000-0000-000000000000&quot;];
2069920698
const page = 1;
2070020699
const includeArchived = true;
20700+
const summaryOnly = true;
2070120701

2070220702
try {
20703-
const response = await xero.accountingApi.getContacts(xeroTenantId, ifModifiedSince, where, order, iDs, page, includeArchived);
20703+
const response = await xero.accountingApi.getContacts(xeroTenantId, ifModifiedSince, where, order, iDs, page, includeArchived, summaryOnly);
2070420704
console.log(response.body || response.response.statusCode)
2070520705
} catch (err) {
2070620706
const error = JSON.stringify(err.response.body, null, 2)
@@ -20878,6 +20878,26 @@ <h2>Parameters</h2>
2087820878
</div>
2087920879
</div>
2088020880
</td>
20881+
</tr>
20882+
20883+
<tr><td style="width:150px;">summaryOnly</td>
20884+
<td>
20885+
20886+
20887+
<div id="d2e199_getContacts_summaryOnly">
20888+
<div class="json-schema-view">
20889+
<div class="primitive">
20890+
<span class="type">
20891+
Boolean
20892+
</span>
20893+
20894+
<div class="inner description marked">
20895+
Use summaryOnly=true in GET Contacts endpoint to retrieve a smaller version of the response object. This returns only lightweight fields, excluding computation-heavy fields from the response, making the API calls quick and efficient.
20896+
</div>
20897+
</div>
20898+
</div>
20899+
</div>
20900+
</td>
2088120901
</tr>
2088220902

2088320903
</table>

docs/assets/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1366,7 +1366,7 @@
13661366
} else if (location.includes('php')){
13671367
sdkLang = 'php'
13681368
sdkName = 'xero-php-oauth2'
1369-
} else if (location.includes('dotnet')){
1369+
} else if (location.includes('xero-netstandard') || location.includes('csharp')){
13701370
sdkLang = 'dotnet'
13711371
sdkName = 'Xero-NetStandard'
13721372
} else if (location.includes('java')){
@@ -1390,7 +1390,7 @@
13901390
<nav id="scrollingNav">
13911391
<ul class="sidenav nav nav-list">
13921392
<li class="nav-header" data-group="Asset"><strong>SDK: </strong><span id='sdk-name'></span></li>
1393-
<li class="nav-header" data-group="Asset"><strong>VSN: </strong>4.11.2</li>
1393+
<li class="nav-header" data-group="Asset"><strong>VSN: </strong>4.11.3</li>
13941394
<li class="nav-header" data-group="Asset"><a href="#api-Asset">Methods</a></li>
13951395
<li data-group="Asset" data-name="createAsset" class="">
13961396
<a href="#api-Asset-createAsset">createAsset</a>

docs/bankfeeds/index.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -923,7 +923,7 @@
923923
"type" : "string",
924924
"description" : "Identifies the type of error.",
925925
"example" : "invalid-application",
926-
"enum" : [ "invalid-request", "invalid-application", "invalid-feed-connection", "duplicate-statement", "invalid-end-balance", "invalid-start-and-end-date", "invalid-start-date", "internal-error", "feed-already-connected-in-current-organisation", "invalid-end-date", "statement-not-found", "feed-connected-in-different-organisation", "feed-already-connected-in-different-organisation", "bank-feed-not-found", "invalid-country-specified", "invalid-organisation-bank-feeds", "invalid-organisation-multi-currency", "invalid-feed-connection-for-organisation", "invalid-user-role", "account-not-valid" ]
926+
"enum" : [ "invalid-request", "invalid-application", "invalid-feed-connection", "duplicate-statement", "invalid-end-balance", "invalid-start-and-end-date", "invalid-start-date", "internal-error", "feed-already-connected-in-current-organisation", "invalid-end-date", "statement-not-found", "feed-connected-in-different-organisation", "feed-already-connected-in-different-organisation", "bank-feed-not-found", "invalid-country-specified", "invalid-organisation-bank-feeds", "invalid-organisation-multi-currency", "invalid-feed-connection-for-organisation", "invalid-user-role", "account-not-valid", "feed-not-found-or-already-deleted" ]
927927
}
928928
},
929929
"description" : "On error, the API consumer will receive an HTTP response with a HTTP Status Code of 4xx or 5xx and a Content-Type of application/problem+json."
@@ -1243,7 +1243,7 @@
12431243
} else if (location.includes('php')){
12441244
sdkLang = 'php'
12451245
sdkName = 'xero-php-oauth2'
1246-
} else if (location.includes('dotnet')){
1246+
} else if (location.includes('xero-netstandard') || location.includes('csharp')){
12471247
sdkLang = 'dotnet'
12481248
sdkName = 'Xero-NetStandard'
12491249
} else if (location.includes('java')){
@@ -1267,7 +1267,7 @@
12671267
<nav id="scrollingNav">
12681268
<ul class="sidenav nav nav-list">
12691269
<li class="nav-header" data-group="BankFeeds"><strong>SDK: </strong><span id='sdk-name'></span></li>
1270-
<li class="nav-header" data-group="BankFeeds"><strong>VSN: </strong>4.11.2</li>
1270+
<li class="nav-header" data-group="BankFeeds"><strong>VSN: </strong>4.11.3</li>
12711271
<li class="nav-header" data-group="BankFeeds"><a href="#api-BankFeeds">Methods</a></li>
12721272
<li data-group="BankFeeds" data-name="createFeedConnections" class="">
12731273
<a href="#api-BankFeeds-createFeedConnections">createFeedConnections</a>

docs/files/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1130,7 +1130,7 @@
11301130
} else if (location.includes('php')){
11311131
sdkLang = 'php'
11321132
sdkName = 'xero-php-oauth2'
1133-
} else if (location.includes('dotnet')){
1133+
} else if (location.includes('xero-netstandard') || location.includes('csharp')){
11341134
sdkLang = 'dotnet'
11351135
sdkName = 'Xero-NetStandard'
11361136
} else if (location.includes('java')){
@@ -1154,7 +1154,7 @@
11541154
<nav id="scrollingNav">
11551155
<ul class="sidenav nav nav-list">
11561156
<li class="nav-header" data-group="Files"><strong>SDK: </strong><span id='sdk-name'></span></li>
1157-
<li class="nav-header" data-group="Files"><strong>VSN: </strong>4.11.2</li>
1157+
<li class="nav-header" data-group="Files"><strong>VSN: </strong>4.11.3</li>
11581158
<li class="nav-header" data-group="Files"><a href="#api-Files">Methods</a></li>
11591159
<li data-group="Files" data-name="createFileAssociation" class="">
11601160
<a href="#api-Files-createFileAssociation">createFileAssociation</a>

docs/payroll-au/index.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -970,7 +970,7 @@
970970
};
971971
defs["DeductionLine"] = {
972972
"title" : "",
973-
"required" : [ "CalculationType", "DeductionTypeID" ],
973+
"required" : [ "DeductionTypeID" ],
974974
"type" : "object",
975975
"properties" : {
976976
"DeductionTypeID" : {
@@ -3208,7 +3208,7 @@
32083208
} else if (location.includes('php')){
32093209
sdkLang = 'php'
32103210
sdkName = 'xero-php-oauth2'
3211-
} else if (location.includes('dotnet')){
3211+
} else if (location.includes('xero-netstandard') || location.includes('csharp')){
32123212
sdkLang = 'dotnet'
32133213
sdkName = 'Xero-NetStandard'
32143214
} else if (location.includes('java')){
@@ -3232,7 +3232,7 @@
32323232
<nav id="scrollingNav">
32333233
<ul class="sidenav nav nav-list">
32343234
<li class="nav-header" data-group="PayrollAu"><strong>SDK: </strong><span id='sdk-name'></span></li>
3235-
<li class="nav-header" data-group="PayrollAu"><strong>VSN: </strong>4.11.2</li>
3235+
<li class="nav-header" data-group="PayrollAu"><strong>VSN: </strong>4.11.3</li>
32363236
<li class="nav-header" data-group="PayrollAu"><a href="#api-PayrollAu">Methods</a></li>
32373237
<li data-group="PayrollAu" data-name="createEmployee" class="">
32383238
<a href="#api-PayrollAu-createEmployee">createEmployee</a>

docs/payroll-nz/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3813,7 +3813,7 @@
38133813
} else if (location.includes('php')){
38143814
sdkLang = 'php'
38153815
sdkName = 'xero-php-oauth2'
3816-
} else if (location.includes('dotnet')){
3816+
} else if (location.includes('xero-netstandard') || location.includes('csharp')){
38173817
sdkLang = 'dotnet'
38183818
sdkName = 'Xero-NetStandard'
38193819
} else if (location.includes('java')){
@@ -3837,7 +3837,7 @@
38373837
<nav id="scrollingNav">
38383838
<ul class="sidenav nav nav-list">
38393839
<li class="nav-header" data-group="PayrollNz"><strong>SDK: </strong><span id='sdk-name'></span></li>
3840-
<li class="nav-header" data-group="PayrollNz"><strong>VSN: </strong>4.11.2</li>
3840+
<li class="nav-header" data-group="PayrollNz"><strong>VSN: </strong>4.11.3</li>
38413841
<li class="nav-header" data-group="PayrollNz"><a href="#api-PayrollNz">Methods</a></li>
38423842
<li data-group="PayrollNz" data-name="approveTimesheet" class="">
38433843
<a href="#api-PayrollNz-approveTimesheet">approveTimesheet</a>

docs/payroll-uk/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3481,7 +3481,7 @@
34813481
} else if (location.includes('php')){
34823482
sdkLang = 'php'
34833483
sdkName = 'xero-php-oauth2'
3484-
} else if (location.includes('dotnet')){
3484+
} else if (location.includes('xero-netstandard') || location.includes('csharp')){
34853485
sdkLang = 'dotnet'
34863486
sdkName = 'Xero-NetStandard'
34873487
} else if (location.includes('java')){
@@ -3505,7 +3505,7 @@
35053505
<nav id="scrollingNav">
35063506
<ul class="sidenav nav nav-list">
35073507
<li class="nav-header" data-group="PayrollUk"><strong>SDK: </strong><span id='sdk-name'></span></li>
3508-
<li class="nav-header" data-group="PayrollUk"><strong>VSN: </strong>4.11.2</li>
3508+
<li class="nav-header" data-group="PayrollUk"><strong>VSN: </strong>4.11.3</li>
35093509
<li class="nav-header" data-group="PayrollUk"><a href="#api-PayrollUk">Methods</a></li>
35103510
<li data-group="PayrollUk" data-name="approveTimesheet" class="">
35113511
<a href="#api-PayrollUk-approveTimesheet">approveTimesheet</a>

docs/projects/index.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1341,7 +1341,7 @@
13411341
"status" : {
13421342
"type" : "string",
13431343
"description" : "Status of the time entry. By default a time entry is created with status of `ACTIVE`. A `LOCKED` state indicates that the time entry is currently changing state (for example being invoiced). Updates are not allowed when in this state. It will have a status of INVOICED once it is invoiced.",
1344-
"enum" : [ "ACTIVE", "LOCKED" ]
1344+
"enum" : [ "ACTIVE", "LOCKED", "INVOICED" ]
13451345
}
13461346
},
13471347
"description" : "",
@@ -1443,7 +1443,7 @@
14431443
} else if (location.includes('php')){
14441444
sdkLang = 'php'
14451445
sdkName = 'xero-php-oauth2'
1446-
} else if (location.includes('dotnet')){
1446+
} else if (location.includes('xero-netstandard') || location.includes('csharp')){
14471447
sdkLang = 'dotnet'
14481448
sdkName = 'Xero-NetStandard'
14491449
} else if (location.includes('java')){
@@ -1467,7 +1467,7 @@
14671467
<nav id="scrollingNav">
14681468
<ul class="sidenav nav nav-list">
14691469
<li class="nav-header" data-group="Project"><strong>SDK: </strong><span id='sdk-name'></span></li>
1470-
<li class="nav-header" data-group="Project"><strong>VSN: </strong>4.11.2</li>
1470+
<li class="nav-header" data-group="Project"><strong>VSN: </strong>4.11.3</li>
14711471
<li class="nav-header" data-group="Project"><a href="#api-Project">Methods</a></li>
14721472
<li data-group="Project" data-name="createProject" class="">
14731473
<a href="#api-Project-createProject">createProject</a>

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "xero-node",
3-
"version": "4.11.2",
3+
"version": "4.11.3",
44
"description": "Xero NodeJS OAuth 2.0 client for xero-node",
55
"main": "dist/index.js",
66
"types": "dist/index.d.ts",

0 commit comments

Comments
 (0)