@emilgroup/customer-sdk-node 1.63.1-beta.0 → 1.63.1-beta.1

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.
Files changed (45) hide show
  1. package/.openapi-generator/FILES +5 -0
  2. package/README.md +2 -2
  3. package/api/customer-controller-rest-api.ts +270 -0
  4. package/api/payments-api.ts +270 -0
  5. package/dist/api/customer-controller-rest-api.d.ts +158 -0
  6. package/dist/api/customer-controller-rest-api.js +195 -0
  7. package/dist/api/payments-api.d.ts +158 -0
  8. package/dist/api/payments-api.js +195 -0
  9. package/dist/models/attach-customer-payment-method-request-dto.d.ts +24 -0
  10. package/dist/models/attach-customer-payment-method-request-dto.js +15 -0
  11. package/dist/models/attach-customer-payment-method-response-class.d.ts +25 -0
  12. package/dist/models/attach-customer-payment-method-response-class.js +15 -0
  13. package/dist/models/create-account-request-dto.d.ts +8 -4
  14. package/dist/models/create-customer-claim-request-dto.d.ts +4 -2
  15. package/dist/models/create-lead-request-dto.d.ts +4 -2
  16. package/dist/models/customer-payment-method-class.d.ts +54 -0
  17. package/dist/models/customer-payment-method-class.js +15 -0
  18. package/dist/models/customer-policy-payment-method-class.d.ts +49 -0
  19. package/dist/models/customer-policy-payment-method-class.js +15 -0
  20. package/dist/models/index.d.ts +5 -0
  21. package/dist/models/index.js +5 -0
  22. package/dist/models/initiate-auth-request-dto.d.ts +4 -2
  23. package/dist/models/list-customer-payment-methods-response-class.d.ts +31 -0
  24. package/dist/models/list-customer-payment-methods-response-class.js +15 -0
  25. package/dist/models/policy-object-dto.d.ts +4 -2
  26. package/dist/models/respond-to-auth-challenge-request-dto.d.ts +4 -2
  27. package/dist/models/shared-customer-policy-object-request-dto.d.ts +4 -2
  28. package/dist/models/update-account-request-dto.d.ts +8 -4
  29. package/dist/models/update-customer-claim-request-dto.d.ts +4 -2
  30. package/models/attach-customer-payment-method-request-dto.ts +30 -0
  31. package/models/attach-customer-payment-method-response-class.ts +31 -0
  32. package/models/create-account-request-dto.ts +4 -4
  33. package/models/create-customer-claim-request-dto.ts +2 -2
  34. package/models/create-lead-request-dto.ts +2 -2
  35. package/models/customer-payment-method-class.ts +60 -0
  36. package/models/customer-policy-payment-method-class.ts +55 -0
  37. package/models/index.ts +5 -0
  38. package/models/initiate-auth-request-dto.ts +2 -2
  39. package/models/list-customer-payment-methods-response-class.ts +37 -0
  40. package/models/policy-object-dto.ts +2 -2
  41. package/models/respond-to-auth-challenge-request-dto.ts +2 -2
  42. package/models/shared-customer-policy-object-request-dto.ts +2 -2
  43. package/models/update-account-request-dto.ts +4 -4
  44. package/models/update-customer-claim-request-dto.ts +2 -2
  45. package/package.json +1 -1
@@ -22,6 +22,8 @@ git_push.sh
22
22
  index.ts
23
23
  models/account-class.ts
24
24
  models/account-policy-class.ts
25
+ models/attach-customer-payment-method-request-dto.ts
26
+ models/attach-customer-payment-method-response-class.ts
25
27
  models/authentication-result-class.ts
26
28
  models/bank-transfer-dto.ts
27
29
  models/billing-address-dto.ts
@@ -48,6 +50,8 @@ models/create-policy-request-dto.ts
48
50
  models/create-presigned-post-response-class.ts
49
51
  models/customer-class.ts
50
52
  models/customer-document-class.ts
