-
Notifications
You must be signed in to change notification settings - Fork 162
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #685 from XeroAPI/6.0.0
Build from OAS 3.0.3
- Loading branch information
Showing
24 changed files
with
234 additions
and
65 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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: 3.0.1 | ||
* The version of the OpenAPI document: 3.0.3 | ||
* Contact: [email protected] | ||
* | ||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). | ||
|
@@ -85,7 +85,7 @@ export enum AccountingApiApiKeys { | |
|
||
export class AccountingApi { | ||
protected _basePath = defaultBasePath; | ||
protected defaultHeaders : any = {'user-agent': 'xero-node-5.1.0'}; | ||
protected defaultHeaders : any = {'user-agent': 'xero-node-6.0.0'}; | ||
protected _useQuerystring : boolean = false; | ||
protected binaryHeaders : any = {}; | ||
|
||
|
@@ -15928,15 +15928,88 @@ export class AccountingApi { | |
}); | ||
}); | ||
} | ||
/** | ||
* | ||
* @summary Retrieves a specific tax rate according to given TaxType code | ||
* @param xeroTenantId Xero identifier for Tenant | ||
* @param taxType A valid TaxType code | ||
*/ | ||
public async getTaxRateByTaxType (xeroTenantId: string, taxType: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: AxiosResponse; body: TaxRates; }> { | ||
const localVarPath = this.basePath + '/TaxRates/{TaxType}' | ||
.replace('{' + 'TaxType' + '}', encodeURIComponent(String(taxType))); | ||
let localVarQueryParameters: any = {}; | ||
let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders); | ||
let localVarFormParams: any = {}; | ||
let acceptHeadersFromSpec = [ | ||
"application/json" | ||
]; | ||
const isBufferType = acceptHeadersFromSpec.includes("application/pdf")|| acceptHeadersFromSpec.includes("application/octet-stream") || acceptHeadersFromSpec.includes("application/jpg"); | ||
const responseTypeOption = isBufferType ? "arraybuffer" : "json"; | ||
|
||
// 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 getTaxRateByTaxType.'); | ||
} | ||
|
||
// verify required parameter 'taxType' is not null or undefined | ||
if (taxType === null || taxType === undefined) { | ||
throw new Error('Required parameter taxType was null or undefined when calling getTaxRateByTaxType.'); | ||
} | ||
|
||
localVarHeaderParams['xero-tenant-id'] = ObjectSerializer.serialize(xeroTenantId, "string"); | ||
localVarHeaderParams['Accept'] = acceptHeadersFromSpec.join(); | ||
(<any>Object).assign(localVarHeaderParams, options.headers); | ||
let localVarUseFormData = false; | ||
|
||
let localVarRequestOptions: AxiosRequestConfig = { | ||
method: 'GET', | ||
params: localVarQueryParameters, | ||
headers: localVarHeaderParams, | ||
url: localVarPath, | ||
responseType: responseTypeOption, | ||
data: {}, | ||
}; | ||
|
||
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).data = localVarFormParams; | ||
localVarRequestOptions.headers = { ...localVarRequestOptions.headers, 'Content-Type': 'multipart/form-data' }; | ||
} else { | ||
localVarRequestOptions.data = localVarFormParams; | ||
localVarRequestOptions.headers = { ...localVarRequestOptions.headers, 'content-type': 'application/x-www-form-urlencoded' }; | ||
} | ||
} | ||
return new Promise<{ response: AxiosResponse; body: TaxRates; }>(async (resolve, reject) => { | ||
let body = null | ||
try { | ||
const response = await axios(localVarRequestOptions) | ||
body = ObjectSerializer.deserialize(response.data, "TaxRates"); | ||
if (response.status && response.status >= 200 && response.status <= 299) { | ||
resolve({ response: response, body: body }); | ||
} else { | ||
reject({ response: response, body: body }); | ||
} | ||
} | ||
catch(error) { | ||
const errorResponse = new ApiError(error) | ||
reject(JSON.stringify(errorResponse.generateError())) | ||
} | ||
}); | ||
}); | ||
} | ||
/** | ||
* | ||
* @summary Retrieves tax rates | ||
* @param xeroTenantId Xero identifier for Tenant | ||
* @param where Filter by an any element | ||
* @param order Order by an any element | ||
* @param taxType Filter by tax type | ||
*/ | ||
public async getTaxRates (xeroTenantId: string, where?: string, order?: string, taxType?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: AxiosResponse; body: TaxRates; }> { | ||
public async getTaxRates (xeroTenantId: string, where?: string, order?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: AxiosResponse; body: TaxRates; }> { | ||
const localVarPath = this.basePath + '/TaxRates'; | ||
let localVarQueryParameters: any = {}; | ||
let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders); | ||
|
@@ -15960,10 +16033,6 @@ export class AccountingApi { | |
localVarQueryParameters['order'] = ObjectSerializer.serialize(order, "string"); | ||
} | ||
|
||
if (taxType !== undefined) { | ||
localVarQueryParameters['TaxType'] = ObjectSerializer.serialize(taxType, "string"); | ||
} | ||
|
||
localVarHeaderParams['xero-tenant-id'] = ObjectSerializer.serialize(xeroTenantId, "string"); | ||
localVarHeaderParams['Accept'] = acceptHeadersFromSpec.join(); | ||
(<any>Object).assign(localVarHeaderParams, options.headers); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
* Xero AppStore API | ||
* These endpoints are for Xero Partners to interact with the App Store Billing platform | ||
* | ||
* The version of the OpenAPI document: 3.0.1 | ||
* The version of the OpenAPI document: 3.0.3 | ||
* Contact: [email protected] | ||
* | ||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). | ||
|
@@ -38,7 +38,7 @@ export enum AppStoreApiApiKeys { | |
|
||
export class AppStoreApi { | ||
protected _basePath = defaultBasePath; | ||
protected defaultHeaders : any = {'user-agent': 'xero-node-5.1.0'}; | ||
protected defaultHeaders : any = {'user-agent': 'xero-node-6.0.0'}; | ||
protected _useQuerystring : boolean = false; | ||
protected binaryHeaders : any = {}; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
* Xero Assets API | ||
* 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. | ||
* | ||
* The version of the OpenAPI document: 3.0.1 | ||
* The version of the OpenAPI document: 3.0.3 | ||
* Contact: [email protected] | ||
* | ||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). | ||
|
@@ -37,7 +37,7 @@ export enum AssetApiApiKeys { | |
|
||
export class AssetApi { | ||
protected _basePath = defaultBasePath; | ||
protected defaultHeaders : any = {'user-agent': 'xero-node-5.1.0'}; | ||
protected defaultHeaders : any = {'user-agent': 'xero-node-6.0.0'}; | ||
protected _useQuerystring : boolean = false; | ||
protected binaryHeaders : any = {}; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
* Xero Bank Feeds API | ||
* 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. | ||
* | ||
* The version of the OpenAPI document: 3.0.1 | ||
* The version of the OpenAPI document: 3.0.3 | ||
* Contact: [email protected] | ||
* | ||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). | ||
|
@@ -36,7 +36,7 @@ export enum BankFeedsApiApiKeys { | |
|
||
export class BankFeedsApi { | ||
protected _basePath = defaultBasePath; | ||
protected defaultHeaders : any = {'user-agent': 'xero-node-5.1.0'}; | ||
protected defaultHeaders : any = {'user-agent': 'xero-node-6.0.0'}; | ||
protected _useQuerystring : boolean = false; | ||
protected binaryHeaders : any = {}; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
* Xero Files API | ||
* These endpoints are specific to Xero Files API | ||
* | ||
* The version of the OpenAPI document: 3.0.1 | ||
* The version of the OpenAPI document: 3.0.3 | ||
* Contact: [email protected] | ||
* | ||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). | ||
|
@@ -36,7 +36,7 @@ export enum FilesApiApiKeys { | |
|
||
export class FilesApi { | ||
protected _basePath = defaultBasePath; | ||
protected defaultHeaders : any = {'user-agent': 'xero-node-5.1.0'}; | ||
protected defaultHeaders : any = {'user-agent': 'xero-node-6.0.0'}; | ||
protected _useQuerystring : boolean = false; | ||
protected binaryHeaders : any = {}; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
* Xero Finance API | ||
* 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. | ||
* | ||
* The version of the OpenAPI document: 3.0.1 | ||
* The version of the OpenAPI document: 3.0.3 | ||
* Contact: [email protected] | ||
* | ||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). | ||
|
@@ -44,7 +44,7 @@ export enum FinanceApiApiKeys { | |
|
||
export class FinanceApi { | ||
protected _basePath = defaultBasePath; | ||
protected defaultHeaders : any = {'user-agent': 'xero-node-5.1.0'}; | ||
protected defaultHeaders : any = {'user-agent': 'xero-node-6.0.0'}; | ||
protected _useQuerystring : boolean = false; | ||
protected binaryHeaders : any = {}; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
* Xero Payroll AU API | ||
* This is the Xero Payroll API for orgs in Australia region. | ||
* | ||
* The version of the OpenAPI document: 3.0.1 | ||
* The version of the OpenAPI document: 3.0.3 | ||
* Contact: [email protected] | ||
* | ||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). | ||
|
@@ -53,7 +53,7 @@ export enum PayrollAuApiApiKeys { | |
|
||
export class PayrollAuApi { | ||
protected _basePath = defaultBasePath; | ||
protected defaultHeaders : any = {'user-agent': 'xero-node-5.1.0'}; | ||
protected defaultHeaders : any = {'user-agent': 'xero-node-6.0.0'}; | ||
protected _useQuerystring : boolean = false; | ||
protected binaryHeaders : any = {}; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
* Xero Payroll NZ | ||
* This is the Xero Payroll API for orgs in the NZ region. | ||
* | ||
* The version of the OpenAPI document: 3.0.1 | ||
* The version of the OpenAPI document: 3.0.3 | ||
* Contact: [email protected] | ||
* | ||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). | ||
|
@@ -94,7 +94,7 @@ export enum PayrollNzApiApiKeys { | |
|
||
export class PayrollNzApi { | ||
protected _basePath = defaultBasePath; | ||
protected defaultHeaders : any = {'user-agent': 'xero-node-5.1.0'}; | ||
protected defaultHeaders : any = {'user-agent': 'xero-node-6.0.0'}; | ||
protected _useQuerystring : boolean = false; | ||
protected binaryHeaders : any = {}; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
* Xero Payroll UK | ||
* This is the Xero Payroll API for orgs in the UK region. | ||
* | ||
* The version of the OpenAPI document: 3.0.1 | ||
* The version of the OpenAPI document: 3.0.3 | ||
* Contact: [email protected] | ||
* | ||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). | ||
|
@@ -94,7 +94,7 @@ export enum PayrollUkApiApiKeys { | |
|
||
export class PayrollUkApi { | ||
protected _basePath = defaultBasePath; | ||
protected defaultHeaders : any = {'user-agent': 'xero-node-5.1.0'}; | ||
protected defaultHeaders : any = {'user-agent': 'xero-node-6.0.0'}; | ||
protected _useQuerystring : boolean = false; | ||
protected binaryHeaders : any = {}; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
* Xero Projects API | ||
* This is the Xero Projects API | ||
* | ||
* The version of the OpenAPI document: 3.0.1 | ||
* The version of the OpenAPI document: 3.0.3 | ||
* Contact: [email protected] | ||
* | ||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). | ||
|
@@ -44,7 +44,7 @@ export enum ProjectApiApiKeys { | |
|
||
export class ProjectApi { | ||
protected _basePath = defaultBasePath; | ||
protected defaultHeaders : any = {'user-agent': 'xero-node-5.1.0'}; | ||
protected defaultHeaders : any = {'user-agent': 'xero-node-6.0.0'}; | ||
protected _useQuerystring : boolean = false; | ||
protected binaryHeaders : any = {}; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.