Skip to content

Commit

Permalink
Merge pull request #589 from XeroAPI/xero-node-4.22.0
Browse files Browse the repository at this point in the history
generates xero-node 4.22.0 from OAS 2.24.0
  • Loading branch information
RettBehrens authored Jul 22, 2022
2 parents 47c5168 + 3f94afd commit 0e36eac
Show file tree
Hide file tree
Showing 24 changed files with 760 additions and 40 deletions.
474 changes: 472 additions & 2 deletions docs/accounting/index.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/appstore/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1142,7 +1142,7 @@
<nav id="scrollingNav">
<ul class="sidenav nav nav-list">
<li class="nav-header" data-group="AppStore"><strong>SDK: </strong><span id='sdk-name'></span></li>
<li class="nav-header" data-group="AppStore"><strong>VSN: </strong>4.21.0</li>
<li class="nav-header" data-group="AppStore"><strong>VSN: </strong>4.22.0</li>
<li class="nav-header" data-group="AppStore"><a href="#api-AppStore">Methods</a></li>
<li data-group="AppStore" data-name="getSubscription" class="">
<a href="#api-AppStore-getSubscription">getSubscription</a>
Expand Down
2 changes: 1 addition & 1 deletion docs/assets/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1393,7 +1393,7 @@
<nav id="scrollingNav">
<ul class="sidenav nav nav-list">
<li class="nav-header" data-group="Asset"><strong>SDK: </strong><span id='sdk-name'></span></li>
<li class="nav-header" data-group="Asset"><strong>VSN: </strong>4.21.0</li>
<li class="nav-header" data-group="Asset"><strong>VSN: </strong>4.22.0</li>
<li class="nav-header" data-group="Asset"><a href="#api-Asset">Methods</a></li>
<li data-group="Asset" data-name="createAsset" class="">
<a href="#api-Asset-createAsset">createAsset</a>
Expand Down
2 changes: 1 addition & 1 deletion docs/bankfeeds/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1269,7 +1269,7 @@
<nav id="scrollingNav">
<ul class="sidenav nav nav-list">
<li class="nav-header" data-group="BankFeeds"><strong>SDK: </strong><span id='sdk-name'></span></li>
<li class="nav-header" data-group="BankFeeds"><strong>VSN: </strong>4.21.0</li>
<li class="nav-header" data-group="BankFeeds"><strong>VSN: </strong>4.22.0</li>
<li class="nav-header" data-group="BankFeeds"><a href="#api-BankFeeds">Methods</a></li>
<li data-group="BankFeeds" data-name="createFeedConnections" class="">
<a href="#api-BankFeeds-createFeedConnections">createFeedConnections</a>
Expand Down
2 changes: 1 addition & 1 deletion docs/files/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1156,7 +1156,7 @@
<nav id="scrollingNav">
<ul class="sidenav nav nav-list">
<li class="nav-header" data-group="Files"><strong>SDK: </strong><span id='sdk-name'></span></li>
<li class="nav-header" data-group="Files"><strong>VSN: </strong>4.21.0</li>
<li class="nav-header" data-group="Files"><strong>VSN: </strong>4.22.0</li>
<li class="nav-header" data-group="Files"><a href="#api-Files">Methods</a></li>
<li data-group="Files" data-name="createFileAssociation" class="">
<a href="#api-Files-createFileAssociation">createFileAssociation</a>
Expand Down
2 changes: 1 addition & 1 deletion docs/finance/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2719,7 +2719,7 @@
<nav id="scrollingNav">
<ul class="sidenav nav nav-list">
<li class="nav-header" data-group="Finance"><strong>SDK: </strong><span id='sdk-name'></span></li>
<li class="nav-header" data-group="Finance"><strong>VSN: </strong>4.21.0</li>
<li class="nav-header" data-group="Finance"><strong>VSN: </strong>4.22.0</li>
<li class="nav-header" data-group="Finance"><a href="#api-Finance">Methods</a></li>
<li data-group="Finance" data-name="getAccountingActivityAccountUsage" class="">
<a href="#api-Finance-getAccountingActivityAccountUsage">getAccountingActivityAccountUsage</a>
Expand Down
4 changes: 2 additions & 2 deletions docs/payroll-au/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1245,7 +1245,7 @@
"title" : "",
"type" : "string",
"description" : "",
"enum" : [ "FIXED", "ORDINARYTIMEEARNINGS", "OVERTIMEEARNINGS", "ALLOWANCE", "LUMPSUMD", "EMPLOYMENTTERMINATIONPAYMENT", "LUMPSUMA", "LUMPSUMB", "BONUSESANDCOMMISSIONS", "LUMPSUME", "LUMPSUMW", "DIRECTORSFEES" ]
"enum" : [ "FIXED", "ORDINARYTIMEEARNINGS", "OVERTIMEEARNINGS", "ALLOWANCE", "LUMPSUMD", "EMPLOYMENTTERMINATIONPAYMENT", "LUMPSUMA", "LUMPSUMB", "BONUSESANDCOMMISSIONS", "LUMPSUME", "LUMPSUMW", "DIRECTORSFEES", "PAIDPARENTALLEAVE", "WORKERSCOMPENSATION" ]
};
defs["Employee"] = {
"title" : "",
Expand Down Expand Up @@ -3255,7 +3255,7 @@
<nav id="scrollingNav">
<ul class="sidenav nav nav-list">
<li class="nav-header" data-group="PayrollAu"><strong>SDK: </strong><span id='sdk-name'></span></li>
<li class="nav-header" data-group="PayrollAu"><strong>VSN: </strong>4.21.0</li>
<li class="nav-header" data-group="PayrollAu"><strong>VSN: </strong>4.22.0</li>
<li class="nav-header" data-group="PayrollAu"><a href="#api-PayrollAu">Methods</a></li>
<li data-group="PayrollAu" data-name="createEmployee" class="">
<a href="#api-PayrollAu-createEmployee">createEmployee</a>
Expand Down
2 changes: 1 addition & 1 deletion docs/payroll-nz/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3839,7 +3839,7 @@
<nav id="scrollingNav">
<ul class="sidenav nav nav-list">
<li class="nav-header" data-group="PayrollNz"><strong>SDK: </strong><span id='sdk-name'></span></li>
<li class="nav-header" data-group="PayrollNz"><strong>VSN: </strong>4.21.0</li>
<li class="nav-header" data-group="PayrollNz"><strong>VSN: </strong>4.22.0</li>
<li class="nav-header" data-group="PayrollNz"><a href="#api-PayrollNz">Methods</a></li>
<li data-group="PayrollNz" data-name="approveTimesheet" class="">
<a href="#api-PayrollNz-approveTimesheet">approveTimesheet</a>
Expand Down
2 changes: 1 addition & 1 deletion docs/payroll-uk/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3511,7 +3511,7 @@
<nav id="scrollingNav">
<ul class="sidenav nav nav-list">
<li class="nav-header" data-group="PayrollUk"><strong>SDK: </strong><span id='sdk-name'></span></li>
<li class="nav-header" data-group="PayrollUk"><strong>VSN: </strong>4.21.0</li>
<li class="nav-header" data-group="PayrollUk"><strong>VSN: </strong>4.22.0</li>
<li class="nav-header" data-group="PayrollUk"><a href="#api-PayrollUk">Methods</a></li>
<li data-group="PayrollUk" data-name="approveTimesheet" class="">
<a href="#api-PayrollUk-approveTimesheet">approveTimesheet</a>
Expand Down
2 changes: 1 addition & 1 deletion docs/projects/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1463,7 +1463,7 @@
<nav id="scrollingNav">
<ul class="sidenav nav nav-list">
<li class="nav-header" data-group="Project"><strong>SDK: </strong><span id='sdk-name'></span></li>
<li class="nav-header" data-group="Project"><strong>VSN: </strong>4.21.0</li>
<li class="nav-header" data-group="Project"><strong>VSN: </strong>4.22.0</li>
<li class="nav-header" data-group="Project"><a href="#api-Project">Methods</a></li>
<li data-group="Project" data-name="createProject" class="">
<a href="#api-Project-createProject">createProject</a>
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "xero-node",
"version": "4.21.0",
"version": "4.22.0",
"description": "Xero NodeJS OAuth 2.0 client for xero-node",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand All @@ -19,12 +19,12 @@
"@types/node": "^12.12.21",
"@types/request": "^2.48.4",
"jest": "^24.9.0",
"nock": "^12.0.1",
"open": "^6.4.0",
"prompt": "^1.0.0",
"sinon": "^9.0.0",
"ts-jest": "^24.3.0",
"typescript": "^3.8.2",
"nock": "^12.0.1",
"sinon": "^9.0.0"
"typescript": "^3.8.2"
},
"dependencies": {
"openid-client": "^4.9.1",
Expand Down
216 changes: 214 additions & 2 deletions src/gen/api/accountingApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Xero Accounting API
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 2.23.0
* The version of the OpenAPI document: 2.24.0
* Contact: api@xero.com
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
Expand Down Expand Up @@ -81,7 +81,7 @@ export enum AccountingApiApiKeys {

export class AccountingApi {
protected _basePath = defaultBasePath;
protected defaultHeaders : any = {'user-agent': 'xero-node-4.21.0'};
protected defaultHeaders : any = {'user-agent': 'xero-node-4.22.0'};
protected _useQuerystring : boolean = false;
protected binaryHeaders : any = {};

Expand Down Expand Up @@ -4153,6 +4153,76 @@ export class AccountingApi {
});
});
}
/**
*
* @summary Creates one or more repeating invoice templates
* @param xeroTenantId Xero identifier for Tenant
* @param repeatingInvoices RepeatingInvoices with an array of repeating invoice objects in body of request
* @param summarizeErrors If false return 200 OK and mix of successfully created objects and any with validation errors
*/
public async createRepeatingInvoices (xeroTenantId: string, repeatingInvoices: RepeatingInvoices, summarizeErrors?: boolean, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: RepeatingInvoices; }> {
const localVarPath = this.basePath + '/RepeatingInvoices';
let localVarQueryParameters: any = {};
let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
let localVarFormParams: any = {};

// verify required parameter 'xeroTenantId' is not null or undefined
if (xeroTenantId === null || xeroTenantId === undefined) {
throw new Error('Required parameter xeroTenantId was null or undefined when calling createRepeatingInvoices.');
}

// verify required parameter 'repeatingInvoices' is not null or undefined
if (repeatingInvoices === null || repeatingInvoices === undefined) {
throw new Error('Required parameter repeatingInvoices was null or undefined when calling createRepeatingInvoices.');
}

if (summarizeErrors !== undefined) {
localVarQueryParameters['summarizeErrors'] = ObjectSerializer.serialize(summarizeErrors, "boolean");
}

localVarHeaderParams['xero-tenant-id'] = ObjectSerializer.serialize(xeroTenantId, "string");

(<any>Object).assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;

let localVarRequestOptions: localVarRequest.Options = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: ObjectSerializer.serialize(repeatingInvoices, "RepeatingInvoices")
};