53
+ models/customer-payment-method-class.ts
54
+ models/customer-policy-payment-method-class.ts
51
55
  models/customer-product-class.ts
52
56
  models/forgot-password-request-dto.ts
53
57
  models/get-customer-claim-response-class.ts
@@ -83,6 +87,7 @@ models/lead-bank-account-class.ts
83
87
  models/lead-class.ts
84
88
  models/link-lead-partner-request-dto.ts
85
89
  models/list-customer-claims-response-class.ts
90
+ models/list-customer-payment-methods-response-class.ts
86
91
  models/list-documents-response-class.ts
87
92
  models/list-invoices-response-class.ts
88
93
  models/list-leads-response-class.ts
package/README.md CHANGED
@@ -17,11 +17,11 @@ Although this package can be used in both TypeScript and JavaScript, it is inten
17
17
  Navigate to the folder of your consuming project and run one of the following commands:
18
18
 
19
19
  ```
20
- npm install @emilgroup/customer-sdk-node@1.63.1-beta.0 --save
20
+ npm install @emilgroup/customer-sdk-node@1.63.1-beta.1 --save
21
21
  ```
22
22
  or
23
23
  ```
24
- yarn add @emilgroup/customer-sdk-node@1.63.1-beta.0
24
+ yarn add @emilgroup/customer-sdk-node@1.63.1-beta.1
25
25
  ```
26
26
 
27
27
  And then you can import `CustomersApi`.
@@ -21,6 +21,10 @@ import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObj
21
21
  // @ts-ignore
22
22
  import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base';
23
23
  // @ts-ignore
24
+ import { AttachCustomerPaymentMethodRequestDto } from '../models';
25
+ // @ts-ignore
26
+ import { AttachCustomerPaymentMethodResponseClass } from '../models';
27
+ // @ts-ignore
24
28
  import { ChangeCustomerEmailRequestDto } from '../models';
25
29
  // @ts-ignore
26
30
  import { ChangePasswordRequestDto } from '../models';
@@ -61,6 +65,8 @@ import { InviteByTenantRequestDto } from '../models';
61
65
  // @ts-ignore
62
66
  import { InviteByTenantResponseClass } from '../models';
63
67
  // @ts-ignore
68
+ import { ListCustomerPaymentMethodsResponseClass } from '../models';
69
+ // @ts-ignore
64
70
  import { ListDocumentsResponseClass } from '../models';
65
71
  // @ts-ignore
66
72
  import { ListInvoicesResponseClass } from '../models';
@@ -100,6 +106,57 @@ const FormData = require('form-data');
100
106
  */
