xero-node 4.21.0 → 4.24.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 +77 -1
- package/dist/gen/api/accountingApi.js +337 -2
- package/dist/gen/api/accountingApi.js.map +1 -1
- 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 -1
- package/dist/gen/api/payrollNZApi.js +2 -2
- package/dist/gen/api/payrollUKApi.d.ts +1 -1
- package/dist/gen/api/payrollUKApi.js +2 -2
- package/dist/gen/api/projectApi.d.ts +1 -1
- package/dist/gen/api/projectApi.js +2 -2
- package/dist/gen/model/{files/inlineObject.d.ts → accounting/batchPaymentDelete.d.ts} +7 -6
- package/dist/gen/model/accounting/batchPaymentDelete.js +23 -0
- package/dist/gen/model/accounting/batchPaymentDelete.js.map +1 -0
- package/dist/gen/model/{files/fileResponse204.d.ts → accounting/batchPaymentDeleteByUrlParam.d.ts} +3 -3
- package/dist/gen/model/accounting/batchPaymentDeleteByUrlParam.js +18 -0
- package/dist/gen/model/accounting/batchPaymentDeleteByUrlParam.js.map +1 -0
- package/dist/gen/model/accounting/models.d.ts +2 -0
- package/dist/gen/model/accounting/models.js +12 -10
- package/dist/gen/model/accounting/models.js.map +1 -1
- package/dist/gen/model/accounting/repeatingInvoice.d.ts +17 -1
- package/dist/gen/model/accounting/repeatingInvoice.js +20 -0
- package/dist/gen/model/accounting/repeatingInvoice.js.map +1 -1
- package/dist/gen/model/appstore/models.js +6 -10
- package/dist/gen/model/appstore/models.js.map +1 -1
- package/dist/gen/model/assets/models.js +6 -10
- package/dist/gen/model/assets/models.js.map +1 -1
- package/dist/gen/model/bankfeeds/models.js +6 -10
- package/dist/gen/model/bankfeeds/models.js.map +1 -1
- package/dist/gen/model/files/models.js +6 -10
- package/dist/gen/model/files/models.js.map +1 -1
- package/dist/gen/model/finance/models.js +6 -10
- package/dist/gen/model/finance/models.js.map +1 -1
- package/dist/gen/model/payroll-au/earningsType.d.ts +3 -1
- package/dist/gen/model/payroll-au/earningsType.js +2 -0
- package/dist/gen/model/payroll-au/earningsType.js.map +1 -1
- package/dist/gen/model/payroll-au/employee.d.ts +1 -1
- package/dist/gen/model/payroll-au/leaveCategoryCode.d.ts +17 -0
- package/dist/gen/model/payroll-au/leaveCategoryCode.js +22 -0
- package/dist/gen/model/payroll-au/leaveCategoryCode.js.map +1 -0
- package/dist/gen/model/payroll-au/leaveType.d.ts +6 -0
- package/dist/gen/model/payroll-au/leaveType.js +10 -0
- package/dist/gen/model/payroll-au/leaveType.js.map +1 -1
- package/dist/gen/model/payroll-au/models.d.ts +1 -0
- package/dist/gen/model/payroll-au/models.js +9 -10
- package/dist/gen/model/payroll-au/models.js.map +1 -1
- package/dist/gen/model/payroll-au/taxDeclaration.d.ts +4 -0
- package/dist/gen/model/payroll-au/taxDeclaration.js +5 -0
- package/dist/gen/model/payroll-au/taxDeclaration.js.map +1 -1
- package/dist/gen/model/payroll-nz/models.js +6 -10
- package/dist/gen/model/payroll-nz/models.js.map +1 -1
- package/dist/gen/model/payroll-uk/models.js +6 -10
- package/dist/gen/model/payroll-uk/models.js.map +1 -1
- package/dist/gen/model/projects/models.js +6 -10
- package/dist/gen/model/projects/models.js.map +1 -1
- package/package.json +1 -1
- package/dist/gen/model/accounting/budgetLines.d.ts +0 -29
- package/dist/gen/model/accounting/budgetLines.js +0 -33
- package/dist/gen/model/accounting/budgetLines.js.map +0 -1
- package/dist/gen/model/accounting/tenNinteyNineContact.d.ts +0 -112
- package/dist/gen/model/accounting/tenNinteyNineContact.js +0 -133
- package/dist/gen/model/accounting/tenNinteyNineContact.js.map +0 -1
- package/dist/gen/model/files/fileResponse204.js +0 -18
- package/dist/gen/model/files/fileResponse204.js.map +0 -1
- package/dist/gen/model/files/inlineObject.js +0 -33
- package/dist/gen/model/files/inlineObject.js.map +0 -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: 2.
|
|
5
|
+
* The version of the OpenAPI document: 2.26.0
|
|
6
6
|
* Contact: api@xero.com
|
|
7
7
|
*
|
|
8
8
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -19,6 +19,8 @@ import { Allocations } from '../model/accounting/allocations';
|
|
|
19
19
|
import { Attachments } from '../model/accounting/attachments';
|
|
20
20
|
import { BankTransactions } from '../model/accounting/bankTransactions';
|
|
21
21
|
import { BankTransfers } from '../model/accounting/bankTransfers';
|
|
22
|
+
import { BatchPaymentDelete } from '../model/accounting/batchPaymentDelete';
|
|
23
|
+
import { BatchPaymentDeleteByUrlParam } from '../model/accounting/batchPaymentDeleteByUrlParam';
|
|
22
24
|
import { BatchPayments } from '../model/accounting/batchPayments';
|
|
23
25
|
import { BrandingThemes } from '../model/accounting/brandingThemes';
|
|
24
26
|
import { Budgets } from '../model/accounting/budgets';
|
|
@@ -873,6 +875,21 @@ export declare class AccountingApi {
|
|
|
873
875
|
response: http.IncomingMessage;
|
|
874
876
|
body: HistoryRecords;
|
|
875
877
|
}>;
|
|
878
|
+
/**
|
|
879
|
+
*
|
|
880
|
+
* @summary Creates one or more repeating invoice templates
|
|
881
|
+
* @param xeroTenantId Xero identifier for Tenant
|
|
882
|
+
* @param repeatingInvoices RepeatingInvoices with an array of repeating invoice objects in body of request
|
|
883
|
+
* @param summarizeErrors If false return 200 OK and mix of successfully created objects and any with validation errors
|
|
884
|
+
*/
|
|
885
|
+
createRepeatingInvoices(xeroTenantId: string, repeatingInvoices: RepeatingInvoices, summarizeErrors?: boolean, options?: {
|
|
886
|
+
headers: {
|
|
887
|
+
[name: string]: string;
|
|
888
|
+
};
|
|
889
|
+
}): Promise<{
|
|
890
|
+
response: http.IncomingMessage;
|
|
891
|
+
body: RepeatingInvoices;
|
|
892
|
+
}>;
|
|
876
893
|
/**
|
|
877
894
|
*
|
|
878
895
|
* @summary Creates one or more tax rates
|
|
@@ -930,6 +947,35 @@ export declare class AccountingApi {
|
|
|
930
947
|
response: http.IncomingMessage;
|
|
931
948
|
body: Accounts;
|
|
932
949
|
}>;
|
|
950
|
+
/**
|
|
951
|
+
*
|
|
952
|
+
* @summary Updates a specific batch payment for invoices and credit notes
|
|
953
|
+
* @param xeroTenantId Xero identifier for Tenant
|
|
954
|
+
* @param batchPaymentDelete
|
|
955
|
+
*/
|
|
956
|
+
deleteBatchPayment(xeroTenantId: string, batchPaymentDelete: BatchPaymentDelete, options?: {
|
|
957
|
+
headers: {
|
|
958
|
+
[name: string]: string;
|
|
959
|
+
};
|
|
960
|
+
}): Promise<{
|
|
961
|
+
response: http.IncomingMessage;
|
|
962
|
+
body: BatchPayments;
|
|
963
|
+
}>;
|
|
964
|
+
/**
|
|
965
|
+
*
|
|
966
|
+
* @summary Updates a specific batch payment for invoices and credit notes
|
|
967
|
+
* @param xeroTenantId Xero identifier for Tenant
|
|
968
|
+
* @param batchPaymentID Unique identifier for BatchPayment
|
|
969
|
+
* @param batchPaymentDeleteByUrlParam
|
|
970
|
+
*/
|
|
971
|
+
deleteBatchPaymentByUrlParam(xeroTenantId: string, batchPaymentID: string, batchPaymentDeleteByUrlParam: BatchPaymentDeleteByUrlParam, options?: {
|
|
972
|
+
headers: {
|
|
973
|
+
[name: string]: string;
|
|
974
|
+
};
|
|
975
|
+
}): Promise<{
|
|
976
|
+
response: http.IncomingMessage;
|
|
977
|
+
body: BatchPayments;
|
|
978
|
+
}>;
|
|
933
979
|
/**
|
|
934
980
|
*
|
|
935
981
|
* @summary Deletes a specific contact from a contact group using a unique contact Id
|
|
@@ -3385,6 +3431,21 @@ export declare class AccountingApi {
|
|
|
3385
3431
|
response: http.IncomingMessage;
|
|
3386
3432
|
body: Quotes;
|
|
3387
3433
|
}>;
|
|
3434
|
+
/**
|
|
3435
|
+
*
|
|
3436
|
+
* @summary Creates or deletes one or more repeating invoice templates
|
|
3437
|
+
* @param xeroTenantId Xero identifier for Tenant
|
|
3438
|
+
* @param repeatingInvoices RepeatingInvoices with an array of repeating invoice objects in body of request
|
|
3439
|
+
* @param summarizeErrors If false return 200 OK and mix of successfully created objects and any with validation errors
|
|
3440
|
+
*/
|
|
3441
|
+
updateOrCreateRepeatingInvoices(xeroTenantId: string, repeatingInvoices: RepeatingInvoices, summarizeErrors?: boolean, options?: {
|
|
3442
|
+
headers: {
|
|
3443
|
+
[name: string]: string;
|
|
3444
|
+
};
|
|
3445
|
+
}): Promise<{
|
|
3446
|
+
response: http.IncomingMessage;
|
|
3447
|
+
body: RepeatingInvoices;
|
|
3448
|
+
}>;
|
|
3388
3449
|
/**
|
|
3389
3450
|
*
|
|
3390
3451
|
* @summary Updates a specific purchase order
|
|
@@ -3479,6 +3540,21 @@ export declare class AccountingApi {
|
|
|
3479
3540
|
response: http.IncomingMessage;
|
|
3480
3541
|
body: Attachments;
|
|
3481
3542
|
}>;
|
|
3543
|
+
/**
|
|
3544
|
+
*
|
|
3545
|
+
* @summary Deletes a specific repeating invoice template
|
|
3546
|
+
* @param xeroTenantId Xero identifier for Tenant
|
|
3547
|
+
* @param repeatingInvoiceID Unique identifier for a Repeating Invoice
|
|
3548
|
+
* @param repeatingInvoices
|
|
3549
|
+
*/
|
|
3550
|
+
updateRepeatingInvoice(xeroTenantId: string, repeatingInvoiceID: string, repeatingInvoices: RepeatingInvoices, options?: {
|
|
3551
|
+
headers: {
|
|
3552
|
+
[name: string]: string;
|
|
3553
|
+
};
|
|
3554
|
+
}): Promise<{
|
|
3555
|
+
response: http.IncomingMessage;
|
|
3556
|
+
body: RepeatingInvoices;
|
|
3557
|
+
}>;
|
|
3482
3558
|
/**
|
|
3483
3559
|
*
|
|
3484
3560
|
* @summary Updates a specific attachment from a specific repeating invoices by file name
|
|
@@ -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: 2.
|
|
6
|
+
* The version of the OpenAPI document: 2.26.0
|
|
7
7
|
* Contact: api@xero.com
|
|
8
8
|
*
|
|
9
9
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -34,7 +34,7 @@ var AccountingApiApiKeys;
|
|
|
34
34
|
class AccountingApi {
|
|
35
35
|
constructor(basePathOrUsername, password, basePath) {
|
|
36
36
|
this._basePath = defaultBasePath;
|
|
37
|
-
this.defaultHeaders = { 'user-agent': 'xero-node-4.
|
|
37
|
+
this.defaultHeaders = { 'user-agent': 'xero-node-4.24.0' };
|
|
38
38
|
this._useQuerystring = false;
|
|
39
39
|
this.binaryHeaders = {};
|
|
40
40
|
this.authentications = {
|
|
@@ -3950,6 +3950,73 @@ class AccountingApi {
|
|
|
3950
3950
|
});
|
|
3951
3951
|
});
|
|
3952
3952
|
}
|
|
3953
|
+
/**
|
|
3954
|
+
*
|
|
3955
|
+
* @summary Creates one or more repeating invoice templates
|
|
3956
|
+
* @param xeroTenantId Xero identifier for Tenant
|
|
3957
|
+
* @param repeatingInvoices RepeatingInvoices with an array of repeating invoice objects in body of request
|
|
3958
|
+
* @param summarizeErrors If false return 200 OK and mix of successfully created objects and any with validation errors
|
|
3959
|
+
*/
|
|
3960
|
+
createRepeatingInvoices(xeroTenantId, repeatingInvoices, summarizeErrors, options = { headers: {} }) {
|
|
3961
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
3962
|
+
const localVarPath = this.basePath + '/RepeatingInvoices';
|
|
3963
|
+
let localVarQueryParameters = {};
|
|
3964
|
+
let localVarHeaderParams = Object.assign({}, this.defaultHeaders);
|
|
3965
|
+
let localVarFormParams = {};
|
|
3966
|
+
// verify required parameter 'xeroTenantId' is not null or undefined
|
|
3967
|
+
if (xeroTenantId === null || xeroTenantId === undefined) {
|
|
3968
|
+
throw new Error('Required parameter xeroTenantId was null or undefined when calling createRepeatingInvoices.');
|
|
3969
|
+
}
|
|
3970
|
+
// verify required parameter 'repeatingInvoices' is not null or undefined
|
|
3971
|
+
if (repeatingInvoices === null || repeatingInvoices === undefined) {
|
|
3972
|
+
throw new Error('Required parameter repeatingInvoices was null or undefined when calling createRepeatingInvoices.');
|
|
3973
|
+
}
|
|
3974
|
+
if (summarizeErrors !== undefined) {
|
|
3975
|
+
localVarQueryParameters['summarizeErrors'] = models_1.ObjectSerializer.serialize(summarizeErrors, "boolean");
|
|
3976
|
+
}
|
|
3977
|
+
localVarHeaderParams['xero-tenant-id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
|
|
3978
|
+
Object.assign(localVarHeaderParams, options.headers);
|
|
3979
|
+
let localVarUseFormData = false;
|
|
3980
|
+
let localVarRequestOptions = {
|
|
3981
|
+
method: 'PUT',
|
|
3982
|
+
qs: localVarQueryParameters,
|
|
3983
|
+
headers: localVarHeaderParams,
|
|
3984
|
+
uri: localVarPath,
|
|
3985
|
+
useQuerystring: this._useQuerystring,
|
|
3986
|
+
json: true,
|
|
3987
|
+
body: models_1.ObjectSerializer.serialize(repeatingInvoices, "RepeatingInvoices")
|
|
3988
|
+
};
|
|
3989
|
+
let authenticationPromise = Promise.resolve();
|
|
3990
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.OAuth2.applyToRequest(localVarRequestOptions));
|
|
3991
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
3992
|
+
return authenticationPromise.then(() => {
|
|
3993
|
+
if (Object.keys(localVarFormParams).length) {
|
|
3994
|
+
if (localVarUseFormData) {
|
|
3995
|
+
localVarRequestOptions.formData = localVarFormParams;
|
|
3996
|
+
}
|
|
3997
|
+
else {
|
|
3998
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
3999
|
+
}
|
|
4000
|
+
}
|
|
4001
|
+
return new Promise((resolve, reject) => {
|
|
4002
|
+
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
4003
|
+
if (error) {
|
|
4004
|
+
reject(error);
|
|
4005
|
+
}
|
|
4006
|
+
else {
|
|
4007
|
+
body = models_1.ObjectSerializer.deserialize(body, "RepeatingInvoices");
|
|
4008
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
4009
|
+
resolve({ response: response, body: body });
|
|
4010
|
+
}
|
|
4011
|
+
else {
|
|
4012
|
+
reject({ response: response, body: body });
|
|
4013
|
+
}
|
|
4014
|
+
}
|
|
4015
|
+
});
|
|
4016
|
+
});
|
|
4017
|
+
});
|
|
4018
|
+
});
|
|
4019
|
+
}
|
|
3953
4020
|
/**
|
|
3954
4021
|
*
|
|
3955
4022
|
* @summary Creates one or more tax rates
|
|
@@ -4208,6 +4275,138 @@ class AccountingApi {
|
|
|
4208
4275
|
});
|
|
4209
4276
|
});
|
|
4210
4277
|
}
|
|
4278
|
+
/**
|
|
4279
|
+
*
|
|
4280
|
+
* @summary Updates a specific batch payment for invoices and credit notes
|
|
4281
|
+
* @param xeroTenantId Xero identifier for Tenant
|
|
4282
|
+
* @param batchPaymentDelete
|
|
4283
|
+
*/
|
|
4284
|
+
deleteBatchPayment(xeroTenantId, batchPaymentDelete, options = { headers: {} }) {
|
|
4285
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
4286
|
+
const localVarPath = this.basePath + '/BatchPayments';
|
|
4287
|
+
let localVarQueryParameters = {};
|
|
4288
|
+
let localVarHeaderParams = Object.assign({}, this.defaultHeaders);
|
|
4289
|
+
let localVarFormParams = {};
|
|
4290
|
+
// verify required parameter 'xeroTenantId' is not null or undefined
|
|
4291
|
+
if (xeroTenantId === null || xeroTenantId === undefined) {
|
|
4292
|
+
throw new Error('Required parameter xeroTenantId was null or undefined when calling deleteBatchPayment.');
|
|
4293
|
+
}
|
|
4294
|
+
// verify required parameter 'batchPaymentDelete' is not null or undefined
|
|
4295
|
+
if (batchPaymentDelete === null || batchPaymentDelete === undefined) {
|
|
4296
|
+
throw new Error('Required parameter batchPaymentDelete was null or undefined when calling deleteBatchPayment.');
|
|
4297
|
+
}
|
|
4298
|
+
localVarHeaderParams['xero-tenant-id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
|
|
4299
|
+
Object.assign(localVarHeaderParams, options.headers);
|
|
4300
|
+
let localVarUseFormData = false;
|
|
4301
|
+
let localVarRequestOptions = {
|
|
4302
|
+
method: 'POST',
|
|
4303
|
+
qs: localVarQueryParameters,
|
|
4304
|
+
headers: localVarHeaderParams,
|
|
4305
|
+
uri: localVarPath,
|
|
4306
|
+
useQuerystring: this._useQuerystring,
|
|
4307
|
+
json: true,
|
|
4308
|
+
body: models_1.ObjectSerializer.serialize(batchPaymentDelete, "BatchPaymentDelete")
|
|
4309
|
+
};
|
|
4310
|
+
let authenticationPromise = Promise.resolve();
|
|
4311
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.OAuth2.applyToRequest(localVarRequestOptions));
|
|
4312
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
4313
|
+
return authenticationPromise.then(() => {
|
|
4314
|
+
if (Object.keys(localVarFormParams).length) {
|
|
4315
|
+
if (localVarUseFormData) {
|
|
4316
|
+
localVarRequestOptions.formData = localVarFormParams;
|
|
4317
|
+
}
|
|
4318
|
+
else {
|
|
4319
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
4320
|
+
}
|
|
4321
|
+
}
|
|
4322
|
+
return new Promise((resolve, reject) => {
|
|
4323
|
+
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
4324
|
+
if (error) {
|
|
4325
|
+
reject(error);
|
|
4326
|
+
}
|
|
4327
|
+
else {
|
|
4328
|
+
body = models_1.ObjectSerializer.deserialize(body, "BatchPayments");
|
|
4329
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
4330
|
+
resolve({ response: response, body: body });
|
|
4331
|
+
}
|
|
4332
|
+
else {
|
|
4333
|
+
reject({ response: response, body: body });
|
|
4334
|
+
}
|
|
4335
|
+
}
|
|
4336
|
+
});
|
|
4337
|
+
});
|
|
4338
|
+
});
|
|
4339
|
+
});
|
|
4340
|
+
}
|
|
4341
|
+
/**
|
|
4342
|
+
*
|
|
4343
|
+
* @summary Updates a specific batch payment for invoices and credit notes
|
|
4344
|
+
* @param xeroTenantId Xero identifier for Tenant
|
|
4345
|
+
* @param batchPaymentID Unique identifier for BatchPayment
|
|
4346
|
+
* @param batchPaymentDeleteByUrlParam
|
|
4347
|
+
*/
|
|
4348
|
+
deleteBatchPaymentByUrlParam(xeroTenantId, batchPaymentID, batchPaymentDeleteByUrlParam, options = { headers: {} }) {
|
|
4349
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
4350
|
+
const localVarPath = this.basePath + '/BatchPayments/{BatchPaymentID}'
|
|
4351
|
+
.replace('{' + 'BatchPaymentID' + '}', encodeURIComponent(String(batchPaymentID)));
|
|
4352
|
+
let localVarQueryParameters = {};
|
|
4353
|
+
let localVarHeaderParams = Object.assign({}, this.defaultHeaders);
|
|
4354
|
+
let localVarFormParams = {};
|
|
4355
|
+
// verify required parameter 'xeroTenantId' is not null or undefined
|
|
4356
|
+
if (xeroTenantId === null || xeroTenantId === undefined) {
|
|
4357
|
+
throw new Error('Required parameter xeroTenantId was null or undefined when calling deleteBatchPaymentByUrlParam.');
|
|
4358
|
+
}
|
|
4359
|
+
// verify required parameter 'batchPaymentID' is not null or undefined
|
|
4360
|
+
if (batchPaymentID === null || batchPaymentID === undefined) {
|
|
4361
|
+
throw new Error('Required parameter batchPaymentID was null or undefined when calling deleteBatchPaymentByUrlParam.');
|
|
4362
|
+
}
|
|
4363
|
+
// verify required parameter 'batchPaymentDeleteByUrlParam' is not null or undefined
|
|
4364
|
+
if (batchPaymentDeleteByUrlParam === null || batchPaymentDeleteByUrlParam === undefined) {
|
|
4365
|
+
throw new Error('Required parameter batchPaymentDeleteByUrlParam was null or undefined when calling deleteBatchPaymentByUrlParam.');
|
|
4366
|
+
}
|
|
4367
|
+
localVarHeaderParams['xero-tenant-id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
|
|
4368
|
+
Object.assign(localVarHeaderParams, options.headers);
|
|
4369
|
+
let localVarUseFormData = false;
|
|
4370
|
+
let localVarRequestOptions = {
|
|
4371
|
+
method: 'POST',
|
|
4372
|
+
qs: localVarQueryParameters,
|
|
4373
|
+
headers: localVarHeaderParams,
|
|
4374
|
+
uri: localVarPath,
|
|
4375
|
+
useQuerystring: this._useQuerystring,
|
|
4376
|
+
json: true,
|
|
4377
|
+
body: models_1.ObjectSerializer.serialize(batchPaymentDeleteByUrlParam, "BatchPaymentDeleteByUrlParam")
|
|
4378
|
+
};
|
|
4379
|
+
let authenticationPromise = Promise.resolve();
|
|
4380
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.OAuth2.applyToRequest(localVarRequestOptions));
|
|
4381
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
4382
|
+
return authenticationPromise.then(() => {
|
|
4383
|
+
if (Object.keys(localVarFormParams).length) {
|
|
4384
|
+
if (localVarUseFormData) {
|
|
4385
|
+
localVarRequestOptions.formData = localVarFormParams;
|
|
4386
|
+
}
|
|
4387
|
+
else {
|
|
4388
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
4389
|
+
}
|
|
4390
|
+
}
|
|
4391
|
+
return new Promise((resolve, reject) => {
|
|
4392
|
+
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
4393
|
+
if (error) {
|
|
4394
|
+
reject(error);
|
|
4395
|
+
}
|
|
4396
|
+
else {
|
|
4397
|
+
body = models_1.ObjectSerializer.deserialize(body, "BatchPayments");
|
|
4398
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
4399
|
+
resolve({ response: response, body: body });
|
|
4400
|
+
}
|
|
4401
|
+
else {
|
|
4402
|
+
reject({ response: response, body: body });
|
|
4403
|
+
}
|
|
4404
|
+
}
|
|
4405
|
+
});
|
|
4406
|
+
});
|
|
4407
|
+
});
|
|
4408
|
+
});
|
|
4409
|
+
}
|
|
4211
4410
|
/**
|
|
4212
4411
|
*
|
|
4213
4412
|
* @summary Deletes a specific contact from a contact group using a unique contact Id
|
|
@@ -15411,6 +15610,73 @@ class AccountingApi {
|
|
|
15411
15610
|
});
|
|
15412
15611
|
});
|
|
15413
15612
|
}
|
|
15613
|
+
/**
|
|
15614
|
+
*
|
|
15615
|
+
* @summary Creates or deletes one or more repeating invoice templates
|
|
15616
|
+
* @param xeroTenantId Xero identifier for Tenant
|
|
15617
|
+
* @param repeatingInvoices RepeatingInvoices with an array of repeating invoice objects in body of request
|
|
15618
|
+
* @param summarizeErrors If false return 200 OK and mix of successfully created objects and any with validation errors
|
|
15619
|
+
*/
|
|
15620
|
+
updateOrCreateRepeatingInvoices(xeroTenantId, repeatingInvoices, summarizeErrors, options = { headers: {} }) {
|
|
15621
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
15622
|
+
const localVarPath = this.basePath + '/RepeatingInvoices';
|
|
15623
|
+
let localVarQueryParameters = {};
|
|
15624
|
+
let localVarHeaderParams = Object.assign({}, this.defaultHeaders);
|
|
15625
|
+
let localVarFormParams = {};
|
|
15626
|
+
// verify required parameter 'xeroTenantId' is not null or undefined
|
|
15627
|
+
if (xeroTenantId === null || xeroTenantId === undefined) {
|
|
15628
|
+
throw new Error('Required parameter xeroTenantId was null or undefined when calling updateOrCreateRepeatingInvoices.');
|
|
15629
|
+
}
|
|
15630
|
+
// verify required parameter 'repeatingInvoices' is not null or undefined
|
|
15631
|
+
if (repeatingInvoices === null || repeatingInvoices === undefined) {
|
|
15632
|
+
throw new Error('Required parameter repeatingInvoices was null or undefined when calling updateOrCreateRepeatingInvoices.');
|
|
15633
|
+
}
|
|
15634
|
+
if (summarizeErrors !== undefined) {
|
|
15635
|
+
localVarQueryParameters['summarizeErrors'] = models_1.ObjectSerializer.serialize(summarizeErrors, "boolean");
|
|
15636
|
+
}
|
|
15637
|
+
localVarHeaderParams['xero-tenant-id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
|
|
15638
|
+
Object.assign(localVarHeaderParams, options.headers);
|
|
15639
|
+
let localVarUseFormData = false;
|
|
15640
|
+
let localVarRequestOptions = {
|
|
15641
|
+
method: 'POST',
|
|
15642
|
+
qs: localVarQueryParameters,
|
|
15643
|
+
headers: localVarHeaderParams,
|
|
15644
|
+
uri: localVarPath,
|
|
15645
|
+
useQuerystring: this._useQuerystring,
|
|
15646
|
+
json: true,
|
|
15647
|
+
body: models_1.ObjectSerializer.serialize(repeatingInvoices, "RepeatingInvoices")
|
|
15648
|
+
};
|
|
15649
|
+
let authenticationPromise = Promise.resolve();
|
|
15650
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.OAuth2.applyToRequest(localVarRequestOptions));
|
|
15651
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
15652
|
+
return authenticationPromise.then(() => {
|
|
15653
|
+
if (Object.keys(localVarFormParams).length) {
|
|
15654
|
+
if (localVarUseFormData) {
|
|
15655
|
+
localVarRequestOptions.formData = localVarFormParams;
|
|
15656
|
+
}
|
|
15657
|
+
else {
|
|
15658
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
15659
|
+
}
|
|
15660
|
+
}
|
|
15661
|
+
return new Promise((resolve, reject) => {
|
|
15662
|
+
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
15663
|
+
if (error) {
|
|
15664
|
+
reject(error);
|
|
15665
|
+
}
|
|
15666
|
+
else {
|
|
15667
|
+
body = models_1.ObjectSerializer.deserialize(body, "RepeatingInvoices");
|
|
15668
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
15669
|
+
resolve({ response: response, body: body });
|
|
15670
|
+
}
|
|
15671
|
+
else {
|
|
15672
|
+
reject({ response: response, body: body });
|
|
15673
|
+
}
|
|
15674
|
+
}
|
|
15675
|
+
});
|
|
15676
|
+
});
|
|
15677
|
+
});
|
|
15678
|
+
});
|
|
15679
|
+
}
|
|
15414
15680
|
/**
|
|
15415
15681
|
*
|
|
15416
15682
|
* @summary Updates a specific purchase order
|
|
@@ -15919,6 +16185,75 @@ class AccountingApi {
|
|
|
15919
16185
|
});
|
|
15920
16186
|
});
|
|
15921
16187
|
}
|
|
16188
|
+
/**
|
|
16189
|
+
*
|
|
16190
|
+
* @summary Deletes a specific repeating invoice template
|
|
16191
|
+
* @param xeroTenantId Xero identifier for Tenant
|
|
16192
|
+
* @param repeatingInvoiceID Unique identifier for a Repeating Invoice
|
|
16193
|
+
* @param repeatingInvoices
|
|
16194
|
+
*/
|
|
16195
|
+
updateRepeatingInvoice(xeroTenantId, repeatingInvoiceID, repeatingInvoices, options = { headers: {} }) {
|
|
16196
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
16197
|
+
const localVarPath = this.basePath + '/RepeatingInvoices/{RepeatingInvoiceID}'
|
|
16198
|
+
.replace('{' + 'RepeatingInvoiceID' + '}', encodeURIComponent(String(repeatingInvoiceID)));
|
|
16199
|
+
let localVarQueryParameters = {};
|
|
16200
|
+
let localVarHeaderParams = Object.assign({}, this.defaultHeaders);
|
|
16201
|
+
let localVarFormParams = {};
|
|
16202
|
+
// verify required parameter 'xeroTenantId' is not null or undefined
|
|
16203
|
+
if (xeroTenantId === null || xeroTenantId === undefined) {
|
|
16204
|
+
throw new Error('Required parameter xeroTenantId was null or undefined when calling updateRepeatingInvoice.');
|
|
16205
|
+
}
|
|
16206
|
+
// verify required parameter 'repeatingInvoiceID' is not null or undefined
|
|
16207
|
+
if (repeatingInvoiceID === null || repeatingInvoiceID === undefined) {
|
|
16208
|
+
throw new Error('Required parameter repeatingInvoiceID was null or undefined when calling updateRepeatingInvoice.');
|
|
16209
|
+
}
|
|
16210
|
+
// verify required parameter 'repeatingInvoices' is not null or undefined
|
|
16211
|
+
if (repeatingInvoices === null || repeatingInvoices === undefined) {
|
|
16212
|
+
throw new Error('Required parameter repeatingInvoices was null or undefined when calling updateRepeatingInvoice.');
|
|
16213
|
+
}
|
|
16214
|
+
localVarHeaderParams['xero-tenant-id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
|
|
16215
|
+
Object.assign(localVarHeaderParams, options.headers);
|
|
16216
|
+
let localVarUseFormData = false;
|
|
16217
|
+
let localVarRequestOptions = {
|
|
16218
|
+
method: 'POST',
|
|
16219
|
+
qs: localVarQueryParameters,
|
|
16220
|
+
headers: localVarHeaderParams,
|
|
16221
|
+
uri: localVarPath,
|
|
16222
|
+
useQuerystring: this._useQuerystring,
|
|
16223
|
+
json: true,
|
|
16224
|
+
body: models_1.ObjectSerializer.serialize(repeatingInvoices, "RepeatingInvoices")
|
|
16225
|
+
};
|
|
16226
|
+
let authenticationPromise = Promise.resolve();
|
|
16227
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.OAuth2.applyToRequest(localVarRequestOptions));
|
|
16228
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
16229
|
+
return authenticationPromise.then(() => {
|
|
16230
|
+
if (Object.keys(localVarFormParams).length) {
|
|
16231
|
+
if (localVarUseFormData) {
|
|
16232
|
+
localVarRequestOptions.formData = localVarFormParams;
|
|
16233
|
+
}
|
|
16234
|
+
else {
|
|
16235
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
16236
|
+
}
|
|
16237
|
+
}
|
|
16238
|
+
return new Promise((resolve, reject) => {
|
|
16239
|
+
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
16240
|
+
if (error) {
|
|
16241
|
+
reject(error);
|
|
16242
|
+
}
|
|
16243
|
+
else {
|
|
16244
|
+
body = models_1.ObjectSerializer.deserialize(body, "RepeatingInvoices");
|
|
16245
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
16246
|
+
resolve({ response: response, body: body });
|
|
16247
|
+
}
|
|
16248
|
+
else {
|
|
16249
|
+
reject({ response: response, body: body });
|
|
16250
|
+
}
|
|
16251
|
+
}
|
|
16252
|
+
});
|
|
16253
|
+
});
|
|
16254
|
+
});
|
|
16255
|
+
});
|
|
16256
|
+
}
|
|
15922
16257
|
/**
|
|
15923
16258
|
*
|
|
15924
16259
|
* @summary Updates a specific attachment from a specific repeating invoices by file name
|