@emilgroup/payment-sdk 1.13.1-beta.131 → 1.13.1-beta.133

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 (38) hide show
  1. package/.openapi-generator/FILES +6 -0
  2. package/README.md +2 -2
  3. package/api/credit-allocation-api.ts +456 -0
  4. package/api.ts +2 -0
  5. package/base.ts +83 -12
  6. package/common.ts +2 -2
  7. package/configuration.ts +9 -0
  8. package/dist/api/credit-allocation-api.d.ts +263 -0
  9. package/dist/api/credit-allocation-api.js +445 -0
  10. package/dist/api.d.ts +1 -0
  11. package/dist/api.js +1 -0
  12. package/dist/base.d.ts +14 -3
  13. package/dist/base.js +86 -23
  14. package/dist/common.js +2 -2
  15. package/dist/configuration.d.ts +6 -0
  16. package/dist/configuration.js +8 -0
  17. package/dist/models/create-credit-allocation-request-dto.d.ts +54 -0
  18. package/dist/models/create-credit-allocation-request-dto.js +21 -0
  19. package/dist/models/create-credit-allocation-response-class.d.ts +25 -0
  20. package/dist/models/create-credit-allocation-response-class.js +15 -0
  21. package/dist/models/credit-allocation-class.d.ts +115 -0
  22. package/dist/models/credit-allocation-class.js +21 -0
  23. package/dist/models/exceeding-credit-class.d.ts +6 -0
  24. package/dist/models/get-credit-allocation-response-class.d.ts +25 -0
  25. package/dist/models/get-credit-allocation-response-class.js +15 -0
  26. package/dist/models/index.d.ts +5 -0
  27. package/dist/models/index.js +5 -0
  28. package/dist/models/list-credit-allocations-response-class.d.ts +43 -0
  29. package/dist/models/list-credit-allocations-response-class.js +15 -0
  30. package/models/create-credit-allocation-request-dto.ts +63 -0
  31. package/models/create-credit-allocation-response-class.ts +31 -0
  32. package/models/credit-allocation-class.ts +124 -0
  33. package/models/exceeding-credit-class.ts +6 -0
  34. package/models/get-credit-allocation-response-class.ts +31 -0
  35. package/models/index.ts +5 -0
  36. package/models/list-credit-allocations-response-class.ts +49 -0
  37. package/package.json +1 -1
  38. package/tsconfig.json +1 -0
package/dist/base.js CHANGED
@@ -99,6 +99,7 @@ var Environment;
99
99
  (function (Environment) {
100
100
  Environment["Production"] = "https://apiv2.emil.de";
101
101
  Environment["Test"] = "https://apiv2-test.emil.de";
102
+ Environment["Staging"] = "https://apiv2-staging.emil.de";
102
103
  Environment["Development"] = "https://apiv2-dev.emil.de";
103
104
  Environment["ProductionZurich"] = "https://eu-central-2.apiv2.emil.de";
104
105
  })(Environment = exports.Environment || (exports.Environment = {}));