let authenticationPromise = Promise.resolve();
authenticationPromise = authenticationPromise.then(() => this.authentications.OAuth2.applyToRequest(localVarRequestOptions));

authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
return authenticationPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
(<any>localVarRequestOptions).formData = localVarFormParams;
} else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise<{ response: http.IncomingMessage; body: RepeatingInvoices; }>((resolve, reject) => {
localVarRequest(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
} else {
body = ObjectSerializer.deserialize(body, "RepeatingInvoices");
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
resolve({ response: response, body: body });
} else {
reject({ response: response, body: body });
}
}
});
});
});
}
/**
*
* @summary Creates one or more tax rates
Expand Down Expand Up @@ -16111,6 +16181,76 @@ export class AccountingApi {
});
});
}
/**
*
* @summary Creates or deletes one or more repeating invoice templates
* @param xeroTenantId Xero identifier for Tenant
* @param repeatingInvoices RepeatingInvoices with an array of repeating invoice objects in body of request
* @param summarizeErrors If false return 200 OK and mix of successfully created objects and any with validation errors
*/
public async updateOrCreateRepeatingInvoices (xeroTenantId: string, repeatingInvoices: RepeatingInvoices, summarizeErrors?: boolean, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: RepeatingInvoices; }> {
const localVarPath = this.basePath + '/RepeatingInvoices';
let localVarQueryParameters: any = {};
let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
let localVarFormParams: any = {};

// verify required parameter 'xeroTenantId' is not null or undefined
if (xeroTenantId === null || xeroTenantId === undefined) {
throw new Error('Required parameter xeroTenantId was null or undefined when calling updateOrCreateRepeatingInvoices.');
}

// verify required parameter 'repeatingInvoices' is not null or undefined
if (repeatingInvoices === null || repeatingInvoices === undefined) {
throw new Error('Required parameter repeatingInvoices was null or undefined when calling updateOrCreateRepeatingInvoices.');
}

if (summarizeErrors !== undefined) {
localVarQueryParameters['summarizeErrors'] = ObjectSerializer.serialize(summarizeErrors, "boolean");
}

localVarHeaderParams['xero-tenant-id'] = ObjectSerializer.serialize(xeroTenantId, "string");

(<any>Object).assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;

let localVarRequestOptions: localVarRequest.Options = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: ObjectSerializer.serialize(repeatingInvoices, "RepeatingInvoices")
};

