xero-node 13.0.0 → 13.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/gen/api/accountingApi.d.ts +5 -5
- package/dist/gen/api/accountingApi.js +6 -6
- package/dist/gen/api/appStoreApi.d.ts +1 -1
- package/dist/gen/api/appStoreApi.js +2 -2
- package/dist/gen/api/assetApi.d.ts +1 -1
- package/dist/gen/api/assetApi.js +2 -2
- package/dist/gen/api/bankfeedsApi.d.ts +1 -1
- package/dist/gen/api/bankfeedsApi.js +2 -2
- package/dist/gen/api/filesApi.d.ts +1 -1
- package/dist/gen/api/filesApi.js +2 -2
- package/dist/gen/api/financeApi.d.ts +1 -1
- package/dist/gen/api/financeApi.js +2 -2
- package/dist/gen/api/payrollAUApi.d.ts +1 -1
- package/dist/gen/api/payrollAUApi.js +2 -2
- package/dist/gen/api/payrollNZApi.d.ts +1 -17
- package/dist/gen/api/payrollNZApi.js +2 -81
- package/dist/gen/api/payrollNZApi.js.map +1 -1
- package/dist/gen/api/payrollUKApi.d.ts +1 -18
- package/dist/gen/api/payrollUKApi.js +2 -81
- package/dist/gen/api/payrollUKApi.js.map +1 -1
- package/dist/gen/api/projectApi.d.ts +1 -1
- package/dist/gen/api/projectApi.js +2 -2
- package/dist/gen/model/accounting/contact.d.ts +10 -0
- package/dist/gen/model/accounting/contact.js +12 -0
- package/dist/gen/model/accounting/contact.js.map +1 -1
- package/dist/gen/model/accounting/models.js +1 -0
- package/dist/gen/model/accounting/models.js.map +1 -1
- package/dist/gen/model/assets/bookDepreciationDetail.d.ts +20 -0
- package/dist/gen/model/assets/bookDepreciationDetail.js +25 -0
- package/dist/gen/model/assets/bookDepreciationDetail.js.map +1 -1
- package/package.json +1 -1
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Xero Accounting API
|
|
3
3
|
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
4
4
|
*
|
|
5
|
-
* The version of the OpenAPI document: 9.
|
|
5
|
+
* The version of the OpenAPI document: 9.2.0
|
|
6
6
|
* Contact: api@xero.com
|
|
7
7
|
*
|
|
8
8
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -425,7 +425,7 @@ export declare class AccountingApi {
|
|
|
425
425
|
body: Currencies;
|
|
426
426
|
}>;
|
|
427
427
|
/**
|
|
428
|
-
*
|
|
428
|
+
* This endpoint is deprecated and will be removed April 28, 2026
|
|
429
429
|
* @summary Creates new employees used in Xero payrun
|
|
430
430
|
* @param xeroTenantId Xero identifier for Tenant
|
|
431
431
|
* @param employees Employees with array of Employee object in body of request
|
|
@@ -1851,7 +1851,7 @@ export declare class AccountingApi {
|
|
|
1851
1851
|
body: Currencies;
|
|
1852
1852
|
}>;
|
|
1853
1853
|
/**
|
|
1854
|
-
*
|
|
1854
|
+
* This endpoint is deprecated and will be removed April 28, 2026
|
|
1855
1855
|
* @summary Retrieves a specific employee used in Xero payrun using a unique employee Id
|
|
1856
1856
|
* @param xeroTenantId Xero identifier for Tenant
|
|
1857
1857
|
* @param employeeID Unique identifier for a Employee
|
|
@@ -1865,7 +1865,7 @@ export declare class AccountingApi {
|
|
|
1865
1865
|
body: Employees;
|
|
1866
1866
|
}>;
|
|
1867
1867
|
/**
|
|
1868
|
-
*
|
|
1868
|
+
* This endpoint is deprecated and will be removed April 28, 2026
|
|
1869
1869
|
* @summary Retrieves employees used in Xero payrun
|
|
1870
1870
|
* @param xeroTenantId Xero identifier for Tenant
|
|
1871
1871
|
* @param ifModifiedSince Only records created or modified since this timestamp will be returned
|
|
@@ -3503,7 +3503,7 @@ export declare class AccountingApi {
|
|
|
3503
3503
|
body: CreditNotes;
|
|
3504
3504
|
}>;
|
|
3505
3505
|
/**
|
|
3506
|
-
*
|
|
3506
|
+
* This endpoint is deprecated and will be removed April 28, 2026
|
|
3507
3507
|
* @summary Creates a single new employees used in Xero payrun
|
|
3508
3508
|
* @param xeroTenantId Xero identifier for Tenant
|
|
3509
3509
|
* @param employees Employees with array of Employee object in body of request
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Xero Accounting API
|
|
4
4
|
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
5
5
|
*
|
|
6
|
-
* The version of the OpenAPI document: 9.
|
|
6
|
+
* The version of the OpenAPI document: 9.2.0
|
|
7
7
|
* Contact: api@xero.com
|
|
8
8
|
*
|
|
9
9
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -39,7 +39,7 @@ var AccountingApiApiKeys;
|
|
|
39
39
|
class AccountingApi {
|
|
40
40
|
constructor(basePathOrUsername, password, basePath) {
|
|
41
41
|
this._basePath = defaultBasePath;
|
|
42
|
-
this.defaultHeaders = { 'user-agent': 'xero-node-13.
|
|
42
|
+
this.defaultHeaders = { 'user-agent': 'xero-node-13.2.0' };
|
|
43
43
|
this._useQuerystring = false;
|
|
44
44
|
this.binaryHeaders = {};
|
|
45
45
|
this.authentications = {
|
|
@@ -1857,7 +1857,7 @@ class AccountingApi {
|
|
|
1857
1857
|
});
|
|
1858
1858
|
}
|
|
1859
1859
|
/**
|
|
1860
|
-
*
|
|
1860
|
+
* This endpoint is deprecated and will be removed April 28, 2026
|
|
1861
1861
|
* @summary Creates new employees used in Xero payrun
|
|
1862
1862
|
* @param xeroTenantId Xero identifier for Tenant
|
|
1863
1863
|
* @param employees Employees with array of Employee object in body of request
|
|
@@ -9117,7 +9117,7 @@ class AccountingApi {
|
|
|
9117
9117
|
});
|
|
9118
9118
|
}
|
|
9119
9119
|
/**
|
|
9120
|
-
*
|
|
9120
|
+
* This endpoint is deprecated and will be removed April 28, 2026
|
|
9121
9121
|
* @summary Retrieves a specific employee used in Xero payrun using a unique employee Id
|
|
9122
9122
|
* @param xeroTenantId Xero identifier for Tenant
|
|
9123
9123
|
* @param employeeID Unique identifier for a Employee
|
|
@@ -9189,7 +9189,7 @@ class AccountingApi {
|
|
|
9189
9189
|
});
|
|
9190
9190
|
}
|
|
9191
9191
|
/**
|
|
9192
|
-
*
|
|
9192
|
+
* This endpoint is deprecated and will be removed April 28, 2026
|
|
9193
9193
|
* @summary Retrieves employees used in Xero payrun
|
|
9194
9194
|
* @param xeroTenantId Xero identifier for Tenant
|
|
9195
9195
|
* @param ifModifiedSince Only records created or modified since this timestamp will be returned
|
|
@@ -17534,7 +17534,7 @@ class AccountingApi {
|
|
|
17534
17534
|
});
|
|
17535
17535
|
}
|
|
17536
17536
|
/**
|
|
17537
|
-
*
|
|
17537
|
+
* This endpoint is deprecated and will be removed April 28, 2026
|
|
17538
17538
|
* @summary Creates a single new employees used in Xero payrun
|
|
17539
17539
|
* @param xeroTenantId Xero identifier for Tenant
|
|
17540
17540
|
* @param employees Employees with array of Employee object in body of request
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Xero AppStore API
|
|
3
3
|
* These endpoints are for Xero Partners to interact with the App Store Billing platform
|
|
4
4
|
*
|
|
5
|
-
* The version of the OpenAPI document: 9.
|
|
5
|
+
* The version of the OpenAPI document: 9.2.0
|
|
6
6
|
* Contact: api@xero.com
|
|
7
7
|
*
|
|
8
8
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Xero AppStore API
|
|
4
4
|
* These endpoints are for Xero Partners to interact with the App Store Billing platform
|
|
5
5
|
*
|
|
6
|
-
* The version of the OpenAPI document: 9.
|
|
6
|
+
* The version of the OpenAPI document: 9.2.0
|
|
7
7
|
* Contact: api@xero.com
|
|
8
8
|
*
|
|
9
9
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -38,7 +38,7 @@ var AppStoreApiApiKeys;
|
|
|
38
38
|
class AppStoreApi {
|
|
39
39
|
constructor(basePathOrUsername, password, basePath) {
|
|
40
40
|
this._basePath = defaultBasePath;
|
|
41
|
-
this.defaultHeaders = { 'user-agent': 'xero-node-13.
|
|
41
|
+
this.defaultHeaders = { 'user-agent': 'xero-node-13.2.0' };
|
|
42
42
|
this._useQuerystring = false;
|
|
43
43
|
this.binaryHeaders = {};
|
|
44
44
|
this.authentications = {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Xero Assets API
|
|
3
3
|
* The Assets API exposes fixed asset related functions of the Xero Accounting application and can be used for a variety of purposes such as creating assets, retrieving asset valuations etc.
|
|
4
4
|
*
|
|
5
|
-
* The version of the OpenAPI document: 9.
|
|
5
|
+
* The version of the OpenAPI document: 9.2.0
|
|
6
6
|
* Contact: api@xero.com
|
|
7
7
|
*
|
|
8
8
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
package/dist/gen/api/assetApi.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Xero Assets API
|
|
4
4
|
* The Assets API exposes fixed asset related functions of the Xero Accounting application and can be used for a variety of purposes such as creating assets, retrieving asset valuations etc.
|
|
5
5
|
*
|
|
6
|
-
* The version of the OpenAPI document: 9.
|
|
6
|
+
* The version of the OpenAPI document: 9.2.0
|
|
7
7
|
* Contact: api@xero.com
|
|
8
8
|
*
|
|
9
9
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -38,7 +38,7 @@ var AssetApiApiKeys;
|
|
|
38
38
|
class AssetApi {
|
|
39
39
|
constructor(basePathOrUsername, password, basePath) {
|
|
40
40
|
this._basePath = defaultBasePath;
|
|
41
|
-
this.defaultHeaders = { 'user-agent': 'xero-node-13.
|
|
41
|
+
this.defaultHeaders = { 'user-agent': 'xero-node-13.2.0' };
|
|
42
42
|
this._useQuerystring = false;
|
|
43
43
|
this.binaryHeaders = {};
|
|
44
44
|
this.authentications = {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Xero Bank Feeds API
|
|
3
3
|
* The Bank Feeds API is a closed API that is only available to financial institutions that have an established financial services partnership with Xero. If you\'re an existing financial services partner that wants access, contact your local Partner Manager. If you\'re a financial institution who wants to provide bank feeds to your business customers, contact us to become a financial services partner.
|
|
4
4
|
*
|
|
5
|
-
* The version of the OpenAPI document: 9.
|
|
5
|
+
* The version of the OpenAPI document: 9.2.0
|
|
6
6
|
* Contact: api@xero.com
|
|
7
7
|
*
|
|
8
8
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Xero Bank Feeds API
|
|
4
4
|
* The Bank Feeds API is a closed API that is only available to financial institutions that have an established financial services partnership with Xero. If you\'re an existing financial services partner that wants access, contact your local Partner Manager. If you\'re a financial institution who wants to provide bank feeds to your business customers, contact us to become a financial services partner.
|
|
5
5
|
*
|
|
6
|
-
* The version of the OpenAPI document: 9.
|
|
6
|
+
* The version of the OpenAPI document: 9.2.0
|
|
7
7
|
* Contact: api@xero.com
|
|
8
8
|
*
|
|
9
9
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -38,7 +38,7 @@ var BankFeedsApiApiKeys;
|
|
|
38
38
|
class BankFeedsApi {
|
|
39
39
|
constructor(basePathOrUsername, password, basePath) {
|
|
40
40
|
this._basePath = defaultBasePath;
|
|
41
|
-
this.defaultHeaders = { 'user-agent': 'xero-node-13.
|
|
41
|
+
this.defaultHeaders = { 'user-agent': 'xero-node-13.2.0' };
|
|
42
42
|
this._useQuerystring = false;
|
|
43
43
|
this.binaryHeaders = {};
|
|
44
44
|
this.authentications = {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Xero Files API
|
|
3
3
|
* These endpoints are specific to Xero Files API
|
|
4
4
|
*
|
|
5
|
-
* The version of the OpenAPI document: 9.
|
|
5
|
+
* The version of the OpenAPI document: 9.2.0
|
|
6
6
|
* Contact: api@xero.com
|
|
7
7
|
*
|
|
8
8
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
package/dist/gen/api/filesApi.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Xero Files API
|
|
4
4
|
* These endpoints are specific to Xero Files API
|
|
5
5
|
*
|
|
6
|
-
* The version of the OpenAPI document: 9.
|
|
6
|
+
* The version of the OpenAPI document: 9.2.0
|
|
7
7
|
* Contact: api@xero.com
|
|
8
8
|
*
|
|
9
9
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -38,7 +38,7 @@ var FilesApiApiKeys;
|
|
|
38
38
|
class FilesApi {
|
|
39
39
|
constructor(basePathOrUsername, password, basePath) {
|
|
40
40
|
this._basePath = defaultBasePath;
|
|
41
|
-
this.defaultHeaders = { 'user-agent': 'xero-node-13.
|
|
41
|
+
this.defaultHeaders = { 'user-agent': 'xero-node-13.2.0' };
|
|
42
42
|
this._useQuerystring = false;
|
|
43
43
|
this.binaryHeaders = {};
|
|
44
44
|
this.authentications = {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Xero Finance API
|
|
3
3
|
* The Finance API is a collection of endpoints which customers can use in the course of a loan application, which may assist lenders to gain the confidence they need to provide capital.
|
|
4
4
|
*
|
|
5
|
-
* The version of the OpenAPI document: 9.
|
|
5
|
+
* The version of the OpenAPI document: 9.2.0
|
|
6
6
|
* Contact: api@xero.com
|
|
7
7
|
*
|
|
8
8
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Xero Finance API
|
|
4
4
|
* The Finance API is a collection of endpoints which customers can use in the course of a loan application, which may assist lenders to gain the confidence they need to provide capital.
|
|
5
5
|
*
|
|
6
|
-
* The version of the OpenAPI document: 9.
|
|
6
|
+
* The version of the OpenAPI document: 9.2.0
|
|
7
7
|
* Contact: api@xero.com
|
|
8
8
|
*
|
|
9
9
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -38,7 +38,7 @@ var FinanceApiApiKeys;
|
|
|
38
38
|
class FinanceApi {
|
|
39
39
|
constructor(basePathOrUsername, password, basePath) {
|
|
40
40
|
this._basePath = defaultBasePath;
|
|
41
|
-
this.defaultHeaders = { 'user-agent': 'xero-node-13.
|
|
41
|
+
this.defaultHeaders = { 'user-agent': 'xero-node-13.2.0' };
|
|
42
42
|
this._useQuerystring = false;
|
|
43
43
|
this.binaryHeaders = {};
|
|
44
44
|
this.authentications = {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Xero Payroll AU API
|
|
3
3
|
* This is the Xero Payroll API for orgs in Australia region.
|
|
4
4
|
*
|
|
5
|
-
* The version of the OpenAPI document: 9.
|
|
5
|
+
* The version of the OpenAPI document: 9.2.0
|
|
6
6
|
* Contact: api@xero.com
|
|
7
7
|
*
|
|
8
8
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Xero Payroll AU API
|
|
4
4
|
* This is the Xero Payroll API for orgs in Australia region.
|
|
5
5
|
*
|
|
6
|
-
* The version of the OpenAPI document: 9.
|
|
6
|
+
* The version of the OpenAPI document: 9.2.0
|
|
7
7
|
* Contact: api@xero.com
|
|
8
8
|
*
|
|
9
9
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -38,7 +38,7 @@ var PayrollAuApiApiKeys;
|
|
|
38
38
|
class PayrollAuApi {
|
|
39
39
|
constructor(basePathOrUsername, password, basePath) {
|
|
40
40
|
this._basePath = defaultBasePath;
|
|
41
|
-
this.defaultHeaders = { 'user-agent': 'xero-node-13.
|
|
41
|
+
this.defaultHeaders = { 'user-agent': 'xero-node-13.2.0' };
|
|
42
42
|
this._useQuerystring = false;
|
|
43
43
|
this.binaryHeaders = {};
|
|
44
44
|
this.authentications = {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Xero Payroll NZ
|
|
3
3
|
* This is the Xero Payroll API for orgs in the NZ region.
|
|
4
4
|
*
|
|
5
|
-
* The version of the OpenAPI document: 9.
|
|
5
|
+
* The version of the OpenAPI document: 9.2.0
|
|
6
6
|
* Contact: api@xero.com
|
|
7
7
|
*
|
|
8
8
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -1123,22 +1123,6 @@ export declare class PayrollNzApi {
|
|
|
1123
1123
|
response: AxiosResponse;
|
|
1124
1124
|
body: EmployeeTaxObject;
|
|
1125
1125
|
}>;
|
|
1126
|
-
/**
|
|
1127
|
-
*
|
|
1128
|
-
* @summary Updates a pay run
|
|
1129
|
-
* @param xeroTenantId Xero identifier for Tenant
|
|
1130
|
-
* @param payRunID Identifier for the pay run
|
|
1131
|
-
* @param payRun
|
|
1132
|
-
* @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
|
|
1133
|
-
*/
|
|
1134
|
-
updatePayRun(xeroTenantId: string, payRunID: string, payRun: PayRun, idempotencyKey?: string, options?: {
|
|
1135
|
-
headers: {
|
|
1136
|
-
[name: string]: string;
|
|
1137
|
-
};
|
|
1138
|
-
}): Promise<{
|
|
1139
|
-
response: AxiosResponse;
|
|
1140
|
-
body: PayRunObject;
|
|
1141
|
-
}>;
|
|
1142
1126
|
/**
|
|
1143
1127
|
*
|
|
1144
1128
|
* @summary Creates an employee pay slip
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Xero Payroll NZ
|
|
4
4
|
* This is the Xero Payroll API for orgs in the NZ region.
|
|
5
5
|
*
|
|
6
|
-
* The version of the OpenAPI document: 9.
|
|
6
|
+
* The version of the OpenAPI document: 9.2.0
|
|
7
7
|
* Contact: api@xero.com
|
|
8
8
|
*
|
|
9
9
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -38,7 +38,7 @@ var PayrollNzApiApiKeys;
|
|
|
38
38
|
class PayrollNzApi {
|
|
39
39
|
constructor(basePathOrUsername, password, basePath) {
|
|
40
40
|
this._basePath = defaultBasePath;
|
|
41
|
-
this.defaultHeaders = { 'user-agent': 'xero-node-13.
|
|
41
|
+
this.defaultHeaders = { 'user-agent': 'xero-node-13.2.0' };
|
|
42
42
|
this._useQuerystring = false;
|
|
43
43
|
this.binaryHeaders = {};
|
|
44
44
|
this.authentications = {
|
|
@@ -5245,85 +5245,6 @@ class PayrollNzApi {
|
|
|
5245
5245
|
});
|
|
5246
5246
|
});
|
|
5247
5247
|
}
|
|
5248
|
-
/**
|
|
5249
|
-
*
|
|
5250
|
-
* @summary Updates a pay run
|
|
5251
|
-
* @param xeroTenantId Xero identifier for Tenant
|
|
5252
|
-
* @param payRunID Identifier for the pay run
|
|
5253
|
-
* @param payRun
|
|
5254
|
-
* @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
|
|
5255
|
-
*/
|
|
5256
|
-
updatePayRun(xeroTenantId_1, payRunID_1, payRun_1, idempotencyKey_1) {
|
|
5257
|
-
return __awaiter(this, arguments, void 0, function* (xeroTenantId, payRunID, payRun, idempotencyKey, options = { headers: {} }) {
|
|
5258
|
-
const localVarPath = this.basePath + '/PayRuns/{PayRunID}'
|
|
5259
|
-
.replace('{' + 'PayRunID' + '}', encodeURIComponent(String(payRunID)));
|
|
5260
|
-
let localVarQueryParameters = {};
|
|
5261
|
-
let localVarHeaderParams = Object.assign({}, this.defaultHeaders);
|
|
5262
|
-
let localVarFormParams = {};
|
|
5263
|
-
let acceptHeadersFromSpec = [
|
|
5264
|
-
"application/json"
|
|
5265
|
-
];
|
|
5266
|
-
const isBufferType = acceptHeadersFromSpec.includes("application/pdf") || acceptHeadersFromSpec.includes("application/octet-stream") || acceptHeadersFromSpec.includes("application/jpg");
|
|
5267
|
-
const responseTypeOption = isBufferType ? "arraybuffer" : "json";
|
|
5268
|
-
// verify required parameter 'xeroTenantId' is not null or undefined
|
|
5269
|
-
if (xeroTenantId === null || xeroTenantId === undefined) {
|
|
5270
|
-
throw new Error('Required parameter xeroTenantId was null or undefined when calling updatePayRun.');
|
|
5271
|
-
}
|
|
5272
|
-
// verify required parameter 'payRunID' is not null or undefined
|
|
5273
|
-
if (payRunID === null || payRunID === undefined) {
|
|
5274
|
-
throw new Error('Required parameter payRunID was null or undefined when calling updatePayRun.');
|
|
5275
|
-
}
|
|
5276
|
-
// verify required parameter 'payRun' is not null or undefined
|
|
5277
|
-
if (payRun === null || payRun === undefined) {
|
|
5278
|
-
throw new Error('Required parameter payRun was null or undefined when calling updatePayRun.');
|
|
5279
|
-
}
|
|
5280
|
-
localVarHeaderParams['Xero-Tenant-Id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
|
|
5281
|
-
localVarHeaderParams['Idempotency-Key'] = models_1.ObjectSerializer.serialize(idempotencyKey, "string");
|
|
5282
|
-
localVarHeaderParams['Accept'] = acceptHeadersFromSpec.join();
|
|
5283
|
-
Object.assign(localVarHeaderParams, options.headers);
|
|
5284
|
-
let localVarUseFormData = false;
|
|
5285
|
-
let localVarRequestOptions = {
|
|
5286
|
-
method: 'PUT',
|
|
5287
|
-
params: localVarQueryParameters,
|
|
5288
|
-
headers: localVarHeaderParams,
|
|
5289
|
-
url: localVarPath,
|
|
5290
|
-
responseType: responseTypeOption,
|
|
5291
|
-
data: models_1.ObjectSerializer.serialize(payRun, "PayRun"),
|
|
5292
|
-
};
|
|
5293
|
-
let authenticationPromise = Promise.resolve();
|
|
5294
|
-
authenticationPromise = authenticationPromise.then(() => this.authentications.OAuth2.applyToRequest(localVarRequestOptions));
|
|
5295
|
-
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
5296
|
-
return authenticationPromise.then(() => {
|
|
5297
|
-
if (Object.keys(localVarFormParams).length) {
|
|
5298
|
-
if (localVarUseFormData) {
|
|
5299
|
-
localVarRequestOptions.data = localVarFormParams;
|
|
5300
|
-
localVarRequestOptions.headers = Object.assign(Object.assign({}, localVarRequestOptions.headers), { 'Content-Type': 'multipart/form-data' });
|
|
5301
|
-
}
|
|
5302
|
-
else {
|
|
5303
|
-
localVarRequestOptions.data = localVarFormParams;
|
|
5304
|
-
localVarRequestOptions.headers = Object.assign(Object.assign({}, localVarRequestOptions.headers), { 'content-type': 'application/x-www-form-urlencoded' });
|
|
5305
|
-
}
|
|
5306
|
-
}
|
|
5307
|
-
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
|
5308
|
-
let body = null;
|
|
5309
|
-
try {
|
|
5310
|
-
const response = yield (0, axios_1.default)(localVarRequestOptions);
|
|
5311
|
-
body = models_1.ObjectSerializer.deserialize(response.data, "PayRunObject");
|
|
5312
|
-
if (response.status && response.status >= 200 && response.status <= 299) {
|
|
5313
|
-
resolve({ response: response, body: body });
|
|
5314
|
-
}
|
|
5315
|
-
else {
|
|
5316
|
-
reject({ response: response, body: body });
|
|
5317
|
-
}
|
|
5318
|
-
}
|
|
5319
|
-
catch (error) {
|
|
5320
|
-
const errorResponse = new ApiError_1.ApiError(error);
|
|
5321
|
-
reject(JSON.stringify(errorResponse.generateError()));
|
|
5322
|
-
}
|
|
5323
|
-
}));
|
|
5324
|
-
});
|
|
5325
|
-
});
|
|
5326
|
-
}
|
|
5327
5248
|
/**
|
|
5328
5249
|
*
|
|
5329
5250
|
* @summary Creates an employee pay slip
|