@@ -123,9 +124,13 @@ var BaseAPI = /** @class */ (function () {
123
124
  this.axios = axios;
124
125
  this.loadTokenData();
125
126
  if (configuration) {
127
+ var accessToken = this.tokenData.accessToken;
126
128
  this.configuration = configuration;
127
129
  this.basePath = configuration.basePath || this.basePath;
128
- this.configuration.accessToken = this.tokenData.accessToken ? "Bearer ".concat(this.tokenData.accessToken) : '';
130
+ // Use config token if provided, otherwise use tokenData token
131
+ var configToken = this.configuration.accessToken;
132
+ var storedToken = accessToken ? "Bearer ".concat(accessToken) : '';
133
+ this.configuration.accessToken = configToken || storedToken;
129
134
  }
130
135
  else {
131
136
  var _a = this.tokenData, accessToken = _a.accessToken, username = _a.username;
@@ -143,11 +148,18 @@ var BaseAPI = /** @class */ (function () {
143
148
  BaseAPI.prototype.selectBasePath = function (path) {
144
149
  this.configuration.basePath = path;
145
150
  };
146
- BaseAPI.prototype.authorize = function (username, password) {
151
+ BaseAPI.prototype.getPermissions = function () {
152
+ var _a;
153
+ if (!((_a = this.tokenData) === null || _a === void 0 ? void 0 : _a.permissions)) {
154
+ return [];
155
+ }
156
+ return this.tokenData.permissions.split(',');
157
+ };
158
+ BaseAPI.prototype.authorize = function (username, password, targetWorkspace) {
147
159
  return __awaiter(this, void 0, void 0, function () {
148
- var options, response, accessToken;
149
- return __generator(this, function (_a) {
150
- switch (_a.label) {
160
+ var options, response, _a, accessToken, permissions;
161
+ return __generator(this, function (_b) {
162
+ switch (_b.label) {
151
163
  case 0:
152
164
  options = {
153
165
  method: 'POST',
@@ -161,12 +173,53 @@ var BaseAPI = /** @class */ (function () {
161
173
  };
162
174
  return [4 /*yield*/, axios_1.default.request(options)];
163
175
  case 1:
164
- response = _a.sent();
165
- accessToken = response.data.accessToken;
176
+ response = _b.sent();
177
+ _a = response.data, accessToken = _a.accessToken, permissions = _a.permissions;
166
178
  this.configuration.username = username;
167
179
  this.configuration.accessToken = "Bearer ".concat(accessToken);
168
180
  this.tokenData.username = username;
169
181
  this.tokenData.accessToken = accessToken;
182
+ this.tokenData.permissions = permissions;
183
+ if (!targetWorkspace) return [3 /*break*/, 3];
184
+ return [4 /*yield*/, this.switchWorkspace(targetWorkspace)];
185
+ case 2:
186
+ _b.sent();
187
+ return [3 /*break*/, 4];
188
+ case 3:
189
+ // Only store if no workspace switch (since switchWorkspace will store after switching)
190
+ this.storeTokenData(__assign({}, this.tokenData));
191
+ _b.label = 4;
192
+ case 4: return [2 /*return*/];
193
+ }
194
+ });
195
+ });
196
+ };
197
+ BaseAPI.prototype.switchWorkspace = function (targetWorkspace) {
198
+ return __awaiter(this, void 0, void 0, function () {
199
+ var options, response, _a, accessToken, permissions;
200
+ return __generator(this, function (_b) {
201
+ switch (_b.label) {
202
+ case 0:
203
+ options = {
204
+ method: 'POST',
205
+ url: "".concat(this.configuration.basePath, "/authservice/v1/workspaces/switch"),
206
+ headers: {
207
+ 'Content-Type': 'application/json',
208
+ 'Authorization': "Bearer ".concat(this.configuration.accessToken),
209
+ },
210
+ data: {
211
+ username: this.configuration.username,
212
+ targetWorkspace: targetWorkspace,
213
+ },
214
+ withCredentials: true,
215
+ };
216
+ return [4 /*yield*/, axios_1.default.request(options)];
217
+ case 1:
218
+ response = _b.sent();
219
+ _a = response.data, accessToken = _a.accessToken, permissions = _a.permissions;
220
+ this.configuration.accessToken = "Bearer ".concat(accessToken);
221
+ this.tokenData.accessToken = accessToken;
222
+ this.tokenData.permissions = permissions;
170
223
  this.storeTokenData(__assign({}, this.tokenData));
171
224
  return [2 /*return*/];
172
225
  }
@@ -175,14 +228,22 @@ var BaseAPI = /** @class */ (function () {
175
228
  };
176
229
  BaseAPI.prototype.refreshTokenInternal = function () {
177
230
  return __awaiter(this, void 0, void 0, function () {
178
- var username, options, accessToken;
231
+ var username, refreshTokenAxios, options, response;
232
+ var _this = this;
179
233
  return __generator(this, function (_a) {
180
234
  switch (_a.label) {
181
235
  case 0:
182
236
  username = this.configuration.username;
183
237
  if (!username) {
184
- return [2 /*return*/, ''];
238
+ throw new Error('Failed to refresh token.');
185
239
  }
240
+ refreshTokenAxios = axios_1.default.create();
241
+ refreshTokenAxios.interceptors.response.use(function (response) {
242
+ var permissions = response.data.permissions;
243
+ _this.tokenData.permissions = permissions;
244
+ _this.storeTokenData(_this.tokenData);
245
+ return response;
246
+ });
186
247
  options = {
187
248
  method: 'POST',
188
249
  url: "".concat(this.configuration.basePath, "/authservice/v1/refresh-token"),
@@ -192,10 +253,10 @@ var BaseAPI = /** @class */ (function () {
192
253
  data: { username: username },
193
254
  withCredentials: true,
194
255
  };
195
- return [4 /*yield*/, axios_1.default.request(options)];
256
+ return [4 /*yield*/, refreshTokenAxios.request(options)];
196
257
  case 1:
197
- accessToken = (_a.sent()).data.accessToken;
198
- return [2 /*return*/, accessToken];
258
+ response = _a.sent();
259
+ return [2 /*return*/, response.data];
199
260
  }
200
261
  });
201
262
  });
@@ -221,22 +282,23 @@ var BaseAPI = /** @class */ (function () {
221
282
  axios.interceptors.response.use(function (res) {
222
283
  return res;
223
284
  }, function (err) { return __awaiter(_this, void 0, void 0, function () {
224
- var originalConfig, tokenString, accessToken, _error_1, tokenString, accessToken, _error_2;
225
- return __generator(this, function (_a) {
226
- switch (_a.label) {
285
+ var originalConfig, _a, tokenString, permissions, accessToken, _error_1, _b, tokenString, permissions, accessToken, _error_2;
286
+ return __generator(this, function (_c) {
287
+ switch (_c.label) {
227
288
  case 0:
228
289
  originalConfig = err.config;
229
290
  if (!(err.response && !(err.response instanceof XMLHttpRequest))) return [3 /*break*/, 5];
230
291
  if (!((err.response.status === 401 || err.response.status === 403)
231
292
  && !originalConfig._retry)) return [3 /*break*/, 4];
232
293
  originalConfig._retry = true;
233
- _a.label = 1;
294
+ _c.label = 1;
234
295
  case 1:
235
- _a.trys.push([1, 3, , 4]);
296
+ _c.trys.push([1, 3, , 4]);
236
297
  return [4 /*yield*/, this.refreshTokenInternal()];
237
298
  case 2:
238
- tokenString = _a.sent();
299
+ _a = _c.sent(), tokenString = _a.accessToken, permissions = _a.permissions;
239
300
  accessToken = "Bearer ".concat(tokenString);
301
+ this.tokenData.permissions = permissions;
240
302
  delete originalConfig.headers['Authorization'];
241
303
  originalConfig.headers['Authorization'] = accessToken;
242
304
  this.configuration.accessToken = accessToken;
@@ -244,7 +306,7 @@ var BaseAPI = /** @class */ (function () {
244
306
  this.storeTokenData(this.tokenData);
245
307
  return [2 /*return*/, axios(originalConfig)];
246
308
  case 3:
247
- _error_1 = _a.sent();
309
+ _error_1 = _c.sent();
248
310
  if (_error_1.response && _error_1.response.data) {
249
311
  return [2 /*return*/, Promise.reject(_error_1.response.data)];
250
312
  }
@@ -255,13 +317,14 @@ var BaseAPI = /** @class */ (function () {
255
317
  && originalConfig.headers.hasOwnProperty('Authorization')
256
318
  && _retry_count < 4)) return [3 /*break*/, 9];
257
319
  _retry_count++;
258
- _a.label = 6;
320
+ _c.label = 6;
259
321
  case 6:
260
- _a.trys.push([6, 8, , 9]);
322
+ _c.trys.push([6, 8, , 9]);
261
323
  return [4 /*yield*/, this.refreshTokenInternal()];
262
324
  case 7:
263
- tokenString = _a.sent();
325
+ _b = _c.sent(), tokenString = _b.accessToken, permissions = _b.permissions;
264
326
  accessToken = "Bearer ".concat(tokenString);
327
+ this.tokenData.permissions = permissions;
265
328
  _retry = true;
266
329
  originalConfig.headers['Authorization'] = accessToken;
267
330
  this.configuration.accessToken = accessToken;
@@ -269,7 +332,7 @@ var BaseAPI = /** @class */ (function () {
269
332
  this.storeTokenData(this.tokenData);
270
333
  return [2 /*return*/, axios.request(__assign({}, originalConfig))];
271
334
  case 8:
272
- _error_2 = _a.sent();
335
+ _error_2 = _c.sent();
273
336
  if (_error_2.response && _error_2.response.data) {
274
337
  return [2 /*return*/, Promise.reject(_error_2.response.data)];
275
338
  }
package/dist/common.js CHANGED
@@ -140,7 +140,7 @@ var setBearerAuthToObject = function (object, configuration) {
140
140
  _b.label = 4;
141
141
  case 4:
142
142
  accessToken = _a;
143
- object["Authorization"] = "Bearer " + accessToken;
143
+ object["Authorization"] = configuration.getBearerToken(accessToken);
144
144
  _b.label = 5;
145
145
  case 5: return [2 /*return*/];
146
146
  }
@@ -170,7 +170,7 @@ var setOAuthToObject = function (object, name, scopes, configuration) {
170
170
  _b.label = 4;
171
171
  case 4:
172
172
  localVarAccessTokenValue = _a;
173
- object["Authorization"] = "Bearer " + localVarAccessTokenValue;
173
+ object["Authorization"] = configuration.getBearerToken(localVarAccessTokenValue);
174
174
  _b.label = 5;
175
175
  case 5: return [2 /*return*/];
176
176
  }
@@ -80,4 +80,10 @@ export declare class Configuration {
80
80
  * @return True if the given MIME is JSON, false otherwise.
81
81
  */
82
82
  isJsonMime(mime: string): boolean;
83
+ /**
84
+ * Returns "Bearer" token.
85
+ * @param token - access token.
86
+ * @return Bearer token.
87
+ */
88
+ getBearerToken(token?: string): string;
83
89
  }
@@ -39,6 +39,14 @@ var Configuration = /** @class */ (function () {
39
39
  var jsonMime = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i');
40
40
  return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json');
41
41
  };
42
+ /**
43
+ * Returns "Bearer" token.
44
+ * @param token - access token.
45
+ * @return Bearer token.
46
+ */
47
+ Configuration.prototype.getBearerToken = function (token) {
48
+ return ('' + token).startsWith("Bearer") ? token : "Bearer " + token;
49
+ };
42
50
  return Configuration;
43
51
  }());
44
52
  exports.Configuration = Configuration;
@@ -0,0 +1,54 @@
1
+ /**
2
+ * Emil Payment Service
3
+ * This service directly communicates with the various Payment Service Providers (PSPs) in order to charge or refund customers. This service will automatically connect to the PSP linked in your admin configuration; meaning if you configured Stripe, it will automatically create a payment on Stripe when you create it in Emil.
4
+ *
5
+ * The version of the OpenAPI document: 1.0
6
+ * Contact: kontakt@emil.de
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ *
14
+ * @export
15
+ * @interface CreateCreditAllocationRequestDto
16
+ */
17
+ export interface CreateCreditAllocationRequestDto {
18
+ /**
19
+ * Codes of the exceeding credits to allocate.
20
+ * @type {Array<string>}
21
+ * @memberof CreateCreditAllocationRequestDto
22
+ */
23
+ 'exceedingCreditCodes': Array<string>;
24
+ /**
25
+ * Financial account code to use for the refund. Required only when allocationType is \"separate_refund\".
26
+ * @type {string}
27
+ * @memberof CreateCreditAllocationRequestDto
28
+ */
29
+ 'financialAccountCode'?: string;
30
+ /**
31
+ * Type of credit allocation.
32
+ * @type {string}
33
+ * @memberof CreateCreditAllocationRequestDto
34
+ */
35
+ 'allocationType': CreateCreditAllocationRequestDtoAllocationTypeEnum;
36
+ /**
37
+ * Amount of the credit allocation in cents.
38
+ * @type {number}
39
+ * @memberof CreateCreditAllocationRequestDto
40
+ */
41
+ 'allocationAmount': number;
42
+ /**
43
+ * Booking date of the credit allocation.
44
+ * @type {string}
45
+ * @memberof CreateCreditAllocationRequestDto
46
+ */
47
+ 'bookingDate'?: string;
48
+ }
49
+ export declare const CreateCreditAllocationRequestDtoAllocationTypeEnum: {
50
+ readonly NextInvoice: "next_invoice";
51
+ readonly LastInvoice: "last_invoice";
52
+ readonly SeparateRefund: "separate_refund";
53
+ };
54
+ export type CreateCreditAllocationRequestDtoAllocationTypeEnum = typeof CreateCreditAllocationRequestDtoAllocationTypeEnum[keyof typeof CreateCreditAllocationRequestDtoAllocationTypeEnum];
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Emil Payment Service
6
+ * This service directly communicates with the various Payment Service Providers (PSPs) in order to charge or refund customers. This service will automatically connect to the PSP linked in your admin configuration; meaning if you configured Stripe, it will automatically create a payment on Stripe when you create it in Emil.
7
+ *
8
+ * The version of the OpenAPI document: 1.0
9
+ * Contact: kontakt@emil.de
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.CreateCreditAllocationRequestDtoAllocationTypeEnum = void 0;
17
+ exports.CreateCreditAllocationRequestDtoAllocationTypeEnum = {
18
+ NextInvoice: 'next_invoice',
19
+ LastInvoice: 'last_invoice',
20
+ SeparateRefund: 'separate_refund'
21
+ };
@@ -0,0 +1,25 @@
1
+ /**
2
+ * Emil Payment Service
3
+ * This service directly communicates with the various Payment Service Providers (PSPs) in order to charge or refund customers. This service will automatically connect to the PSP linked in your admin configuration; meaning if you configured Stripe, it will automatically create a payment on Stripe when you create it in Emil.
4
+ *
5
+ * The version of the OpenAPI document: 1.0
6
+ * Contact: kontakt@emil.de
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import { CreditAllocationClass } from './credit-allocation-class';
13
+ /**
14
+ *
15
+ * @export
16
+ * @interface CreateCreditAllocationResponseClass
17
+ */
18
+ export interface CreateCreditAllocationResponseClass {
19
+ /**
20
+ * Credit allocation created.
21
+ * @type {CreditAllocationClass}
22
+ * @memberof CreateCreditAllocationResponseClass
23
+ */
24
+ 'creditAllocation'?: CreditAllocationClass;
25
+ }
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Emil Payment Service
6
+ * This service directly communicates with the various Payment Service Providers (PSPs) in order to charge or refund customers. This service will automatically connect to the PSP linked in your admin configuration; meaning if you configured Stripe, it will automatically create a payment on Stripe when you create it in Emil.
7
+ *
8
+ * The version of the OpenAPI document: 1.0
9
+ * Contact: kontakt@emil.de
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,115 @@
1
+ /**
2
+ * Emil Payment Service
3
+ * This service directly communicates with the various Payment Service Providers (PSPs) in order to charge or refund customers. This service will automatically connect to the PSP linked in your admin configuration; meaning if you configured Stripe, it will automatically create a payment on Stripe when you create it in Emil.
4
+ *
5
+ * The version of the OpenAPI document: 1.0
6
+ * Contact: kontakt@emil.de
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import { ExceedingCreditClass } from './exceeding-credit-class';
13
+ /**
14
+ *
15
+ * @export
16
+ * @interface CreditAllocationClass
17
+ */
18
+ export interface CreditAllocationClass {
19
+ /**
20
+ * Internal unique identifier for the object. You should not have to use this, use code instead.
21
+ * @type {number}
22
+ * @memberof CreditAllocationClass
23
+ */
24
+ 'id': number;
25
+ /**
26
+ * Code of the credit allocation.
27
+ * @type {string}
28
+ * @memberof CreditAllocationClass
29
+ */
30
+ 'code': string;
31
+ /**
32
+ * Codes of the exceeding credits that were allocated.
33
+ * @type {Array<string>}
34
+ * @memberof CreditAllocationClass
35
+ */
36
+ 'exceedingCreditCodes': Array<string>;
37
+ /**
38
+ * Policy code associated with the credit.
39
+ * @type {string}
40
+ * @memberof CreditAllocationClass
41
+ */
42
+ 'policyCode': string;
43
+ /**
44
+ * Policy number associated with the credit.
45
+ * @type {string}
46
+ * @memberof CreditAllocationClass
47
+ */
48
+ 'policyNumber': string;
49
+ /**
50
+ * Amount of the credit allocation in cents.
51
+ * @type {number}
52
+ * @memberof CreditAllocationClass
53
+ */
54
+ 'allocationAmount': number;
55
+ /**
56
+ * Currency of the credit allocation.
57
+ * @type {string}
58
+ * @memberof CreditAllocationClass
59
+ */
60
+ 'allocationCurrency': string;
61
+ /**
62
+ * Type of credit allocation.
63
+ * @type {string}
64
+ * @memberof CreditAllocationClass
65
+ */
66
+ 'allocationType': CreditAllocationClassAllocationTypeEnum;
67
+ /**
68
+ * Financial account code used for the allocation.
69
+ * @type {string}
70
+ * @memberof CreditAllocationClass
71
+ */
72
+ 'financialAccountCode'?: string;
73
+ /**
74
+ * Booking date of the credit allocation.
75
+ * @type {string}
76
+ * @memberof CreditAllocationClass
77
+ */
78
+ 'bookingDate'?: string;
79
+ /**
80
+ * Time at which the object was created.
81
+ * @type {string}
82
+ * @memberof CreditAllocationClass
83
+ */
84
+ 'createdAt': string;
85
+ /**
86
+ * Time at which the object was updated.
87
+ * @type {string}
88
+ * @memberof CreditAllocationClass
89
+ */
90
+ 'updatedAt': string;
91
+ /**
92
+ * Identifier of the user who created the record.
93
+ * @type {string}
94
+ * @memberof CreditAllocationClass
95
+ */
96
+ 'createdBy': string;
97
+ /**
98
+ * Identifier of the user who last updated the record.
99
+ * @type {string}
100
+ * @memberof CreditAllocationClass
101
+ */
102
+ 'updatedBy': string;
103
+ /**
104
+ * List of exceeding credits associated with this allocation.
105
+ * @type {Array<ExceedingCreditClass>}
106
+ * @memberof CreditAllocationClass
107
+ */
108
+ 'exceedingCredits'?: Array<ExceedingCreditClass>;
109
+ }
110
+ export declare const CreditAllocationClassAllocationTypeEnum: {
111
+ readonly NextInvoice: "next_invoice";
112
+ readonly LastInvoice: "last_invoice";
113
+ readonly SeparateRefund: "separate_refund";
114
+ };
115
+ export type CreditAllocationClassAllocationTypeEnum = typeof CreditAllocationClassAllocationTypeEnum[keyof typeof CreditAllocationClassAllocationTypeEnum];
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Emil Payment Service
6
+ * This service directly communicates with the various Payment Service Providers (PSPs) in order to charge or refund customers. This service will automatically connect to the PSP linked in your admin configuration; meaning if you configured Stripe, it will automatically create a payment on Stripe when you create it in Emil.
7
+ *
8
+ * The version of the OpenAPI document: 1.0
9
+ * Contact: kontakt@emil.de
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.CreditAllocationClassAllocationTypeEnum = void 0;
17
+ exports.CreditAllocationClassAllocationTypeEnum = {
18
+ NextInvoice: 'next_invoice',
19
+ LastInvoice: 'last_invoice',
20
+ SeparateRefund: 'separate_refund'
21
+ };
@@ -75,6 +75,12 @@ export interface ExceedingCreditClass {
75
75
  * @memberof ExceedingCreditClass
76
76
  */
77
77
  'policyCode': string;
78
+ /**
79
+ * The allocation ID if this credit has been allocated.
80
+ * @type {number}
81
+ * @memberof ExceedingCreditClass
82
+ */
83
+ 'allocationId'?: number;
78
84
  /**
79
85
  * Time at which the object was created.
80
86
  * @type {string}
@@ -0,0 +1,25 @@
1
+ /**
2
+ * Emil Payment Service
3
+ * This service directly communicates with the various Payment Service Providers (PSPs) in order to charge or refund customers. This service will automatically connect to the PSP linked in your admin configuration; meaning if you configured Stripe, it will automatically create a payment on Stripe when you create it in Emil.
4
+ *
5
+ * The version of the OpenAPI document: 1.0
6
+ * Contact: kontakt@emil.de
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import { CreditAllocationClass } from './credit-allocation-class';
13
+ /**
14
+ *
15
+ * @export
16
+ * @interface GetCreditAllocationResponseClass
17
+ */
18
+ export interface GetCreditAllocationResponseClass {
19
+ /**
20
+ * Credit allocation entry.
21
+ * @type {CreditAllocationClass}
22
+ * @memberof GetCreditAllocationResponseClass
23
+ */
24
+ 'creditAllocation': CreditAllocationClass;
25
+ }
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Emil Payment Service
6
+ * This service directly communicates with the various Payment Service Providers (PSPs) in order to charge or refund customers. This service will automatically connect to the PSP linked in your admin configuration; meaning if you configured Stripe, it will automatically create a payment on Stripe when you create it in Emil.
7
+ *
8
+ * The version of the OpenAPI document: 1.0
9
+ * Contact: kontakt@emil.de
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -21,6 +21,8 @@ export * from './create-bank-account-request-dto';
21
21
  export * from './create-bank-account-response-class';
22
22
  export * from './create-bank-order-request-dto';
23
23
  export * from './create-bank-order-response-class';
24
+ export * from './create-credit-allocation-request-dto';
25
+ export * from './create-credit-allocation-response-class';
24
26
  export * from './create-payment-method-response-class';
25
27
  export * from './create-payment-order-dto';
26
28
  export * from './create-payment-order-request-dto';
@@ -35,6 +37,7 @@ export * from './create-refund-request-dto';
35
37
  export * from './create-refund-response-class';
36
38
  export * from './create-tenant-bank-account-request-dto';
37
39
  export * from './create-tenant-bank-account-response-class';
40
+ export * from './credit-allocation-class';
38
41
  export * from './deactivate-payment-reminder-request-dto';
39
42
  export * from './deactivate-payment-reminder-response-class';
40
43
  export * from './deactivated-payment-reminder-class';
@@ -45,6 +48,7 @@ export * from './generate-invoice-match-suggestions-response-class';
45
48
  export * from './get-bank-account-response-class';
46
49
  export * from './get-bank-order-response-class';
47
50
  export * from './get-bank-transactions-response-class';
51
+ export * from './get-credit-allocation-response-class';
48
52
  export * from './get-exceeding-credit-response-class';
49
53
  export * from './get-payment-method-response-class';
50
54
  export * from './get-payment-reminder-response-class';
@@ -70,6 +74,7 @@ export * from './link-bank-transactions-response-class';
70
74
  export * from './list-bank-accounts-response-class';
71
75
  export * from './list-bank-orders-response-class';
72
76
  export * from './list-bank-transactions-response-class';
77
+ export * from './list-credit-allocations-response-class';
73
78
  export * from './list-exceeding-credits-response-class';
74
79
  export * from './list-payment-methods-response-class';
75
80
  export * from './list-payment-reminders-response-class';
@@ -37,6 +37,8 @@ __exportStar(require("./create-bank-account-request-dto"), exports);
37
37
  __exportStar(require("./create-bank-account-response-class"), exports);
38
38
  __exportStar(require("./create-bank-order-request-dto"), exports);
39
39
  __exportStar(require("./create-bank-order-response-class"), exports);
40
+ __exportStar(require("./create-credit-allocation-request-dto"), exports);
41
+ __exportStar(require("./create-credit-allocation-response-class"), exports);
40
42
  __exportStar(require("./create-payment-method-response-class"), exports);
41
43
  __exportStar(require("./create-payment-order-dto"), exports);
42
44
  __exportStar(require("./create-payment-order-request-dto"), exports);
@@ -51,6 +53,7 @@ __exportStar(require("./create-refund-request-dto"), exports);
51
53
  __exportStar(require("./create-refund-response-class"), exports);
52
54
  __exportStar(require("./create-tenant-bank-account-request-dto"), exports);
53
55
  __exportStar(require("./create-tenant-bank-account-response-class"), exports);
56
+ __exportStar(require("./credit-allocation-class"), exports);
54
57
  __exportStar(require("./deactivate-payment-reminder-request-dto"), exports);
55
58
  __exportStar(require("./deactivate-payment-reminder-response-class"), exports);
56
59
  __exportStar(require("./deactivated-payment-reminder-class"), exports);
@@ -61,6 +64,7 @@ __exportStar(require("./generate-invoice-match-suggestions-response-class"), exp
61
64
  __exportStar(require("./get-bank-account-response-class"), exports);
62
65
  __exportStar(require("./get-bank-order-response-class"), exports);
63
66
  __exportStar(require("./get-bank-transactions-response-class"), exports);
67
+ __exportStar(require("./get-credit-allocation-response-class"), exports);
64
68
  __exportStar(require("./get-exceeding-credit-response-class"), exports);
65
69
  __exportStar(require("./get-payment-method-response-class"), exports);
66
70
  __exportStar(require("./get-payment-reminder-response-class"), exports);
@@ -86,6 +90,7 @@ __exportStar(require("./link-bank-transactions-response-class"), exports);
86
90
  __exportStar(require("./list-bank-accounts-response-class"), exports);
87
91
  __exportStar(require("./list-bank-orders-response-class"), exports);
88
92
  __exportStar(require("./list-bank-transactions-response-class"), exports);
93
+ __exportStar(require("./list-credit-allocations-response-class"), exports);
89
94
  __exportStar(require("./list-exceeding-credits-response-class"), exports);
90
95
  __exportStar(require("./list-payment-methods-response-class"), exports);
91
96
  __exportStar(require("./list-payment-reminders-response-class"), exports);