101
107
  export const CustomerControllerRestApiAxiosParamCreator = function (configuration?: Configuration) {
102
108
  return {
109
+ /**
110
+ * Use one of the customer\'s payment methods for future payments of the given policy.
111
+ * @summary Attach a payment method to a policy
112
+ * @param {string} customerCode The customer code or \"me\" for the currently logged in customer.
113
+ * @param {string} paymentMethodCode Code of one of the customer\'s payment methods.
114
+ * @param {AttachCustomerPaymentMethodRequestDto} attachCustomerPaymentMethodRequestDto
115
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
116
+ * @param {*} [options] Override http request option.
117
+ * @throws {RequiredError}
118
+ */
119
+ attachPaymentMethod: async (customerCode: string, paymentMethodCode: string, attachCustomerPaymentMethodRequestDto: AttachCustomerPaymentMethodRequestDto, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
120
+ // verify required parameter 'customerCode' is not null or undefined
121
+ assertParamExists('attachPaymentMethod', 'customerCode', customerCode)
122
+ // verify required parameter 'paymentMethodCode' is not null or undefined
123
+ assertParamExists('attachPaymentMethod', 'paymentMethodCode', paymentMethodCode)
124
+ // verify required parameter 'attachCustomerPaymentMethodRequestDto' is not null or undefined
125
+ assertParamExists('attachPaymentMethod', 'attachCustomerPaymentMethodRequestDto', attachCustomerPaymentMethodRequestDto)
126
+ const localVarPath = `/v1/customers/{customerCode}/payment-methods/{paymentMethodCode}/attach`
127
+ .replace(`{${"customerCode"}}`, encodeURIComponent(String(customerCode)))
128
+ .replace(`{${"paymentMethodCode"}}`, encodeURIComponent(String(paymentMethodCode)));
129
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
130
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
131
+ let baseOptions;
132
+ let baseAccessToken;
133
+ if (configuration) {
134
+ baseOptions = configuration.baseOptions;
135
+ baseAccessToken = configuration.accessToken;
136
+ }
137
+
138
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
139
+ const localVarHeaderParameter = {} as any;
140
+ const localVarQueryParameter = {} as any;
141
+
142
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
143
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
144
+ }
145
+
146
+
147
+
148
+ localVarHeaderParameter['Content-Type'] = 'application/json';
149
+
150
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
151
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
152
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
153
+ localVarRequestOptions.data = serializeDataIfNeeded(attachCustomerPaymentMethodRequestDto, localVarRequestOptions, configuration)
154
+
155
+ return {
156
+ url: toPathString(localVarUrlObj),
157
+ options: localVarRequestOptions,
158
+ };
159
+ },
103
160
  /**
104
161
  * Change customer\'s email using the token provided by the request email change endpoint.
105
162
  * @summary Change customer email
@@ -795,6 +852,62 @@ export const CustomerControllerRestApiAxiosParamCreator = function (configuratio
795
852
 
796
853
 
797
854
 
855
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
856
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
857
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
858
+
859
+ return {
860
+ url: toPathString(localVarUrlObj),
861
+ options: localVarRequestOptions,
862
+ };
863
+ },
864
+ /**
865
+ * List the payment methods on the customer\'s account, for example to choose one to attach to policies. IBANs are masked to their last four digits.
866
+ * @summary List payment methods of a customer
867
+ * @param {string} customerCode The customer code or \&quot;me\&quot; for the currently logged in customer.
868
+ * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
869
+ * @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&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
870
+ * @param {string} [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.
871
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
872
+ * @param {*} [options] Override http request option.
873
+ * @throws {RequiredError}
874
+ */
875
+ listPaymentMethods: async (customerCode: string, pageSize?: number, pageToken?: string, order?: string, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
876
+ // verify required parameter 'customerCode' is not null or undefined
877
+ assertParamExists('listPaymentMethods', 'customerCode', customerCode)
878
+ const localVarPath = `/v1/customers/{customerCode}/payment-methods`
879
+ .replace(`{${"customerCode"}}`, encodeURIComponent(String(customerCode)));
880
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
881
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
882
+ let baseOptions;
883
+ let baseAccessToken;
884
+ if (configuration) {
885
+ baseOptions = configuration.baseOptions;
886
+ baseAccessToken = configuration.accessToken;
887
+ }
888
+
889
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
890
+ const localVarHeaderParameter = {} as any;
891
+ const localVarQueryParameter = {} as any;
892
+
893
+ if (pageSize !== undefined) {
894
+ localVarQueryParameter['pageSize'] = pageSize;
895
+ }
896
+
897
+ if (pageToken !== undefined) {
898
+ localVarQueryParameter['pageToken'] = pageToken;
899
+ }
900
+
901
+ if (order !== undefined) {
902
+ localVarQueryParameter['order'] = order;
903
+ }
904
+
905
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
906
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
907
+ }
908
+
909
+
910
+
798
911
  setSearchParams(localVarUrlObj, localVarQueryParameter);
799
912
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
800
913
  localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
@@ -1190,6 +1303,20 @@ export const CustomerControllerRestApiAxiosParamCreator = function (configuratio
1190
1303
  export const CustomerControllerRestApiFp = function(configuration?: Configuration) {
1191
1304
  const localVarAxiosParamCreator = CustomerControllerRestApiAxiosParamCreator(configuration)
1192
1305
  return {
1306
+ /**
1307
+ * Use one of the customer\'s payment methods for future payments of the given policy.
1308
+ * @summary Attach a payment method to a policy
1309
+ * @param {string} customerCode The customer code or \&quot;me\&quot; for the currently logged in customer.
1310
+ * @param {string} paymentMethodCode Code of one of the customer\&#39;s payment methods.
1311
+ * @param {AttachCustomerPaymentMethodRequestDto} attachCustomerPaymentMethodRequestDto
1312
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
1313
+ * @param {*} [options] Override http request option.
1314
+ * @throws {RequiredError}
1315
+ */
1316
+ async attachPaymentMethod(customerCode: string, paymentMethodCode: string, attachCustomerPaymentMethodRequestDto: AttachCustomerPaymentMethodRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AttachCustomerPaymentMethodResponseClass>> {
1317
+ const localVarAxiosArgs = await localVarAxiosParamCreator.attachPaymentMethod(customerCode, paymentMethodCode, attachCustomerPaymentMethodRequestDto, authorization, options);
1318
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
1319
+ },
1193
1320
  /**
1194
1321
  * Change customer\'s email using the token provided by the request email change endpoint.
1195
1322
  * @summary Change customer email
@@ -1381,6 +1508,21 @@ export const CustomerControllerRestApiFp = function(configuration?: Configuratio
1381
1508
  const localVarAxiosArgs = await localVarAxiosParamCreator.listInvoices(customerCode, pageSize, pageToken, filter, search, order, expand, filters, authorization, options);
1382
1509
  return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
1383
1510
  },
1511
+ /**
1512
+ * List the payment methods on the customer\'s account, for example to choose one to attach to policies. IBANs are masked to their last four digits.
1513
+ * @summary List payment methods of a customer
1514
+ * @param {string} customerCode The customer code or \&quot;me\&quot; for the currently logged in customer.
1515
+ * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
1516
+ * @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&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
1517
+ * @param {string} [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.
1518
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
1519
+ * @param {*} [options] Override http request option.
1520
+ * @throws {RequiredError}
1521
+ */
1522
+ async listPaymentMethods(customerCode: string, pageSize?: number, pageToken?: string, order?: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListCustomerPaymentMethodsResponseClass>> {
1523
+ const localVarAxiosArgs = await localVarAxiosParamCreator.listPaymentMethods(customerCode, pageSize, pageToken, order, authorization, options);
1524
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
1525
+ },
1384
1526
  /**
1385
1527
  * Get new access token, new refresh token.
1386
1528
  * @summary Refresh token by customer
@@ -1497,6 +1639,19 @@ export const CustomerControllerRestApiFp = function(configuration?: Configuratio
1497
1639
  export const CustomerControllerRestApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
1498
1640
  const localVarFp = CustomerControllerRestApiFp(configuration)
1499
1641
  return {
1642
+ /**
1643
+ * Use one of the customer\'s payment methods for future payments of the given policy.
1644
+ * @summary Attach a payment method to a policy
1645
+ * @param {string} customerCode The customer code or \&quot;me\&quot; for the currently logged in customer.
1646
+ * @param {string} paymentMethodCode Code of one of the customer\&#39;s payment methods.
1647
+ * @param {AttachCustomerPaymentMethodRequestDto} attachCustomerPaymentMethodRequestDto
1648
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
1649
+ * @param {*} [options] Override http request option.
1650
+ * @throws {RequiredError}
1651
+ */
1652
+ attachPaymentMethod(customerCode: string, paymentMethodCode: string, attachCustomerPaymentMethodRequestDto: AttachCustomerPaymentMethodRequestDto, authorization?: string, options?: any): AxiosPromise<AttachCustomerPaymentMethodResponseClass> {
1653
+ return localVarFp.attachPaymentMethod(customerCode, paymentMethodCode, attachCustomerPaymentMethodRequestDto, authorization, options).then((request) => request(axios, basePath));
1654
+ },
1500
1655
  /**
1501
1656
  * Change customer\'s email using the token provided by the request email change endpoint.
1502
1657
  * @summary Change customer email
@@ -1674,6 +1829,20 @@ export const CustomerControllerRestApiFactory = function (configuration?: Config
1674
1829
  listInvoices(customerCode: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, filters?: string, authorization?: string, options?: any): AxiosPromise<ListInvoicesResponseClass> {
1675
1830
  return localVarFp.listInvoices(customerCode, pageSize, pageToken, filter, search, order, expand, filters, authorization, options).then((request) => request(axios, basePath));
1676
1831
  },
1832
+ /**
1833
+ * List the payment methods on the customer\'s account, for example to choose one to attach to policies. IBANs are masked to their last four digits.
1834
+ * @summary List payment methods of a customer
1835
+ * @param {string} customerCode The customer code or \&quot;me\&quot; for the currently logged in customer.
1836
+ * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
1837
+ * @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&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
1838
+ * @param {string} [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.
1839
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
1840
+ * @param {*} [options] Override http request option.
1841
+ * @throws {RequiredError}
1842
+ */
1843
+ listPaymentMethods(customerCode: string, pageSize?: number, pageToken?: string, order?: string, authorization?: string, options?: any): AxiosPromise<ListCustomerPaymentMethodsResponseClass> {
1844
+ return localVarFp.listPaymentMethods(customerCode, pageSize, pageToken, order, authorization, options).then((request) => request(axios, basePath));
1845
+ },
1677
1846
  /**
1678
1847
  * Get new access token, new refresh token.
1679
1848
  * @summary Refresh token by customer
@@ -1774,6 +1943,41 @@ export const CustomerControllerRestApiFactory = function (configuration?: Config
1774
1943
  };
1775
1944
  };
1776
1945
 
1946
+ /**
1947
+ * Request parameters for attachPaymentMethod operation in CustomerControllerRestApi.
1948
+ * @export
1949
+ * @interface CustomerControllerRestApiAttachPaymentMethodRequest
1950
+ */
1951
+ export interface CustomerControllerRestApiAttachPaymentMethodRequest {
1952
+ /**
1953
+ * The customer code or \&quot;me\&quot; for the currently logged in customer.
1954
+ * @type {string}
1955
+ * @memberof CustomerControllerRestApiAttachPaymentMethod
1956
+ */
1957
+ readonly customerCode: string
1958
+
1959
+ /**
1960
+ * Code of one of the customer\&#39;s payment methods.
1961
+ * @type {string}
1962
+ * @memberof CustomerControllerRestApiAttachPaymentMethod
1963
+ */
1964
+ readonly paymentMethodCode: string
1965
+
1966
+ /**
1967
+ *
1968
+ * @type {AttachCustomerPaymentMethodRequestDto}
1969
+ * @memberof CustomerControllerRestApiAttachPaymentMethod
1970
+ */
1971
+ readonly attachCustomerPaymentMethodRequestDto: AttachCustomerPaymentMethodRequestDto
1972
+
1973
+ /**
1974
+ * Bearer Token: provided by the login endpoint under the name accessToken.
1975
+ * @type {string}
1976
+ * @memberof CustomerControllerRestApiAttachPaymentMethod
1977
+ */
1978
+ readonly authorization?: string
1979
+ }
1980
+
1777
1981
  /**
1778
1982
  * Request parameters for changeCustomerEmail operation in CustomerControllerRestApi.
1779
1983
  * @export
@@ -2229,6 +2433,48 @@ export interface CustomerControllerRestApiListInvoicesRequest {
2229
2433
  readonly authorization?: string
2230
2434
  }
2231
2435
 
2436
+ /**
2437
+ * Request parameters for listPaymentMethods operation in CustomerControllerRestApi.
2438
+ * @export
2439
+ * @interface CustomerControllerRestApiListPaymentMethodsRequest
2440
+ */
2441
+ export interface CustomerControllerRestApiListPaymentMethodsRequest {
2442
+ /**
2443
+ * The customer code or \&quot;me\&quot; for the currently logged in customer.
2444
+ * @type {string}
2445
+ * @memberof CustomerControllerRestApiListPaymentMethods
2446
+ */
2447
+ readonly customerCode: string
2448
+
2449
+ /**
2450
+ * A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
2451
+ * @type {number}
2452
+ * @memberof CustomerControllerRestApiListPaymentMethods
2453
+ */
2454
+ readonly pageSize?: number
2455
+
2456
+ /**
2457
+ * 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&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
2458
+ * @type {string}
2459
+ * @memberof CustomerControllerRestApiListPaymentMethods
2460
+ */
2461
+ readonly pageToken?: string
2462
+
2463
+ /**
2464
+ * 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.
2465
+ * @type {string}
2466
+ * @memberof CustomerControllerRestApiListPaymentMethods
2467
+ */
2468
+ readonly order?: string
2469
+
2470
+ /**
2471
+ * Bearer Token: provided by the login endpoint under the name accessToken.
2472
+ * @type {string}
2473
+ * @memberof CustomerControllerRestApiListPaymentMethods
2474
+ */
2475
+ readonly authorization?: string
2476
+ }
2477
+
2232
2478
  /**
2233
2479
  * Request parameters for refreshToken operation in CustomerControllerRestApi.
2234
2480
  * @export
@@ -2411,6 +2657,18 @@ export interface CustomerControllerRestApiVerifyResetPasswordTokenRequest {
2411
2657
  * @extends {BaseAPI}
2412
2658
  */
2413
2659
  export class CustomerControllerRestApi extends BaseAPI {
2660
+ /**
2661
+ * Use one of the customer\'s payment methods for future payments of the given policy.
2662
+ * @summary Attach a payment method to a policy
2663
+ * @param {CustomerControllerRestApiAttachPaymentMethodRequest} requestParameters Request parameters.
2664
+ * @param {*} [options] Override http request option.
2665
+ * @throws {RequiredError}
2666
+ * @memberof CustomerControllerRestApi
2667
+ */
2668
+ public attachPaymentMethod(requestParameters: CustomerControllerRestApiAttachPaymentMethodRequest, options?: AxiosRequestConfig) {
2669
+ return CustomerControllerRestApiFp(this.configuration).attachPaymentMethod(requestParameters.customerCode, requestParameters.paymentMethodCode, requestParameters.attachCustomerPaymentMethodRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
2670
+ }
2671
+
2414
2672
  /**
2415
2673
  * Change customer\'s email using the token provided by the request email change endpoint.
2416
2674
  * @summary Change customer email
@@ -2579,6 +2837,18 @@ export class CustomerControllerRestApi extends BaseAPI {
2579
2837
  return CustomerControllerRestApiFp(this.configuration).listInvoices(requestParameters.customerCode, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, requestParameters.filters, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
2580
2838
  }
2581
2839
 
2840
+ /**
2841
+ * List the payment methods on the customer\'s account, for example to choose one to attach to policies. IBANs are masked to their last four digits.
2842
+ * @summary List payment methods of a customer
2843
+ * @param {CustomerControllerRestApiListPaymentMethodsRequest} requestParameters Request parameters.
2844
+ * @param {*} [options] Override http request option.
2845
+ * @throws {RequiredError}
2846
+ * @memberof CustomerControllerRestApi
2847
+ */
2848
+ public listPaymentMethods(requestParameters: CustomerControllerRestApiListPaymentMethodsRequest, options?: AxiosRequestConfig) {
2849
+ return CustomerControllerRestApiFp(this.configuration).listPaymentMethods(requestParameters.customerCode, requestParameters.pageSize, requestParameters.pageToken, requestParameters.order, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
2850
+ }
2851
+
2582
2852
  /**
2583
2853
  * Get new access token, new refresh token.
2584
2854
  * @summary Refresh token by customer