/* tslint:disable */ /* eslint-disable */ /** * EMIL CommissionService * The EMIL CommissionService API description * * The version of the OpenAPI document: 1.0 * Contact: kontakt@emil.de * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; import { Configuration } from '../configuration'; // Some imports not used depending on template conditions // @ts-ignore import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common'; // @ts-ignore import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base'; // @ts-ignore import { CreateCommissionAgreementRequestDto } from '../models'; // @ts-ignore import { CreateCommissionAgreementResponseClass } from '../models'; // @ts-ignore import { GetCommissionAgreementResponseClass } from '../models'; // @ts-ignore import { ListCommissionAgreementsResponseClass } from '../models'; // @ts-ignore import { PatchCommissionAgreementStatusRequestDto } from '../models'; // @ts-ignore import { PatchCommissionAgreementStatusResponseClass } from '../models'; // @ts-ignore import { UpdateCommissionAgreementRequestDto } from '../models'; // @ts-ignore import { UpdateCommissionAgreementResponseClass } from '../models'; /** * CommissionAgreementsApi - axios parameter creator * @export */ export const CommissionAgreementsApiAxiosParamCreator = function (configuration?: Configuration) { return { /** * This will create commission agreement. * @summary Create the commission agreement * @param {CreateCommissionAgreementRequestDto} createCommissionAgreementRequestDto * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken. * @param {*} [options] Override http request option. * @throws {RequiredError} */ createCommissionAgreement: async (createCommissionAgreementRequestDto: CreateCommissionAgreementRequestDto, authorization?: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'createCommissionAgreementRequestDto' is not null or undefined assertParamExists('createCommissionAgreement', 'createCommissionAgreementRequestDto', createCommissionAgreementRequestDto) const localVarPath = `/commissionservice/v1/agreements`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; let baseAccessToken; if (configuration) { baseOptions = configuration.baseOptions; baseAccessToken = configuration.accessToken; } const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication bearer required // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) { localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken); } localVarHeaderParameter['Content-Type'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(createCommissionAgreementRequestDto, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * This will delete commission agreement. * @summary Delete the commission agreement * @param {string} code Unique identifier for the object. * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken. * @param {*} [options] Override http request option. * @throws {RequiredError} */ deleteCommissionAgreement: async (code: string, authorization?: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'code' is not null or undefined assertParamExists('deleteCommissionAgreement', 'code', code) const localVarPath = `/commissionservice/v1/agreements/{code}` .replace(`{${"code"}}`, encodeURIComponent(String(code))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; let baseAccessToken; if (configuration) { baseOptions = configuration.baseOptions; baseAccessToken = configuration.accessToken; } const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication bearer required // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) { localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken); } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * This will get commission agreement. * @summary Retrieve the commission agreement * @param {string} code * @param {string} expand * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getCommissionAgreement: async (code: string, expand: string, authorization?: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'code' is not null or undefined assertParamExists('getCommissionAgreement', 'code', code) // verify required parameter 'expand' is not null or undefined assertParamExists('getCommissionAgreement', 'expand', expand) const localVarPath = `/commissionservice/v1/agreements/{code}` .replace(`{${"code"}}`, encodeURIComponent(String(code))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; let baseAccessToken; if (configuration) { baseOptions = configuration.baseOptions; baseAccessToken = configuration.accessToken; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication bearer required // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) if (expand !== undefined) { localVarQueryParameter['expand'] = expand; } if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) { localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken); } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Retrieves a list of commission agreements. * @summary List commission agreements * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken. * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10. * @param {string} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken=1, your subsequent call can include pageToken=2 in order to fetch the next page of the list. * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.<br/> <br/> <i>Allowed values: id, code, createdAt, partnerCode, productSlug, endDate</i> * @param {string} [search] Search the response for matches in any searchable field. Use filter instead where possible for improved performance.<br/> <br/> <i>Searchable fields: code, commissionAgreementNumber, name, description</i> * @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.<br/> <br/> <i>Allowed values: commissionAgreementNumber, status, createdAt, updatedAt, billingFrequency</i> * @param {string} [expand] Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.<br/> <br/> <i>Allowed values: versions, products<i> * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.<br/> <br/> <i>Allowed values: id, code, createdAt, partnerCode, productSlug, endDate</i> * @param {*} [options] Override http request option. * @throws {RequiredError} */ listCommissionAgreements: async (authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, filters?: string, options: AxiosRequestConfig = {}): Promise => { const localVarPath = `/commissionservice/v1/agreements`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; let baseAccessToken; if (configuration) { baseOptions = configuration.baseOptions; baseAccessToken = configuration.accessToken; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication bearer required // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) if (pageSize !== undefined) { localVarQueryParameter['pageSize'] = pageSize; } if (pageToken !== undefined) { localVarQueryParameter['pageToken'] = pageToken; } if (filter !== undefined) { localVarQueryParameter['filter'] = filter; } if (search !== undefined) { localVarQueryParameter['search'] = search; } if (order !== undefined) { localVarQueryParameter['order'] = order; } if (expand !== undefined) { localVarQueryParameter['expand'] = expand; } if (filters !== undefined) { localVarQueryParameter['filters'] = filters; } if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) { localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken); } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * This will patch commission agreement status. * @summary Update the commission agreement status * @param {string} code Unique identifier for the object. * @param {PatchCommissionAgreementStatusRequestDto} patchCommissionAgreementStatusRequestDto * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken. * @param {*} [options] Override http request option. * @throws {RequiredError} */ patchCommissionAgreementStatus: async (code: string, patchCommissionAgreementStatusRequestDto: PatchCommissionAgreementStatusRequestDto, authorization?: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'code' is not null or undefined assertParamExists('patchCommissionAgreementStatus', 'code', code) // verify required parameter 'patchCommissionAgreementStatusRequestDto' is not null or undefined assertParamExists('patchCommissionAgreementStatus', 'patchCommissionAgreementStatusRequestDto', patchCommissionAgreementStatusRequestDto) const localVarPath = `/commissionservice/v1/agreements/{code}/status` .replace(`{${"code"}}`, encodeURIComponent(String(code))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; let baseAccessToken; if (configuration) { baseOptions = configuration.baseOptions; baseAccessToken = configuration.accessToken; } const localVarRequestOptions = { method: 'PATCH', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication bearer required // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) { localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken); } localVarHeaderParameter['Content-Type'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(patchCommissionAgreementStatusRequestDto, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * This will update commission agreement. * @summary Update the commission agreement * @param {string} code * @param {UpdateCommissionAgreementRequestDto} updateCommissionAgreementRequestDto * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken. * @param {*} [options] Override http request option. * @throws {RequiredError} */ updateCommissionAgreement: async (code: string, updateCommissionAgreementRequestDto: UpdateCommissionAgreementRequestDto, authorization?: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'code' is not null or undefined assertParamExists('updateCommissionAgreement', 'code', code) // verify required parameter 'updateCommissionAgreementRequestDto' is not null or undefined assertParamExists('updateCommissionAgreement', 'updateCommissionAgreementRequestDto', updateCommissionAgreementRequestDto) const localVarPath = `/commissionservice/v1/agreements/{code}` .replace(`{${"code"}}`, encodeURIComponent(String(code))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; let baseAccessToken; if (configuration) { baseOptions = configuration.baseOptions; baseAccessToken = configuration.accessToken; } const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication bearer required // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) { localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken); } localVarHeaderParameter['Content-Type'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(updateCommissionAgreementRequestDto, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, } }; /** * CommissionAgreementsApi - functional programming interface * @export */ export const CommissionAgreementsApiFp = function(configuration?: Configuration) { const localVarAxiosParamCreator = CommissionAgreementsApiAxiosParamCreator(configuration) return { /** * This will create commission agreement. * @summary Create the commission agreement * @param {CreateCommissionAgreementRequestDto} createCommissionAgreementRequestDto * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async createCommissionAgreement(createCommissionAgreementRequestDto: CreateCommissionAgreementRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.createCommissionAgreement(createCommissionAgreementRequestDto, authorization, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * This will delete commission agreement. * @summary Delete the commission agreement * @param {string} code Unique identifier for the object. * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async deleteCommissionAgreement(code: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.deleteCommissionAgreement(code, authorization, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * This will get commission agreement. * @summary Retrieve the commission agreement * @param {string} code * @param {string} expand * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async getCommissionAgreement(code: string, expand: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getCommissionAgreement(code, expand, authorization, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * Retrieves a list of commission agreements. * @summary List commission agreements * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken. * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10. * @param {string} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken=1, your subsequent call can include pageToken=2 in order to fetch the next page of the list. * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.<br/> <br/> <i>Allowed values: id, code, createdAt, partnerCode, productSlug, endDate</i> * @param {string} [search] Search the response for matches in any searchable field. Use filter instead where possible for improved performance.<br/> <br/> <i>Searchable fields: code, commissionAgreementNumber, name, description</i> * @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.<br/> <br/> <i>Allowed values: commissionAgreementNumber, status, createdAt, updatedAt, billingFrequency</i> * @param {string} [expand] Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.<br/> <br/> <i>Allowed values: versions, products<i> * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.<br/> <br/> <i>Allowed values: id, code, createdAt, partnerCode, productSlug, endDate</i> * @param {*} [options] Override http request option. * @throws {RequiredError} */ async listCommissionAgreements(authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, filters?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.listCommissionAgreements(authorization, pageSize, pageToken, filter, search, order, expand, filters, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * This will patch commission agreement status. * @summary Update the commission agreement status * @param {string} code Unique identifier for the object. * @param {PatchCommissionAgreementStatusRequestDto} patchCommissionAgreementStatusRequestDto * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async patchCommissionAgreementStatus(code: string, patchCommissionAgreementStatusRequestDto: PatchCommissionAgreementStatusRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.patchCommissionAgreementStatus(code, patchCommissionAgreementStatusRequestDto, authorization, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * This will update commission agreement. * @summary Update the commission agreement * @param {string} code * @param {UpdateCommissionAgreementRequestDto} updateCommissionAgreementRequestDto * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async updateCommissionAgreement(code: string, updateCommissionAgreementRequestDto: UpdateCommissionAgreementRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.updateCommissionAgreement(code, updateCommissionAgreementRequestDto, authorization, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, } }; /** * CommissionAgreementsApi - factory interface * @export */ export const CommissionAgreementsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { const localVarFp = CommissionAgreementsApiFp(configuration) return { /** * This will create commission agreement. * @summary Create the commission agreement * @param {CreateCommissionAgreementRequestDto} createCommissionAgreementRequestDto * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken. * @param {*} [options] Override http request option. * @throws {RequiredError} */ createCommissionAgreement(createCommissionAgreementRequestDto: CreateCommissionAgreementRequestDto, authorization?: string, options?: any): AxiosPromise { return localVarFp.createCommissionAgreement(createCommissionAgreementRequestDto, authorization, options).then((request) => request(axios, basePath)); }, /** * This will delete commission agreement. * @summary Delete the commission agreement * @param {string} code Unique identifier for the object. * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken. * @param {*} [options] Override http request option. * @throws {RequiredError} */ deleteCommissionAgreement(code: string, authorization?: string, options?: any): AxiosPromise { return localVarFp.deleteCommissionAgreement(code, authorization, options).then((request) => request(axios, basePath)); }, /** * This will get commission agreement. * @summary Retrieve the commission agreement * @param {string} code * @param {string} expand * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getCommissionAgreement(code: string, expand: string, authorization?: string, options?: any): AxiosPromise { return localVarFp.getCommissionAgreement(code, expand, authorization, options).then((request) => request(axios, basePath)); }, /** * Retrieves a list of commission agreements. * @summary List commission agreements * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken. * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10. * @param {string} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken=1, your subsequent call can include pageToken=2 in order to fetch the next page of the list. * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.<br/> <br/> <i>Allowed values: id, code, createdAt, partnerCode, productSlug, endDate</i> * @param {string} [search] Search the response for matches in any searchable field. Use filter instead where possible for improved performance.<br/> <br/> <i>Searchable fields: code, commissionAgreementNumber, name, description</i> * @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.<br/> <br/> <i>Allowed values: commissionAgreementNumber, status, createdAt, updatedAt, billingFrequency</i> * @param {string} [expand] Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.<br/> <br/> <i>Allowed values: versions, products<i> * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.<br/> <br/> <i>Allowed values: id, code, createdAt, partnerCode, productSlug, endDate</i> * @param {*} [options] Override http request option. * @throws {RequiredError} */ listCommissionAgreements(authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, filters?: string, options?: any): AxiosPromise { return localVarFp.listCommissionAgreements(authorization, pageSize, pageToken, filter, search, order, expand, filters, options).then((request) => request(axios, basePath)); }, /** * This will patch commission agreement status. * @summary Update the commission agreement status * @param {string} code Unique identifier for the object. * @param {PatchCommissionAgreementStatusRequestDto} patchCommissionAgreementStatusRequestDto * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken. * @param {*} [options] Override http request option. * @throws {RequiredError} */ patchCommissionAgreementStatus(code: string, patchCommissionAgreementStatusRequestDto: PatchCommissionAgreementStatusRequestDto, authorization?: string, options?: any): AxiosPromise { return localVarFp.patchCommissionAgreementStatus(code, patchCommissionAgreementStatusRequestDto, authorization, options).then((request) => request(axios, basePath)); }, /** * This will update commission agreement. * @summary Update the commission agreement * @param {string} code * @param {UpdateCommissionAgreementRequestDto} updateCommissionAgreementRequestDto * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken. * @param {*} [options] Override http request option. * @throws {RequiredError} */ updateCommissionAgreement(code: string, updateCommissionAgreementRequestDto: UpdateCommissionAgreementRequestDto, authorization?: string, options?: any): AxiosPromise { return localVarFp.updateCommissionAgreement(code, updateCommissionAgreementRequestDto, authorization, options).then((request) => request(axios, basePath)); }, }; }; /** * Request parameters for createCommissionAgreement operation in CommissionAgreementsApi. * @export * @interface CommissionAgreementsApiCreateCommissionAgreementRequest */ export interface CommissionAgreementsApiCreateCommissionAgreementRequest { /** * * @type {CreateCommissionAgreementRequestDto} * @memberof CommissionAgreementsApiCreateCommissionAgreement */ readonly createCommissionAgreementRequestDto: CreateCommissionAgreementRequestDto /** * Bearer Token: provided by the login endpoint under the name accessToken. * @type {string} * @memberof CommissionAgreementsApiCreateCommissionAgreement */ readonly authorization?: string } /** * Request parameters for deleteCommissionAgreement operation in CommissionAgreementsApi. * @export * @interface CommissionAgreementsApiDeleteCommissionAgreementRequest */ export interface CommissionAgreementsApiDeleteCommissionAgreementRequest { /** * Unique identifier for the object. * @type {string} * @memberof CommissionAgreementsApiDeleteCommissionAgreement */ readonly code: string /** * Bearer Token: provided by the login endpoint under the name accessToken. * @type {string} * @memberof CommissionAgreementsApiDeleteCommissionAgreement */ readonly authorization?: string } /** * Request parameters for getCommissionAgreement operation in CommissionAgreementsApi. * @export * @interface CommissionAgreementsApiGetCommissionAgreementRequest */ export interface CommissionAgreementsApiGetCommissionAgreementRequest { /** * * @type {string} * @memberof CommissionAgreementsApiGetCommissionAgreement */ readonly code: string /** * * @type {string} * @memberof CommissionAgreementsApiGetCommissionAgreement */ readonly expand: string /** * Bearer Token: provided by the login endpoint under the name accessToken. * @type {string} * @memberof CommissionAgreementsApiGetCommissionAgreement */ readonly authorization?: string } /** * Request parameters for listCommissionAgreements operation in CommissionAgreementsApi. * @export * @interface CommissionAgreementsApiListCommissionAgreementsRequest */ export interface CommissionAgreementsApiListCommissionAgreementsRequest { /** * Bearer Token: provided by the login endpoint under the name accessToken. * @type {string} * @memberof CommissionAgreementsApiListCommissionAgreements */ readonly authorization?: string /** * A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10. * @type {number} * @memberof CommissionAgreementsApiListCommissionAgreements */ readonly pageSize?: number /** * A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken=1, your subsequent call can include pageToken=2 in order to fetch the next page of the list. * @type {string} * @memberof CommissionAgreementsApiListCommissionAgreements */ readonly pageToken?: string /** * Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.<br/> <br/> <i>Allowed values: id, code, createdAt, partnerCode, productSlug, endDate</i> * @type {string} * @memberof CommissionAgreementsApiListCommissionAgreements */ readonly filter?: string /** * Search the response for matches in any searchable field. Use filter instead where possible for improved performance.<br/> <br/> <i>Searchable fields: code, commissionAgreementNumber, name, description</i> * @type {string} * @memberof CommissionAgreementsApiListCommissionAgreements */ readonly search?: string /** * Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.<br/> <br/> <i>Allowed values: commissionAgreementNumber, status, createdAt, updatedAt, billingFrequency</i> * @type {string} * @memberof CommissionAgreementsApiListCommissionAgreements */ readonly order?: string /** * Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.<br/> <br/> <i>Allowed values: versions, products<i> * @type {string} * @memberof CommissionAgreementsApiListCommissionAgreements */ readonly expand?: string /** * Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.<br/> <br/> <i>Allowed values: id, code, createdAt, partnerCode, productSlug, endDate</i> * @type {string} * @memberof CommissionAgreementsApiListCommissionAgreements */ readonly filters?: string } /** * Request parameters for patchCommissionAgreementStatus operation in CommissionAgreementsApi. * @export * @interface CommissionAgreementsApiPatchCommissionAgreementStatusRequest */ export interface CommissionAgreementsApiPatchCommissionAgreementStatusRequest { /** * Unique identifier for the object. * @type {string} * @memberof CommissionAgreementsApiPatchCommissionAgreementStatus */ readonly code: string /** * * @type {PatchCommissionAgreementStatusRequestDto} * @memberof CommissionAgreementsApiPatchCommissionAgreementStatus */ readonly patchCommissionAgreementStatusRequestDto: PatchCommissionAgreementStatusRequestDto /** * Bearer Token: provided by the login endpoint under the name accessToken. * @type {string} * @memberof CommissionAgreementsApiPatchCommissionAgreementStatus */ readonly authorization?: string } /** * Request parameters for updateCommissionAgreement operation in CommissionAgreementsApi. * @export * @interface CommissionAgreementsApiUpdateCommissionAgreementRequest */ export interface CommissionAgreementsApiUpdateCommissionAgreementRequest { /** * * @type {string} * @memberof CommissionAgreementsApiUpdateCommissionAgreement */ readonly code: string /** * * @type {UpdateCommissionAgreementRequestDto} * @memberof CommissionAgreementsApiUpdateCommissionAgreement */ readonly updateCommissionAgreementRequestDto: UpdateCommissionAgreementRequestDto /** * Bearer Token: provided by the login endpoint under the name accessToken. * @type {string} * @memberof CommissionAgreementsApiUpdateCommissionAgreement */ readonly authorization?: string } /** * CommissionAgreementsApi - object-oriented interface * @export * @class CommissionAgreementsApi * @extends {BaseAPI} */ export class CommissionAgreementsApi extends BaseAPI { /** * This will create commission agreement. * @summary Create the commission agreement * @param {CommissionAgreementsApiCreateCommissionAgreementRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CommissionAgreementsApi */ public createCommissionAgreement(requestParameters: CommissionAgreementsApiCreateCommissionAgreementRequest, options?: AxiosRequestConfig) { return CommissionAgreementsApiFp(this.configuration).createCommissionAgreement(requestParameters.createCommissionAgreementRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath)); } /** * This will delete commission agreement. * @summary Delete the commission agreement * @param {CommissionAgreementsApiDeleteCommissionAgreementRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CommissionAgreementsApi */ public deleteCommissionAgreement(requestParameters: CommissionAgreementsApiDeleteCommissionAgreementRequest, options?: AxiosRequestConfig) { return CommissionAgreementsApiFp(this.configuration).deleteCommissionAgreement(requestParameters.code, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath)); } /** * This will get commission agreement. * @summary Retrieve the commission agreement * @param {CommissionAgreementsApiGetCommissionAgreementRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CommissionAgreementsApi */ public getCommissionAgreement(requestParameters: CommissionAgreementsApiGetCommissionAgreementRequest, options?: AxiosRequestConfig) { return CommissionAgreementsApiFp(this.configuration).getCommissionAgreement(requestParameters.code, requestParameters.expand, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath)); } /** * Retrieves a list of commission agreements. * @summary List commission agreements * @param {CommissionAgreementsApiListCommissionAgreementsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CommissionAgreementsApi */ public listCommissionAgreements(requestParameters: CommissionAgreementsApiListCommissionAgreementsRequest = {}, options?: AxiosRequestConfig) { return CommissionAgreementsApiFp(this.configuration).listCommissionAgreements(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, requestParameters.filters, options).then((request) => request(this.axios, this.basePath)); } /** * This will patch commission agreement status. * @summary Update the commission agreement status * @param {CommissionAgreementsApiPatchCommissionAgreementStatusRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CommissionAgreementsApi */ public patchCommissionAgreementStatus(requestParameters: CommissionAgreementsApiPatchCommissionAgreementStatusRequest, options?: AxiosRequestConfig) { return CommissionAgreementsApiFp(this.configuration).patchCommissionAgreementStatus(requestParameters.code, requestParameters.patchCommissionAgreementStatusRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath)); } /** * This will update commission agreement. * @summary Update the commission agreement * @param {CommissionAgreementsApiUpdateCommissionAgreementRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CommissionAgreementsApi */ public updateCommissionAgreement(requestParameters: CommissionAgreementsApiUpdateCommissionAgreementRequest, options?: AxiosRequestConfig) { return CommissionAgreementsApiFp(this.configuration).updateCommissionAgreement(requestParameters.code, requestParameters.updateCommissionAgreementRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath)); } }