Created
November 26, 2019 13:54
-
-
Save jfreyre/c4133ee34c0e7cf9b75ffd44cad8ad6c to your computer and use it in GitHub Desktop.
This file contains hidden or 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
/* tslint:disable */ | |
/* eslint-disable */ | |
//---------------------- | |
// <auto-generated> | |
// Generated using the NSwag toolchain v13.1.6.0 (NJsonSchema v10.0.28.0 (Newtonsoft.Json v9.0.0.0)) (http://NSwag.org) | |
// </auto-generated> | |
//---------------------- | |
// ReSharper disable InconsistentNaming | |
export class Client { | |
private http: { fetch(url: RequestInfo, init?: RequestInit): Promise<Response> }; | |
private baseUrl: string; | |
protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined; | |
constructor(baseUrl?: string, http?: { fetch(url: RequestInfo, init?: RequestInit): Promise<Response> }) { | |
this.http = http ? http : <any>window; | |
this.baseUrl = baseUrl ? baseUrl : "msvc-partenaire-dev.vaudoise.ch:35361/v5"; | |
} | |
/** | |
* getHealthStatus | |
* @param accept_Language (optional) Language | |
* @return OK | |
*/ | |
getHealthStatusUsingGET(accept_Language: AcceptLanguage | null | undefined): Promise<HealthDto> { | |
let url_ = this.baseUrl + "/actuator/health"; | |
url_ = url_.replace(/[?&]$/, ""); | |
let options_ = <RequestInit>{ | |
method: "GET", | |
headers: { | |
"Accept-Language": accept_Language !== undefined && accept_Language !== null ? "" + accept_Language : "", | |
"Accept": "*/*" | |
} | |
}; | |
return this.http.fetch(url_, options_).then((_response: Response) => { | |
return this.processGetHealthStatusUsingGET(_response); | |
}); | |
} | |
protected processGetHealthStatusUsingGET(response: Response): Promise<HealthDto> { | |
const status = response.status; | |
let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); }; | |
if (status === 200) { | |
return response.text().then((_responseText) => { | |
let result200: any = null; | |
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver); | |
result200 = HealthDto.fromJS(resultData200); | |
return result200; | |
}); | |
} else if (status !== 200 && status !== 204) { | |
return response.text().then((_responseText) => { | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
}); | |
} | |
return Promise.resolve<HealthDto>(<any>null); | |
} | |
/** | |
* getInfo | |
* @param accept_Language (optional) Language | |
* @return OK | |
*/ | |
getInfoUsingGET(accept_Language: AcceptLanguage2 | null | undefined): Promise<InfoDto> { | |
let url_ = this.baseUrl + "/actuator/info"; | |
url_ = url_.replace(/[?&]$/, ""); | |
let options_ = <RequestInit>{ | |
method: "GET", | |
headers: { | |
"Accept-Language": accept_Language !== undefined && accept_Language !== null ? "" + accept_Language : "", | |
"Accept": "application/json;charset=UTF-8" | |
} | |
}; | |
return this.http.fetch(url_, options_).then((_response: Response) => { | |
return this.processGetInfoUsingGET(_response); | |
}); | |
} | |
protected processGetInfoUsingGET(response: Response): Promise<InfoDto> { | |
const status = response.status; | |
let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); }; | |
if (status === 200) { | |
return response.text().then((_responseText) => { | |
let result200: any = null; | |
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver); | |
result200 = InfoDto.fromJS(resultData200); | |
return result200; | |
}); | |
} else if (status !== 200 && status !== 204) { | |
return response.text().then((_responseText) => { | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
}); | |
} | |
return Promise.resolve<InfoDto>(<any>null); | |
} | |
/** | |
* getMetrics | |
* @param accept_Language (optional) Language | |
* @return OK | |
*/ | |
getMetricsUsingGET(accept_Language: AcceptLanguage3 | null | undefined): Promise<MetricsDto> { | |
let url_ = this.baseUrl + "/actuator/metrics"; | |
url_ = url_.replace(/[?&]$/, ""); | |
let options_ = <RequestInit>{ | |
method: "GET", | |
headers: { | |
"Accept-Language": accept_Language !== undefined && accept_Language !== null ? "" + accept_Language : "", | |
"Accept": "application/json;charset=UTF-8" | |
} | |
}; | |
return this.http.fetch(url_, options_).then((_response: Response) => { | |
return this.processGetMetricsUsingGET(_response); | |
}); | |
} | |
protected processGetMetricsUsingGET(response: Response): Promise<MetricsDto> { | |
const status = response.status; | |
let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); }; | |
if (status === 200) { | |
return response.text().then((_responseText) => { | |
let result200: any = null; | |
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver); | |
result200 = MetricsDto.fromJS(resultData200); | |
return result200; | |
}); | |
} else if (status !== 200 && status !== 204) { | |
return response.text().then((_responseText) => { | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
}); | |
} | |
return Promise.resolve<MetricsDto>(<any>null); | |
} | |
/** | |
* Retrieve the list of categories of leisures | |
* @param accept_Language (optional) Language | |
* @return The list of categories has been returned | |
*/ | |
listCategoriesUsingGET(accept_Language: AcceptLanguage4 | null | undefined): Promise<LeisureCategory[]> { | |
let url_ = this.baseUrl + "/leisure-categories"; | |
url_ = url_.replace(/[?&]$/, ""); | |
let options_ = <RequestInit>{ | |
method: "GET", | |
headers: { | |
"Accept-Language": accept_Language !== undefined && accept_Language !== null ? "" + accept_Language : "", | |
"Accept": "*/*" | |
} | |
}; | |
return this.http.fetch(url_, options_).then((_response: Response) => { | |
return this.processListCategoriesUsingGET(_response); | |
}); | |
} | |
protected processListCategoriesUsingGET(response: Response): Promise<LeisureCategory[]> { | |
const status = response.status; | |
let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); }; | |
if (status === 200) { | |
return response.text().then((_responseText) => { | |
let result200: any = null; | |
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver); | |
if (Array.isArray(resultData200)) { | |
result200 = [] as any; | |
for (let item of resultData200) | |
result200!.push(LeisureCategory.fromJS(item)); | |
} | |
return result200; | |
}); | |
} else if (status !== 200 && status !== 204) { | |
return response.text().then((_responseText) => { | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
}); | |
} | |
return Promise.resolve<LeisureCategory[]>(<any>null); | |
} | |
/** | |
* Retrieve the list of leisures | |
* @param accept_Language (optional) Language | |
* @return The list of leisures has been returned | |
*/ | |
listUsingGET(accept_Language: AcceptLanguage5 | null | undefined): Promise<Leisure[]> { | |
let url_ = this.baseUrl + "/leisures"; | |
url_ = url_.replace(/[?&]$/, ""); | |
let options_ = <RequestInit>{ | |
method: "GET", | |
headers: { | |
"Accept-Language": accept_Language !== undefined && accept_Language !== null ? "" + accept_Language : "", | |
"Accept": "*/*" | |
} | |
}; | |
return this.http.fetch(url_, options_).then((_response: Response) => { | |
return this.processListUsingGET(_response); | |
}); | |
} | |
protected processListUsingGET(response: Response): Promise<Leisure[]> { | |
const status = response.status; | |
let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); }; | |
if (status === 200) { | |
return response.text().then((_responseText) => { | |
let result200: any = null; | |
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver); | |
if (Array.isArray(resultData200)) { | |
result200 = [] as any; | |
for (let item of resultData200) | |
result200!.push(Leisure.fromJS(item)); | |
} | |
return result200; | |
}); | |
} else if (status !== 200 && status !== 204) { | |
return response.text().then((_responseText) => { | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
}); | |
} | |
return Promise.resolve<Leisure[]>(<any>null); | |
} | |
/** | |
* Retrieve the list of partners | |
* @param page (optional) Page number. Starting from 0 | |
* @param size (optional) Page size. By default 20 | |
* @param accept_Language (optional) Language | |
* @param birthDate (optional) Birth date in format YYYY-MM-DD - Only for people. Beware that search by birth date only can result in bad response time. Example: 1980-02-20 | |
* @param city (optional) Swiss city (official city name in 20 characters, examples : 'Bern', 'Zürich', 'Genève', 'Villars-sur-Ollon', 'Aeugst am Albis') Tolerates fuzzy search like 'Zurich', 'Villars', 'Geneve', 'AEUGST'. - Searches on all addresses, not just the principal address | |
* @param email (optional) E-mail | |
* @param firstName (optional) First name of the partner. Use "\*" as wildcard. Example: Johann,\*o\*ann | |
* @param iban (optional) Iban | |
* @param isnPers (optional) IsnPers | |
* @param name (optional) Last name, Company name or couple name. Use "\*" as wildcard. Example: Pache,Pa\*che | |
* @param partnerTypes (optional) List of Partner types in camel case. Example: person | |
* @param petName (optional) Name of the pet owned by the partner. Use "\*" as wildcard. Example: Can\*el\*e, , to search for a pet with name like 'Cannelle' or 'Canelle' or 'Canele' or 'Canelle' | |
* @param phoneNumber (optional) phoneNumber | |
* @param policyHolderId (optional) List of policy holder ids | |
* @param postCode (optional) Swiss post code - Searches on all addresses, not just the principal address | |
* @param sort (optional) Sorting criteria in the format: property(,asc|desc). Default sort order is ascending. Multiple sort criteria are supported (on separate lines). Possible sort attributes are : policyHolderId | firstName | lastName | companyName | coupleName | birthDate | address.postCode | address.city | |
* @return The list of partners found | |
*/ | |
searchPartnersUsingGET(page: number | null | undefined, size: number | null | undefined, accept_Language: AcceptLanguage6 | null | undefined, birthDate: string | null | undefined, city: string | null | undefined, email: string | null | undefined, firstName: string | null | undefined, iban: string | null | undefined, isnPers: number | null | undefined, name: string | null | undefined, partnerTypes: PartnerTypes | null | undefined, petName: string | null | undefined, phoneNumber: string | null | undefined, policyHolderId: number[] | null | undefined, postCode: string | null | undefined, sort: string[] | null | undefined): Promise<Partner[]> { | |
let url_ = this.baseUrl + "/partners?"; | |
if (page !== undefined) | |
url_ += "$page=" + encodeURIComponent("" + page) + "&"; | |
if (size !== undefined) | |
url_ += "$size=" + encodeURIComponent("" + size) + "&"; | |
if (birthDate !== undefined) | |
url_ += "birthDate=" + encodeURIComponent("" + birthDate) + "&"; | |
if (city !== undefined) | |
url_ += "city=" + encodeURIComponent("" + city) + "&"; | |
if (email !== undefined) | |
url_ += "email=" + encodeURIComponent("" + email) + "&"; | |
if (firstName !== undefined) | |
url_ += "firstName=" + encodeURIComponent("" + firstName) + "&"; | |
if (iban !== undefined) | |
url_ += "iban=" + encodeURIComponent("" + iban) + "&"; | |
if (isnPers !== undefined) | |
url_ += "isnPers=" + encodeURIComponent("" + isnPers) + "&"; | |
if (name !== undefined) | |
url_ += "name=" + encodeURIComponent("" + name) + "&"; | |
if (partnerTypes !== undefined) | |
partnerTypes && partnerTypes.forEach(item => { url_ += "partnerTypes=" + encodeURIComponent("" + item) + "&"; }); | |
if (petName !== undefined) | |
url_ += "petName=" + encodeURIComponent("" + petName) + "&"; | |
if (phoneNumber !== undefined) | |
url_ += "phoneNumber=" + encodeURIComponent("" + phoneNumber) + "&"; | |
if (policyHolderId !== undefined) | |
policyHolderId && policyHolderId.forEach(item => { url_ += "policyHolderId=" + encodeURIComponent("" + item) + "&"; }); | |
if (postCode !== undefined) | |
url_ += "postCode=" + encodeURIComponent("" + postCode) + "&"; | |
if (sort !== undefined) | |
sort && sort.forEach(item => { url_ += "sort=" + encodeURIComponent("" + item) + "&"; }); | |
url_ = url_.replace(/[?&]$/, ""); | |
let options_ = <RequestInit>{ | |
method: "GET", | |
headers: { | |
"Accept-Language": accept_Language !== undefined && accept_Language !== null ? "" + accept_Language : "", | |
"Accept": "*/*" | |
} | |
}; | |
return this.http.fetch(url_, options_).then((_response: Response) => { | |
return this.processSearchPartnersUsingGET(_response); | |
}); | |
} | |
protected processSearchPartnersUsingGET(response: Response): Promise<Partner[]> { | |
const status = response.status; | |
let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); }; | |
if (status === 200) { | |
return response.text().then((_responseText) => { | |
let result200: any = null; | |
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver); | |
if (Array.isArray(resultData200)) { | |
result200 = [] as any; | |
for (let item of resultData200) | |
result200!.push(Partner.fromJS(item)); | |
} | |
return result200; | |
}); | |
} else if (status === 206) { | |
return response.text().then((_responseText) => { | |
let result206: any = null; | |
let resultData206 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver); | |
if (Array.isArray(resultData206)) { | |
result206 = [] as any; | |
for (let item of resultData206) | |
result206!.push(Partner.fromJS(item)); | |
} | |
return result206; | |
}); | |
} else if (status === 400) { | |
return response.text().then((_responseText) => { | |
let result400: any = null; | |
let resultData400 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver); | |
result400 = ValidationResponse.fromJS(resultData400); | |
return throwException("Invalid parameter", status, _responseText, _headers, result400); | |
}); | |
} else if (status === 416) { | |
return response.text().then((_responseText) => { | |
return throwException("Paginated Out of Range response", status, _responseText, _headers); | |
}); | |
} else if (status !== 200 && status !== 204) { | |
return response.text().then((_responseText) => { | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
}); | |
} | |
return Promise.resolve<Partner[]>(<any>null); | |
} | |
/** | |
* Retrieve a partner for a given policy holder id | |
* @param accept_Language (optional) Language | |
* @param policyHolderId policyHolderId | |
* @return The partner has been returned | |
*/ | |
getPartnerUsingGET(accept_Language: AcceptLanguage7 | null | undefined, policyHolderId: number): Promise<Partner> { | |
let url_ = this.baseUrl + "/partners/{policyHolderId}"; | |
if (policyHolderId === undefined || policyHolderId === null) | |
throw new Error("The parameter 'policyHolderId' must be defined."); | |
url_ = url_.replace("{policyHolderId}", encodeURIComponent("" + policyHolderId)); | |
url_ = url_.replace(/[?&]$/, ""); | |
let options_ = <RequestInit>{ | |
method: "GET", | |
headers: { | |
"Accept-Language": accept_Language !== undefined && accept_Language !== null ? "" + accept_Language : "", | |
"Accept": "application/json" | |
} | |
}; | |
return this.http.fetch(url_, options_).then((_response: Response) => { | |
return this.processGetPartnerUsingGET(_response); | |
}); | |
} | |
protected processGetPartnerUsingGET(response: Response): Promise<Partner> { | |
const status = response.status; | |
let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); }; | |
if (status === 200) { | |
return response.text().then((_responseText) => { | |
let result200: any = null; | |
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver); | |
result200 = Partner.fromJS(resultData200); | |
return result200; | |
}); | |
} else if (status === 400) { | |
return response.text().then((_responseText) => { | |
let result400: any = null; | |
let resultData400 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver); | |
result400 = ValidationResponse.fromJS(resultData400); | |
return throwException("Invalid parameter", status, _responseText, _headers, result400); | |
}); | |
} else if (status === 404) { | |
return response.text().then((_responseText) => { | |
let result404: any = null; | |
let resultData404 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver); | |
result404 = ErrorResponse.fromJS(resultData404); | |
return throwException("The partner has not been found", status, _responseText, _headers, result404); | |
}); | |
} else if (status !== 200 && status !== 204) { | |
return response.text().then((_responseText) => { | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
}); | |
} | |
return Promise.resolve<Partner>(<any>null); | |
} | |
/** | |
* Retrieve the list of addresses for a given partner | |
* @param accept_Language (optional) Language | |
* @param policyHolderId policyHolderId | |
* @return The list of addresses has been returned | |
*/ | |
getPartnerAddressesUsingGET(accept_Language: AcceptLanguage8 | null | undefined, policyHolderId: number): Promise<PartnerAddress[]> { | |
let url_ = this.baseUrl + "/partners/{policyHolderId}/addresses"; | |
if (policyHolderId === undefined || policyHolderId === null) | |
throw new Error("The parameter 'policyHolderId' must be defined."); | |
url_ = url_.replace("{policyHolderId}", encodeURIComponent("" + policyHolderId)); | |
url_ = url_.replace(/[?&]$/, ""); | |
let options_ = <RequestInit>{ | |
method: "GET", | |
headers: { | |
"Accept-Language": accept_Language !== undefined && accept_Language !== null ? "" + accept_Language : "", | |
"Accept": "application/json" | |
} | |
}; | |
return this.http.fetch(url_, options_).then((_response: Response) => { | |
return this.processGetPartnerAddressesUsingGET(_response); | |
}); | |
} | |
protected processGetPartnerAddressesUsingGET(response: Response): Promise<PartnerAddress[]> { | |
const status = response.status; | |
let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); }; | |
if (status === 200) { | |
return response.text().then((_responseText) => { | |
let result200: any = null; | |
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver); | |
if (Array.isArray(resultData200)) { | |
result200 = [] as any; | |
for (let item of resultData200) | |
result200!.push(PartnerAddress.fromJS(item)); | |
} | |
return result200; | |
}); | |
} else if (status === 400) { | |
return response.text().then((_responseText) => { | |
let result400: any = null; | |
let resultData400 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver); | |
result400 = ValidationResponse.fromJS(resultData400); | |
return throwException("Invalid parameter", status, _responseText, _headers, result400); | |
}); | |
} else if (status === 404) { | |
return response.text().then((_responseText) => { | |
let result404: any = null; | |
let resultData404 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver); | |
result404 = ErrorResponse.fromJS(resultData404); | |
return throwException("The policy holder has not been found", status, _responseText, _headers, result404); | |
}); | |
} else if (status !== 200 && status !== 204) { | |
return response.text().then((_responseText) => { | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
}); | |
} | |
return Promise.resolve<PartnerAddress[]>(<any>null); | |
} | |
/** | |
* Retrieve the bank accounts for a given policy holder id | |
* @param accept_Language (optional) Language | |
* @param policyHolderId policyHolderId | |
* @return The bank accounts of the partner have been returned | |
*/ | |
getBankAccountsUsingGET(accept_Language: AcceptLanguage9 | null | undefined, policyHolderId: number): Promise<BankingInformationDto[]> { | |
let url_ = this.baseUrl + "/partners/{policyHolderId}/bank-accounts"; | |
if (policyHolderId === undefined || policyHolderId === null) | |
throw new Error("The parameter 'policyHolderId' must be defined."); | |
url_ = url_.replace("{policyHolderId}", encodeURIComponent("" + policyHolderId)); | |
url_ = url_.replace(/[?&]$/, ""); | |
let options_ = <RequestInit>{ | |
method: "GET", | |
headers: { | |
"Accept-Language": accept_Language !== undefined && accept_Language !== null ? "" + accept_Language : "", | |
"Accept": "*/*" | |
} | |
}; | |
return this.http.fetch(url_, options_).then((_response: Response) => { | |
return this.processGetBankAccountsUsingGET(_response); | |
}); | |
} | |
protected processGetBankAccountsUsingGET(response: Response): Promise<BankingInformationDto[]> { | |
const status = response.status; | |
let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); }; | |
if (status === 200) { | |
return response.text().then((_responseText) => { | |
let result200: any = null; | |
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver); | |
if (Array.isArray(resultData200)) { | |
result200 = [] as any; | |
for (let item of resultData200) | |
result200!.push(BankingInformationDto.fromJS(item)); | |
} | |
return result200; | |
}); | |
} else if (status === 400) { | |
return response.text().then((_responseText) => { | |
let result400: any = null; | |
let resultData400 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver); | |
result400 = ValidationResponse.fromJS(resultData400); | |
return throwException("Invalid parameter", status, _responseText, _headers, result400); | |
}); | |
} else if (status === 404) { | |
return response.text().then((_responseText) => { | |
let result404: any = null; | |
let resultData404 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver); | |
result404 = ErrorResponse.fromJS(resultData404); | |
return throwException("The policy holder has not been found", status, _responseText, _headers, result404); | |
}); | |
} else if (status !== 200 && status !== 204) { | |
return response.text().then((_responseText) => { | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
}); | |
} | |
return Promise.resolve<BankingInformationDto[]>(<any>null); | |
} | |
/** | |
* Retrieve the comment for a given policy holder id | |
* @param accept_Language (optional) Language | |
* @param effectiveDate (optional) Effective date of the comment, in format = YYYY-MM-DD, example = 2018-03-16 | |
* @param policyHolderId policyHolderId | |
* @return The comment for the partner has been returned | |
*/ | |
getCommentUsingGET(accept_Language: AcceptLanguage10 | null | undefined, effectiveDate: string | null | undefined, policyHolderId: number): Promise<string> { | |
let url_ = this.baseUrl + "/partners/{policyHolderId}/comment?"; | |
if (policyHolderId === undefined || policyHolderId === null) | |
throw new Error("The parameter 'policyHolderId' must be defined."); | |
url_ = url_.replace("{policyHolderId}", encodeURIComponent("" + policyHolderId)); | |
if (effectiveDate !== undefined) | |
url_ += "effectiveDate=" + encodeURIComponent("" + effectiveDate) + "&"; | |
url_ = url_.replace(/[?&]$/, ""); | |
let options_ = <RequestInit>{ | |
method: "GET", | |
headers: { | |
"Accept-Language": accept_Language !== undefined && accept_Language !== null ? "" + accept_Language : "", | |
"Accept": "*/*" | |
} | |
}; | |
return this.http.fetch(url_, options_).then((_response: Response) => { | |
return this.processGetCommentUsingGET(_response); | |
}); | |
} | |
protected processGetCommentUsingGET(response: Response): Promise<string> { | |
const status = response.status; | |
let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); }; | |
if (status === 200) { | |
return response.text().then((_responseText) => { | |
let result200: any = null; | |
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver); | |
result200 = resultData200 !== undefined ? resultData200 : <any>null; | |
return result200; | |
}); | |
} else if (status === 204) { | |
return response.text().then((_responseText) => { | |
let result204: any = null; | |
let resultData204 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver); | |
result204 = resultData204 !== undefined ? resultData204 : <any>null; | |
return result204; | |
}); | |
} else if (status === 400) { | |
return response.text().then((_responseText) => { | |
let result400: any = null; | |
let resultData400 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver); | |
result400 = ValidationResponse.fromJS(resultData400); | |
return throwException("Invalid parameter", status, _responseText, _headers, result400); | |
}); | |
} else if (status === 404) { | |
return response.text().then((_responseText) => { | |
let result404: any = null; | |
let resultData404 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver); | |
result404 = ErrorResponse.fromJS(resultData404); | |
return throwException("The policy holder has not been found", status, _responseText, _headers, result404); | |
}); | |
} else if (status !== 200 && status !== 204) { | |
return response.text().then((_responseText) => { | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
}); | |
} | |
return Promise.resolve<string>(<any>null); | |
} | |
/** | |
* Retrieve the comments for a given policy holder id | |
* @param accept_Language (optional) Language | |
* @param effectiveDate (optional) Effective date of the comments, in format = YYYY-MM-DD | |
* @param policyHolderId policyHolderId | |
* @return The comments of the partner have been returned | |
* @deprecated | |
*/ | |
getCommentsUsingGET(accept_Language: AcceptLanguage11 | null | undefined, effectiveDate: string | null | undefined, policyHolderId: number): Promise<string[]> { | |
let url_ = this.baseUrl + "/partners/{policyHolderId}/comments?"; | |
if (policyHolderId === undefined || policyHolderId === null) | |
throw new Error("The parameter 'policyHolderId' must be defined."); | |
url_ = url_.replace("{policyHolderId}", encodeURIComponent("" + policyHolderId)); | |
if (effectiveDate !== undefined) | |
url_ += "effectiveDate=" + encodeURIComponent("" + effectiveDate) + "&"; | |
url_ = url_.replace(/[?&]$/, ""); | |
let options_ = <RequestInit>{ | |
method: "GET", | |
headers: { | |
"Accept-Language": accept_Language !== undefined && accept_Language !== null ? "" + accept_Language : "", | |
"Accept": "application/json;charset=UTF-8" | |
} | |
}; | |
return this.http.fetch(url_, options_).then((_response: Response) => { | |
return this.processGetCommentsUsingGET(_response); | |
}); | |
} | |
protected processGetCommentsUsingGET(response: Response): Promise<string[]> { | |
const status = response.status; | |
let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); }; | |
if (status === 200) { | |
return response.text().then((_responseText) => { | |
let result200: any = null; | |
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver); | |
if (Array.isArray(resultData200)) { | |
result200 = [] as any; | |
for (let item of resultData200) | |
result200!.push(item); | |
} | |
return result200; | |
}); | |
} else if (status === 400) { | |
return response.text().then((_responseText) => { | |
let result400: any = null; | |
let resultData400 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver); | |
result400 = ValidationResponse.fromJS(resultData400); | |
return throwException("Invalid parameter", status, _responseText, _headers, result400); | |
}); | |
} else if (status === 404) { | |
return response.text().then((_responseText) => { | |
let result404: any = null; | |
let resultData404 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver); | |
result404 = ErrorResponse.fromJS(resultData404); | |
return throwException("The policy holder has not been found", status, _responseText, _headers, result404); | |
}); | |
} else if (status !== 200 && status !== 204) { | |
return response.text().then((_responseText) => { | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
}); | |
} | |
return Promise.resolve<string[]>(<any>null); | |
} | |
/** | |
* Retrieve the list of leisures of a partner | |
* @param accept_Language (optional) Language | |
* @param isActive (optional) isActive | |
* @param policyHolderId policyHolderId | |
* @return The list of leisures has been returned | |
*/ | |
listByPartnerUsingGET(accept_Language: AcceptLanguage12 | null | undefined, isActive: boolean | null | undefined, policyHolderId: number): Promise<PartnerLeisure[]> { | |
let url_ = this.baseUrl + "/partners/{policyHolderId}/leisures?"; | |
if (policyHolderId === undefined || policyHolderId === null) | |
throw new Error("The parameter 'policyHolderId' must be defined."); | |
url_ = url_.replace("{policyHolderId}", encodeURIComponent("" + policyHolderId)); | |
if (isActive !== undefined) | |
url_ += "isActive=" + encodeURIComponent("" + isActive) + "&"; | |
url_ = url_.replace(/[?&]$/, ""); | |
let options_ = <RequestInit>{ | |
method: "GET", | |
headers: { | |
"Accept-Language": accept_Language !== undefined && accept_Language !== null ? "" + accept_Language : "", | |
"Accept": "*/*" | |
} | |
}; | |
return this.http.fetch(url_, options_).then((_response: Response) => { | |
return this.processListByPartnerUsingGET(_response); | |
}); | |
} | |
protected processListByPartnerUsingGET(response: Response): Promise<PartnerLeisure[]> { | |
const status = response.status; | |
let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); }; | |
if (status === 200) { | |
return response.text().then((_responseText) => { | |
let result200: any = null; | |
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver); | |
if (Array.isArray(resultData200)) { | |
result200 = [] as any; | |
for (let item of resultData200) | |
result200!.push(PartnerLeisure.fromJS(item)); | |
} | |
return result200; | |
}); | |
} else if (status === 400) { | |
return response.text().then((_responseText) => { | |
let result400: any = null; | |
let resultData400 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver); | |
result400 = ValidationResponse.fromJS(resultData400); | |
return throwException("Invalid parameter", status, _responseText, _headers, result400); | |
}); | |
} else if (status === 404) { | |
return response.text().then((_responseText) => { | |
let result404: any = null; | |
let resultData404 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver); | |
result404 = ErrorResponse.fromJS(resultData404); | |
return throwException("No partner has been found with this policyHolderId", status, _responseText, _headers, result404); | |
}); | |
} else if (status !== 200 && status !== 204) { | |
return response.text().then((_responseText) => { | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
}); | |
} | |
return Promise.resolve<PartnerLeisure[]>(<any>null); | |
} | |
/** | |
* Add new leisure to a partner | |
* @param accept_Language (optional) Language | |
* @param leisureCreationDto leisureCreationDto | |
* @param policyHolderId policyHolderId | |
* @return Leisure was added with success | |
*/ | |
createLeisureUsingPOST(accept_Language: AcceptLanguage13 | null | undefined, leisureCreationDto: LeisureCreationDto, policyHolderId: number): Promise<void> { | |
let url_ = this.baseUrl + "/partners/{policyHolderId}/leisures"; | |
if (policyHolderId === undefined || policyHolderId === null) | |
throw new Error("The parameter 'policyHolderId' must be defined."); | |
url_ = url_.replace("{policyHolderId}", encodeURIComponent("" + policyHolderId)); | |
url_ = url_.replace(/[?&]$/, ""); | |
const content_ = JSON.stringify(leisureCreationDto); | |
let options_ = <RequestInit>{ | |
body: content_, | |
method: "POST", | |
headers: { | |
"Accept-Language": accept_Language !== undefined && accept_Language !== null ? "" + accept_Language : "", | |
"Content-Type": "application/json", | |
} | |
}; | |
return this.http.fetch(url_, options_).then((_response: Response) => { | |
return this.processCreateLeisureUsingPOST(_response); | |
}); | |
} | |
protected processCreateLeisureUsingPOST(response: Response): Promise<void> { | |
const status = response.status; | |
let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); }; | |
if (status === 201) { | |
return response.text().then((_responseText) => { | |
return; | |
}); | |
} else if (status === 400) { | |
return response.text().then((_responseText) => { | |
let result400: any = null; | |
let resultData400 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver); | |
result400 = ValidationResponse.fromJS(resultData400); | |
return throwException("Invalid parameter", status, _responseText, _headers, result400); | |
}); | |
} else if (status === 404) { | |
return response.text().then((_responseText) => { | |
let result404: any = null; | |
let resultData404 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver); | |
result404 = ErrorResponse.fromJS(resultData404); | |
return throwException("Partner or leisure has not been found", status, _responseText, _headers, result404); | |
}); | |
} else if (status === 409) { | |
return response.text().then((_responseText) => { | |
let result409: any = null; | |
let resultData409 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver); | |
result409 = ErrorResponse.fromJS(resultData409); | |
return throwException("Partner already has the leisure", status, _responseText, _headers, result409); | |
}); | |
} else if (status !== 200 && status !== 204) { | |
return response.text().then((_responseText) => { | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
}); | |
} | |
return Promise.resolve<void>(<any>null); | |
} | |
/** | |
* Retrieve a specific leisure of a partner | |
* @param accept_Language (optional) Language | |
* @param leisureId leisureId | |
* @param policyHolderId policyHolderId | |
* @return A partner leisure has been returned | |
*/ | |
getPartnerLeisureUsingGET(accept_Language: AcceptLanguage14 | null | undefined, leisureId: string, policyHolderId: number): Promise<PartnerLeisure> { | |
let url_ = this.baseUrl + "/partners/{policyHolderId}/leisures/{leisureId}"; | |
if (leisureId === undefined || leisureId === null) | |
throw new Error("The parameter 'leisureId' must be defined."); | |
url_ = url_.replace("{leisureId}", encodeURIComponent("" + leisureId)); | |
if (policyHolderId === undefined || policyHolderId === null) | |
throw new Error("The parameter 'policyHolderId' must be defined."); | |
url_ = url_.replace("{policyHolderId}", encodeURIComponent("" + policyHolderId)); | |
url_ = url_.replace(/[?&]$/, ""); | |
let options_ = <RequestInit>{ | |
method: "GET", | |
headers: { | |
"Accept-Language": accept_Language !== undefined && accept_Language !== null ? "" + accept_Language : "", | |
"Accept": "*/*" | |
} | |
}; | |
return this.http.fetch(url_, options_).then((_response: Response) => { | |
return this.processGetPartnerLeisureUsingGET(_response); | |
}); | |
} | |
protected processGetPartnerLeisureUsingGET(response: Response): Promise<PartnerLeisure> { | |
const status = response.status; | |
let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); }; | |
if (status === 200) { | |
return response.text().then((_responseText) => { | |
let result200: any = null; | |
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver); | |
result200 = PartnerLeisure.fromJS(resultData200); | |
return result200; | |
}); | |
} else if (status === 400) { | |
return response.text().then((_responseText) => { | |
let result400: any = null; | |
let resultData400 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver); | |
result400 = ValidationResponse.fromJS(resultData400); | |
return throwException("Invalid parameter", status, _responseText, _headers, result400); | |
}); | |
} else if (status === 404) { | |
return response.text().then((_responseText) => { | |
let result404: any = null; | |
let resultData404 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver); | |
result404 = ErrorResponse.fromJS(resultData404); | |
return throwException("No leisure has been found", status, _responseText, _headers, result404); | |
}); | |
} else if (status !== 200 && status !== 204) { | |
return response.text().then((_responseText) => { | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
}); | |
} | |
return Promise.resolve<PartnerLeisure>(<any>null); | |
} | |
/** | |
* Remove leisure from partner | |
* @param accept_Language (optional) Language | |
* @param leisureId leisureId | |
* @param policyHolderId policyHolderId | |
* @return Leisure was added with success | |
*/ | |
deleteLeisureUsingDELETE(accept_Language: AcceptLanguage15 | null | undefined, leisureId: string, policyHolderId: number): Promise<void> { | |
let url_ = this.baseUrl + "/partners/{policyHolderId}/leisures/{leisureId}"; | |
if (leisureId === undefined || leisureId === null) | |
throw new Error("The parameter 'leisureId' must be defined."); | |
url_ = url_.replace("{leisureId}", encodeURIComponent("" + leisureId)); | |
if (policyHolderId === undefined || policyHolderId === null) | |
throw new Error("The parameter 'policyHolderId' must be defined."); | |
url_ = url_.replace("{policyHolderId}", encodeURIComponent("" + policyHolderId)); | |
url_ = url_.replace(/[?&]$/, ""); | |
let options_ = <RequestInit>{ | |
method: "DELETE", | |
headers: { | |
"Accept-Language": accept_Language !== undefined && accept_Language !== null ? "" + accept_Language : "", | |
} | |
}; | |
return this.http.fetch(url_, options_).then((_response: Response) => { | |
return this.processDeleteLeisureUsingDELETE(_response); | |
}); | |
} | |
protected processDeleteLeisureUsingDELETE(response: Response): Promise<void> { | |
const status = response.status; | |
let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); }; | |
if (status === 204) { | |
return response.text().then((_responseText) => { | |
return; | |
}); | |
} else if (status === 400) { | |
return response.text().then((_responseText) => { | |
let result400: any = null; | |
let resultData400 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver); | |
result400 = ValidationResponse.fromJS(resultData400); | |
return throwException("Invalid parameter", status, _responseText, _headers, result400); | |
}); | |
} else if (status === 404) { | |
return response.text().then((_responseText) => { | |
let result404: any = null; | |
let resultData404 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver); | |
result404 = ErrorResponse.fromJS(resultData404); | |
return throwException("Leisure for partner has not been found", status, _responseText, _headers, result404); | |
}); | |
} else if (status !== 200 && status !== 204) { | |
return response.text().then((_responseText) => { | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
}); | |
} | |
return Promise.resolve<void>(<any>null); | |
} | |
/** | |
* Retrieve the list of logs for a given partner | |
* @param accept_Language (optional) Language | |
* @param policyHolderId policyHolderId | |
* @return The list of logs has been returned | |
*/ | |
getLogsUsingGET(accept_Language: AcceptLanguage16 | null | undefined, policyHolderId: number): Promise<Log[]> { | |
let url_ = this.baseUrl + "/partners/{policyHolderId}/logs"; | |
if (policyHolderId === undefined || policyHolderId === null) | |
throw new Error("The parameter 'policyHolderId' must be defined."); | |
url_ = url_.replace("{policyHolderId}", encodeURIComponent("" + policyHolderId)); | |
url_ = url_.replace(/[?&]$/, ""); | |
let options_ = <RequestInit>{ | |
method: "GET", | |
headers: { | |
"Accept-Language": accept_Language !== undefined && accept_Language !== null ? "" + accept_Language : "", | |
"Accept": "*/*" | |
} | |
}; | |
return this.http.fetch(url_, options_).then((_response: Response) => { | |
return this.processGetLogsUsingGET(_response); | |
}); | |
} | |
protected processGetLogsUsingGET(response: Response): Promise<Log[]> { | |
const status = response.status; | |
let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); }; | |
if (status === 200) { | |
return response.text().then((_responseText) => { | |
let result200: any = null; | |
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver); | |
if (Array.isArray(resultData200)) { | |
result200 = [] as any; | |
for (let item of resultData200) | |
result200!.push(Log.fromJS(item)); | |
} | |
return result200; | |
}); | |
} else if (status === 400) { | |
return response.text().then((_responseText) => { | |
let result400: any = null; | |
let resultData400 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver); | |
result400 = ValidationResponse.fromJS(resultData400); | |
return throwException("Invalid parameter", status, _responseText, _headers, result400); | |
}); | |
} else if (status !== 200 && status !== 204) { | |
return response.text().then((_responseText) => { | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
}); | |
} | |
return Promise.resolve<Log[]>(<any>null); | |
} | |
/** | |
* Retrieve the medical restrictions for a given policy holder id | |
* @param accept_Language (optional) Language | |
* @param policyHolderId policyHolderId | |
* @return The medical restrictions of the partner have been returned | |
*/ | |
getMedicalRestrictionsUsingGET(accept_Language: AcceptLanguage17 | null | undefined, policyHolderId: number): Promise<MedicalRestrictionDto[]> { | |
let url_ = this.baseUrl + "/partners/{policyHolderId}/medical-restrictions"; | |
if (policyHolderId === undefined || policyHolderId === null) | |
throw new Error("The parameter 'policyHolderId' must be defined."); | |
url_ = url_.replace("{policyHolderId}", encodeURIComponent("" + policyHolderId)); | |
url_ = url_.replace(/[?&]$/, ""); | |
let options_ = <RequestInit>{ | |
method: "GET", | |
headers: { | |
"Accept-Language": accept_Language !== undefined && accept_Language !== null ? "" + accept_Language : "", | |
"Accept": "*/*" | |
} | |
}; | |
return this.http.fetch(url_, options_).then((_response: Response) => { | |
return this.processGetMedicalRestrictionsUsingGET(_response); | |
}); | |
} | |
protected processGetMedicalRestrictionsUsingGET(response: Response): Promise<MedicalRestrictionDto[]> { | |
const status = response.status; | |
let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); }; | |
if (status === 200) { | |
return response.text().then((_responseText) => { | |
let result200: any = null; | |
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver); | |
if (Array.isArray(resultData200)) { | |
result200 = [] as any; | |
for (let item of resultData200) | |
result200!.push(MedicalRestrictionDto.fromJS(item)); | |
} | |
return result200; | |
}); | |
} else if (status === 400) { | |
return response.text().then((_responseText) => { | |
let result400: any = null; | |
let resultData400 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver); | |
result400 = ValidationResponse.fromJS(resultData400); | |
return throwException("Invalid parameter", status, _responseText, _headers, result400); | |
}); | |
} else if (status === 404) { | |
return response.text().then((_responseText) => { | |
let result404: any = null; | |
let resultData404 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver); | |
result404 = ErrorResponse.fromJS(resultData404); | |
return throwException("The policy holder has not been found", status, _responseText, _headers, result404); | |
}); | |
} else if (status !== 200 && status !== 204) { | |
return response.text().then((_responseText) => { | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
}); | |
} | |
return Promise.resolve<MedicalRestrictionDto[]>(<any>null); | |
} | |
/** | |
* Retrieve the list of relations for a given partner and type | |
* @param accept_Language (optional) Language | |
* @param policyHolderId (optional) Partner Policy Holder Id | |
* @param type (optional) Type of the relation | |
* @return The list of relations for a given policy holder id has been returned | |
*/ | |
listRelationsUsingGET(accept_Language: AcceptLanguage18 | null | undefined, policyHolderId: number | null | undefined, type: Type | null | undefined): Promise<PartnerRelation[]> { | |
let url_ = this.baseUrl + "/relations?"; | |
if (policyHolderId !== undefined) | |
url_ += "policyHolderId=" + encodeURIComponent("" + policyHolderId) + "&"; | |
if (type !== undefined) | |
url_ += "type=" + encodeURIComponent("" + type) + "&"; | |
url_ = url_.replace(/[?&]$/, ""); | |
let options_ = <RequestInit>{ | |
method: "GET", | |
headers: { | |
"Accept-Language": accept_Language !== undefined && accept_Language !== null ? "" + accept_Language : "", | |
"Accept": "*/*" | |
} | |
}; | |
return this.http.fetch(url_, options_).then((_response: Response) => { | |
return this.processListRelationsUsingGET(_response); | |
}); | |
} | |
protected processListRelationsUsingGET(response: Response): Promise<PartnerRelation[]> { | |
const status = response.status; | |
let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); }; | |
if (status === 200) { | |
return response.text().then((_responseText) => { | |
let result200: any = null; | |
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver); | |
if (Array.isArray(resultData200)) { | |
result200 = [] as any; | |
for (let item of resultData200) | |
result200!.push(PartnerRelation.fromJS(item)); | |
} | |
return result200; | |
}); | |
} else if (status === 400) { | |
return response.text().then((_responseText) => { | |
let result400: any = null; | |
let resultData400 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver); | |
result400 = ValidationResponse.fromJS(resultData400); | |
return throwException("Invalid parameter", status, _responseText, _headers, result400); | |
}); | |
} else if (status !== 200 && status !== 204) { | |
return response.text().then((_responseText) => { | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
}); | |
} | |
return Promise.resolve<PartnerRelation[]>(<any>null); | |
} | |
/** | |
* Create a new relation between 2 partners | |
* @param accept_Language (optional) Language | |
* @param relationDto relationDto | |
* @return The relation between partners has been created | |
*/ | |
createRelationUsingPOST(accept_Language: AcceptLanguage19 | null | undefined, relationDto: BaseRelation): Promise<PartnerRelation> { | |
let url_ = this.baseUrl + "/relations"; | |
url_ = url_.replace(/[?&]$/, ""); | |
const content_ = JSON.stringify(relationDto); | |
let options_ = <RequestInit>{ | |
body: content_, | |
method: "POST", | |
headers: { | |
"Accept-Language": accept_Language !== undefined && accept_Language !== null ? "" + accept_Language : "", | |
"Content-Type": "application/json", | |
"Accept": "*/*" | |
} | |
}; | |
return this.http.fetch(url_, options_).then((_response: Response) => { | |
return this.processCreateRelationUsingPOST(_response); | |
}); | |
} | |
protected processCreateRelationUsingPOST(response: Response): Promise<PartnerRelation> { | |
const status = response.status; | |
let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); }; | |
if (status === 201) { | |
return response.text().then((_responseText) => { | |
let result201: any = null; | |
let resultData201 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver); | |
result201 = PartnerRelation.fromJS(resultData201); | |
return result201; | |
}); | |
} else if (status === 400) { | |
return response.text().then((_responseText) => { | |
let result400: any = null; | |
let resultData400 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver); | |
result400 = ErrorResponse.fromJS(resultData400); | |
return throwException("Invalid partner", status, _responseText, _headers, result400); | |
}); | |
} else if (status !== 200 && status !== 204) { | |
return response.text().then((_responseText) => { | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
}); | |
} | |
return Promise.resolve<PartnerRelation>(<any>null); | |
} | |
/** | |
* Retrieve a relation from a given Id | |
* @param accept_Language (optional) Language | |
* @param id id | |
* @return The relation has been returned | |
*/ | |
getRelationUsingGET(accept_Language: AcceptLanguage20 | null | undefined, id: number): Promise<PartnerRelation> { | |
let url_ = this.baseUrl + "/relations/{id}"; | |
if (id === undefined || id === null) | |
throw new Error("The parameter 'id' must be defined."); | |
url_ = url_.replace("{id}", encodeURIComponent("" + id)); | |
url_ = url_.replace(/[?&]$/, ""); | |
let options_ = <RequestInit>{ | |
method: "GET", | |
headers: { | |
"Accept-Language": accept_Language !== undefined && accept_Language !== null ? "" + accept_Language : "", | |
"Accept": "*/*" | |
} | |
}; | |
return this.http.fetch(url_, options_).then((_response: Response) => { | |
return this.processGetRelationUsingGET(_response); | |
}); | |
} | |
protected processGetRelationUsingGET(response: Response): Promise<PartnerRelation> { | |
const status = response.status; | |
let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); }; | |
if (status === 200) { | |
return response.text().then((_responseText) => { | |
let result200: any = null; | |
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver); | |
result200 = PartnerRelation.fromJS(resultData200); | |
return result200; | |
}); | |
} else if (status === 400) { | |
return response.text().then((_responseText) => { | |
let result400: any = null; | |
let resultData400 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver); | |
result400 = ValidationResponse.fromJS(resultData400); | |
return throwException("Invalid parameter", status, _responseText, _headers, result400); | |
}); | |
} else if (status === 404) { | |
return response.text().then((_responseText) => { | |
let result404: any = null; | |
let resultData404 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver); | |
result404 = ErrorResponse.fromJS(resultData404); | |
return throwException("The relation has not been found", status, _responseText, _headers, result404); | |
}); | |
} else if (status !== 200 && status !== 204) { | |
return response.text().then((_responseText) => { | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
}); | |
} | |
return Promise.resolve<PartnerRelation>(<any>null); | |
} | |
/** | |
* Update a relation between 2 partners | |
* @param accept_Language (optional) Language | |
* @param id id | |
* @param relationDto relationDto | |
* @return The relation between partners has been updated | |
*/ | |
updateRelationUsingPUT(accept_Language: AcceptLanguage21 | null | undefined, id: number, relationDto: BaseRelation): Promise<PartnerRelation> { | |
let url_ = this.baseUrl + "/relations/{id}"; | |
if (id === undefined || id === null) | |
throw new Error("The parameter 'id' must be defined."); | |
url_ = url_.replace("{id}", encodeURIComponent("" + id)); | |
url_ = url_.replace(/[?&]$/, ""); | |
const content_ = JSON.stringify(relationDto); | |
let options_ = <RequestInit>{ | |
body: content_, | |
method: "PUT", | |
headers: { | |
"Accept-Language": accept_Language !== undefined && accept_Language !== null ? "" + accept_Language : "", | |
"Content-Type": "application/json", | |
"Accept": "*/*" | |
} | |
}; | |
return this.http.fetch(url_, options_).then((_response: Response) => { | |
return this.processUpdateRelationUsingPUT(_response); | |
}); | |
} | |
protected processUpdateRelationUsingPUT(response: Response): Promise<PartnerRelation> { | |
const status = response.status; | |
let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); }; | |
if (status === 200) { | |
return response.text().then((_responseText) => { | |
let result200: any = null; | |
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver); | |
result200 = PartnerRelation.fromJS(resultData200); | |
return result200; | |
}); | |
} else if (status === 400) { | |
return response.text().then((_responseText) => { | |
let result400: any = null; | |
let resultData400 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver); | |
result400 = ErrorResponse.fromJS(resultData400); | |
return throwException("Invalid partner", status, _responseText, _headers, result400); | |
}); | |
} else if (status === 404) { | |
return response.text().then((_responseText) => { | |
let result404: any = null; | |
let resultData404 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver); | |
result404 = ErrorResponse.fromJS(resultData404); | |
return throwException("The relation has not been found", status, _responseText, _headers, result404); | |
}); | |
} else if (status === 409) { | |
return response.text().then((_responseText) => { | |
let result409: any = null; | |
let resultData409 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver); | |
result409 = ErrorResponse.fromJS(resultData409); | |
return throwException("The relation has already been modified", status, _responseText, _headers, result409); | |
}); | |
} else if (status !== 200 && status !== 204) { | |
return response.text().then((_responseText) => { | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
}); | |
} | |
return Promise.resolve<PartnerRelation>(<any>null); | |
} | |
/** | |
* Delete a relation between 2 partners | |
* @param accept_Language (optional) Language | |
* @param id id | |
* @return The partner relation has been deleted | |
*/ | |
deleteRelationUsingDELETE(accept_Language: AcceptLanguage22 | null | undefined, id: number): Promise<void> { | |
let url_ = this.baseUrl + "/relations/{id}"; | |
if (id === undefined || id === null) | |
throw new Error("The parameter 'id' must be defined."); | |
url_ = url_.replace("{id}", encodeURIComponent("" + id)); | |
url_ = url_.replace(/[?&]$/, ""); | |
let options_ = <RequestInit>{ | |
method: "DELETE", | |
headers: { | |
"Accept-Language": accept_Language !== undefined && accept_Language !== null ? "" + accept_Language : "", | |
} | |
}; | |
return this.http.fetch(url_, options_).then((_response: Response) => { | |
return this.processDeleteRelationUsingDELETE(_response); | |
}); | |
} | |
protected processDeleteRelationUsingDELETE(response: Response): Promise<void> { | |
const status = response.status; | |
let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); }; | |
if (status === 204) { | |
return response.text().then((_responseText) => { | |
return; | |
}); | |
} else if (status === 400) { | |
return response.text().then((_responseText) => { | |
let result400: any = null; | |
let resultData400 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver); | |
result400 = ValidationResponse.fromJS(resultData400); | |
return throwException("Invalid parameter", status, _responseText, _headers, result400); | |
}); | |
} else if (status === 404) { | |
return response.text().then((_responseText) => { | |
let result404: any = null; | |
let resultData404 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver); | |
result404 = ErrorResponse.fromJS(resultData404); | |
return throwException("The relation has not been found", status, _responseText, _headers, result404); | |
}); | |
} else if (status !== 200 && status !== 204) { | |
return response.text().then((_responseText) => { | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
}); | |
} | |
return Promise.resolve<void>(<any>null); | |
} | |
/** | |
* Retrieve a supplier's data | |
* @param accept_Language (optional) Language | |
* @param policyHolderId policyHolderId | |
* @return The supplier's data has been returned | |
*/ | |
getSupplierDataUsingGET(accept_Language: AcceptLanguage23 | null | undefined, policyHolderId: number): Promise<SupplierBusiness[]> { | |
let url_ = this.baseUrl + "/suppliers/{policyHolderId}"; | |
if (policyHolderId === undefined || policyHolderId === null) | |
throw new Error("The parameter 'policyHolderId' must be defined."); | |
url_ = url_.replace("{policyHolderId}", encodeURIComponent("" + policyHolderId)); | |
url_ = url_.replace(/[?&]$/, ""); | |
let options_ = <RequestInit>{ | |
method: "GET", | |
headers: { | |
"Accept-Language": accept_Language !== undefined && accept_Language !== null ? "" + accept_Language : "", | |
"Accept": "application/json" | |
} | |
}; | |
return this.http.fetch(url_, options_).then((_response: Response) => { | |
return this.processGetSupplierDataUsingGET(_response); | |
}); | |
} | |
protected processGetSupplierDataUsingGET(response: Response): Promise<SupplierBusiness[]> { | |
const status = response.status; | |
let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); }; | |
if (status === 200) { | |
return response.text().then((_responseText) => { | |
let result200: any = null; | |
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver); | |
if (Array.isArray(resultData200)) { | |
result200 = [] as any; | |
for (let item of resultData200) | |
result200!.push(SupplierBusiness.fromJS(item)); | |
} | |
return result200; | |
}); | |
} else if (status === 400) { | |
return response.text().then((_responseText) => { | |
let result400: any = null; | |
let resultData400 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver); | |
result400 = ValidationResponse.fromJS(resultData400); | |
return throwException("Invalid parameter", status, _responseText, _headers, result400); | |
}); | |
} else if (status === 404) { | |
return response.text().then((_responseText) => { | |
let result404: any = null; | |
let resultData404 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver); | |
result404 = ErrorResponse.fromJS(resultData404); | |
return throwException("The partner has not been found", status, _responseText, _headers, result404); | |
}); | |
} else if (status !== 200 && status !== 204) { | |
return response.text().then((_responseText) => { | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
}); | |
} | |
return Promise.resolve<SupplierBusiness[]>(<any>null); | |
} | |
} | |
export class BankingInformationDto implements IBankingInformationDto { | |
/** Address of the bank */ | |
bankAddress?: PartnerAddress | undefined; | |
/** Bank name of the partner */ | |
bankName?: string | undefined; | |
/** The policy holder Id of the bank */ | |
bankPolicyHolderId?: number | undefined; | |
/** IBAN of the partner without spaces */ | |
iban?: string | undefined; | |
/** Address of the partner */ | |
partnerAddress?: PartnerAddress | undefined; | |
constructor(data?: IBankingInformationDto) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(_data?: any) { | |
if (_data) { | |
this.bankAddress = _data["bankAddress"] ? PartnerAddress.fromJS(_data["bankAddress"]) : <any>undefined; | |
this.bankName = _data["bankName"]; | |
this.bankPolicyHolderId = _data["bankPolicyHolderId"]; | |
this.iban = _data["iban"]; | |
this.partnerAddress = _data["partnerAddress"] ? PartnerAddress.fromJS(_data["partnerAddress"]) : <any>undefined; | |
} | |
} | |
static fromJS(data: any): BankingInformationDto { | |
data = typeof data === 'object' ? data : {}; | |
let result = new BankingInformationDto(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["bankAddress"] = this.bankAddress ? this.bankAddress.toJSON() : <any>undefined; | |
data["bankName"] = this.bankName; | |
data["bankPolicyHolderId"] = this.bankPolicyHolderId; | |
data["iban"] = this.iban; | |
data["partnerAddress"] = this.partnerAddress ? this.partnerAddress.toJSON() : <any>undefined; | |
return data; | |
} | |
} | |
export interface IBankingInformationDto { | |
/** Address of the bank */ | |
bankAddress?: PartnerAddress | undefined; | |
/** Bank name of the partner */ | |
bankName?: string | undefined; | |
/** The policy holder Id of the bank */ | |
bankPolicyHolderId?: number | undefined; | |
/** IBAN of the partner without spaces */ | |
iban?: string | undefined; | |
/** Address of the partner */ | |
partnerAddress?: PartnerAddress | undefined; | |
} | |
/** Create/Update PartnerRelation */ | |
export class BaseRelation implements IBaseRelation { | |
/** The date at which the relationship ended. If the relationship is ongoing, endDate is null */ | |
endDate?: string | undefined; | |
/** Type of relationship */ | |
relationType!: string; | |
/** The partner policy holder id the target partner is linked to */ | |
sourcePartner!: number; | |
/** The date at which the relationship started */ | |
startDate?: string | undefined; | |
/** Timestamp of the last update */ | |
statusId?: string | undefined; | |
/** The partner policy holder id with whom the source partner is linked */ | |
targetPartner!: number; | |
/** Type of relationship */ | |
type!: BaseRelationType; | |
/** ID of the user who created/updated the relationship */ | |
userId!: number; | |
constructor(data?: IBaseRelation) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(_data?: any) { | |
if (_data) { | |
this.endDate = _data["endDate"]; | |
this.relationType = _data["relationType"]; | |
this.sourcePartner = _data["sourcePartner"]; | |
this.startDate = _data["startDate"]; | |
this.statusId = _data["statusId"]; | |
this.targetPartner = _data["targetPartner"]; | |
this.type = _data["type"]; | |
this.userId = _data["userId"]; | |
} | |
} | |
static fromJS(data: any): BaseRelation { | |
data = typeof data === 'object' ? data : {}; | |
let result = new BaseRelation(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["endDate"] = this.endDate; | |
data["relationType"] = this.relationType; | |
data["sourcePartner"] = this.sourcePartner; | |
data["startDate"] = this.startDate; | |
data["statusId"] = this.statusId; | |
data["targetPartner"] = this.targetPartner; | |
data["type"] = this.type; | |
data["userId"] = this.userId; | |
return data; | |
} | |
} | |
/** Create/Update PartnerRelation */ | |
export interface IBaseRelation { | |
/** The date at which the relationship ended. If the relationship is ongoing, endDate is null */ | |
endDate?: string | undefined; | |
/** Type of relationship */ | |
relationType: string; | |
/** The partner policy holder id the target partner is linked to */ | |
sourcePartner: number; | |
/** The date at which the relationship started */ | |
startDate?: string | undefined; | |
/** Timestamp of the last update */ | |
statusId?: string | undefined; | |
/** The partner policy holder id with whom the source partner is linked */ | |
targetPartner: number; | |
/** Type of relationship */ | |
type: BaseRelationType; | |
/** ID of the user who created/updated the relationship */ | |
userId: number; | |
} | |
export class Partner implements IPartner { | |
/** Date of the partner entry creation */ | |
creationDate?: Date | undefined; | |
/** Partner personal email address */ | |
email?: string | undefined; | |
/** Partner fax number */ | |
faxNumber?: string | undefined; | |
/** Indicates if the partner policy holder Id is cancelled. A partner is cancelled when a duplicate entry is found. */ | |
isCancelled?: boolean | undefined; | |
/** Indicates whether the partner is an injured party */ | |
isInjuredParty?: boolean | undefined; | |
/** Indicates whether the partner is a Vaudoise policy holder */ | |
isPolicyHolder?: boolean | undefined; | |
/** Indicates whether the partner gives a reason for concern (e.g. Payment delays) */ | |
isUnderMonitoring?: boolean | undefined; | |
/** Indicates whether the partner pays a flat rate in case this latter is liable to VAT */ | |
isVatFlatRate?: boolean | undefined; | |
/** Indicates whether the partner is liable to pay VAT */ | |
isVatLiable?: boolean | undefined; | |
/** Indicates whether the partner is VIP */ | |
isVip?: boolean | undefined; | |
/** Partner ISNPers */ | |
isnPers?: number | undefined; | |
/** Partner language */ | |
language?: string | undefined; | |
/** Managing agency of the policy holder */ | |
managingAgency?: string | undefined; | |
/** Partner mobile phone */ | |
mobilePhone?: string | undefined; | |
/** Partner phone */ | |
phone?: string | undefined; | |
/** Partner Policy Holder Id */ | |
policyHolderId!: number; | |
/** Statistics related to the partner */ | |
statistics!: PartnerStatisticsDto; | |
/** Unique user id of the person who updated the partner entry */ | |
updatedBy?: number | undefined; | |
/** Date of the latest partner entry update */ | |
updatedDate?: Date | undefined; | |
/** Partner professional email address */ | |
workEmail?: string | undefined; | |
/** Partner work phone */ | |
workPhone?: string | undefined; | |
protected _discriminator: string; | |
constructor(data?: IPartner) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
if (!data) { | |
this.statistics = new PartnerStatisticsDto(); | |
} | |
this._discriminator = "Partner"; | |
} | |
init(_data?: any) { | |
if (_data) { | |
this.creationDate = _data["creationDate"] ? new Date(_data["creationDate"].toString()) : <any>undefined; | |
this.email = _data["email"]; | |
this.faxNumber = _data["faxNumber"]; | |
this.isCancelled = _data["isCancelled"]; | |
this.isInjuredParty = _data["isInjuredParty"]; | |
this.isPolicyHolder = _data["isPolicyHolder"]; | |
this.isUnderMonitoring = _data["isUnderMonitoring"]; | |
this.isVatFlatRate = _data["isVatFlatRate"]; | |
this.isVatLiable = _data["isVatLiable"]; | |
this.isVip = _data["isVip"]; | |
this.isnPers = _data["isnPers"]; | |
this.language = _data["language"]; | |
this.managingAgency = _data["managingAgency"]; | |
this.mobilePhone = _data["mobilePhone"]; | |
this.phone = _data["phone"]; | |
this.policyHolderId = _data["policyHolderId"]; | |
this.statistics = _data["statistics"] ? PartnerStatisticsDto.fromJS(_data["statistics"]) : new PartnerStatisticsDto(); | |
this.updatedBy = _data["updatedBy"]; | |
this.updatedDate = _data["updatedDate"] ? new Date(_data["updatedDate"].toString()) : <any>undefined; | |
this.workEmail = _data["workEmail"]; | |
this.workPhone = _data["workPhone"]; | |
} | |
} | |
static fromJS(data: any): Partner { | |
data = typeof data === 'object' ? data : {}; | |
if (data["type"] === "Company") { | |
let result = new Company(); | |
result.init(data); | |
return result; | |
} | |
if (data["type"] === "Couple") { | |
let result = new Couple(); | |
result.init(data); | |
return result; | |
} | |
if (data["type"] === "Person") { | |
let result = new Person(); | |
result.init(data); | |
return result; | |
} | |
let result = new Partner(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["type"] = this._discriminator; | |
data["creationDate"] = this.creationDate ? this.creationDate.toISOString() : <any>undefined; | |
data["email"] = this.email; | |
data["faxNumber"] = this.faxNumber; | |
data["isCancelled"] = this.isCancelled; | |
data["isInjuredParty"] = this.isInjuredParty; | |
data["isPolicyHolder"] = this.isPolicyHolder; | |
data["isUnderMonitoring"] = this.isUnderMonitoring; | |
data["isVatFlatRate"] = this.isVatFlatRate; | |
data["isVatLiable"] = this.isVatLiable; | |
data["isVip"] = this.isVip; | |
data["isnPers"] = this.isnPers; | |
data["language"] = this.language; | |
data["managingAgency"] = this.managingAgency; | |
data["mobilePhone"] = this.mobilePhone; | |
data["phone"] = this.phone; | |
data["policyHolderId"] = this.policyHolderId; | |
data["statistics"] = this.statistics ? this.statistics.toJSON() : <any>undefined; | |
data["updatedBy"] = this.updatedBy; | |
data["updatedDate"] = this.updatedDate ? this.updatedDate.toISOString() : <any>undefined; | |
data["workEmail"] = this.workEmail; | |
data["workPhone"] = this.workPhone; | |
return data; | |
} | |
} | |
export interface IPartner { | |
/** Date of the partner entry creation */ | |
creationDate?: Date | undefined; | |
/** Partner personal email address */ | |
email?: string | undefined; | |
/** Partner fax number */ | |
faxNumber?: string | undefined; | |
/** Indicates if the partner policy holder Id is cancelled. A partner is cancelled when a duplicate entry is found. */ | |
isCancelled?: boolean | undefined; | |
/** Indicates whether the partner is an injured party */ | |
isInjuredParty?: boolean | undefined; | |
/** Indicates whether the partner is a Vaudoise policy holder */ | |
isPolicyHolder?: boolean | undefined; | |
/** Indicates whether the partner gives a reason for concern (e.g. Payment delays) */ | |
isUnderMonitoring?: boolean | undefined; | |
/** Indicates whether the partner pays a flat rate in case this latter is liable to VAT */ | |
isVatFlatRate?: boolean | undefined; | |
/** Indicates whether the partner is liable to pay VAT */ | |
isVatLiable?: boolean | undefined; | |
/** Indicates whether the partner is VIP */ | |
isVip?: boolean | undefined; | |
/** Partner ISNPers */ | |
isnPers?: number | undefined; | |
/** Partner language */ | |
language?: string | undefined; | |
/** Managing agency of the policy holder */ | |
managingAgency?: string | undefined; | |
/** Partner mobile phone */ | |
mobilePhone?: string | undefined; | |
/** Partner phone */ | |
phone?: string | undefined; | |
/** Partner Policy Holder Id */ | |
policyHolderId: number; | |
/** Statistics related to the partner */ | |
statistics: PartnerStatisticsDto; | |
/** Unique user id of the person who updated the partner entry */ | |
updatedBy?: number | undefined; | |
/** Date of the latest partner entry update */ | |
updatedDate?: Date | undefined; | |
/** Partner professional email address */ | |
workEmail?: string | undefined; | |
/** Partner work phone */ | |
workPhone?: string | undefined; | |
} | |
export class Company extends Partner implements ICompany { | |
/** Annual revenue of the company */ | |
annualRevenue?: number | undefined; | |
/** Company business identification number */ | |
businessIdentificationNumber?: string | undefined; | |
/** Company name */ | |
companyName?: string | undefined; | |
/** Date of the partner entry creation */ | |
creationDate?: Date | undefined; | |
/** Company economic sector */ | |
economicSector?: number | undefined; | |
/** Partner personal email address */ | |
email?: string | undefined; | |
/** Partner fax number */ | |
faxNumber?: string | undefined; | |
/** Date of creation of the company */ | |
foundationDate?: string | undefined; | |
/** Indicates if the partner policy holder Id is cancelled. A partner is cancelled when a duplicate entry is found. */ | |
isCancelled?: boolean | undefined; | |
/** Indicates whether the partner is an injured party */ | |
isInjuredParty?: boolean | undefined; | |
/** Indicates whether the partner is a Vaudoise policy holder */ | |
isPolicyHolder?: boolean | undefined; | |
/** Indicates whether the partner gives a reason for concern (e.g. Payment delays) */ | |
isUnderMonitoring?: boolean | undefined; | |
/** Indicates whether the partner pays a flat rate in case this latter is liable to VAT */ | |
isVatFlatRate?: boolean | undefined; | |
/** Indicates whether the partner is liable to pay VAT */ | |
isVatLiable?: boolean | undefined; | |
/** Indicates whether the partner is VIP */ | |
isVip?: boolean | undefined; | |
/** Partner ISNPers */ | |
isnPers?: number | undefined; | |
/** Partner language */ | |
language?: string | undefined; | |
/** Type of company */ | |
legalFormCode?: CompanyLegalFormCode | undefined; | |
/** Managing agency of the policy holder */ | |
managingAgency?: string | undefined; | |
/** Partner mobile phone */ | |
mobilePhone?: string | undefined; | |
/** Company Noga code */ | |
nogaCode?: string | undefined; | |
/** Number of employees in the company */ | |
numberOfEmployees?: number | undefined; | |
/** Company payroll */ | |
payroll?: number | undefined; | |
/** Partner phone */ | |
phone?: string | undefined; | |
/** Partner Policy Holder Id */ | |
policyHolderId!: number; | |
/** Statistics related to the partner */ | |
statistics!: PartnerStatisticsDto; | |
/** Partner type */ | |
type!: CompanyType; | |
/** Unique user id of the person who updated the partner entry */ | |
updatedBy?: number | undefined; | |
/** Date of the latest partner entry update */ | |
updatedDate?: Date | undefined; | |
/** Partner professional email address */ | |
workEmail?: string | undefined; | |
/** Partner work phone */ | |
workPhone?: string | undefined; | |
constructor(data?: ICompany) { | |
super(data); | |
if (!data) { | |
this.statistics = new PartnerStatisticsDto(); | |
} | |
this._discriminator = "Company"; | |
} | |
init(_data?: any) { | |
super.init(_data); | |
if (_data) { | |
this.annualRevenue = _data["annualRevenue"]; | |
this.businessIdentificationNumber = _data["businessIdentificationNumber"]; | |
this.companyName = _data["companyName"]; | |
this.creationDate = _data["creationDate"] ? new Date(_data["creationDate"].toString()) : <any>undefined; | |
this.economicSector = _data["economicSector"]; | |
this.email = _data["email"]; | |
this.faxNumber = _data["faxNumber"]; | |
this.foundationDate = _data["foundationDate"]; | |
this.isCancelled = _data["isCancelled"]; | |
this.isInjuredParty = _data["isInjuredParty"]; | |
this.isPolicyHolder = _data["isPolicyHolder"]; | |
this.isUnderMonitoring = _data["isUnderMonitoring"]; | |
this.isVatFlatRate = _data["isVatFlatRate"]; | |
this.isVatLiable = _data["isVatLiable"]; | |
this.isVip = _data["isVip"]; | |
this.isnPers = _data["isnPers"]; | |
this.language = _data["language"]; | |
this.legalFormCode = _data["legalFormCode"]; | |
this.managingAgency = _data["managingAgency"]; | |
this.mobilePhone = _data["mobilePhone"]; | |
this.nogaCode = _data["nogaCode"]; | |
this.numberOfEmployees = _data["numberOfEmployees"]; | |
this.payroll = _data["payroll"]; | |
this.phone = _data["phone"]; | |
this.policyHolderId = _data["policyHolderId"]; | |
this.statistics = _data["statistics"] ? PartnerStatisticsDto.fromJS(_data["statistics"]) : new PartnerStatisticsDto(); | |
this.type = _data["type"]; | |
this.updatedBy = _data["updatedBy"]; | |
this.updatedDate = _data["updatedDate"] ? new Date(_data["updatedDate"].toString()) : <any>undefined; | |
this.workEmail = _data["workEmail"]; | |
this.workPhone = _data["workPhone"]; | |
} | |
} | |
static fromJS(data: any): Company { | |
data = typeof data === 'object' ? data : {}; | |
let result = new Company(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["annualRevenue"] = this.annualRevenue; | |
data["businessIdentificationNumber"] = this.businessIdentificationNumber; | |
data["companyName"] = this.companyName; | |
data["creationDate"] = this.creationDate ? this.creationDate.toISOString() : <any>undefined; | |
data["economicSector"] = this.economicSector; | |
data["email"] = this.email; | |
data["faxNumber"] = this.faxNumber; | |
data["foundationDate"] = this.foundationDate; | |
data["isCancelled"] = this.isCancelled; | |
data["isInjuredParty"] = this.isInjuredParty; | |
data["isPolicyHolder"] = this.isPolicyHolder; | |
data["isUnderMonitoring"] = this.isUnderMonitoring; | |
data["isVatFlatRate"] = this.isVatFlatRate; | |
data["isVatLiable"] = this.isVatLiable; | |
data["isVip"] = this.isVip; | |
data["isnPers"] = this.isnPers; | |
data["language"] = this.language; | |
data["legalFormCode"] = this.legalFormCode; | |
data["managingAgency"] = this.managingAgency; | |
data["mobilePhone"] = this.mobilePhone; | |
data["nogaCode"] = this.nogaCode; | |
data["numberOfEmployees"] = this.numberOfEmployees; | |
data["payroll"] = this.payroll; | |
data["phone"] = this.phone; | |
data["policyHolderId"] = this.policyHolderId; | |
data["statistics"] = this.statistics ? this.statistics.toJSON() : <any>undefined; | |
data["type"] = this.type; | |
data["updatedBy"] = this.updatedBy; | |
data["updatedDate"] = this.updatedDate ? this.updatedDate.toISOString() : <any>undefined; | |
data["workEmail"] = this.workEmail; | |
data["workPhone"] = this.workPhone; | |
super.toJSON(data); | |
return data; | |
} | |
} | |
export interface ICompany extends IPartner { | |
/** Annual revenue of the company */ | |
annualRevenue?: number | undefined; | |
/** Company business identification number */ | |
businessIdentificationNumber?: string | undefined; | |
/** Company name */ | |
companyName?: string | undefined; | |
/** Date of the partner entry creation */ | |
creationDate?: Date | undefined; | |
/** Company economic sector */ | |
economicSector?: number | undefined; | |
/** Partner personal email address */ | |
email?: string | undefined; | |
/** Partner fax number */ | |
faxNumber?: string | undefined; | |
/** Date of creation of the company */ | |
foundationDate?: string | undefined; | |
/** Indicates if the partner policy holder Id is cancelled. A partner is cancelled when a duplicate entry is found. */ | |
isCancelled?: boolean | undefined; | |
/** Indicates whether the partner is an injured party */ | |
isInjuredParty?: boolean | undefined; | |
/** Indicates whether the partner is a Vaudoise policy holder */ | |
isPolicyHolder?: boolean | undefined; | |
/** Indicates whether the partner gives a reason for concern (e.g. Payment delays) */ | |
isUnderMonitoring?: boolean | undefined; | |
/** Indicates whether the partner pays a flat rate in case this latter is liable to VAT */ | |
isVatFlatRate?: boolean | undefined; | |
/** Indicates whether the partner is liable to pay VAT */ | |
isVatLiable?: boolean | undefined; | |
/** Indicates whether the partner is VIP */ | |
isVip?: boolean | undefined; | |
/** Partner ISNPers */ | |
isnPers?: number | undefined; | |
/** Partner language */ | |
language?: string | undefined; | |
/** Type of company */ | |
legalFormCode?: CompanyLegalFormCode | undefined; | |
/** Managing agency of the policy holder */ | |
managingAgency?: string | undefined; | |
/** Partner mobile phone */ | |
mobilePhone?: string | undefined; | |
/** Company Noga code */ | |
nogaCode?: string | undefined; | |
/** Number of employees in the company */ | |
numberOfEmployees?: number | undefined; | |
/** Company payroll */ | |
payroll?: number | undefined; | |
/** Partner phone */ | |
phone?: string | undefined; | |
/** Partner Policy Holder Id */ | |
policyHolderId: number; | |
/** Statistics related to the partner */ | |
statistics: PartnerStatisticsDto; | |
/** Partner type */ | |
type: CompanyType; | |
/** Unique user id of the person who updated the partner entry */ | |
updatedBy?: number | undefined; | |
/** Date of the latest partner entry update */ | |
updatedDate?: Date | undefined; | |
/** Partner professional email address */ | |
workEmail?: string | undefined; | |
/** Partner work phone */ | |
workPhone?: string | undefined; | |
} | |
export class Couple extends Partner implements ICouple { | |
/** Couple name */ | |
coupleName?: string | undefined; | |
/** Date of the partner entry creation */ | |
creationDate?: Date | undefined; | |
/** Partner personal email address */ | |
email?: string | undefined; | |
/** Partner fax number */ | |
faxNumber?: string | undefined; | |
/** Indicates if the partner policy holder Id is cancelled. A partner is cancelled when a duplicate entry is found. */ | |
isCancelled?: boolean | undefined; | |
/** Indicates whether the partner is an injured party */ | |
isInjuredParty?: boolean | undefined; | |
/** Indicates whether the partner is a Vaudoise policy holder */ | |
isPolicyHolder?: boolean | undefined; | |
/** Indicates whether the partner gives a reason for concern (e.g. Payment delays) */ | |
isUnderMonitoring?: boolean | undefined; | |
/** Indicates whether the partner pays a flat rate in case this latter is liable to VAT */ | |
isVatFlatRate?: boolean | undefined; | |
/** Indicates whether the partner is liable to pay VAT */ | |
isVatLiable?: boolean | undefined; | |
/** Indicates whether the partner is VIP */ | |
isVip?: boolean | undefined; | |
/** Partner ISNPers */ | |
isnPers?: number | undefined; | |
/** Partner language */ | |
language?: string | undefined; | |
/** Managing agency of the policy holder */ | |
managingAgency?: string | undefined; | |
/** Partner mobile phone */ | |
mobilePhone?: string | undefined; | |
/** Partner phone */ | |
phone?: string | undefined; | |
/** Partner Policy Holder Id */ | |
policyHolderId!: number; | |
/** Statistics related to the partner */ | |
statistics!: PartnerStatisticsDto; | |
/** Partner type */ | |
type!: CoupleType; | |
/** Unique user id of the person who updated the partner entry */ | |
updatedBy?: number | undefined; | |
/** Date of the latest partner entry update */ | |
updatedDate?: Date | undefined; | |
/** Partner professional email address */ | |
workEmail?: string | undefined; | |
/** Partner work phone */ | |
workPhone?: string | undefined; | |
constructor(data?: ICouple) { | |
super(data); | |
if (!data) { | |
this.statistics = new PartnerStatisticsDto(); | |
} | |
this._discriminator = "Couple"; | |
} | |
init(_data?: any) { | |
super.init(_data); | |
if (_data) { | |
this.coupleName = _data["coupleName"]; | |
this.creationDate = _data["creationDate"] ? new Date(_data["creationDate"].toString()) : <any>undefined; | |
this.email = _data["email"]; | |
this.faxNumber = _data["faxNumber"]; | |
this.isCancelled = _data["isCancelled"]; | |
this.isInjuredParty = _data["isInjuredParty"]; | |
this.isPolicyHolder = _data["isPolicyHolder"]; | |
this.isUnderMonitoring = _data["isUnderMonitoring"]; | |
this.isVatFlatRate = _data["isVatFlatRate"]; | |
this.isVatLiable = _data["isVatLiable"]; | |
this.isVip = _data["isVip"]; | |
this.isnPers = _data["isnPers"]; | |
this.language = _data["language"]; | |
this.managingAgency = _data["managingAgency"]; | |
this.mobilePhone = _data["mobilePhone"]; | |
this.phone = _data["phone"]; | |
this.policyHolderId = _data["policyHolderId"]; | |
this.statistics = _data["statistics"] ? PartnerStatisticsDto.fromJS(_data["statistics"]) : new PartnerStatisticsDto(); | |
this.type = _data["type"]; | |
this.updatedBy = _data["updatedBy"]; | |
this.updatedDate = _data["updatedDate"] ? new Date(_data["updatedDate"].toString()) : <any>undefined; | |
this.workEmail = _data["workEmail"]; | |
this.workPhone = _data["workPhone"]; | |
} | |
} | |
static fromJS(data: any): Couple { | |
data = typeof data === 'object' ? data : {}; | |
let result = new Couple(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["coupleName"] = this.coupleName; | |
data["creationDate"] = this.creationDate ? this.creationDate.toISOString() : <any>undefined; | |
data["email"] = this.email; | |
data["faxNumber"] = this.faxNumber; | |
data["isCancelled"] = this.isCancelled; | |
data["isInjuredParty"] = this.isInjuredParty; | |
data["isPolicyHolder"] = this.isPolicyHolder; | |
data["isUnderMonitoring"] = this.isUnderMonitoring; | |
data["isVatFlatRate"] = this.isVatFlatRate; | |
data["isVatLiable"] = this.isVatLiable; | |
data["isVip"] = this.isVip; | |
data["isnPers"] = this.isnPers; | |
data["language"] = this.language; | |
data["managingAgency"] = this.managingAgency; | |
data["mobilePhone"] = this.mobilePhone; | |
data["phone"] = this.phone; | |
data["policyHolderId"] = this.policyHolderId; | |
data["statistics"] = this.statistics ? this.statistics.toJSON() : <any>undefined; | |
data["type"] = this.type; | |
data["updatedBy"] = this.updatedBy; | |
data["updatedDate"] = this.updatedDate ? this.updatedDate.toISOString() : <any>undefined; | |
data["workEmail"] = this.workEmail; | |
data["workPhone"] = this.workPhone; | |
super.toJSON(data); | |
return data; | |
} | |
} | |
export interface ICouple extends IPartner { | |
/** Couple name */ | |
coupleName?: string | undefined; | |
/** Date of the partner entry creation */ | |
creationDate?: Date | undefined; | |
/** Partner personal email address */ | |
email?: string | undefined; | |
/** Partner fax number */ | |
faxNumber?: string | undefined; | |
/** Indicates if the partner policy holder Id is cancelled. A partner is cancelled when a duplicate entry is found. */ | |
isCancelled?: boolean | undefined; | |
/** Indicates whether the partner is an injured party */ | |
isInjuredParty?: boolean | undefined; | |
/** Indicates whether the partner is a Vaudoise policy holder */ | |
isPolicyHolder?: boolean | undefined; | |
/** Indicates whether the partner gives a reason for concern (e.g. Payment delays) */ | |
isUnderMonitoring?: boolean | undefined; | |
/** Indicates whether the partner pays a flat rate in case this latter is liable to VAT */ | |
isVatFlatRate?: boolean | undefined; | |
/** Indicates whether the partner is liable to pay VAT */ | |
isVatLiable?: boolean | undefined; | |
/** Indicates whether the partner is VIP */ | |
isVip?: boolean | undefined; | |
/** Partner ISNPers */ | |
isnPers?: number | undefined; | |
/** Partner language */ | |
language?: string | undefined; | |
/** Managing agency of the policy holder */ | |
managingAgency?: string | undefined; | |
/** Partner mobile phone */ | |
mobilePhone?: string | undefined; | |
/** Partner phone */ | |
phone?: string | undefined; | |
/** Partner Policy Holder Id */ | |
policyHolderId: number; | |
/** Statistics related to the partner */ | |
statistics: PartnerStatisticsDto; | |
/** Partner type */ | |
type: CoupleType; | |
/** Unique user id of the person who updated the partner entry */ | |
updatedBy?: number | undefined; | |
/** Date of the latest partner entry update */ | |
updatedDate?: Date | undefined; | |
/** Partner professional email address */ | |
workEmail?: string | undefined; | |
/** Partner work phone */ | |
workPhone?: string | undefined; | |
} | |
export class DependencyDto implements IDependencyDto { | |
depth?: number | undefined; | |
name?: string | undefined; | |
status?: DependencyDtoStatus | undefined; | |
constructor(data?: IDependencyDto) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(_data?: any) { | |
if (_data) { | |
this.depth = _data["depth"]; | |
this.name = _data["name"]; | |
this.status = _data["status"]; | |
} | |
} | |
static fromJS(data: any): DependencyDto { | |
data = typeof data === 'object' ? data : {}; | |
let result = new DependencyDto(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["depth"] = this.depth; | |
data["name"] = this.name; | |
data["status"] = this.status; | |
return data; | |
} | |
} | |
export interface IDependencyDto { | |
depth?: number | undefined; | |
name?: string | undefined; | |
status?: DependencyDtoStatus | undefined; | |
} | |
export class ErrorResponse implements IErrorResponse { | |
/** Code that can be used to implement a custom translation */ | |
code?: string | undefined; | |
/** Message in the language provided in the request */ | |
display?: string | undefined; | |
/** Identifier */ | |
id?: string | undefined; | |
/** Message in system language (i.e. English) */ | |
message?: string | undefined; | |
constructor(data?: IErrorResponse) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(_data?: any) { | |
if (_data) { | |
this.code = _data["code"]; | |
this.display = _data["display"]; | |
this.id = _data["id"]; | |
this.message = _data["message"]; | |
} | |
} | |
static fromJS(data: any): ErrorResponse { | |
data = typeof data === 'object' ? data : {}; | |
let result = new ErrorResponse(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["code"] = this.code; | |
data["display"] = this.display; | |
data["id"] = this.id; | |
data["message"] = this.message; | |
return data; | |
} | |
} | |
export interface IErrorResponse { | |
/** Code that can be used to implement a custom translation */ | |
code?: string | undefined; | |
/** Message in the language provided in the request */ | |
display?: string | undefined; | |
/** Identifier */ | |
id?: string | undefined; | |
/** Message in system language (i.e. English) */ | |
message?: string | undefined; | |
} | |
export class FamilyRelation extends BaseRelation implements IFamilyRelation { | |
/** The partner policy holder id dependent of the source partner */ | |
dependentPartner?: number | undefined; | |
/** The date at which the relationship ended. If the relationship is ongoing, endDate is null */ | |
endDate?: string | undefined; | |
/** ID of the partner relationship */ | |
id?: number | undefined; | |
/** Type of relationship */ | |
relationType!: string; | |
/** The partner policy holder id the target partner is linked to */ | |
sourcePartner!: number; | |
/** The date at which the relationship started */ | |
startDate?: string | undefined; | |
/** Timestamp of the last update */ | |
statusId?: string | undefined; | |
/** The partner policy holder id with whom the source partner is linked */ | |
targetPartner!: number; | |
/** Type of relationship */ | |
type!: FamilyRelationType; | |
/** Type of union (Only used to describe a marriage/partnership union) */ | |
unionType?: string | undefined; | |
/** ID of the user who created/updated the relationship */ | |
userId!: number; | |
constructor(data?: IFamilyRelation) { | |
super(data); | |
} | |
init(_data?: any) { | |
super.init(_data); | |
if (_data) { | |
this.dependentPartner = _data["dependentPartner"]; | |
this.endDate = _data["endDate"]; | |
this.id = _data["id"]; | |
this.relationType = _data["relationType"]; | |
this.sourcePartner = _data["sourcePartner"]; | |
this.startDate = _data["startDate"]; | |
this.statusId = _data["statusId"]; | |
this.targetPartner = _data["targetPartner"]; | |
this.type = _data["type"]; | |
this.unionType = _data["unionType"]; | |
this.userId = _data["userId"]; | |
} | |
} | |
static fromJS(data: any): FamilyRelation { | |
data = typeof data === 'object' ? data : {}; | |
let result = new FamilyRelation(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["dependentPartner"] = this.dependentPartner; | |
data["endDate"] = this.endDate; | |
data["id"] = this.id; | |
data["relationType"] = this.relationType; | |
data["sourcePartner"] = this.sourcePartner; | |
data["startDate"] = this.startDate; | |
data["statusId"] = this.statusId; | |
data["targetPartner"] = this.targetPartner; | |
data["type"] = this.type; | |
data["unionType"] = this.unionType; | |
data["userId"] = this.userId; | |
super.toJSON(data); | |
return data; | |
} | |
} | |
export interface IFamilyRelation extends IBaseRelation { | |
/** The partner policy holder id dependent of the source partner */ | |
dependentPartner?: number | undefined; | |
/** The date at which the relationship ended. If the relationship is ongoing, endDate is null */ | |
endDate?: string | undefined; | |
/** ID of the partner relationship */ | |
id?: number | undefined; | |
/** Type of relationship */ | |
relationType: string; | |
/** The partner policy holder id the target partner is linked to */ | |
sourcePartner: number; | |
/** The date at which the relationship started */ | |
startDate?: string | undefined; | |
/** Timestamp of the last update */ | |
statusId?: string | undefined; | |
/** The partner policy holder id with whom the source partner is linked */ | |
targetPartner: number; | |
/** Type of relationship */ | |
type: FamilyRelationType; | |
/** Type of union (Only used to describe a marriage/partnership union) */ | |
unionType?: string | undefined; | |
/** ID of the user who created/updated the relationship */ | |
userId: number; | |
} | |
export class HealthDto implements IHealthDto { | |
dependencies?: DependencyDto[] | undefined; | |
name?: string | undefined; | |
status?: HealthDtoStatus | undefined; | |
constructor(data?: IHealthDto) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(_data?: any) { | |
if (_data) { | |
if (Array.isArray(_data["dependencies"])) { | |
this.dependencies = [] as any; | |
for (let item of _data["dependencies"]) | |
this.dependencies!.push(DependencyDto.fromJS(item)); | |
} | |
this.name = _data["name"]; | |
this.status = _data["status"]; | |
} | |
} | |
static fromJS(data: any): HealthDto { | |
data = typeof data === 'object' ? data : {}; | |
let result = new HealthDto(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
if (Array.isArray(this.dependencies)) { | |
data["dependencies"] = []; | |
for (let item of this.dependencies) | |
data["dependencies"].push(item.toJSON()); | |
} | |
data["name"] = this.name; | |
data["status"] = this.status; | |
return data; | |
} | |
} | |
export interface IHealthDto { | |
dependencies?: DependencyDto[] | undefined; | |
name?: string | undefined; | |
status?: HealthDtoStatus | undefined; | |
} | |
export class InfoDto implements IInfoDto { | |
product?: string | undefined; | |
version?: string | undefined; | |
constructor(data?: IInfoDto) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(_data?: any) { | |
if (_data) { | |
this.product = _data["product"]; | |
this.version = _data["version"]; | |
} | |
} | |
static fromJS(data: any): InfoDto { | |
data = typeof data === 'object' ? data : {}; | |
let result = new InfoDto(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["product"] = this.product; | |
data["version"] = this.version; | |
return data; | |
} | |
} | |
export interface IInfoDto { | |
product?: string | undefined; | |
version?: string | undefined; | |
} | |
export class Leisure implements ILeisure { | |
/** The code of the category associated with this leisure */ | |
category?: string | undefined; | |
/** The unique id corresponding to the leisure */ | |
id?: string | undefined; | |
/** The translated value of the leisure */ | |
label?: string | undefined; | |
constructor(data?: ILeisure) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(_data?: any) { | |
if (_data) { | |
this.category = _data["category"]; | |
this.id = _data["id"]; | |
this.label = _data["label"]; | |
} | |
} | |
static fromJS(data: any): Leisure { | |
data = typeof data === 'object' ? data : {}; | |
let result = new Leisure(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["category"] = this.category; | |
data["id"] = this.id; | |
data["label"] = this.label; | |
return data; | |
} | |
} | |
export interface ILeisure { | |
/** The code of the category associated with this leisure */ | |
category?: string | undefined; | |
/** The unique id corresponding to the leisure */ | |
id?: string | undefined; | |
/** The translated value of the leisure */ | |
label?: string | undefined; | |
} | |
export class LeisureCategory implements ILeisureCategory { | |
/** The code corresponding to the leisure category */ | |
code?: string | undefined; | |
/** The translated label of the category */ | |
label?: string | undefined; | |
constructor(data?: ILeisureCategory) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(_data?: any) { | |
if (_data) { | |
this.code = _data["code"]; | |
this.label = _data["label"]; | |
} | |
} | |
static fromJS(data: any): LeisureCategory { | |
data = typeof data === 'object' ? data : {}; | |
let result = new LeisureCategory(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["code"] = this.code; | |
data["label"] = this.label; | |
return data; | |
} | |
} | |
export interface ILeisureCategory { | |
/** The code corresponding to the leisure category */ | |
code?: string | undefined; | |
/** The translated label of the category */ | |
label?: string | undefined; | |
} | |
export class LeisureCreationDto implements ILeisureCreationDto { | |
leisureId!: string; | |
startDate?: string | undefined; | |
constructor(data?: ILeisureCreationDto) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(_data?: any) { | |
if (_data) { | |
this.leisureId = _data["leisureId"]; | |
this.startDate = _data["startDate"]; | |
} | |
} | |
static fromJS(data: any): LeisureCreationDto { | |
data = typeof data === 'object' ? data : {}; | |
let result = new LeisureCreationDto(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["leisureId"] = this.leisureId; | |
data["startDate"] = this.startDate; | |
return data; | |
} | |
} | |
export interface ILeisureCreationDto { | |
leisureId: string; | |
startDate?: string | undefined; | |
} | |
export class Log implements ILog { | |
/** User Id of the log author. Detailed information can be retrieved from the user endpoint in the Employee microservice */ | |
authorUserId?: number | undefined; | |
/** Creation date of the log */ | |
creationDate?: string | undefined; | |
/** List of operation logs */ | |
operations?: OperationLog[] | undefined; | |
/** Log title */ | |
title?: string | undefined; | |
constructor(data?: ILog) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(_data?: any) { | |
if (_data) { | |
this.authorUserId = _data["authorUserId"]; | |
this.creationDate = _data["creationDate"]; | |
if (Array.isArray(_data["operations"])) { | |
this.operations = [] as any; | |
for (let item of _data["operations"]) | |
this.operations!.push(OperationLog.fromJS(item)); | |
} | |
this.title = _data["title"]; | |
} | |
} | |
static fromJS(data: any): Log { | |
data = typeof data === 'object' ? data : {}; | |
let result = new Log(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["authorUserId"] = this.authorUserId; | |
data["creationDate"] = this.creationDate; | |
if (Array.isArray(this.operations)) { | |
data["operations"] = []; | |
for (let item of this.operations) | |
data["operations"].push(item.toJSON()); | |
} | |
data["title"] = this.title; | |
return data; | |
} | |
} | |
export interface ILog { | |
/** User Id of the log author. Detailed information can be retrieved from the user endpoint in the Employee microservice */ | |
authorUserId?: number | undefined; | |
/** Creation date of the log */ | |
creationDate?: string | undefined; | |
/** List of operation logs */ | |
operations?: OperationLog[] | undefined; | |
/** Log title */ | |
title?: string | undefined; | |
} | |
export class MedicalRestrictionDto implements IMedicalRestrictionDto { | |
/** End date of the medical restriction */ | |
endDate?: string | undefined; | |
/** Start date of the medical restriction */ | |
startDate?: string | undefined; | |
/** Type of the medical restriction */ | |
type!: MedicalRestrictionDtoType; | |
constructor(data?: IMedicalRestrictionDto) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(_data?: any) { | |
if (_data) { | |
this.endDate = _data["endDate"]; | |
this.startDate = _data["startDate"]; | |
this.type = _data["type"]; | |
} | |
} | |
static fromJS(data: any): MedicalRestrictionDto { | |
data = typeof data === 'object' ? data : {}; | |
let result = new MedicalRestrictionDto(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["endDate"] = this.endDate; | |
data["startDate"] = this.startDate; | |
data["type"] = this.type; | |
return data; | |
} | |
} | |
export interface IMedicalRestrictionDto { | |
/** End date of the medical restriction */ | |
endDate?: string | undefined; | |
/** Start date of the medical restriction */ | |
startDate?: string | undefined; | |
/** Type of the medical restriction */ | |
type: MedicalRestrictionDtoType; | |
} | |
export class MetricsDto implements IMetricsDto { | |
environmentArchitecture?: string | undefined; | |
environmentName?: string | undefined; | |
machineDomain?: string | undefined; | |
machineName?: string | undefined; | |
machineOS?: string | undefined; | |
machineProcessorCount?: number | undefined; | |
serviceName?: string | undefined; | |
serviceProcessId?: number | undefined; | |
serviceStartTime?: string | undefined; | |
constructor(data?: IMetricsDto) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(_data?: any) { | |
if (_data) { | |
this.environmentArchitecture = _data["environmentArchitecture"]; | |
this.environmentName = _data["environmentName"]; | |
this.machineDomain = _data["machineDomain"]; | |
this.machineName = _data["machineName"]; | |
this.machineOS = _data["machineOS"]; | |
this.machineProcessorCount = _data["machineProcessorCount"]; | |
this.serviceName = _data["serviceName"]; | |
this.serviceProcessId = _data["serviceProcessId"]; | |
this.serviceStartTime = _data["serviceStartTime"]; | |
} | |
} | |
static fromJS(data: any): MetricsDto { | |
data = typeof data === 'object' ? data : {}; | |
let result = new MetricsDto(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["environmentArchitecture"] = this.environmentArchitecture; | |
data["environmentName"] = this.environmentName; | |
data["machineDomain"] = this.machineDomain; | |
data["machineName"] = this.machineName; | |
data["machineOS"] = this.machineOS; | |
data["machineProcessorCount"] = this.machineProcessorCount; | |
data["serviceName"] = this.serviceName; | |
data["serviceProcessId"] = this.serviceProcessId; | |
data["serviceStartTime"] = this.serviceStartTime; | |
return data; | |
} | |
} | |
export interface IMetricsDto { | |
environmentArchitecture?: string | undefined; | |
environmentName?: string | undefined; | |
machineDomain?: string | undefined; | |
machineName?: string | undefined; | |
machineOS?: string | undefined; | |
machineProcessorCount?: number | undefined; | |
serviceName?: string | undefined; | |
serviceProcessId?: number | undefined; | |
serviceStartTime?: string | undefined; | |
} | |
export class OperationLog implements IOperationLog { | |
/** User Id of the log author. Detailed information can be retrieved from the user endpoint in the Employee microservice */ | |
readonly authorUserId?: number | undefined; | |
/** Creation date of the operation log */ | |
readonly creationDate?: string | undefined; | |
/** Detailed description of the operation log */ | |
readonly description?: string | undefined; | |
/** Order of the operation */ | |
readonly order?: number | undefined; | |
/** Title of the operation log */ | |
readonly title?: string | undefined; | |
constructor(data?: IOperationLog) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(_data?: any) { | |
if (_data) { | |
(<any>this).authorUserId = _data["authorUserId"]; | |
(<any>this).creationDate = _data["creationDate"]; | |
(<any>this).description = _data["description"]; | |
(<any>this).order = _data["order"]; | |
(<any>this).title = _data["title"]; | |
} | |
} | |
static fromJS(data: any): OperationLog { | |
data = typeof data === 'object' ? data : {}; | |
let result = new OperationLog(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["authorUserId"] = this.authorUserId; | |
data["creationDate"] = this.creationDate; | |
data["description"] = this.description; | |
data["order"] = this.order; | |
data["title"] = this.title; | |
return data; | |
} | |
} | |
export interface IOperationLog { | |
/** User Id of the log author. Detailed information can be retrieved from the user endpoint in the Employee microservice */ | |
authorUserId?: number | undefined; | |
/** Creation date of the operation log */ | |
creationDate?: string | undefined; | |
/** Detailed description of the operation log */ | |
description?: string | undefined; | |
/** Order of the operation */ | |
order?: number | undefined; | |
/** Title of the operation log */ | |
title?: string | undefined; | |
} | |
export class OwnerRelation extends BaseRelation implements IOwnerRelation { | |
/** The date at which the relationship ended. If the relationship is ongoing, endDate is null */ | |
endDate?: string | undefined; | |
/** ID of the partner relationship */ | |
id?: number | undefined; | |
/** Date at which the relationship details have been communicated for the last time */ | |
lastInfoDate?: string | undefined; | |
/** Relationship subtype */ | |
ownerType?: string | undefined; | |
/** Type of relationship */ | |
relationType!: string; | |
/** The partner policy holder id the target partner is linked to */ | |
sourcePartner!: number; | |
/** The date at which the relationship started */ | |
startDate?: string | undefined; | |
/** Status code indicating the relationship validity. Status code can be either 1 or 2 */ | |
statusCode?: number | undefined; | |
/** Timestamp of the last update */ | |
statusId?: string | undefined; | |
/** The partner policy holder id with whom the source partner is linked */ | |
targetPartner!: number; | |
/** Type of relationship */ | |
type!: OwnerRelationType; | |
/** ID of the user who created/updated the relationship */ | |
userId!: number; | |
constructor(data?: IOwnerRelation) { | |
super(data); | |
} | |
init(_data?: any) { | |
super.init(_data); | |
if (_data) { | |
this.endDate = _data["endDate"]; | |
this.id = _data["id"]; | |
this.lastInfoDate = _data["lastInfoDate"]; | |
this.ownerType = _data["ownerType"]; | |
this.relationType = _data["relationType"]; | |
this.sourcePartner = _data["sourcePartner"]; | |
this.startDate = _data["startDate"]; | |
this.statusCode = _data["statusCode"]; | |
this.statusId = _data["statusId"]; | |
this.targetPartner = _data["targetPartner"]; | |
this.type = _data["type"]; | |
this.userId = _data["userId"]; | |
} | |
} | |
static fromJS(data: any): OwnerRelation { | |
data = typeof data === 'object' ? data : {}; | |
let result = new OwnerRelation(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["endDate"] = this.endDate; | |
data["id"] = this.id; | |
data["lastInfoDate"] = this.lastInfoDate; | |
data["ownerType"] = this.ownerType; | |
data["relationType"] = this.relationType; | |
data["sourcePartner"] = this.sourcePartner; | |
data["startDate"] = this.startDate; | |
data["statusCode"] = this.statusCode; | |
data["statusId"] = this.statusId; | |
data["targetPartner"] = this.targetPartner; | |
data["type"] = this.type; | |
data["userId"] = this.userId; | |
super.toJSON(data); | |
return data; | |
} | |
} | |
export interface IOwnerRelation extends IBaseRelation { | |
/** The date at which the relationship ended. If the relationship is ongoing, endDate is null */ | |
endDate?: string | undefined; | |
/** ID of the partner relationship */ | |
id?: number | undefined; | |
/** Date at which the relationship details have been communicated for the last time */ | |
lastInfoDate?: string | undefined; | |
/** Relationship subtype */ | |
ownerType?: string | undefined; | |
/** Type of relationship */ | |
relationType: string; | |
/** The partner policy holder id the target partner is linked to */ | |
sourcePartner: number; | |
/** The date at which the relationship started */ | |
startDate?: string | undefined; | |
/** Status code indicating the relationship validity. Status code can be either 1 or 2 */ | |
statusCode?: number | undefined; | |
/** Timestamp of the last update */ | |
statusId?: string | undefined; | |
/** The partner policy holder id with whom the source partner is linked */ | |
targetPartner: number; | |
/** Type of relationship */ | |
type: OwnerRelationType; | |
/** ID of the user who created/updated the relationship */ | |
userId: number; | |
} | |
export class Pageable implements IPageable { | |
offset?: number | undefined; | |
pageNumber?: number | undefined; | |
pageSize?: number | undefined; | |
paged?: boolean | undefined; | |
sort?: Sort | undefined; | |
unpaged?: boolean | undefined; | |
constructor(data?: IPageable) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(_data?: any) { | |
if (_data) { | |
this.offset = _data["offset"]; | |
this.pageNumber = _data["pageNumber"]; | |
this.pageSize = _data["pageSize"]; | |
this.paged = _data["paged"]; | |
this.sort = _data["sort"] ? Sort.fromJS(_data["sort"]) : <any>undefined; | |
this.unpaged = _data["unpaged"]; | |
} | |
} | |
static fromJS(data: any): Pageable { | |
data = typeof data === 'object' ? data : {}; | |
let result = new Pageable(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["offset"] = this.offset; | |
data["pageNumber"] = this.pageNumber; | |
data["pageSize"] = this.pageSize; | |
data["paged"] = this.paged; | |
data["sort"] = this.sort ? this.sort.toJSON() : <any>undefined; | |
data["unpaged"] = this.unpaged; | |
return data; | |
} | |
} | |
export interface IPageable { | |
offset?: number | undefined; | |
pageNumber?: number | undefined; | |
pageSize?: number | undefined; | |
paged?: boolean | undefined; | |
sort?: Sort | undefined; | |
unpaged?: boolean | undefined; | |
} | |
export class Page«Partner» implements IPage«Partner» { | |
content?: Partner[] | undefined; | |
empty?: boolean | undefined; | |
first?: boolean | undefined; | |
last?: boolean | undefined; | |
number?: number | undefined; | |
numberOfElements?: number | undefined; | |
pageable?: Pageable | undefined; | |
size?: number | undefined; | |
sort?: Sort | undefined; | |
totalElements?: number | undefined; | |
totalPages?: number | undefined; | |
constructor(data?: IPage«Partner») { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(_data?: any) { | |
if (_data) { | |
if (Array.isArray(_data["content"])) { | |
this.content = [] as any; | |
for (let item of _data["content"]) | |
this.content!.push(Partner.fromJS(item)); | |
} | |
this.empty = _data["empty"]; | |
this.first = _data["first"]; | |
this.last = _data["last"]; | |
this.number = _data["number"]; | |
this.numberOfElements = _data["numberOfElements"]; | |
this.pageable = _data["pageable"] ? Pageable.fromJS(_data["pageable"]) : <any>undefined; | |
this.size = _data["size"]; | |
this.sort = _data["sort"] ? Sort.fromJS(_data["sort"]) : <any>undefined; | |
this.totalElements = _data["totalElements"]; | |
this.totalPages = _data["totalPages"]; | |
} | |
} | |
static fromJS(data: any): Page«Partner» { | |
data = typeof data === 'object' ? data : {}; | |
let result = new Page«Partner»(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
if (Array.isArray(this.content)) { | |
data["content"] = []; | |
for (let item of this.content) | |
data["content"].push(item.toJSON()); | |
} | |
data["empty"] = this.empty; | |
data["first"] = this.first; | |
data["last"] = this.last; | |
data["number"] = this.number; | |
data["numberOfElements"] = this.numberOfElements; | |
data["pageable"] = this.pageable ? this.pageable.toJSON() : <any>undefined; | |
data["size"] = this.size; | |
data["sort"] = this.sort ? this.sort.toJSON() : <any>undefined; | |
data["totalElements"] = this.totalElements; | |
data["totalPages"] = this.totalPages; | |
return data; | |
} | |
} | |
export interface IPage«Partner» { | |
content?: Partner[] | undefined; | |
empty?: boolean | undefined; | |
first?: boolean | undefined; | |
last?: boolean | undefined; | |
number?: number | undefined; | |
numberOfElements?: number | undefined; | |
pageable?: Pageable | undefined; | |
size?: number | undefined; | |
sort?: Sort | undefined; | |
totalElements?: number | undefined; | |
totalPages?: number | undefined; | |
} | |
export class PartnerAddress implements IPartnerAddress { | |
/** 2 character Canton Code */ | |
canton?: string | undefined; | |
/** City name */ | |
city!: string; | |
/** Address or recipient optional complement */ | |
complement?: string | undefined; | |
/** 2 character Country ISO Code */ | |
country!: string; | |
/** ID of the address */ | |
id!: number; | |
/** Order in the list of addresses */ | |
order!: number; | |
/** City postcode */ | |
postCode!: string; | |
/** Recipient : if this information is present, it should be considered as the partner name in the address */ | |
recipient?: string | undefined; | |
/** Street */ | |
street!: string; | |
/** Type of the address (Enum). Warning: An AIA address is not editable and must be used cautiously. This latter is a copy of the address used to create a tax certificate and may be out-of-date */ | |
type!: PartnerAddressType; | |
constructor(data?: IPartnerAddress) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(_data?: any) { | |
if (_data) { | |
this.canton = _data["canton"]; | |
this.city = _data["city"]; | |
this.complement = _data["complement"]; | |
this.country = _data["country"]; | |
this.id = _data["id"]; | |
this.order = _data["order"]; | |
this.postCode = _data["postCode"]; | |
this.recipient = _data["recipient"]; | |
this.street = _data["street"]; | |
this.type = _data["type"]; | |
} | |
} | |
static fromJS(data: any): PartnerAddress { | |
data = typeof data === 'object' ? data : {}; | |
let result = new PartnerAddress(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["canton"] = this.canton; | |
data["city"] = this.city; | |
data["complement"] = this.complement; | |
data["country"] = this.country; | |
data["id"] = this.id; | |
data["order"] = this.order; | |
data["postCode"] = this.postCode; | |
data["recipient"] = this.recipient; | |
data["street"] = this.street; | |
data["type"] = this.type; | |
return data; | |
} | |
} | |
export interface IPartnerAddress { | |
/** 2 character Canton Code */ | |
canton?: string | undefined; | |
/** City name */ | |
city: string; | |
/** Address or recipient optional complement */ | |
complement?: string | undefined; | |
/** 2 character Country ISO Code */ | |
country: string; | |
/** ID of the address */ | |
id: number; | |
/** Order in the list of addresses */ | |
order: number; | |
/** City postcode */ | |
postCode: string; | |
/** Recipient : if this information is present, it should be considered as the partner name in the address */ | |
recipient?: string | undefined; | |
/** Street */ | |
street: string; | |
/** Type of the address (Enum). Warning: An AIA address is not editable and must be used cautiously. This latter is a copy of the address used to create a tax certificate and may be out-of-date */ | |
type: PartnerAddressType; | |
} | |
export class PartnerLeisure implements IPartnerLeisure { | |
/** The code of the category associated with this leisure */ | |
category?: string | undefined; | |
/** The end date of this leisure */ | |
endDate?: string | undefined; | |
/** The unique id corresponding to the leisure */ | |
id?: string | undefined; | |
/** The translated value of the leisure */ | |
label?: string | undefined; | |
/** The start date of this leisure */ | |
startDate?: string | undefined; | |
constructor(data?: IPartnerLeisure) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(_data?: any) { | |
if (_data) { | |
this.category = _data["category"]; | |
this.endDate = _data["endDate"]; | |
this.id = _data["id"]; | |
this.label = _data["label"]; | |
this.startDate = _data["startDate"]; | |
} | |
} | |
static fromJS(data: any): PartnerLeisure { | |
data = typeof data === 'object' ? data : {}; | |
let result = new PartnerLeisure(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["category"] = this.category; | |
data["endDate"] = this.endDate; | |
data["id"] = this.id; | |
data["label"] = this.label; | |
data["startDate"] = this.startDate; | |
return data; | |
} | |
} | |
export interface IPartnerLeisure { | |
/** The code of the category associated with this leisure */ | |
category?: string | undefined; | |
/** The end date of this leisure */ | |
endDate?: string | undefined; | |
/** The unique id corresponding to the leisure */ | |
id?: string | undefined; | |
/** The translated value of the leisure */ | |
label?: string | undefined; | |
/** The start date of this leisure */ | |
startDate?: string | undefined; | |
} | |
export class PartnerRelation implements IPartnerRelation { | |
/** The date at which the relationship ended. If the relationship is ongoing, endDate is null */ | |
endDate?: string | undefined; | |
/** ID of the partner relationship */ | |
id?: number | undefined; | |
/** Type of relationship */ | |
relationType!: string; | |
/** The partner policy holder id the target partner is linked to */ | |
sourcePartner!: number; | |
/** The date at which the relationship started */ | |
startDate?: string | undefined; | |
/** Timestamp of the last update */ | |
statusId?: string | undefined; | |
/** The partner policy holder id with whom the source partner is linked */ | |
targetPartner!: number; | |
/** Type of relationship */ | |
type!: PartnerRelationType; | |
/** ID of the user who created/updated the relationship */ | |
userId!: number; | |
constructor(data?: IPartnerRelation) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(_data?: any) { | |
if (_data) { | |
this.endDate = _data["endDate"]; | |
this.id = _data["id"]; | |
this.relationType = _data["relationType"]; | |
this.sourcePartner = _data["sourcePartner"]; | |
this.startDate = _data["startDate"]; | |
this.statusId = _data["statusId"]; | |
this.targetPartner = _data["targetPartner"]; | |
this.type = _data["type"]; | |
this.userId = _data["userId"]; | |
} | |
} | |
static fromJS(data: any): PartnerRelation { | |
data = typeof data === 'object' ? data : {}; | |
let result = new PartnerRelation(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["endDate"] = this.endDate; | |
data["id"] = this.id; | |
data["relationType"] = this.relationType; | |
data["sourcePartner"] = this.sourcePartner; | |
data["startDate"] = this.startDate; | |
data["statusId"] = this.statusId; | |
data["targetPartner"] = this.targetPartner; | |
data["type"] = this.type; | |
data["userId"] = this.userId; | |
return data; | |
} | |
} | |
export interface IPartnerRelation { | |
/** The date at which the relationship ended. If the relationship is ongoing, endDate is null */ | |
endDate?: string | undefined; | |
/** ID of the partner relationship */ | |
id?: number | undefined; | |
/** Type of relationship */ | |
relationType: string; | |
/** The partner policy holder id the target partner is linked to */ | |
sourcePartner: number; | |
/** The date at which the relationship started */ | |
startDate?: string | undefined; | |
/** Timestamp of the last update */ | |
statusId?: string | undefined; | |
/** The partner policy holder id with whom the source partner is linked */ | |
targetPartner: number; | |
/** Type of relationship */ | |
type: PartnerRelationType; | |
/** ID of the user who created/updated the relationship */ | |
userId: number; | |
} | |
export class PartnerStatisticsDto implements IPartnerStatisticsDto { | |
/** Partner net claim ratio */ | |
netClaimRatio?: number | undefined; | |
constructor(data?: IPartnerStatisticsDto) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(_data?: any) { | |
if (_data) { | |
this.netClaimRatio = _data["netClaimRatio"]; | |
} | |
} | |
static fromJS(data: any): PartnerStatisticsDto { | |
data = typeof data === 'object' ? data : {}; | |
let result = new PartnerStatisticsDto(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["netClaimRatio"] = this.netClaimRatio; | |
return data; | |
} | |
} | |
export interface IPartnerStatisticsDto { | |
/** Partner net claim ratio */ | |
netClaimRatio?: number | undefined; | |
} | |
export class Person extends Partner implements IPerson { | |
/** Partner AVS Number */ | |
avsNumber?: number | undefined; | |
/** Partner BirthDate */ | |
birthDate?: string | undefined; | |
/** Partner civil status */ | |
civilStatus?: PersonCivilStatus | undefined; | |
/** Date of the partner entry creation */ | |
creationDate?: Date | undefined; | |
/** Date of death if any */ | |
deceasedDate?: string | undefined; | |
/** Partner driver license issue date */ | |
driverLicenseDate?: string | undefined; | |
/** Partner personal email address */ | |
email?: string | undefined; | |
/** Partner fax number */ | |
faxNumber?: string | undefined; | |
/** Partner first name */ | |
firstName?: string | undefined; | |
/** Partner honorific title (Prof Dr, Prince...) */ | |
honorificTitle?: string | undefined; | |
/** Indicates if the partner policy holder Id is cancelled. A partner is cancelled when a duplicate entry is found. */ | |
isCancelled?: boolean | undefined; | |
/** Indicates whether the partner is deceased */ | |
isDeceased?: boolean | undefined; | |
/** Indicates whether the partner is a Vaudoise employee */ | |
isEmployee?: boolean | undefined; | |
/** Indicates whether the partner is an injured party */ | |
isInjuredParty?: boolean | undefined; | |
/** Indicates whether the partner is a Vaudoise policy holder */ | |
isPolicyHolder?: boolean | undefined; | |
/** Indicates whether the partner gives a reason for concern (e.g. Payment delays) */ | |
isUnderMonitoring?: boolean | undefined; | |
/** Indicates whether the partner pays a flat rate in case this latter is liable to VAT */ | |
isVatFlatRate?: boolean | undefined; | |
/** Indicates whether the partner is liable to pay VAT */ | |
isVatLiable?: boolean | undefined; | |
/** Indicates whether the partner is VIP */ | |
isVip?: boolean | undefined; | |
/** Partner ISNPers */ | |
isnPers?: number | undefined; | |
/** Partner language */ | |
language?: string | undefined; | |
/** Partner last name */ | |
lastName?: string | undefined; | |
/** Partner maiden name */ | |
maidenName?: string | undefined; | |
/** Managing agency of the policy holder */ | |
managingAgency?: string | undefined; | |
/** Partner mobile phone */ | |
mobilePhone?: string | undefined; | |
/** Partner nationality */ | |
nationality?: string | undefined; | |
/** Partner occupation */ | |
occupation?: string | undefined; | |
/** Partner phone */ | |
phone?: string | undefined; | |
/** Partner Policy Holder Id */ | |
policyHolderId!: number; | |
/** Statistics related to the partner */ | |
statistics!: PartnerStatisticsDto; | |
/** Partner title */ | |
title?: PersonTitle | undefined; | |
/** Partner type */ | |
type!: PersonType; | |
/** Unique user id of the person who updated the partner entry */ | |
updatedBy?: number | undefined; | |
/** Date of the latest partner entry update */ | |
updatedDate?: Date | undefined; | |
/** Partner professional email address */ | |
workEmail?: string | undefined; | |
/** Partner work phone */ | |
workPhone?: string | undefined; | |
constructor(data?: IPerson) { | |
super(data); | |
if (!data) { | |
this.statistics = new PartnerStatisticsDto(); | |
} | |
this._discriminator = "Person"; | |
} | |
init(_data?: any) { | |
super.init(_data); | |
if (_data) { | |
this.avsNumber = _data["avsNumber"]; | |
this.birthDate = _data["birthDate"]; | |
this.civilStatus = _data["civilStatus"]; | |
this.creationDate = _data["creationDate"] ? new Date(_data["creationDate"].toString()) : <any>undefined; | |
this.deceasedDate = _data["deceasedDate"]; | |
this.driverLicenseDate = _data["driverLicenseDate"]; | |
this.email = _data["email"]; | |
this.faxNumber = _data["faxNumber"]; | |
this.firstName = _data["firstName"]; | |
this.honorificTitle = _data["honorificTitle"]; | |
this.isCancelled = _data["isCancelled"]; | |
this.isDeceased = _data["isDeceased"]; | |
this.isEmployee = _data["isEmployee"]; | |
this.isInjuredParty = _data["isInjuredParty"]; | |
this.isPolicyHolder = _data["isPolicyHolder"]; | |
this.isUnderMonitoring = _data["isUnderMonitoring"]; | |
this.isVatFlatRate = _data["isVatFlatRate"]; | |
this.isVatLiable = _data["isVatLiable"]; | |
this.isVip = _data["isVip"]; | |
this.isnPers = _data["isnPers"]; | |
this.language = _data["language"]; | |
this.lastName = _data["lastName"]; | |
this.maidenName = _data["maidenName"]; | |
this.managingAgency = _data["managingAgency"]; | |
this.mobilePhone = _data["mobilePhone"]; | |
this.nationality = _data["nationality"]; | |
this.occupation = _data["occupation"]; | |
this.phone = _data["phone"]; | |
this.policyHolderId = _data["policyHolderId"]; | |
this.statistics = _data["statistics"] ? PartnerStatisticsDto.fromJS(_data["statistics"]) : new PartnerStatisticsDto(); | |
this.title = _data["title"]; | |
this.type = _data["type"]; | |
this.updatedBy = _data["updatedBy"]; | |
this.updatedDate = _data["updatedDate"] ? new Date(_data["updatedDate"].toString()) : <any>undefined; | |
this.workEmail = _data["workEmail"]; | |
this.workPhone = _data["workPhone"]; | |
} | |
} | |
static fromJS(data: any): Person { | |
data = typeof data === 'object' ? data : {}; | |
let result = new Person(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["avsNumber"] = this.avsNumber; | |
data["birthDate"] = this.birthDate; | |
data["civilStatus"] = this.civilStatus; | |
data["creationDate"] = this.creationDate ? this.creationDate.toISOString() : <any>undefined; | |
data["deceasedDate"] = this.deceasedDate; | |
data["driverLicenseDate"] = this.driverLicenseDate; | |
data["email"] = this.email; | |
data["faxNumber"] = this.faxNumber; | |
data["firstName"] = this.firstName; | |
data["honorificTitle"] = this.honorificTitle; | |
data["isCancelled"] = this.isCancelled; | |
data["isDeceased"] = this.isDeceased; | |
data["isEmployee"] = this.isEmployee; | |
data["isInjuredParty"] = this.isInjuredParty; | |
data["isPolicyHolder"] = this.isPolicyHolder; | |
data["isUnderMonitoring"] = this.isUnderMonitoring; | |
data["isVatFlatRate"] = this.isVatFlatRate; | |
data["isVatLiable"] = this.isVatLiable; | |
data["isVip"] = this.isVip; | |
data["isnPers"] = this.isnPers; | |
data["language"] = this.language; | |
data["lastName"] = this.lastName; | |
data["maidenName"] = this.maidenName; | |
data["managingAgency"] = this.managingAgency; | |
data["mobilePhone"] = this.mobilePhone; | |
data["nationality"] = this.nationality; | |
data["occupation"] = this.occupation; | |
data["phone"] = this.phone; | |
data["policyHolderId"] = this.policyHolderId; | |
data["statistics"] = this.statistics ? this.statistics.toJSON() : <any>undefined; | |
data["title"] = this.title; | |
data["type"] = this.type; | |
data["updatedBy"] = this.updatedBy; | |
data["updatedDate"] = this.updatedDate ? this.updatedDate.toISOString() : <any>undefined; | |
data["workEmail"] = this.workEmail; | |
data["workPhone"] = this.workPhone; | |
super.toJSON(data); | |
return data; | |
} | |
} | |
export interface IPerson extends IPartner { | |
/** Partner AVS Number */ | |
avsNumber?: number | undefined; | |
/** Partner BirthDate */ | |
birthDate?: string | undefined; | |
/** Partner civil status */ | |
civilStatus?: PersonCivilStatus | undefined; | |
/** Date of the partner entry creation */ | |
creationDate?: Date | undefined; | |
/** Date of death if any */ | |
deceasedDate?: string | undefined; | |
/** Partner driver license issue date */ | |
driverLicenseDate?: string | undefined; | |
/** Partner personal email address */ | |
email?: string | undefined; | |
/** Partner fax number */ | |
faxNumber?: string | undefined; | |
/** Partner first name */ | |
firstName?: string | undefined; | |
/** Partner honorific title (Prof Dr, Prince...) */ | |
honorificTitle?: string | undefined; | |
/** Indicates if the partner policy holder Id is cancelled. A partner is cancelled when a duplicate entry is found. */ | |
isCancelled?: boolean | undefined; | |
/** Indicates whether the partner is deceased */ | |
isDeceased?: boolean | undefined; | |
/** Indicates whether the partner is a Vaudoise employee */ | |
isEmployee?: boolean | undefined; | |
/** Indicates whether the partner is an injured party */ | |
isInjuredParty?: boolean | undefined; | |
/** Indicates whether the partner is a Vaudoise policy holder */ | |
isPolicyHolder?: boolean | undefined; | |
/** Indicates whether the partner gives a reason for concern (e.g. Payment delays) */ | |
isUnderMonitoring?: boolean | undefined; | |
/** Indicates whether the partner pays a flat rate in case this latter is liable to VAT */ | |
isVatFlatRate?: boolean | undefined; | |
/** Indicates whether the partner is liable to pay VAT */ | |
isVatLiable?: boolean | undefined; | |
/** Indicates whether the partner is VIP */ | |
isVip?: boolean | undefined; | |
/** Partner ISNPers */ | |
isnPers?: number | undefined; | |
/** Partner language */ | |
language?: string | undefined; | |
/** Partner last name */ | |
lastName?: string | undefined; | |
/** Partner maiden name */ | |
maidenName?: string | undefined; | |
/** Managing agency of the policy holder */ | |
managingAgency?: string | undefined; | |
/** Partner mobile phone */ | |
mobilePhone?: string | undefined; | |
/** Partner nationality */ | |
nationality?: string | undefined; | |
/** Partner occupation */ | |
occupation?: string | undefined; | |
/** Partner phone */ | |
phone?: string | undefined; | |
/** Partner Policy Holder Id */ | |
policyHolderId: number; | |
/** Statistics related to the partner */ | |
statistics: PartnerStatisticsDto; | |
/** Partner title */ | |
title?: PersonTitle | undefined; | |
/** Partner type */ | |
type: PersonType; | |
/** Unique user id of the person who updated the partner entry */ | |
updatedBy?: number | undefined; | |
/** Date of the latest partner entry update */ | |
updatedDate?: Date | undefined; | |
/** Partner professional email address */ | |
workEmail?: string | undefined; | |
/** Partner work phone */ | |
workPhone?: string | undefined; | |
} | |
export class ProxyRelation extends BaseRelation implements IProxyRelation { | |
/** The date at which the relationship ended. If the relationship is ongoing, endDate is null */ | |
endDate?: string | undefined; | |
/** ID of the partner relationship */ | |
id?: number | undefined; | |
/** Date at which the relationship details have been communicated for the last time */ | |
lastInfoDate?: string | undefined; | |
/** Relationship subtype */ | |
proxyType?: string | undefined; | |
/** Type of relationship */ | |
relationType!: string; | |
/** The partner policy holder id the target partner is linked to */ | |
sourcePartner!: number; | |
/** The date at which the relationship started */ | |
startDate?: string | undefined; | |
/** Status code indicating the relationship validity. Status code can be either 1 or 2 */ | |
statusCode?: number | undefined; | |
/** Timestamp of the last update */ | |
statusId?: string | undefined; | |
/** The partner policy holder id with whom the source partner is linked */ | |
targetPartner!: number; | |
/** Type of relationship */ | |
type!: ProxyRelationType; | |
/** ID of the user who created/updated the relationship */ | |
userId!: number; | |
constructor(data?: IProxyRelation) { | |
super(data); | |
} | |
init(_data?: any) { | |
super.init(_data); | |
if (_data) { | |
this.endDate = _data["endDate"]; | |
this.id = _data["id"]; | |
this.lastInfoDate = _data["lastInfoDate"]; | |
this.proxyType = _data["proxyType"]; | |
this.relationType = _data["relationType"]; | |
this.sourcePartner = _data["sourcePartner"]; | |
this.startDate = _data["startDate"]; | |
this.statusCode = _data["statusCode"]; | |
this.statusId = _data["statusId"]; | |
this.targetPartner = _data["targetPartner"]; | |
this.type = _data["type"]; | |
this.userId = _data["userId"]; | |
} | |
} | |
static fromJS(data: any): ProxyRelation { | |
data = typeof data === 'object' ? data : {}; | |
let result = new ProxyRelation(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["endDate"] = this.endDate; | |
data["id"] = this.id; | |
data["lastInfoDate"] = this.lastInfoDate; | |
data["proxyType"] = this.proxyType; | |
data["relationType"] = this.relationType; | |
data["sourcePartner"] = this.sourcePartner; | |
data["startDate"] = this.startDate; | |
data["statusCode"] = this.statusCode; | |
data["statusId"] = this.statusId; | |
data["targetPartner"] = this.targetPartner; | |
data["type"] = this.type; | |
data["userId"] = this.userId; | |
super.toJSON(data); | |
return data; | |
} | |
} | |
export interface IProxyRelation extends IBaseRelation { | |
/** The date at which the relationship ended. If the relationship is ongoing, endDate is null */ | |
endDate?: string | undefined; | |
/** ID of the partner relationship */ | |
id?: number | undefined; | |
/** Date at which the relationship details have been communicated for the last time */ | |
lastInfoDate?: string | undefined; | |
/** Relationship subtype */ | |
proxyType?: string | undefined; | |
/** Type of relationship */ | |
relationType: string; | |
/** The partner policy holder id the target partner is linked to */ | |
sourcePartner: number; | |
/** The date at which the relationship started */ | |
startDate?: string | undefined; | |
/** Status code indicating the relationship validity. Status code can be either 1 or 2 */ | |
statusCode?: number | undefined; | |
/** Timestamp of the last update */ | |
statusId?: string | undefined; | |
/** The partner policy holder id with whom the source partner is linked */ | |
targetPartner: number; | |
/** Type of relationship */ | |
type: ProxyRelationType; | |
/** ID of the user who created/updated the relationship */ | |
userId: number; | |
} | |
export class Sort implements ISort { | |
empty?: boolean | undefined; | |
sorted?: boolean | undefined; | |
unsorted?: boolean | undefined; | |
constructor(data?: ISort) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(_data?: any) { | |
if (_data) { | |
this.empty = _data["empty"]; | |
this.sorted = _data["sorted"]; | |
this.unsorted = _data["unsorted"]; | |
} | |
} | |
static fromJS(data: any): Sort { | |
data = typeof data === 'object' ? data : {}; | |
let result = new Sort(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["empty"] = this.empty; | |
data["sorted"] = this.sorted; | |
data["unsorted"] = this.unsorted; | |
return data; | |
} | |
} | |
export interface ISort { | |
empty?: boolean | undefined; | |
sorted?: boolean | undefined; | |
unsorted?: boolean | undefined; | |
} | |
export class SupplierBusiness implements ISupplierBusiness { | |
/** Value of the business with the supplier */ | |
amount?: number | undefined; | |
/** Number of invoices */ | |
numberOfInvoices?: number | undefined; | |
/** Business year */ | |
year?: number | undefined; | |
constructor(data?: ISupplierBusiness) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(_data?: any) { | |
if (_data) { | |
this.amount = _data["amount"]; | |
this.numberOfInvoices = _data["numberOfInvoices"]; | |
this.year = _data["year"]; | |
} | |
} | |
static fromJS(data: any): SupplierBusiness { | |
data = typeof data === 'object' ? data : {}; | |
let result = new SupplierBusiness(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["amount"] = this.amount; | |
data["numberOfInvoices"] = this.numberOfInvoices; | |
data["year"] = this.year; | |
return data; | |
} | |
} | |
export interface ISupplierBusiness { | |
/** Value of the business with the supplier */ | |
amount?: number | undefined; | |
/** Number of invoices */ | |
numberOfInvoices?: number | undefined; | |
/** Business year */ | |
year?: number | undefined; | |
} | |
export class ValidationMessage implements IValidationMessage { | |
code?: string | undefined; | |
display?: string | undefined; | |
fields?: string[] | undefined; | |
valParams?: { [key: string]: string; } | undefined; | |
constructor(data?: IValidationMessage) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(_data?: any) { | |
if (_data) { | |
this.code = _data["code"]; | |
this.display = _data["display"]; | |
if (Array.isArray(_data["fields"])) { | |
this.fields = [] as any; | |
for (let item of _data["fields"]) | |
this.fields!.push(item); | |
} | |
if (_data["valParams"]) { | |
this.valParams = {} as any; | |
for (let key in _data["valParams"]) { | |
if (_data["valParams"].hasOwnProperty(key)) | |
this.valParams![key] = _data["valParams"][key]; | |
} | |
} | |
} | |
} | |
static fromJS(data: any): ValidationMessage { | |
data = typeof data === 'object' ? data : {}; | |
let result = new ValidationMessage(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["code"] = this.code; | |
data["display"] = this.display; | |
if (Array.isArray(this.fields)) { | |
data["fields"] = []; | |
for (let item of this.fields) | |
data["fields"].push(item); | |
} | |
if (this.valParams) { | |
data["valParams"] = {}; | |
for (let key in this.valParams) { | |
if (this.valParams.hasOwnProperty(key)) | |
data["valParams"][key] = this.valParams[key]; | |
} | |
} | |
return data; | |
} | |
} | |
export interface IValidationMessage { | |
code?: string | undefined; | |
display?: string | undefined; | |
fields?: string[] | undefined; | |
valParams?: { [key: string]: string; } | undefined; | |
} | |
export class ValidationResponse implements IValidationResponse { | |
validations?: ValidationMessage[] | undefined; | |
constructor(data?: IValidationResponse) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(_data?: any) { | |
if (_data) { | |
if (Array.isArray(_data["validations"])) { | |
this.validations = [] as any; | |
for (let item of _data["validations"]) | |
this.validations!.push(ValidationMessage.fromJS(item)); | |
} | |
} | |
} | |
static fromJS(data: any): ValidationResponse { | |
data = typeof data === 'object' ? data : {}; | |
let result = new ValidationResponse(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
if (Array.isArray(this.validations)) { | |
data["validations"] = []; | |
for (let item of this.validations) | |
data["validations"].push(item.toJSON()); | |
} | |
return data; | |
} | |
} | |
export interface IValidationResponse { | |
validations?: ValidationMessage[] | undefined; | |
} | |
/** Language */ | |
export enum AcceptLanguage { | |
FR = "FR", | |
DE = "DE", | |
IT = "IT", | |
} | |
/** Language */ | |
export enum AcceptLanguage2 { | |
FR = "FR", | |
DE = "DE", | |
IT = "IT", | |
} | |
/** Language */ | |
export enum AcceptLanguage3 { | |
FR = "FR", | |
DE = "DE", | |
IT = "IT", | |
} | |
/** Language */ | |
export enum AcceptLanguage4 { | |
FR = "FR", | |
DE = "DE", | |
IT = "IT", | |
} | |
/** Language */ | |
export enum AcceptLanguage5 { | |
FR = "FR", | |
DE = "DE", | |
IT = "IT", | |
} | |
/** Language */ | |
export enum AcceptLanguage6 { | |
FR = "FR", | |
DE = "DE", | |
IT = "IT", | |
} | |
/** List of Partner types in camel case. Example: person */ | |
export enum PartnerTypes { | |
Person = "person", | |
Company = "company", | |
Couple = "couple", | |
} | |
/** Language */ | |
export enum AcceptLanguage7 { | |
FR = "FR", | |
DE = "DE", | |
IT = "IT", | |
} | |
/** Language */ | |
export enum AcceptLanguage8 { | |
FR = "FR", | |
DE = "DE", | |
IT = "IT", | |
} | |
/** Language */ | |
export enum AcceptLanguage9 { | |
FR = "FR", | |
DE = "DE", | |
IT = "IT", | |
} | |
/** Language */ | |
export enum AcceptLanguage10 { | |
FR = "FR", | |
DE = "DE", | |
IT = "IT", | |
} | |
/** Language */ | |
export enum AcceptLanguage11 { | |
FR = "FR", | |
DE = "DE", | |
IT = "IT", | |
} | |
/** Language */ | |
export enum AcceptLanguage12 { | |
FR = "FR", | |
DE = "DE", | |
IT = "IT", | |
} | |
/** Language */ | |
export enum AcceptLanguage13 { | |
FR = "FR", | |
DE = "DE", | |
IT = "IT", | |
} | |
/** Language */ | |
export enum AcceptLanguage14 { | |
FR = "FR", | |
DE = "DE", | |
IT = "IT", | |
} | |
/** Language */ | |
export enum AcceptLanguage15 { | |
FR = "FR", | |
DE = "DE", | |
IT = "IT", | |
} | |
/** Language */ | |
export enum AcceptLanguage16 { | |
FR = "FR", | |
DE = "DE", | |
IT = "IT", | |
} | |
/** Language */ | |
export enum AcceptLanguage17 { | |
FR = "FR", | |
DE = "DE", | |
IT = "IT", | |
} | |
/** Language */ | |
export enum AcceptLanguage18 { | |
FR = "FR", | |
DE = "DE", | |
IT = "IT", | |
} | |
/** Type of the relation */ | |
export enum Type { | |
Family = "family", | |
Ownership = "ownership", | |
Proxy = "proxy", | |
} | |
/** Language */ | |
export enum AcceptLanguage19 { | |
FR = "FR", | |
DE = "DE", | |
IT = "IT", | |
} | |
/** Language */ | |
export enum AcceptLanguage20 { | |
FR = "FR", | |
DE = "DE", | |
IT = "IT", | |
} | |
/** Language */ | |
export enum AcceptLanguage21 { | |
FR = "FR", | |
DE = "DE", | |
IT = "IT", | |
} | |
/** Language */ | |
export enum AcceptLanguage22 { | |
FR = "FR", | |
DE = "DE", | |
IT = "IT", | |
} | |
/** Language */ | |
export enum AcceptLanguage23 { | |
FR = "FR", | |
DE = "DE", | |
IT = "IT", | |
} | |
export enum BaseRelationType { | |
Family = "family", | |
Ownership = "ownership", | |
Proxy = "proxy", | |
} | |
export enum CompanyLegalFormCode { | |
PersonalCompany = "personalCompany", | |
SimpleCompany = "simpleCompany", | |
GeneralPartnership = "generalPartnership", | |
LimitedPartnership = "limitedPartnership", | |
LimitedSharesPartnership = "limitedSharesPartnership", | |
AnonymousPartnership = "anonymousPartnership", | |
LimitedLiabilityPartnership = "limitedLiabilityPartnership", | |
CooperativePartnership = "cooperativePartnership", | |
Other = "other", | |
} | |
export enum CompanyType { | |
Person = "person", | |
Company = "company", | |
Couple = "couple", | |
} | |
export enum CoupleType { | |
Person = "person", | |
Company = "company", | |
Couple = "couple", | |
} | |
export enum DependencyDtoStatus { | |
UP = "UP", | |
DOWN = "DOWN", | |
UNKNOWN = "UNKNOWN", | |
OUT_OF_SERVICE = "OUT_OF_SERVICE", | |
} | |
export enum FamilyRelationType { | |
Family = "family", | |
Ownership = "ownership", | |
Proxy = "proxy", | |
} | |
export enum HealthDtoStatus { | |
UP = "UP", | |
DOWN = "DOWN", | |
UNKNOWN = "UNKNOWN", | |
OUT_OF_SERVICE = "OUT_OF_SERVICE", | |
} | |
export enum MedicalRestrictionDtoType { | |
InjuredPersonExclusion = "injuredPersonExclusion", | |
Reserve = "reserve", | |
Other = "other", | |
Several = "several", | |
} | |
export enum OwnerRelationType { | |
Family = "family", | |
Ownership = "ownership", | |
Proxy = "proxy", | |
} | |
export enum PartnerAddressType { | |
UNDEFINED = "UNDEFINED", | |
MAIN = "MAIN", | |
PROFESSIONAL = "PROFESSIONAL", | |
SECONDARY = "SECONDARY", | |
POSTAL = "POSTAL", | |
POST_PAID = "POST_PAID", | |
SUMMONS = "SUMMONS", | |
AIA = "AIA", | |
CORRESPONDENCE = "CORRESPONDENCE", | |
} | |
export enum PartnerRelationType { | |
Family = "family", | |
Ownership = "ownership", | |
Proxy = "proxy", | |
} | |
export enum PersonCivilStatus { | |
Single = "single", | |
Married = "married", | |
Divorced = "divorced", | |
Widower = "widower", | |
Separate = "separate", | |
} | |
export enum PersonTitle { | |
Mr = "mr", | |
Mrs = "mrs", | |
Ms = "ms", | |
} | |
export enum PersonType { | |
Person = "person", | |
Company = "company", | |
Couple = "couple", | |
} | |
export enum ProxyRelationType { | |
Family = "family", | |
Ownership = "ownership", | |
Proxy = "proxy", | |
} | |
export class ApiException extends Error { | |
message: string; | |
status: number; | |
response: string; | |
headers: { [key: string]: any; }; | |
result: any; | |
constructor(message: string, status: number, response: string, headers: { [key: string]: any; }, result: any) { | |
super(); | |
this.message = message; | |
this.status = status; | |
this.response = response; | |
this.headers = headers; | |
this.result = result; | |
} | |
protected isApiException = true; | |
static isApiException(obj: any): obj is ApiException { | |
return obj.isApiException === true; | |
} | |
} | |
function throwException(message: string, status: number, response: string, headers: { [key: string]: any; }, result?: any): any { | |
if (result !== null && result !== undefined) | |
throw result; | |
else | |
throw new ApiException(message, status, response, headers, null); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment