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

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
@@ -96,6 +96,53 @@ var FormData = require('form-data');
96
96
  var CustomerControllerRestApiAxiosParamCreator = function (configuration) {
97
97
  var _this = this;
98
98
  return {
99
+ /**
100
+ * Use one of the customer\'s payment methods for future payments of the given policy.
101
+ * @summary Attach a payment method to a policy
102
+ * @param {string} customerCode The customer code or \"me\" for the currently logged in customer.
103
+ * @param {string} paymentMethodCode Code of one of the customer\'s payment methods.
104
+ * @param {AttachCustomerPaymentMethodRequestDto} attachCustomerPaymentMethodRequestDto
105
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
106
+ * @param {*} [options] Override http request option.
107
+ * @throws {RequiredError}
108
+ */
109
+ attachPaymentMethod: function (customerCode, paymentMethodCode, attachCustomerPaymentMethodRequestDto, authorization, options) {
110
+ if (options === void 0) { options = {}; }
111
+ return __awaiter(_this, void 0, void 0, function () {
112
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
113
+ return __generator(this, function (_a) {
114
+ // verify required parameter 'customerCode' is not null or undefined
115
+ (0, common_1.assertParamExists)('attachPaymentMethod', 'customerCode', customerCode);
116
+ // verify required parameter 'paymentMethodCode' is not null or undefined
117
+ (0, common_1.assertParamExists)('attachPaymentMethod', 'paymentMethodCode', paymentMethodCode);
118
+ // verify required parameter 'attachCustomerPaymentMethodRequestDto' is not null or undefined
119
+ (0, common_1.assertParamExists)('attachPaymentMethod', 'attachCustomerPaymentMethodRequestDto', attachCustomerPaymentMethodRequestDto);
120
+ localVarPath = "/v1/customers/{customerCode}/payment-methods/{paymentMethodCode}/attach"
121
+ .replace("{".concat("customerCode", "}"), encodeURIComponent(String(customerCode)))
122
+ .replace("{".concat("paymentMethodCode", "}"), encodeURIComponent(String(paymentMethodCode)));
123
+ localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
124
+ if (configuration) {
125
+ baseOptions = configuration.baseOptions;
126
+ baseAccessToken = configuration.accessToken;
127
+ }
128
+ localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
129
+ localVarHeaderParameter = {};
130
+ localVarQueryParameter = {};
131
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
132
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
133
+ }
134
+ localVarHeaderParameter['Content-Type'] = 'application/json';
135
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
136
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
137
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
138
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(attachCustomerPaymentMethodRequestDto, localVarRequestOptions, configuration);
139
+ return [2 /*return*/, {
140
+ url: (0, common_1.toPathString)(localVarUrlObj),
141
+ options: localVarRequestOptions,
142
+ }];
143
+ });
144
+ });
145
+ },
99
146
  /**
100
147
  * Change customer\'s email using the token provided by the request email change endpoint.
101
148
  * @summary Change customer email
@@ -729,6 +776,56 @@ var CustomerControllerRestApiAxiosParamCreator = function (configuration) {
729
776
  });
730
777
  });
731
778
  },
779
+ /**
780
+ * 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.
781
+ * @summary List payment methods of a customer
782
+ * @param {string} customerCode The customer code or \"me\" for the currently logged in customer.
783
+ * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
784
+ * @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.
785
+ * @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.
786
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
787
+ * @param {*} [options] Override http request option.
788
+ * @throws {RequiredError}
789
+ */
790
+ listPaymentMethods: function (customerCode, pageSize, pageToken, order, authorization, options) {
791
+ if (options === void 0) { options = {}; }
792
+ return __awaiter(_this, void 0, void 0, function () {
793
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
794
+ return __generator(this, function (_a) {
795
+ // verify required parameter 'customerCode' is not null or undefined
796
+ (0, common_1.assertParamExists)('listPaymentMethods', 'customerCode', customerCode);
797
+ localVarPath = "/v1/customers/{customerCode}/payment-methods"
798
+ .replace("{".concat("customerCode", "}"), encodeURIComponent(String(customerCode)));
799
+ localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
800
+ if (configuration) {
801
+ baseOptions = configuration.baseOptions;
802
+ baseAccessToken = configuration.accessToken;
803
+ }
804
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
805
+ localVarHeaderParameter = {};
806
+ localVarQueryParameter = {};
807
+ if (pageSize !== undefined) {
808
+ localVarQueryParameter['pageSize'] = pageSize;
809
+ }
810
+ if (pageToken !== undefined) {
811
+ localVarQueryParameter['pageToken'] = pageToken;
812
+ }
813
+ if (order !== undefined) {
814
+ localVarQueryParameter['order'] = order;
815
+ }
816
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
817
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
818
+ }
819
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
820
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
821
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
822
+ return [2 /*return*/, {
823
+ url: (0, common_1.toPathString)(localVarUrlObj),
824
+ options: localVarRequestOptions,
825
+ }];
826
+ });
827
+ });
828
+ },
732
829
  /**
733
830
  * Get new access token, new refresh token.
734
831
  * @summary Refresh token by customer
@@ -1084,6 +1181,29 @@ exports.CustomerControllerRestApiAxiosParamCreator = CustomerControllerRestApiAx
1084
1181
  var CustomerControllerRestApiFp = function (configuration) {
1085
1182
  var localVarAxiosParamCreator = (0, exports.CustomerControllerRestApiAxiosParamCreator)(configuration);
1086
1183
  return {
1184
+ /**
1185
+ * Use one of the customer\'s payment methods for future payments of the given policy.
1186
+ * @summary Attach a payment method to a policy
1187
+ * @param {string} customerCode The customer code or \"me\" for the currently logged in customer.
1188
+ * @param {string} paymentMethodCode Code of one of the customer\'s payment methods.
1189
+ * @param {AttachCustomerPaymentMethodRequestDto} attachCustomerPaymentMethodRequestDto
1190
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
1191
+ * @param {*} [options] Override http request option.
1192
+ * @throws {RequiredError}
1193
+ */
1194
+ attachPaymentMethod: function (customerCode, paymentMethodCode, attachCustomerPaymentMethodRequestDto, authorization, options) {
1195
+ return __awaiter(this, void 0, void 0, function () {
1196
+ var localVarAxiosArgs;
1197
+ return __generator(this, function (_a) {
1198
+ switch (_a.label) {
1199
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.attachPaymentMethod(customerCode, paymentMethodCode, attachCustomerPaymentMethodRequestDto, authorization, options)];
1200
+ case 1:
1201
+ localVarAxiosArgs = _a.sent();
1202
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
1203
+ }
1204
+ });
1205
+ });
1206
+ },
1087
1207
  /**
1088
1208
  * Change customer\'s email using the token provided by the request email change endpoint.
1089
1209
  * @summary Change customer email
@@ -1401,6 +1521,30 @@ var CustomerControllerRestApiFp = function (configuration) {
1401
1521
  });
1402
1522
  });
1403
1523
  },
1524
+ /**
1525
+ * 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.
1526
+ * @summary List payment methods of a customer
1527
+ * @param {string} customerCode The customer code or \"me\" for the currently logged in customer.
1528
+ * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
1529
+ * @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.
1530
+ * @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.
1531
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
1532
+ * @param {*} [options] Override http request option.
1533
+ * @throws {RequiredError}
1534
+ */
1535
+ listPaymentMethods: function (customerCode, pageSize, pageToken, order, authorization, options) {
1536
+ return __awaiter(this, void 0, void 0, function () {
1537
+ var localVarAxiosArgs;
1538
+ return __generator(this, function (_a) {
1539
+ switch (_a.label) {
1540
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.listPaymentMethods(customerCode, pageSize, pageToken, order, authorization, options)];
1541
+ case 1:
1542
+ localVarAxiosArgs = _a.sent();
1543
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
1544
+ }
1545
+ });
1546
+ });
1547
+ },
1404
1548
  /**
1405
1549
  * Get new access token, new refresh token.
1406
1550
  * @summary Refresh token by customer
@@ -1598,6 +1742,19 @@ exports.CustomerControllerRestApiFp = CustomerControllerRestApiFp;
1598
1742
  var CustomerControllerRestApiFactory = function (configuration, basePath, axios) {
1599
1743
  var localVarFp = (0, exports.CustomerControllerRestApiFp)(configuration);
1600
1744
  return {
1745
+ /**
1746
+ * Use one of the customer\'s payment methods for future payments of the given policy.
1747
+ * @summary Attach a payment method to a policy
1748
+ * @param {string} customerCode The customer code or \"me\" for the currently logged in customer.
1749
+ * @param {string} paymentMethodCode Code of one of the customer\'s payment methods.
1750
+ * @param {AttachCustomerPaymentMethodRequestDto} attachCustomerPaymentMethodRequestDto
1751
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
1752
+ * @param {*} [options] Override http request option.
1753
+ * @throws {RequiredError}
1754
+ */
1755
+ attachPaymentMethod: function (customerCode, paymentMethodCode, attachCustomerPaymentMethodRequestDto, authorization, options) {
1756
+ return localVarFp.attachPaymentMethod(customerCode, paymentMethodCode, attachCustomerPaymentMethodRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
1757
+ },
1601
1758
  /**
1602
1759
  * Change customer\'s email using the token provided by the request email change endpoint.
1603
1760
  * @summary Change customer email
@@ -1775,6 +1932,20 @@ var CustomerControllerRestApiFactory = function (configuration, basePath, axios)
1775
1932
  listInvoices: function (customerCode, pageSize, pageToken, filter, search, order, expand, filters, authorization, options) {
1776
1933
  return localVarFp.listInvoices(customerCode, pageSize, pageToken, filter, search, order, expand, filters, authorization, options).then(function (request) { return request(axios, basePath); });
1777
1934
  },
1935
+ /**
1936
+ * 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.
1937
+ * @summary List payment methods of a customer
1938
+ * @param {string} customerCode The customer code or \"me\" for the currently logged in customer.
1939
+ * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
1940
+ * @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.
1941
+ * @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.
1942
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
1943
+ * @param {*} [options] Override http request option.
1944
+ * @throws {RequiredError}
1945
+ */
1946
+ listPaymentMethods: function (customerCode, pageSize, pageToken, order, authorization, options) {
1947
+ return localVarFp.listPaymentMethods(customerCode, pageSize, pageToken, order, authorization, options).then(function (request) { return request(axios, basePath); });
1948
+ },
1778
1949
  /**
1779
1950
  * Get new access token, new refresh token.
1780
1951
  * @summary Refresh token by customer
@@ -1886,6 +2057,18 @@ var CustomerControllerRestApi = /** @class */ (function (_super) {
1886
2057
  function CustomerControllerRestApi() {
1887
2058
  return _super !== null && _super.apply(this, arguments) || this;
1888
2059
  }
2060
+ /**
2061
+ * Use one of the customer\'s payment methods for future payments of the given policy.
2062
+ * @summary Attach a payment method to a policy
2063
+ * @param {CustomerControllerRestApiAttachPaymentMethodRequest} requestParameters Request parameters.
2064
+ * @param {*} [options] Override http request option.
2065
+ * @throws {RequiredError}
2066
+ * @memberof CustomerControllerRestApi
2067
+ */
2068
+ CustomerControllerRestApi.prototype.attachPaymentMethod = function (requestParameters, options) {
2069
+ var _this = this;
2070
+ return (0, exports.CustomerControllerRestApiFp)(this.configuration).attachPaymentMethod(requestParameters.customerCode, requestParameters.paymentMethodCode, requestParameters.attachCustomerPaymentMethodRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
2071
+ };
1889
2072
  /**
1890
2073
  * Change customer\'s email using the token provided by the request email change endpoint.
1891
2074
  * @summary Change customer email
@@ -2055,6 +2238,18 @@ var CustomerControllerRestApi = /** @class */ (function (_super) {
2055
2238
  var _this = this;
2056
2239
  return (0, exports.CustomerControllerRestApiFp)(this.configuration).listInvoices(requestParameters.customerCode, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, requestParameters.filters, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
2057
2240
  };
2241
+ /**
2242
+ * 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.
2243
+ * @summary List payment methods of a customer
2244
+ * @param {CustomerControllerRestApiListPaymentMethodsRequest} requestParameters Request parameters.
2245
+ * @param {*} [options] Override http request option.
2246
+ * @throws {RequiredError}
2247
+ * @memberof CustomerControllerRestApi
2248
+ */
2249
+ CustomerControllerRestApi.prototype.listPaymentMethods = function (requestParameters, options) {
2250
+ var _this = this;
2251
+ return (0, exports.CustomerControllerRestApiFp)(this.configuration).listPaymentMethods(requestParameters.customerCode, requestParameters.pageSize, requestParameters.pageToken, requestParameters.order, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
2252
+ };
2058
2253
  /**
2059
2254
  * Get new access token, new refresh token.
2060
2255
  * @summary Refresh token by customer
@@ -12,15 +12,29 @@
12
12
  import { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
13
13
  import { Configuration } from '../configuration';
14
14
  import { RequestArgs, BaseAPI } from '../base';
15
+ import { AttachCustomerPaymentMethodRequestDto } from '../models';
16
+ import { AttachCustomerPaymentMethodResponseClass } from '../models';
15
17
  import { CompletePaymentSetupPspRequest } from '../models';
16
18
  import { CompletePaymentSetupResponseClass } from '../models';
17
19
  import { InitiatePaymentSetupRequestDto } from '../models';
18
20
  import { InitiatePaymentSetupResponseClass } from '../models';
21
+ import { ListCustomerPaymentMethodsResponseClass } from '../models';
19
22
  /**
20
23
  * PaymentsApi - axios parameter creator
21
24
  * @export
22
25
  */
23
26
  export declare const PaymentsApiAxiosParamCreator: (configuration?: Configuration) => {
27
+ /**
28
+ * Use one of the customer\'s payment methods for future payments of the given policy.
29
+ * @summary Attach a payment method to a policy
30
+ * @param {string} customerCode The customer code or \"me\" for the currently logged in customer.
31
+ * @param {string} paymentMethodCode Code of one of the customer\'s payment methods.
32
+ * @param {AttachCustomerPaymentMethodRequestDto} attachCustomerPaymentMethodRequestDto
33
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
34
+ * @param {*} [options] Override http request option.
35
+ * @throws {RequiredError}
36
+ */
37
+ attachPaymentMethod: (customerCode: string, paymentMethodCode: string, attachCustomerPaymentMethodRequestDto: AttachCustomerPaymentMethodRequestDto, authorization?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
24
38
  /**
25
39
  * Request to complete a payment change by customer.
26
40
  * @summary Request payment setup complete
@@ -41,12 +55,35 @@ export declare const PaymentsApiAxiosParamCreator: (configuration?: Configuratio
41
55
  * @throws {RequiredError}
42
56
  */
43
57
  initiatePaymentSetup: (customerCode: string, initiatePaymentSetupRequestDto: InitiatePaymentSetupRequestDto, authorization?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
58
+ /**
59
+ * 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.
60
+ * @summary List payment methods of a customer
61
+ * @param {string} customerCode The customer code or \&quot;me\&quot; for the currently logged in customer.
62
+ * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
63
+ * @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.
64
+ * @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.
65
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
66
+ * @param {*} [options] Override http request option.
67
+ * @throws {RequiredError}
68
+ */
69
+ listPaymentMethods: (customerCode: string, pageSize?: number, pageToken?: string, order?: string, authorization?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
44
70
  };
45
71
  /**
46
72
  * PaymentsApi - functional programming interface
47
73
  * @export
48
74
  */
49
75
  export declare const PaymentsApiFp: (configuration?: Configuration) => {
76
+ /**
77
+ * Use one of the customer\'s payment methods for future payments of the given policy.
78
+ * @summary Attach a payment method to a policy
79
+ * @param {string} customerCode The customer code or \&quot;me\&quot; for the currently logged in customer.
80
+ * @param {string} paymentMethodCode Code of one of the customer\&#39;s payment methods.
81
+ * @param {AttachCustomerPaymentMethodRequestDto} attachCustomerPaymentMethodRequestDto
82
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
83
+ * @param {*} [options] Override http request option.
84
+ * @throws {RequiredError}
85
+ */
86
+ attachPaymentMethod(customerCode: string, paymentMethodCode: string, attachCustomerPaymentMethodRequestDto: AttachCustomerPaymentMethodRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AttachCustomerPaymentMethodResponseClass>>;
50
87
  /**
51
88
  * Request to complete a payment change by customer.
52
89
  * @summary Request payment setup complete
@@ -67,12 +104,35 @@ export declare const PaymentsApiFp: (configuration?: Configuration) => {
67
104
  * @throws {RequiredError}
68
105
  */
69
106
  initiatePaymentSetup(customerCode: string, initiatePaymentSetupRequestDto: InitiatePaymentSetupRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<InitiatePaymentSetupResponseClass>>;
107
+ /**
108
+ * 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.
109
+ * @summary List payment methods of a customer
110
+ * @param {string} customerCode The customer code or \&quot;me\&quot; for the currently logged in customer.
111
+ * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
112
+ * @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.
113
+ * @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.
114
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
115
+ * @param {*} [options] Override http request option.
116
+ * @throws {RequiredError}
117
+ */
118
+ listPaymentMethods(customerCode: string, pageSize?: number, pageToken?: string, order?: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListCustomerPaymentMethodsResponseClass>>;
70
119
  };
71
120
  /**
72
121
  * PaymentsApi - factory interface
73
122
  * @export
74
123
  */
75
124
  export declare const PaymentsApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
125
+ /**
126
+ * Use one of the customer\'s payment methods for future payments of the given policy.
127
+ * @summary Attach a payment method to a policy
128
+ * @param {string} customerCode The customer code or \&quot;me\&quot; for the currently logged in customer.
129
+ * @param {string} paymentMethodCode Code of one of the customer\&#39;s payment methods.
130
+ * @param {AttachCustomerPaymentMethodRequestDto} attachCustomerPaymentMethodRequestDto
131
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
132
+ * @param {*} [options] Override http request option.
133
+ * @throws {RequiredError}
134
+ */
135
+ attachPaymentMethod(customerCode: string, paymentMethodCode: string, attachCustomerPaymentMethodRequestDto: AttachCustomerPaymentMethodRequestDto, authorization?: string, options?: any): AxiosPromise<AttachCustomerPaymentMethodResponseClass>;
76
136
  /**
77
137
  * Request to complete a payment change by customer.
78
138
  * @summary Request payment setup complete
@@ -93,7 +153,50 @@ export declare const PaymentsApiFactory: (configuration?: Configuration, basePat
93
153
  * @throws {RequiredError}
94
154
  */
95
155
  initiatePaymentSetup(customerCode: string, initiatePaymentSetupRequestDto: InitiatePaymentSetupRequestDto, authorization?: string, options?: any): AxiosPromise<InitiatePaymentSetupResponseClass>;
156
+ /**
157
+ * 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.
158
+ * @summary List payment methods of a customer
159
+ * @param {string} customerCode The customer code or \&quot;me\&quot; for the currently logged in customer.
160
+ * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
161
+ * @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.
162
+ * @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.
163
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
164
+ * @param {*} [options] Override http request option.
165
+ * @throws {RequiredError}
166
+ */
167
+ listPaymentMethods(customerCode: string, pageSize?: number, pageToken?: string, order?: string, authorization?: string, options?: any): AxiosPromise<ListCustomerPaymentMethodsResponseClass>;
96
168
  };
169
+ /**
170
+ * Request parameters for attachPaymentMethod operation in PaymentsApi.
171
+ * @export
172
+ * @interface PaymentsApiAttachPaymentMethodRequest
173
+ */
174
+ export interface PaymentsApiAttachPaymentMethodRequest {
175
+ /**
176
+ * The customer code or \&quot;me\&quot; for the currently logged in customer.
177
+ * @type {string}
178
+ * @memberof PaymentsApiAttachPaymentMethod
179
+ */
180
+ readonly customerCode: string;
181
+ /**
182
+ * Code of one of the customer\&#39;s payment methods.
183
+ * @type {string}
184
+ * @memberof PaymentsApiAttachPaymentMethod
185
+ */
186
+ readonly paymentMethodCode: string;
187
+ /**
188
+ *
189
+ * @type {AttachCustomerPaymentMethodRequestDto}
190
+ * @memberof PaymentsApiAttachPaymentMethod
191
+ */
192
+ readonly attachCustomerPaymentMethodRequestDto: AttachCustomerPaymentMethodRequestDto;
193
+ /**
194
+ * Bearer Token: provided by the login endpoint under the name accessToken.
195
+ * @type {string}
196
+ * @memberof PaymentsApiAttachPaymentMethod
197
+ */
198
+ readonly authorization?: string;
199
+ }
97
200
  /**
98
201
  * Request parameters for completePaymentSetup operation in PaymentsApi.
99
202
  * @export
@@ -144,6 +247,43 @@ export interface PaymentsApiInitiatePaymentSetupRequest {
144
247
  */
145
248
  readonly authorization?: string;
146
249
  }
250
+ /**
251
+ * Request parameters for listPaymentMethods operation in PaymentsApi.
252
+ * @export
253
+ * @interface PaymentsApiListPaymentMethodsRequest
254
+ */
255
+ export interface PaymentsApiListPaymentMethodsRequest {
256
+ /**
257
+ * The customer code or \&quot;me\&quot; for the currently logged in customer.
258
+ * @type {string}
259
+ * @memberof PaymentsApiListPaymentMethods
260
+ */
261
+ readonly customerCode: string;
262
+ /**
263
+ * A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
264
+ * @type {number}
265
+ * @memberof PaymentsApiListPaymentMethods
266
+ */
267
+ readonly pageSize?: number;
268
+ /**
269
+ * 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.
270
+ * @type {string}
271
+ * @memberof PaymentsApiListPaymentMethods
272
+ */
273
+ readonly pageToken?: string;
274
+ /**
275
+ * 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.
276
+ * @type {string}
277
+ * @memberof PaymentsApiListPaymentMethods
278
+ */
279
+ readonly order?: string;
280
+ /**
281
+ * Bearer Token: provided by the login endpoint under the name accessToken.
282
+ * @type {string}
283
+ * @memberof PaymentsApiListPaymentMethods
284
+ */
285
+ readonly authorization?: string;
286
+ }
147
287
  /**
148
288
  * PaymentsApi - object-oriented interface
149
289
  * @export
@@ -151,6 +291,15 @@ export interface PaymentsApiInitiatePaymentSetupRequest {
151
291
  * @extends {BaseAPI}
152
292
  */
153
293
  export declare class PaymentsApi extends BaseAPI {
294
+ /**
295
+ * Use one of the customer\'s payment methods for future payments of the given policy.
296
+ * @summary Attach a payment method to a policy
297
+ * @param {PaymentsApiAttachPaymentMethodRequest} requestParameters Request parameters.
298
+ * @param {*} [options] Override http request option.
299
+ * @throws {RequiredError}
300
+ * @memberof PaymentsApi
301
+ */
302
+ attachPaymentMethod(requestParameters: PaymentsApiAttachPaymentMethodRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<AttachCustomerPaymentMethodResponseClass, any, {}>>;
154
303
  /**
155
304
  * Request to complete a payment change by customer.
156
305
  * @summary Request payment setup complete
@@ -169,4 +318,13 @@ export declare class PaymentsApi extends BaseAPI {
169
318
  * @memberof PaymentsApi
170
319
  */
171
320
  initiatePaymentSetup(requestParameters: PaymentsApiInitiatePaymentSetupRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<InitiatePaymentSetupResponseClass, any, {}>>;
321
+ /**
322
+ * 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.
323
+ * @summary List payment methods of a customer
324
+ * @param {PaymentsApiListPaymentMethodsRequest} requestParameters Request parameters.
325
+ * @param {*} [options] Override http request option.
326
+ * @throws {RequiredError}
327
+ * @memberof PaymentsApi
328
+ */
329
+ listPaymentMethods(requestParameters: PaymentsApiListPaymentMethodsRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<ListCustomerPaymentMethodsResponseClass, any, {}>>;
172
330
  }