@emilgroup/discount-sdk 1.5.0 → 1.5.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 (149) hide show
  1. package/index.js +99 -0
  2. package/package.json +8 -21
  3. package/scripts/deploy.js +225 -0
  4. package/.openapi-generator/FILES +0 -54
  5. package/.openapi-generator/VERSION +0 -1
  6. package/.openapi-generator-ignore +0 -23
  7. package/api/campaigns-api.ts +0 -1433
  8. package/api/default-api.ts +0 -124
  9. package/api/policy-vouchers-api.ts +0 -999
  10. package/api/vouchers-api.ts +0 -691
  11. package/api.ts +0 -33
  12. package/base.ts +0 -331
  13. package/common.ts +0 -198
  14. package/configuration.ts +0 -110
  15. package/dist/api/campaigns-api.d.ts +0 -808
  16. package/dist/api/campaigns-api.js +0 -1251
  17. package/dist/api/default-api.d.ts +0 -70
  18. package/dist/api/default-api.js +0 -200
  19. package/dist/api/policy-vouchers-api.d.ts +0 -555
  20. package/dist/api/policy-vouchers-api.js +0 -915
  21. package/dist/api/vouchers-api.d.ts +0 -393
  22. package/dist/api/vouchers-api.js +0 -642
  23. package/dist/api.d.ts +0 -15
  24. package/dist/api.js +0 -33
  25. package/dist/base.d.ts +0 -86
  26. package/dist/base.js +0 -367
  27. package/dist/common.d.ts +0 -91
  28. package/dist/common.js +0 -276
  29. package/dist/configuration.d.ts +0 -89
  30. package/dist/configuration.js +0 -52
  31. package/dist/index.d.ts +0 -15
  32. package/dist/index.js +0 -36
  33. package/dist/models/campaign-class.d.ts +0 -105
  34. package/dist/models/campaign-class.js +0 -24
  35. package/dist/models/charge-policy-voucher-request-dto.d.ts +0 -48
  36. package/dist/models/charge-policy-voucher-request-dto.js +0 -15
  37. package/dist/models/charge-policy-voucher-response-class.d.ts +0 -96
  38. package/dist/models/charge-policy-voucher-response-class.js +0 -21
  39. package/dist/models/check-account-eligibility-request-dto.d.ts +0 -48
  40. package/dist/models/check-account-eligibility-request-dto.js +0 -15
  41. package/dist/models/check-account-eligibility-response-class.d.ts +0 -57
  42. package/dist/models/check-account-eligibility-response-class.js +0 -24
  43. package/dist/models/create-campaign-request-dto.d.ts +0 -42
  44. package/dist/models/create-campaign-request-dto.js +0 -15
  45. package/dist/models/create-campaign-response-class.d.ts +0 -25
  46. package/dist/models/create-campaign-response-class.js +0 -15
  47. package/dist/models/create-eligible-account-request-dto.d.ts +0 -30
  48. package/dist/models/create-eligible-account-request-dto.js +0 -15
  49. package/dist/models/create-eligible-account-response-class.d.ts +0 -25
  50. package/dist/models/create-eligible-account-response-class.js +0 -15
  51. package/dist/models/create-policy-voucher-request-dto.d.ts +0 -48
  52. package/dist/models/create-policy-voucher-request-dto.js +0 -15
  53. package/dist/models/create-policy-voucher-response-class.d.ts +0 -25
  54. package/dist/models/create-policy-voucher-response-class.js +0 -15
  55. package/dist/models/create-product-discount-dto.d.ts +0 -48
  56. package/dist/models/create-product-discount-dto.js +0 -15
  57. package/dist/models/create-voucher-request-dto.d.ts +0 -66
  58. package/dist/models/create-voucher-request-dto.js +0 -20
  59. package/dist/models/create-voucher-response-class.d.ts +0 -25
  60. package/dist/models/create-voucher-response-class.js +0 -15
  61. package/dist/models/eligible-account-class.d.ts +0 -78
  62. package/dist/models/eligible-account-class.js +0 -15
  63. package/dist/models/get-campaign-response-class.d.ts +0 -25
  64. package/dist/models/get-campaign-response-class.js +0 -15
  65. package/dist/models/get-policy-voucher-response-class.d.ts +0 -25
  66. package/dist/models/get-policy-voucher-response-class.js +0 -15
  67. package/dist/models/get-voucher-response-class.d.ts +0 -25
  68. package/dist/models/get-voucher-response-class.js +0 -15
  69. package/dist/models/index.d.ts +0 -37
  70. package/dist/models/index.js +0 -53
  71. package/dist/models/inline-response200.d.ts +0 -54
  72. package/dist/models/inline-response200.js +0 -15
  73. package/dist/models/inline-response503.d.ts +0 -54
  74. package/dist/models/inline-response503.js +0 -15
  75. package/dist/models/list-campaigns-response-class.d.ts +0 -43
  76. package/dist/models/list-campaigns-response-class.js +0 -15
  77. package/dist/models/list-eligible-accounts-response-class.d.ts +0 -43
  78. package/dist/models/list-eligible-accounts-response-class.js +0 -15
  79. package/dist/models/list-policy-vouchers-response-class.d.ts +0 -43
  80. package/dist/models/list-policy-vouchers-response-class.js +0 -15
  81. package/dist/models/list-vouchers-response-class.d.ts +0 -43
  82. package/dist/models/list-vouchers-response-class.js +0 -15
  83. package/dist/models/policy-voucher-class.d.ts +0 -165
  84. package/dist/models/policy-voucher-class.js +0 -21
  85. package/dist/models/policy-voucher-transaction-class.d.ts +0 -126
  86. package/dist/models/policy-voucher-transaction-class.js +0 -26
  87. package/dist/models/product-discount-class.d.ts +0 -90
  88. package/dist/models/product-discount-class.js +0 -15
  89. package/dist/models/redeem-policy-voucher-request-dto.d.ts +0 -48
  90. package/dist/models/redeem-policy-voucher-request-dto.js +0 -15
  91. package/dist/models/redeem-policy-voucher-response-class.d.ts +0 -84
  92. package/dist/models/redeem-policy-voucher-response-class.js +0 -21
  93. package/dist/models/update-campaign-request-dto.d.ts +0 -42
  94. package/dist/models/update-campaign-request-dto.js +0 -15
  95. package/dist/models/update-campaign-response-class.d.ts +0 -25
  96. package/dist/models/update-campaign-response-class.js +0 -15
  97. package/dist/models/update-campaign-status-request-dto.d.ts +0 -33
  98. package/dist/models/update-campaign-status-request-dto.js +0 -24
  99. package/dist/models/update-voucher-request-dto.d.ts +0 -60
  100. package/dist/models/update-voucher-request-dto.js +0 -20
  101. package/dist/models/update-voucher-response-class.d.ts +0 -25
  102. package/dist/models/update-voucher-response-class.js +0 -15
  103. package/dist/models/voucher-class.d.ts +0 -127
  104. package/dist/models/voucher-class.js +0 -20
  105. package/dist/models/withdraw-policy-voucher-request-dto.d.ts +0 -36
  106. package/dist/models/withdraw-policy-voucher-request-dto.js +0 -15
  107. package/dist/models/withdraw-policy-voucher-response-class.d.ts +0 -78
  108. package/dist/models/withdraw-policy-voucher-response-class.js +0 -21
  109. package/git_push.sh +0 -57
  110. package/index.ts +0 -19
  111. package/models/campaign-class.ts +0 -114
  112. package/models/charge-policy-voucher-request-dto.ts +0 -54
  113. package/models/charge-policy-voucher-response-class.ts +0 -105
  114. package/models/check-account-eligibility-request-dto.ts +0 -54
  115. package/models/check-account-eligibility-response-class.ts +0 -66
  116. package/models/create-campaign-request-dto.ts +0 -48
  117. package/models/create-campaign-response-class.ts +0 -31
  118. package/models/create-eligible-account-request-dto.ts +0 -36
  119. package/models/create-eligible-account-response-class.ts +0 -31
  120. package/models/create-policy-voucher-request-dto.ts +0 -54
  121. package/models/create-policy-voucher-response-class.ts +0 -31
  122. package/models/create-product-discount-dto.ts +0 -54
  123. package/models/create-voucher-request-dto.ts +0 -75
  124. package/models/create-voucher-response-class.ts +0 -31
  125. package/models/eligible-account-class.ts +0 -84
  126. package/models/get-campaign-response-class.ts +0 -31
  127. package/models/get-policy-voucher-response-class.ts +0 -31
  128. package/models/get-voucher-response-class.ts +0 -31
  129. package/models/index.ts +0 -37
  130. package/models/inline-response200.ts +0 -48
  131. package/models/inline-response503.ts +0 -48
  132. package/models/list-campaigns-response-class.ts +0 -49
  133. package/models/list-eligible-accounts-response-class.ts +0 -49
  134. package/models/list-policy-vouchers-response-class.ts +0 -49
  135. package/models/list-vouchers-response-class.ts +0 -49
  136. package/models/policy-voucher-class.ts +0 -174
  137. package/models/policy-voucher-transaction-class.ts +0 -136
  138. package/models/product-discount-class.ts +0 -96
  139. package/models/redeem-policy-voucher-request-dto.ts +0 -54
  140. package/models/redeem-policy-voucher-response-class.ts +0 -93
  141. package/models/update-campaign-request-dto.ts +0 -48
  142. package/models/update-campaign-response-class.ts +0 -31
  143. package/models/update-campaign-status-request-dto.ts +0 -42
  144. package/models/update-voucher-request-dto.ts +0 -69
  145. package/models/update-voucher-response-class.ts +0 -31
  146. package/models/voucher-class.ts +0 -136
  147. package/models/withdraw-policy-voucher-request-dto.ts +0 -42
  148. package/models/withdraw-policy-voucher-response-class.ts +0 -87
  149. package/tsconfig.json +0 -23
