@emilgroup/customer-sdk-node 1.9.0 → 1.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.openapi-generator/FILES +6 -0
- package/README.md +2 -2
- package/api/authentication-api.ts +601 -0
- package/api/claims-api.ts +16 -16
- package/api/customers-api.ts +72 -1770
- package/api/documents-api.ts +442 -0
- package/api/invites-api.ts +443 -0
- package/api/invoices-api.ts +245 -0
- package/api/payments-api.ts +277 -0
- package/api/policies-api.ts +16 -16
- package/api/products-api.ts +19 -19
- package/api.ts +10 -0
- package/dist/api/authentication-api.d.ts +332 -0
- package/dist/api/authentication-api.js +604 -0
- package/dist/api/claims-api.d.ts +16 -16
- package/dist/api/claims-api.js +12 -12
- package/dist/api/customers-api.d.ts +0 -954
- package/dist/api/customers-api.js +20 -1381
- package/dist/api/documents-api.d.ts +262 -0
- package/dist/api/documents-api.js +417 -0
- package/dist/api/invites-api.d.ts +248 -0
- package/dist/api/invites-api.js +456 -0
- package/dist/api/invoices-api.d.ts +150 -0
- package/dist/api/invoices-api.js +253 -0
- package/dist/api/payments-api.d.ts +162 -0
- package/dist/api/payments-api.js +306 -0
- package/dist/api/policies-api.d.ts +16 -16
- package/dist/api/policies-api.js +12 -12
- package/dist/api/products-api.d.ts +20 -20
- package/dist/api/products-api.js +12 -12
- package/dist/api.d.ts +5 -0
- package/dist/api.js +5 -0
- package/dist/models/account-class.d.ts +26 -1
- package/dist/models/account-class.js +7 -0
- package/dist/models/create-account-request-dto.d.ts +39 -9
- package/dist/models/create-account-request-dto.js +11 -1
- package/dist/models/index.d.ts +1 -0
- package/dist/models/index.js +1 -0
- package/dist/models/list-policies-response-class.d.ts +4 -4
- package/dist/models/list-products-response-class.d.ts +31 -0
- package/dist/models/list-products-response-class.js +15 -0
- package/models/account-class.ts +29 -1
- package/models/create-account-request-dto.ts +41 -9
- package/models/index.ts +1 -0
- package/models/list-policies-response-class.ts +4 -4
- package/models/list-products-response-class.ts +37 -0
- package/package.json +2 -2
|
@@ -0,0 +1,245 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* EMIL CustomerService
|
|
5
|
+
* The EMIL CustomerService API description
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0
|
|
8
|
+
* Contact: kontakt@emil.de
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
|
|
17
|
+
import { Configuration } from '../configuration';
|
|
18
|
+
// Some imports not used depending on template conditions
|
|
19
|
+
// @ts-ignore
|
|
20
|
+
import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common';
|
|
21
|
+
// @ts-ignore
|
|
22
|
+
import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base';
|
|
23
|
+
// @ts-ignore
|
|
24
|
+
import { ListInvoicesResponseClass } from '../models';
|
|
25
|
+
// URLSearchParams not necessarily used
|
|
26
|
+
// @ts-ignore
|
|
27
|
+
import { URL, URLSearchParams } from 'url';
|
|
28
|
+
const FormData = require('form-data');
|
|
29
|
+
/**
|
|
30
|
+
* InvoicesApi - axios parameter creator
|
|
31
|
+
* @export
|
|
32
|
+
*/
|
|
33
|
+
export const InvoicesApiAxiosParamCreator = function (configuration?: Configuration) {
|
|
34
|
+
return {
|
|
35
|
+
/**
|
|
36
|
+
* List all the invoices of a customer.
|
|
37
|
+
* @summary List invoices of a customer
|
|
38
|
+
* @param {string} customerCode The customer code or \"me\" for the currently logged in customer.
|
|
39
|
+
* @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
|
|
40
|
+
* @param {any} [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.
|
|
41
|
+
* @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
|
|
42
|
+
* @param {any} [search] Search the list by any field. For instance, if you want to search by code add code=xxx in order to fetch the result.
|
|
43
|
+
* @param {any} [order] The order parameter determines how the results should be sorted according to a specified field. It functions similarly to an SQL ORDER BY. Sorting can be performed in either ascending (ASC) or descending (DESC) order. Default: ASC.
|
|
44
|
+
* @param {any} [expand] Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in addition to the default ones. Expanding resources can reduce the number of API calls required to accomplish a task. However, use this with parsimony as some expanded fields can drastically increase payload size.
|
|
45
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
46
|
+
* @param {*} [options] Override http request option.
|
|
47
|
+
* @throws {RequiredError}
|
|
48
|
+
*/
|
|
49
|
+
listInvoices: async (customerCode: string, pageSize?: any, pageToken?: any, filter?: any, search?: any, order?: any, expand?: any, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
50
|
+
// verify required parameter 'customerCode' is not null or undefined
|
|
51
|
+
assertParamExists('listInvoices', 'customerCode', customerCode)
|
|
52
|
+
const localVarPath = `/v1/customers/{customerCode}/invoices`
|
|
53
|
+
.replace(`{${"customerCode"}}`, encodeURIComponent(String(customerCode)));
|
|
54
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
55
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
56
|
+
let baseOptions;
|
|
57
|
+
let baseAccessToken;
|
|
58
|
+
if (configuration) {
|
|
59
|
+
baseOptions = configuration.baseOptions;
|
|
60
|
+
baseAccessToken = configuration.accessToken;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
64
|
+
const localVarHeaderParameter = {} as any;
|
|
65
|
+
const localVarQueryParameter = {} as any;
|
|
66
|
+
|
|
67
|
+
if (pageSize !== undefined) {
|
|
68
|
+
localVarQueryParameter['pageSize'] = pageSize;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
if (pageToken !== undefined) {
|
|
72
|
+
localVarQueryParameter['pageToken'] = pageToken;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
if (filter !== undefined) {
|
|
76
|
+
localVarQueryParameter['filter'] = filter;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
if (search !== undefined) {
|
|
80
|
+
localVarQueryParameter['search'] = search;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
if (order !== undefined) {
|
|
84
|
+
localVarQueryParameter['order'] = order;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
if (expand !== undefined) {
|
|
88
|
+
localVarQueryParameter['expand'] = expand;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
92
|
+
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
98
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
99
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
100
|
+
|
|
101
|
+
return {
|
|
102
|
+
url: toPathString(localVarUrlObj),
|
|
103
|
+
options: localVarRequestOptions,
|
|
104
|
+
};
|
|
105
|
+
},
|
|
106
|
+
}
|
|
107
|
+
};
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* InvoicesApi - functional programming interface
|
|
111
|
+
* @export
|
|
112
|
+
*/
|
|
113
|
+
export const InvoicesApiFp = function(configuration?: Configuration) {
|
|
114
|
+
const localVarAxiosParamCreator = InvoicesApiAxiosParamCreator(configuration)
|
|
115
|
+
return {
|
|
116
|
+
/**
|
|
117
|
+
* List all the invoices of a customer.
|
|
118
|
+
* @summary List invoices of a customer
|
|
119
|
+
* @param {string} customerCode The customer code or \"me\" for the currently logged in customer.
|
|
120
|
+
* @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
|
|
121
|
+
* @param {any} [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.
|
|
122
|
+
* @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
|
|
123
|
+
* @param {any} [search] Search the list by any field. For instance, if you want to search by code add code=xxx in order to fetch the result.
|
|
124
|
+
* @param {any} [order] The order parameter determines how the results should be sorted according to a specified field. It functions similarly to an SQL ORDER BY. Sorting can be performed in either ascending (ASC) or descending (DESC) order. Default: ASC.
|
|
125
|
+
* @param {any} [expand] Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in addition to the default ones. Expanding resources can reduce the number of API calls required to accomplish a task. However, use this with parsimony as some expanded fields can drastically increase payload size.
|
|
126
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
127
|
+
* @param {*} [options] Override http request option.
|
|
128
|
+
* @throws {RequiredError}
|
|
129
|
+
*/
|
|
130
|
+
async listInvoices(customerCode: string, pageSize?: any, pageToken?: any, filter?: any, search?: any, order?: any, expand?: any, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListInvoicesResponseClass>> {
|
|
131
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.listInvoices(customerCode, pageSize, pageToken, filter, search, order, expand, authorization, options);
|
|
132
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
133
|
+
},
|
|
134
|
+
}
|
|
135
|
+
};
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* InvoicesApi - factory interface
|
|
139
|
+
* @export
|
|
140
|
+
*/
|
|
141
|
+
export const InvoicesApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
|
142
|
+
const localVarFp = InvoicesApiFp(configuration)
|
|
143
|
+
return {
|
|
144
|
+
/**
|
|
145
|
+
* List all the invoices of a customer.
|
|
146
|
+
* @summary List invoices of a customer
|
|
147
|
+
* @param {string} customerCode The customer code or \"me\" for the currently logged in customer.
|
|
148
|
+
* @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
|
|
149
|
+
* @param {any} [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.
|
|
150
|
+
* @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
|
|
151
|
+
* @param {any} [search] Search the list by any field. For instance, if you want to search by code add code=xxx in order to fetch the result.
|
|
152
|
+
* @param {any} [order] The order parameter determines how the results should be sorted according to a specified field. It functions similarly to an SQL ORDER BY. Sorting can be performed in either ascending (ASC) or descending (DESC) order. Default: ASC.
|
|
153
|
+
* @param {any} [expand] Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in addition to the default ones. Expanding resources can reduce the number of API calls required to accomplish a task. However, use this with parsimony as some expanded fields can drastically increase payload size.
|
|
154
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
155
|
+
* @param {*} [options] Override http request option.
|
|
156
|
+
* @throws {RequiredError}
|
|
157
|
+
*/
|
|
158
|
+
listInvoices(customerCode: string, pageSize?: any, pageToken?: any, filter?: any, search?: any, order?: any, expand?: any, authorization?: string, options?: any): AxiosPromise<ListInvoicesResponseClass> {
|
|
159
|
+
return localVarFp.listInvoices(customerCode, pageSize, pageToken, filter, search, order, expand, authorization, options).then((request) => request(axios, basePath));
|
|
160
|
+
},
|
|
161
|
+
};
|
|
162
|
+
};
|
|
163
|
+
|
|
164
|
+
/**
|
|
165
|
+
* Request parameters for listInvoices operation in InvoicesApi.
|
|
166
|
+
* @export
|
|
167
|
+
* @interface InvoicesApiListInvoicesRequest
|
|
168
|
+
*/
|
|
169
|
+
export interface InvoicesApiListInvoicesRequest {
|
|
170
|
+
/**
|
|
171
|
+
* The customer code or \"me\" for the currently logged in customer.
|
|
172
|
+
* @type {string}
|
|
173
|
+
* @memberof InvoicesApiListInvoices
|
|
174
|
+
*/
|
|
175
|
+
readonly customerCode: string
|
|
176
|
+
|
|
177
|
+
/**
|
|
178
|
+
* A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
|
|
179
|
+
* @type {any}
|
|
180
|
+
* @memberof InvoicesApiListInvoices
|
|
181
|
+
*/
|
|
182
|
+
readonly pageSize?: any
|
|
183
|
+
|
|
184
|
+
/**
|
|
185
|
+
* 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.
|
|
186
|
+
* @type {any}
|
|
187
|
+
* @memberof InvoicesApiListInvoices
|
|
188
|
+
*/
|
|
189
|
+
readonly pageToken?: any
|
|
190
|
+
|
|
191
|
+
/**
|
|
192
|
+
* Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
|
|
193
|
+
* @type {any}
|
|
194
|
+
* @memberof InvoicesApiListInvoices
|
|
195
|
+
*/
|
|
196
|
+
readonly filter?: any
|
|
197
|
+
|
|
198
|
+
/**
|
|
199
|
+
* Search the list by any field. For instance, if you want to search by code add code=xxx in order to fetch the result.
|
|
200
|
+
* @type {any}
|
|
201
|
+
* @memberof InvoicesApiListInvoices
|
|
202
|
+
*/
|
|
203
|
+
readonly search?: any
|
|
204
|
+
|
|
205
|
+
/**
|
|
206
|
+
* The order parameter determines how the results should be sorted according to a specified field. It functions similarly to an SQL ORDER BY. Sorting can be performed in either ascending (ASC) or descending (DESC) order. Default: ASC.
|
|
207
|
+
* @type {any}
|
|
208
|
+
* @memberof InvoicesApiListInvoices
|
|
209
|
+
*/
|
|
210
|
+
readonly order?: any
|
|
211
|
+
|
|
212
|
+
/**
|
|
213
|
+
* Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in addition to the default ones. Expanding resources can reduce the number of API calls required to accomplish a task. However, use this with parsimony as some expanded fields can drastically increase payload size.
|
|
214
|
+
* @type {any}
|
|
215
|
+
* @memberof InvoicesApiListInvoices
|
|
216
|
+
*/
|
|
217
|
+
readonly expand?: any
|
|
218
|
+
|
|
219
|
+
/**
|
|
220
|
+
* Bearer Token: provided by the login endpoint under the name accessToken.
|
|
221
|
+
* @type {string}
|
|
222
|
+
* @memberof InvoicesApiListInvoices
|
|
223
|
+
*/
|
|
224
|
+
readonly authorization?: string
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
/**
|
|
228
|
+
* InvoicesApi - object-oriented interface
|
|
229
|
+
* @export
|
|
230
|
+
* @class InvoicesApi
|
|
231
|
+
* @extends {BaseAPI}
|
|
232
|
+
*/
|
|
233
|
+
export class InvoicesApi extends BaseAPI {
|
|
234
|
+
/**
|
|
235
|
+
* List all the invoices of a customer.
|
|
236
|
+
* @summary List invoices of a customer
|
|
237
|
+
* @param {InvoicesApiListInvoicesRequest} requestParameters Request parameters.
|
|
238
|
+
* @param {*} [options] Override http request option.
|
|
239
|
+
* @throws {RequiredError}
|
|
240
|
+
* @memberof InvoicesApi
|
|
241
|
+
*/
|
|
242
|
+
public listInvoices(requestParameters: InvoicesApiListInvoicesRequest, options?: AxiosRequestConfig) {
|
|
243
|
+
return InvoicesApiFp(this.configuration).listInvoices(requestParameters.customerCode, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
|
|
244
|
+
}
|
|
245
|
+
}
|
|
@@ -0,0 +1,277 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* EMIL CustomerService
|
|
5
|
+
* The EMIL CustomerService API description
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0
|
|
8
|
+
* Contact: kontakt@emil.de
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
|
|
17
|
+
import { Configuration } from '../configuration';
|
|
18
|
+
// Some imports not used depending on template conditions
|
|
19
|
+
// @ts-ignore
|
|
20
|
+
import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common';
|
|
21
|
+
// @ts-ignore
|
|
22
|
+
import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base';
|
|
23
|
+
// @ts-ignore
|
|
24
|
+
import { CompletePaymentSetupPspRequest } from '../models';
|
|
25
|
+
// @ts-ignore
|
|
26
|
+
import { CompletePaymentSetupResponseClass } from '../models';
|
|
27
|
+
// @ts-ignore
|
|
28
|
+
import { InitiatePaymentSetupResponseClass } from '../models';
|
|
29
|
+
// URLSearchParams not necessarily used
|
|
30
|
+
// @ts-ignore
|
|
31
|
+
import { URL, URLSearchParams } from 'url';
|
|
32
|
+
const FormData = require('form-data');
|
|
33
|
+
/**
|
|
34
|
+
* PaymentsApi - axios parameter creator
|
|
35
|
+
* @export
|
|
36
|
+
*/
|
|
37
|
+
export const PaymentsApiAxiosParamCreator = function (configuration?: Configuration) {
|
|
38
|
+
return {
|
|
39
|
+
/**
|
|
40
|
+
* Request to complete a payment change by customer.
|
|
41
|
+
* @summary Request payment setup complete by customer
|
|
42
|
+
* @param {string} customerCode The customer code or \"me\" for the currently logged in customer.
|
|
43
|
+
* @param {CompletePaymentSetupPspRequest} completePaymentSetupPspRequest
|
|
44
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
45
|
+
* @param {*} [options] Override http request option.
|
|
46
|
+
* @throws {RequiredError}
|
|
47
|
+
*/
|
|
48
|
+
completePaymentSetup: async (customerCode: string, completePaymentSetupPspRequest: CompletePaymentSetupPspRequest, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
49
|
+
// verify required parameter 'customerCode' is not null or undefined
|
|
50
|
+
assertParamExists('completePaymentSetup', 'customerCode', customerCode)
|
|
51
|
+
// verify required parameter 'completePaymentSetupPspRequest' is not null or undefined
|
|
52
|
+
assertParamExists('completePaymentSetup', 'completePaymentSetupPspRequest', completePaymentSetupPspRequest)
|
|
53
|
+
const localVarPath = `/v1/customers/{customerCode}/payment_setup/complete`
|
|
54
|
+
.replace(`{${"customerCode"}}`, encodeURIComponent(String(customerCode)));
|
|
55
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
56
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
57
|
+
let baseOptions;
|
|
58
|
+
let baseAccessToken;
|
|
59
|
+
if (configuration) {
|
|
60
|
+
baseOptions = configuration.baseOptions;
|
|
61
|
+
baseAccessToken = configuration.accessToken;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
|
|
65
|
+
const localVarHeaderParameter = {} as any;
|
|
66
|
+
const localVarQueryParameter = {} as any;
|
|
67
|
+
|
|
68
|
+
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
69
|
+
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
75
|
+
|
|
76
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
77
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
78
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
79
|
+
localVarRequestOptions.data = serializeDataIfNeeded(completePaymentSetupPspRequest, localVarRequestOptions, configuration)
|
|
80
|
+
|
|
81
|
+
return {
|
|
82
|
+
url: toPathString(localVarUrlObj),
|
|
83
|
+
options: localVarRequestOptions,
|
|
84
|
+
};
|
|
85
|
+
},
|
|
86
|
+
/**
|
|
87
|
+
* Request to initiate a payment change by customer.
|
|
88
|
+
* @summary Request payment setup initiation by customer
|
|
89
|
+
* @param {string} customerCode The customer code or \"me\" for the currently logged in customer.
|
|
90
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
91
|
+
* @param {*} [options] Override http request option.
|
|
92
|
+
* @throws {RequiredError}
|
|
93
|
+
*/
|
|
94
|
+
initiatePaymentSetup: async (customerCode: string, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
95
|
+
// verify required parameter 'customerCode' is not null or undefined
|
|
96
|
+
assertParamExists('initiatePaymentSetup', 'customerCode', customerCode)
|
|
97
|
+
const localVarPath = `/v1/customers/{customerCode}/payment_setup/initiate`
|
|
98
|
+
.replace(`{${"customerCode"}}`, encodeURIComponent(String(customerCode)));
|
|
99
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
100
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
101
|
+
let baseOptions;
|
|
102
|
+
let baseAccessToken;
|
|
103
|
+
if (configuration) {
|
|
104
|
+
baseOptions = configuration.baseOptions;
|
|
105
|
+
baseAccessToken = configuration.accessToken;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
|
|
109
|
+
const localVarHeaderParameter = {} as any;
|
|
110
|
+
const localVarQueryParameter = {} as any;
|
|
111
|
+
|
|
112
|
+
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
113
|
+
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
119
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
120
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
121
|
+
|
|
122
|
+
return {
|
|
123
|
+
url: toPathString(localVarUrlObj),
|
|
124
|
+
options: localVarRequestOptions,
|
|
125
|
+
};
|
|
126
|
+
},
|
|
127
|
+
}
|
|
128
|
+
};
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* PaymentsApi - functional programming interface
|
|
132
|
+
* @export
|
|
133
|
+
*/
|
|
134
|
+
export const PaymentsApiFp = function(configuration?: Configuration) {
|
|
135
|
+
const localVarAxiosParamCreator = PaymentsApiAxiosParamCreator(configuration)
|
|
136
|
+
return {
|
|
137
|
+
/**
|
|
138
|
+
* Request to complete a payment change by customer.
|
|
139
|
+
* @summary Request payment setup complete by customer
|
|
140
|
+
* @param {string} customerCode The customer code or \"me\" for the currently logged in customer.
|
|
141
|
+
* @param {CompletePaymentSetupPspRequest} completePaymentSetupPspRequest
|
|
142
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
143
|
+
* @param {*} [options] Override http request option.
|
|
144
|
+
* @throws {RequiredError}
|
|
145
|
+
*/
|
|
146
|
+
async completePaymentSetup(customerCode: string, completePaymentSetupPspRequest: CompletePaymentSetupPspRequest, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CompletePaymentSetupResponseClass>> {
|
|
147
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.completePaymentSetup(customerCode, completePaymentSetupPspRequest, authorization, options);
|
|
148
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
149
|
+
},
|
|
150
|
+
/**
|
|
151
|
+
* Request to initiate a payment change by customer.
|
|
152
|
+
* @summary Request payment setup initiation by customer
|
|
153
|
+
* @param {string} customerCode The customer code or \"me\" for the currently logged in customer.
|
|
154
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
155
|
+
* @param {*} [options] Override http request option.
|
|
156
|
+
* @throws {RequiredError}
|
|
157
|
+
*/
|
|
158
|
+
async initiatePaymentSetup(customerCode: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<InitiatePaymentSetupResponseClass>> {
|
|
159
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.initiatePaymentSetup(customerCode, authorization, options);
|
|
160
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
161
|
+
},
|
|
162
|
+
}
|
|
163
|
+
};
|
|
164
|
+
|
|
165
|
+
/**
|
|
166
|
+
* PaymentsApi - factory interface
|
|
167
|
+
* @export
|
|
168
|
+
*/
|
|
169
|
+
export const PaymentsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
|
170
|
+
const localVarFp = PaymentsApiFp(configuration)
|
|
171
|
+
return {
|
|
172
|
+
/**
|
|
173
|
+
* Request to complete a payment change by customer.
|
|
174
|
+
* @summary Request payment setup complete by customer
|
|
175
|
+
* @param {string} customerCode The customer code or \"me\" for the currently logged in customer.
|
|
176
|
+
* @param {CompletePaymentSetupPspRequest} completePaymentSetupPspRequest
|
|
177
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
178
|
+
* @param {*} [options] Override http request option.
|
|
179
|
+
* @throws {RequiredError}
|
|
180
|
+
*/
|
|
181
|
+
completePaymentSetup(customerCode: string, completePaymentSetupPspRequest: CompletePaymentSetupPspRequest, authorization?: string, options?: any): AxiosPromise<CompletePaymentSetupResponseClass> {
|
|
182
|
+
return localVarFp.completePaymentSetup(customerCode, completePaymentSetupPspRequest, authorization, options).then((request) => request(axios, basePath));
|
|
183
|
+
},
|
|
184
|
+
/**
|
|
185
|
+
* Request to initiate a payment change by customer.
|
|
186
|
+
* @summary Request payment setup initiation by customer
|
|
187
|
+
* @param {string} customerCode The customer code or \"me\" for the currently logged in customer.
|
|
188
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
189
|
+
* @param {*} [options] Override http request option.
|
|
190
|
+
* @throws {RequiredError}
|
|
191
|
+
*/
|
|
192
|
+
initiatePaymentSetup(customerCode: string, authorization?: string, options?: any): AxiosPromise<InitiatePaymentSetupResponseClass> {
|
|
193
|
+
return localVarFp.initiatePaymentSetup(customerCode, authorization, options).then((request) => request(axios, basePath));
|
|
194
|
+
},
|
|
195
|
+
};
|
|
196
|
+
};
|
|
197
|
+
|
|
198
|
+
/**
|
|
199
|
+
* Request parameters for completePaymentSetup operation in PaymentsApi.
|
|
200
|
+
* @export
|
|
201
|
+
* @interface PaymentsApiCompletePaymentSetupRequest
|
|
202
|
+
*/
|
|
203
|
+
export interface PaymentsApiCompletePaymentSetupRequest {
|
|
204
|
+
/**
|
|
205
|
+
* The customer code or \"me\" for the currently logged in customer.
|
|
206
|
+
* @type {string}
|
|
207
|
+
* @memberof PaymentsApiCompletePaymentSetup
|
|
208
|
+
*/
|
|
209
|
+
readonly customerCode: string
|
|
210
|
+
|
|
211
|
+
/**
|
|
212
|
+
*
|
|
213
|
+
* @type {CompletePaymentSetupPspRequest}
|
|
214
|
+
* @memberof PaymentsApiCompletePaymentSetup
|
|
215
|
+
*/
|
|
216
|
+
readonly completePaymentSetupPspRequest: CompletePaymentSetupPspRequest
|
|
217
|
+
|
|
218
|
+
/**
|
|
219
|
+
* Bearer Token: provided by the login endpoint under the name accessToken.
|
|
220
|
+
* @type {string}
|
|
221
|
+
* @memberof PaymentsApiCompletePaymentSetup
|
|
222
|
+
*/
|
|
223
|
+
readonly authorization?: string
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
/**
|
|
227
|
+
* Request parameters for initiatePaymentSetup operation in PaymentsApi.
|
|
228
|
+
* @export
|
|
229
|
+
* @interface PaymentsApiInitiatePaymentSetupRequest
|
|
230
|
+
*/
|
|
231
|
+
export interface PaymentsApiInitiatePaymentSetupRequest {
|
|
232
|
+
/**
|
|
233
|
+
* The customer code or \"me\" for the currently logged in customer.
|
|
234
|
+
* @type {string}
|
|
235
|
+
* @memberof PaymentsApiInitiatePaymentSetup
|
|
236
|
+
*/
|
|
237
|
+
readonly customerCode: string
|
|
238
|
+
|
|
239
|
+
/**
|
|
240
|
+
* Bearer Token: provided by the login endpoint under the name accessToken.
|
|
241
|
+
* @type {string}
|
|
242
|
+
* @memberof PaymentsApiInitiatePaymentSetup
|
|
243
|
+
*/
|
|
244
|
+
readonly authorization?: string
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
/**
|
|
248
|
+
* PaymentsApi - object-oriented interface
|
|
249
|
+
* @export
|
|
250
|
+
* @class PaymentsApi
|
|
251
|
+
* @extends {BaseAPI}
|
|
252
|
+
*/
|
|
253
|
+
export class PaymentsApi extends BaseAPI {
|
|
254
|
+
/**
|
|
255
|
+
* Request to complete a payment change by customer.
|
|
256
|
+
* @summary Request payment setup complete by customer
|
|
257
|
+
* @param {PaymentsApiCompletePaymentSetupRequest} requestParameters Request parameters.
|
|
258
|
+
* @param {*} [options] Override http request option.
|
|
259
|
+
* @throws {RequiredError}
|
|
260
|
+
* @memberof PaymentsApi
|
|
261
|
+
*/
|
|
262
|
+
public completePaymentSetup(requestParameters: PaymentsApiCompletePaymentSetupRequest, options?: AxiosRequestConfig) {
|
|
263
|
+
return PaymentsApiFp(this.configuration).completePaymentSetup(requestParameters.customerCode, requestParameters.completePaymentSetupPspRequest, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
/**
|
|
267
|
+
* Request to initiate a payment change by customer.
|
|
268
|
+
* @summary Request payment setup initiation by customer
|
|
269
|
+
* @param {PaymentsApiInitiatePaymentSetupRequest} requestParameters Request parameters.
|
|
270
|
+
* @param {*} [options] Override http request option.
|
|
271
|
+
* @throws {RequiredError}
|
|
272
|
+
* @memberof PaymentsApi
|
|
273
|
+
*/
|
|
274
|
+
public initiatePaymentSetup(requestParameters: PaymentsApiInitiatePaymentSetupRequest, options?: AxiosRequestConfig) {
|
|
275
|
+
return PaymentsApiFp(this.configuration).initiatePaymentSetup(requestParameters.customerCode, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
|
|
276
|
+
}
|
|
277
|
+
}
|
package/api/policies-api.ts
CHANGED
|
@@ -152,12 +152,12 @@ export const PoliciesApiAxiosParamCreator = function (configuration?: Configurat
|
|
|
152
152
|
* List all the policies that belong to a customer, the policies can be filtered by policy code, policy number.
|
|
153
153
|
* @summary List policies of a customer
|
|
154
154
|
* @param {string} customerCode The customer code or \"me\" for the currently logged in customer.
|
|
155
|
-
* @param {any} [pageSize] A limit on the number of objects to be returned.
|
|
156
|
-
* @param {any} [pageToken] A cursor for use in pagination.
|
|
155
|
+
* @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
|
|
156
|
+
* @param {any} [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.
|
|
157
157
|
* @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
|
|
158
158
|
* @param {any} [search] Search the list by any field. For instance, if you want to search by code add code=xxx in order to fetch the result.
|
|
159
|
-
* @param {any} [order] The order parameter determines how the results should be sorted according to a specified field.
|
|
160
|
-
* @param {any} [expand] Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in
|
|
159
|
+
* @param {any} [order] The order parameter determines how the results should be sorted according to a specified field. It functions similarly to an SQL ORDER BY. Sorting can be performed in either ascending (ASC) or descending (DESC) order. Default: ASC.
|
|
160
|
+
* @param {any} [expand] Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in addition to the default ones. Expanding resources can reduce the number of API calls required to accomplish a task. However, use this with parsimony as some expanded fields can drastically increase payload size.
|
|
161
161
|
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
162
162
|
* @param {*} [options] Override http request option.
|
|
163
163
|
* @throws {RequiredError}
|
|
@@ -454,12 +454,12 @@ export const PoliciesApiFp = function(configuration?: Configuration) {
|
|
|
454
454
|
* List all the policies that belong to a customer, the policies can be filtered by policy code, policy number.
|
|
455
455
|
* @summary List policies of a customer
|
|
456
456
|
* @param {string} customerCode The customer code or \"me\" for the currently logged in customer.
|
|
457
|
-
* @param {any} [pageSize] A limit on the number of objects to be returned.
|
|
458
|
-
* @param {any} [pageToken] A cursor for use in pagination.
|
|
457
|
+
* @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
|
|
458
|
+
* @param {any} [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.
|
|
459
459
|
* @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
|
|
460
460
|
* @param {any} [search] Search the list by any field. For instance, if you want to search by code add code=xxx in order to fetch the result.
|
|
461
|
-
* @param {any} [order] The order parameter determines how the results should be sorted according to a specified field.
|
|
462
|
-
* @param {any} [expand] Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in
|
|
461
|
+
* @param {any} [order] The order parameter determines how the results should be sorted according to a specified field. It functions similarly to an SQL ORDER BY. Sorting can be performed in either ascending (ASC) or descending (DESC) order. Default: ASC.
|
|
462
|
+
* @param {any} [expand] Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in addition to the default ones. Expanding resources can reduce the number of API calls required to accomplish a task. However, use this with parsimony as some expanded fields can drastically increase payload size.
|
|
463
463
|
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
464
464
|
* @param {*} [options] Override http request option.
|
|
465
465
|
* @throws {RequiredError}
|
|
@@ -562,12 +562,12 @@ export const PoliciesApiFactory = function (configuration?: Configuration, baseP
|
|
|
562
562
|
* List all the policies that belong to a customer, the policies can be filtered by policy code, policy number.
|
|
563
563
|
* @summary List policies of a customer
|
|
564
564
|
* @param {string} customerCode The customer code or \"me\" for the currently logged in customer.
|
|
565
|
-
* @param {any} [pageSize] A limit on the number of objects to be returned.
|
|
566
|
-
* @param {any} [pageToken] A cursor for use in pagination.
|
|
565
|
+
* @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
|
|
566
|
+
* @param {any} [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.
|
|
567
567
|
* @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
|
|
568
568
|
* @param {any} [search] Search the list by any field. For instance, if you want to search by code add code=xxx in order to fetch the result.
|
|
569
|
-
* @param {any} [order] The order parameter determines how the results should be sorted according to a specified field.
|
|
570
|
-
* @param {any} [expand] Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in
|
|
569
|
+
* @param {any} [order] The order parameter determines how the results should be sorted according to a specified field. It functions similarly to an SQL ORDER BY. Sorting can be performed in either ascending (ASC) or descending (DESC) order. Default: ASC.
|
|
570
|
+
* @param {any} [expand] Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in addition to the default ones. Expanding resources can reduce the number of API calls required to accomplish a task. However, use this with parsimony as some expanded fields can drastically increase payload size.
|
|
571
571
|
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
572
572
|
* @param {*} [options] Override http request option.
|
|
573
573
|
* @throws {RequiredError}
|
|
@@ -712,14 +712,14 @@ export interface PoliciesApiListPoliciesRequest {
|
|
|
712
712
|
readonly customerCode: string
|
|
713
713
|
|
|
714
714
|
/**
|
|
715
|
-
* A limit on the number of objects to be returned.
|
|
715
|
+
* A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
|
|
716
716
|
* @type {any}
|
|
717
717
|
* @memberof PoliciesApiListPolicies
|
|
718
718
|
*/
|
|
719
719
|
readonly pageSize?: any
|
|
720
720
|
|
|
721
721
|
/**
|
|
722
|
-
* A cursor for use in pagination.
|
|
722
|
+
* 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.
|
|
723
723
|
* @type {any}
|
|
724
724
|
* @memberof PoliciesApiListPolicies
|
|
725
725
|
*/
|
|
@@ -740,14 +740,14 @@ export interface PoliciesApiListPoliciesRequest {
|
|
|
740
740
|
readonly search?: any
|
|
741
741
|
|
|
742
742
|
/**
|
|
743
|
-
* The order parameter determines how the results should be sorted according to a specified field.
|
|
743
|
+
* The order parameter determines how the results should be sorted according to a specified field. It functions similarly to an SQL ORDER BY. Sorting can be performed in either ascending (ASC) or descending (DESC) order. Default: ASC.
|
|
744
744
|
* @type {any}
|
|
745
745
|
* @memberof PoliciesApiListPolicies
|
|
746
746
|
*/
|
|
747
747
|
readonly order?: any
|
|
748
748
|
|
|
749
749
|
/**
|
|
750
|
-
* Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in
|
|
750
|
+
* Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in addition to the default ones. Expanding resources can reduce the number of API calls required to accomplish a task. However, use this with parsimony as some expanded fields can drastically increase payload size.
|
|
751
751
|
* @type {any}
|
|
752
752
|
* @memberof PoliciesApiListPolicies
|
|
753
753
|
*/
|