let authenticationPromise = Promise.resolve();
authenticationPromise = authenticationPromise.then(() => this.authentications.OAuth2.applyToRequest(localVarRequestOptions));

authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
return authenticationPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
(<any>localVarRequestOptions).formData = localVarFormParams;
} else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise<{ response: http.IncomingMessage; body: RepeatingInvoices; }>((resolve, reject) => {
localVarRequest(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
} else {
body = ObjectSerializer.deserialize(body, "RepeatingInvoices");
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
resolve({ response: response, body: body });
} else {
reject({ response: response, body: body });
}
}
});
});
});
}
/**
*
* @summary Updates a specific purchase order
Expand Down Expand Up @@ -16635,6 +16775,78 @@ export class AccountingApi {
});
});
}
/**
*
* @summary Deletes a specific repeating invoice template
* @param xeroTenantId Xero identifier for Tenant
* @param repeatingInvoiceID Unique identifier for a Repeating Invoice
* @param repeatingInvoices
*/
public async updateRepeatingInvoice (xeroTenantId: string, repeatingInvoiceID: string, repeatingInvoices: RepeatingInvoices, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: RepeatingInvoices; }> {
const localVarPath = this.basePath + '/RepeatingInvoices/{RepeatingInvoiceID}'
.replace('{' + 'RepeatingInvoiceID' + '}', encodeURIComponent(String(repeatingInvoiceID)));
let localVarQueryParameters: any = {};
let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
let localVarFormParams: any = {};

// verify required parameter 'xeroTenantId' is not null or undefined
if (xeroTenantId === null || xeroTenantId === undefined) {
throw new Error('Required parameter xeroTenantId was null or undefined when calling updateRepeatingInvoice.');
}

// verify required parameter 'repeatingInvoiceID' is not null or undefined
if (repeatingInvoiceID === null || repeatingInvoiceID === undefined) {
throw new Error('Required parameter repeatingInvoiceID was null or undefined when calling updateRepeatingInvoice.');
}

// verify required parameter 'repeatingInvoices' is not null or undefined
if (repeatingInvoices === null || repeatingInvoices === undefined) {
throw new Error('Required parameter repeatingInvoices was null or undefined when calling updateRepeatingInvoice.');
}

localVarHeaderParams['xero-tenant-id'] = ObjectSerializer.serialize(xeroTenantId, "string");

(<any>Object).assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;

let localVarRequestOptions: localVarRequest.Options = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: ObjectSerializer.serialize(repeatingInvoices, "RepeatingInvoices")
};

let authenticationPromise = Promise.resolve();
authenticationPromise = authenticationPromise.then(() => this.authentications.OAuth2.applyToRequest(localVarRequestOptions));

authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
return authenticationPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
(<any>localVarRequestOptions).formData = localVarFormParams;
} else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise<{ response: http.IncomingMessage; body: RepeatingInvoices; }>((resolve, reject) => {
localVarRequest(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
} else {
body = ObjectSerializer.deserialize(body, "RepeatingInvoices");
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
resolve({ response: response, body: body });
} else {
reject({ response: response, body: body });
}
}
});
});
});
}
/**
*
* @summary Updates a specific attachment from a specific repeating invoices by file name
Expand Down
Loading

0 comments on commit 0e36eac

Please sign in to comment.