@@ -1,84 +0,0 @@
1
- /**
2
- * EMIL DiscountService
3
- * The EMIL DiscountService API description
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 RedeemPolicyVoucherResponseClass
16
- */
17
- export interface RedeemPolicyVoucherResponseClass {
18
- /**
19
- * Unique identifier of the transaction that this object belongs to.
20
- * @type {string}
21
- * @memberof RedeemPolicyVoucherResponseClass
22
- */
23
- 'transactionCode': string;
24
- /**
25
- * Transaction date
26
- * @type {string}
27
- * @memberof RedeemPolicyVoucherResponseClass
28
- */
29
- 'transactionDate': string;
30
- /**
31
- * Unique identifier for the object.
32
- * @type {string}
33
- * @memberof RedeemPolicyVoucherResponseClass
34
- */
35
- 'code': string;
36
- /**
37
- * Voucher status
38
- * @type {string}
39
- * @memberof RedeemPolicyVoucherResponseClass
40
- */
41
- 'status': RedeemPolicyVoucherResponseClassStatusEnum;
42
- /**
43
- * Customer-defined voucher code
44
- * @type {string}
45
- * @memberof RedeemPolicyVoucherResponseClass
46
- */
47
- 'voucherCode': string;
48
- /**
49
- * Slug of the product the voucher is redeemed for
50
- * @type {string}
51
- * @memberof RedeemPolicyVoucherResponseClass
52
- */
53
- 'productSlug': string;
54
- /**
55
- * Code of the customer the voucher is used by
56
- * @type {string}
57
- * @memberof RedeemPolicyVoucherResponseClass
58
- */
59
- 'partnerNumber': string;
60
- /**
61
- * The remaining number of months left in the voucher to use
62
- * @type {number}
63
- * @memberof RedeemPolicyVoucherResponseClass
64
- */
65
- 'remainingMonths': number;
66
- /**
67
- * The amount (in cents!) of remaining voucher credits
68
- * @type {number}
69
- * @memberof RedeemPolicyVoucherResponseClass
70
- */
71
- 'remainingCredits': number;
72
- /**
73
- * The yearly premium of the policy
74
- * @type {number}
75
- * @memberof RedeemPolicyVoucherResponseClass
76
- */
77
- 'yearlyPremium': number;
78
- }
79
- export declare const RedeemPolicyVoucherResponseClassStatusEnum: {
80
- readonly Redeemable: "REDEEMABLE";
81
- readonly Active: "ACTIVE";
82
- readonly Used: "USED";
83
- };
84
- export type RedeemPolicyVoucherResponseClassStatusEnum = typeof RedeemPolicyVoucherResponseClassStatusEnum[keyof typeof RedeemPolicyVoucherResponseClassStatusEnum];
@@ -1,21 +0,0 @@
1
- "use strict";
2
- /* tslint:disable */
3
- /* eslint-disable */
4
- /**
5
- * EMIL DiscountService
6
- * The EMIL DiscountService API description
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.RedeemPolicyVoucherResponseClassStatusEnum = void 0;
17
- exports.RedeemPolicyVoucherResponseClassStatusEnum = {
18
- Redeemable: 'REDEEMABLE',
19
- Active: 'ACTIVE',
20
- Used: 'USED'
21
- };
@@ -1,42 +0,0 @@
1
- /**
2
- * EMIL DiscountService
3
- * The EMIL DiscountService API description
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 UpdateCampaignRequestDto
16
- */
17
- export interface UpdateCampaignRequestDto {
18
- /**
19
- * The name of the campaign.
20
- * @type {string}
21
- * @memberof UpdateCampaignRequestDto
22
- */
23
- 'name': string;
24
- /**
25
- * A unique identifier for the campaign.
26
- * @type {string}
27
- * @memberof UpdateCampaignRequestDto
28
- */
29
- 'slug': string;
30
- /**
31
- * The date when the campaign becomes active. Must be before the end date.
32
- * @type {string}
33
- * @memberof UpdateCampaignRequestDto
34
- */
35
- 'startDate': string;
36
- /**
37
- * The date when the campaign expires. Must be after the start date.
38
- * @type {string}
39
- * @memberof UpdateCampaignRequestDto
40
- */
41
- 'endDate': string;
42
- }
@@ -1,15 +0,0 @@
1
- "use strict";
2
- /* tslint:disable */
3
- /* eslint-disable */
4
- /**
5
- * EMIL DiscountService
6
- * The EMIL DiscountService API description
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 });
@@ -1,25 +0,0 @@
1
- /**
2
- * EMIL DiscountService
3
- * The EMIL DiscountService API description
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 { CampaignClass } from './campaign-class';
13
- /**
14
- *
15
- * @export
16
- * @interface UpdateCampaignResponseClass
17
- */
18
- export interface UpdateCampaignResponseClass {
19
- /**
20
- * The updated campaign.
21
- * @type {CampaignClass}
22
- * @memberof UpdateCampaignResponseClass
23
- */
24
- 'campaign': CampaignClass;
25
- }
@@ -1,15 +0,0 @@
1
- "use strict";
2
- /* tslint:disable */
3
- /* eslint-disable */
4
- /**
5
- * EMIL DiscountService
6
- * The EMIL DiscountService API description
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 });
@@ -1,33 +0,0 @@
1
- /**
2
- * EMIL DiscountService
3
- * The EMIL DiscountService API description
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 UpdateCampaignStatusRequestDto
16
- */
17
- export interface UpdateCampaignStatusRequestDto {
18
- /**
19
- * The new status of the campaign. Changing the status affects whether the campaign can be updated or vouchers can be redeemed.
20
- * @type {string}
21
- * @memberof UpdateCampaignStatusRequestDto
22
- */
23
- 'status': UpdateCampaignStatusRequestDtoStatusEnum;
24
- }
25
- export declare const UpdateCampaignStatusRequestDtoStatusEnum: {
26
- readonly Active: "ACTIVE";
27
- readonly Draft: "DRAFT";
28
- readonly Paused: "PAUSED";
29
- readonly Expired: "EXPIRED";
30
- readonly InProgress: "IN_PROGRESS";
31
- readonly Failed: "FAILED";
32
- };
33
- export type UpdateCampaignStatusRequestDtoStatusEnum = typeof UpdateCampaignStatusRequestDtoStatusEnum[keyof typeof UpdateCampaignStatusRequestDtoStatusEnum];
@@ -1,24 +0,0 @@
1
- "use strict";
2
- /* tslint:disable */
3
- /* eslint-disable */
4
- /**
5
- * EMIL DiscountService
6
- * The EMIL DiscountService API description
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.UpdateCampaignStatusRequestDtoStatusEnum = void 0;
17
- exports.UpdateCampaignStatusRequestDtoStatusEnum = {
18
- Active: 'ACTIVE',
19
- Draft: 'DRAFT',
20
- Paused: 'PAUSED',
21
- Expired: 'EXPIRED',
22
- InProgress: 'IN_PROGRESS',
23
- Failed: 'FAILED'
24
- };
@@ -1,60 +0,0 @@
1
- /**
2
- * EMIL DiscountService
3
- * The EMIL DiscountService API description
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 { CreateProductDiscountDto } from './create-product-discount-dto';
13
- /**
14
- *
15
- * @export
16
- * @interface UpdateVoucherRequestDto
17
- */
18
- export interface UpdateVoucherRequestDto {
19
- /**
20
- * The new unique code for this voucher. This code will be used for redemption.
21
- * @type {string}
22
- * @memberof UpdateVoucherRequestDto
23
- */
24
- 'voucherCode': string;
25
- /**
26
- * The new duration in months for which the discount will be applied. Must be at least 1 month.
27
- * @type {number}
28
- * @memberof UpdateVoucherRequestDto
29
- */
30
- 'discountPeriodMonths': number;
31
- /**
32
- * The new type of discount to be applied. Can be either absolute (fixed amount) or relative (percentage).
33
- * @type {string}
34
- * @memberof UpdateVoucherRequestDto
35
- */
36
- 'discountType': UpdateVoucherRequestDtoDiscountTypeEnum;
37
- /**
38
- * The value of the discount. For absolute discounts: fixed amount in cents (integer). For relative discounts: percentage with max 2 decimals (1-100).
39
- * @type {number}
40
- * @memberof UpdateVoucherRequestDto
41
- */
42
- 'discountValue': number;
43
- /**
44
- * If true, this voucher cannot be combined with other discounts. Defaults to false if not specified.
45
- * @type {boolean}
46
- * @memberof UpdateVoucherRequestDto
47
- */
48
- 'isExclusive'?: boolean;
49
- /**
50
- * A list of product-specific discount configurations.
51
- * @type {Array<CreateProductDiscountDto>}
52
- * @memberof UpdateVoucherRequestDto
53
- */
54
- 'productDiscounts': Array<CreateProductDiscountDto>;
55
- }
56
- export declare const UpdateVoucherRequestDtoDiscountTypeEnum: {
57
- readonly Absolute: "ABSOLUTE";
58
- readonly Relative: "RELATIVE";
59
- };
60
- export type UpdateVoucherRequestDtoDiscountTypeEnum = typeof UpdateVoucherRequestDtoDiscountTypeEnum[keyof typeof UpdateVoucherRequestDtoDiscountTypeEnum];
@@ -1,20 +0,0 @@
1
- "use strict";
2
- /* tslint:disable */
3
- /* eslint-disable */
4
- /**
5
- * EMIL DiscountService
6
- * The EMIL DiscountService API description
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.UpdateVoucherRequestDtoDiscountTypeEnum = void 0;
17
- exports.UpdateVoucherRequestDtoDiscountTypeEnum = {
18
- Absolute: 'ABSOLUTE',
19
- Relative: 'RELATIVE'
20
- };
@@ -1,25 +0,0 @@
1
- /**
2
- * EMIL DiscountService
3
- * The EMIL DiscountService API description
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 { VoucherClass } from './voucher-class';
13
- /**
14
- *
15
- * @export
16
- * @interface UpdateVoucherResponseClass
17
- */
18
- export interface UpdateVoucherResponseClass {
19
- /**
20
- * The updated voucher.
21
- * @type {VoucherClass}
22
- * @memberof UpdateVoucherResponseClass
23
- */
24
- 'voucher': VoucherClass;
25
- }
@@ -1,15 +0,0 @@
1
- "use strict";
2
- /* tslint:disable */
3
- /* eslint-disable */
4
- /**
5
- * EMIL DiscountService
6
- * The EMIL DiscountService API description
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 });
@@ -1,127 +0,0 @@
1
- /**
2
- * EMIL DiscountService
3
- * The EMIL DiscountService API description
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 { CampaignClass } from './campaign-class';
13
- import { ProductDiscountClass } from './product-discount-class';
14
- /**
15
- *
16
- * @export
17
- * @interface VoucherClass
18
- */
19
- export interface VoucherClass {
20
- /**
21
- * Internal unique identifier for the object. You should not have to use this, use code instead.
22
- * @type {number}
23
- * @memberof VoucherClass
24
- */
25
- 'id': number;
26
- /**
27
- * Unique identifier for the object.
28
- * @type {string}
29
- * @memberof VoucherClass
30
- */
31
- 'code': string;
32
- /**
33
- * The unique code for this voucher.
34
- * @type {string}
35
- * @memberof VoucherClass
36
- */
37
- 'voucherCode': string;
38
- /**
39
- * The unique identifier of the campaign this voucher belongs to.
40
- * @type {number}
41
- * @memberof VoucherClass
42
- */
43
- 'campaignId': number;
44
- /**
45
- * The duration in months for which the discount will be applied.
46
- * @type {number}
47
- * @memberof VoucherClass
48
- */
49
- 'discountPeriodMonths': number;
50
- /**
51
- * The type of discount to be applied. Can be either absolute (fixed amount) or relative (percentage).
52
- * @type {string}
53
- * @memberof VoucherClass
54
- */
55
- 'discountType': VoucherClassDiscountTypeEnum;
56
- /**
57
- * The value of the discount. For absolute discounts, this is the fixed amount. For relative discounts, this is the percentage.
58
- * @type {number}
59
- * @memberof VoucherClass
60
- */
61
- 'discountValue': number;
62
- /**
63
- * The monthly discount value.
64
- * @type {number}
65
- * @memberof VoucherClass
66
- */
67
- 'monthlyDiscountValue': number;
68
- /**
69
- * If true, this voucher cannot be combined with other discounts. Defaults to false if not specified.
70
- * @type {boolean}
71
- * @memberof VoucherClass
72
- */
73
- 'isExclusive': boolean;
74
- /**
75
- * A list of product-specific discount configurations.
76
- * @type {Array<ProductDiscountClass>}
77
- * @memberof VoucherClass
78
- */
79
- 'productDiscounts': Array<ProductDiscountClass>;
80
- /**
81
- * Time at which the object was created.
82
- * @type {string}
83
- * @memberof VoucherClass
84
- */
85
- 'createdAt': string;
86
- /**
87
- * Time at which the object was updated.
88
- * @type {string}
89
- * @memberof VoucherClass
90
- */
91
- 'updatedAt': string;
92
- /**
93
- * Identifier of the user who created the record.
94
- * @type {string}
95
- * @memberof VoucherClass
96
- */
97
- 'createdBy': string;
98
- /**
99
- * Identifier of the user who last updated the record.
100
- * @type {string}
101
- * @memberof VoucherClass
102
- */
103
- 'updatedBy': string;
104
- /**
105
- * Emil Resources Names (ERN) identifies the most specific owner of a resource.
106
- * @type {string}
107
- * @memberof VoucherClass
108
- */
109
- 'ern': string;
110
- /**
111
- * The version of the campaign.
112
- * @type {number}
113
- * @memberof VoucherClass
114
- */
115
- 'version': number;
116
- /**
117
- * The campaign this voucher belongs to.
118
- * @type {CampaignClass}
119
- * @memberof VoucherClass
120
- */
121
- 'campaign': CampaignClass;
122
- }
123
- export declare const VoucherClassDiscountTypeEnum: {
124
- readonly Absolute: "ABSOLUTE";
125
- readonly Relative: "RELATIVE";
126
- };
127
- export type VoucherClassDiscountTypeEnum = typeof VoucherClassDiscountTypeEnum[keyof typeof VoucherClassDiscountTypeEnum];
@@ -1,20 +0,0 @@
1
- "use strict";
2
- /* tslint:disable */
3
- /* eslint-disable */
4
- /**
5
- * EMIL DiscountService
6
- * The EMIL DiscountService API description
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.VoucherClassDiscountTypeEnum = void 0;
17
- exports.VoucherClassDiscountTypeEnum = {
18
- Absolute: 'ABSOLUTE',
19
- Relative: 'RELATIVE'
20
- };
@@ -1,36 +0,0 @@
1
- /**
2
- * EMIL DiscountService
3
- * The EMIL DiscountService API description
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 WithdrawPolicyVoucherRequestDto
16
- */
17
- export interface WithdrawPolicyVoucherRequestDto {
18
- /**
19
- * Customer-defined voucher code
20
- * @type {string}
21
- * @memberof WithdrawPolicyVoucherRequestDto
22
- */
23
- 'voucherCode': string;
24
- /**
25
- * Slug of the campaign the voucher is used for
26
- * @type {string}
27
- * @memberof WithdrawPolicyVoucherRequestDto
28
- */
29
- 'campaignSlug': string;
30
- /**
31
- * Number of the partner the voucher is used by
32
- * @type {string}
33
- * @memberof WithdrawPolicyVoucherRequestDto
34
- */
35
- 'partnerNumber': string;
36
- }
@@ -1,15 +0,0 @@
1
- "use strict";
2
- /* tslint:disable */
3
- /* eslint-disable */
4
- /**
5
- * EMIL DiscountService
6
- * The EMIL DiscountService API description
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 });
@@ -1,78 +0,0 @@
1
- /**
2
- * EMIL DiscountService
3
- * The EMIL DiscountService API description
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 WithdrawPolicyVoucherResponseClass
16
- */
17
- export interface WithdrawPolicyVoucherResponseClass {
18
- /**
19
- * Unique identifier of the transaction that this object belongs to.
20
- * @type {string}
21
- * @memberof WithdrawPolicyVoucherResponseClass
22
- */
23
- 'transactionCode': string;
24
- /**
25
- * Transaction date
26
- * @type {string}
27
- * @memberof WithdrawPolicyVoucherResponseClass
28
- */
29
- 'transactionDate': string;
30
- /**
31
- * Unique identifier for the object.
32
- * @type {string}
33
- * @memberof WithdrawPolicyVoucherResponseClass
34
- */
35
- 'code': string;
36
- /**
37
- * Voucher status
38
- * @type {string}
39
- * @memberof WithdrawPolicyVoucherResponseClass
40
- */
41
- 'status': WithdrawPolicyVoucherResponseClassStatusEnum;
42
- /**
43
- * Customer-defined voucher code
44
- * @type {string}
45
- * @memberof WithdrawPolicyVoucherResponseClass
46
- */
47
- 'voucherCode': string;
48
- /**
49
- * Slug of the product the voucher is redeemed for
50
- * @type {string}
51
- * @memberof WithdrawPolicyVoucherResponseClass
52
- */
53
- 'productSlug': string;
54
- /**
55
- * Code of the customer the voucher is used by
56
- * @type {string}
57
- * @memberof WithdrawPolicyVoucherResponseClass
58
- */
59
- 'partnerNumber': string;
60
- /**
61
- * The remaining number of months left in the voucher to use
62
- * @type {number}
63
- * @memberof WithdrawPolicyVoucherResponseClass
64
- */
65
- 'remainingMonths': number;
66
- /**
67
- * The amount (in cents!) of remaining voucher credits
68
- * @type {number}
69
- * @memberof WithdrawPolicyVoucherResponseClass
70
- */
71
- 'remainingCredits': number;
72
- }
73
- export declare const WithdrawPolicyVoucherResponseClassStatusEnum: {
74
- readonly Redeemable: "REDEEMABLE";
75
- readonly Active: "ACTIVE";
76
- readonly Used: "USED";
77
- };
78
- export type WithdrawPolicyVoucherResponseClassStatusEnum = typeof WithdrawPolicyVoucherResponseClassStatusEnum[keyof typeof WithdrawPolicyVoucherResponseClassStatusEnum];