@emilgroup/discount-sdk 1.4.1-beta.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 (150) hide show
  1. package/README.md +2 -2
  2. package/index.js +99 -0
  3. package/package.json +8 -21
  4. package/scripts/deploy.js +225 -0
  5. package/.openapi-generator/FILES +0 -54
  6. package/.openapi-generator/VERSION +0 -1
  7. package/.openapi-generator-ignore +0 -23
  8. package/api/campaigns-api.ts +0 -1433
  9. package/api/default-api.ts +0 -124
  10. package/api/policy-vouchers-api.ts +0 -999
  11. package/api/vouchers-api.ts +0 -691
  12. package/api.ts +0 -33
  13. package/base.ts +0 -331
  14. package/common.ts +0 -198
  15. package/configuration.ts +0 -110
  16. package/dist/api/campaigns-api.d.ts +0 -808
  17. package/dist/api/campaigns-api.js +0 -1251
  18. package/dist/api/default-api.d.ts +0 -70
  19. package/dist/api/default-api.js +0 -200
  20. package/dist/api/policy-vouchers-api.d.ts +0 -555
  21. package/dist/api/policy-vouchers-api.js +0 -915
  22. package/dist/api/vouchers-api.d.ts +0 -393
  23. package/dist/api/vouchers-api.js +0 -642
  24. package/dist/api.d.ts +0 -15
  25. package/dist/api.js +0 -33
  26. package/dist/base.d.ts +0 -86
  27. package/dist/base.js +0 -367
  28. package/dist/common.d.ts +0 -91
  29. package/dist/common.js +0 -276
  30. package/dist/configuration.d.ts +0 -89
  31. package/dist/configuration.js +0 -52
  32. package/dist/index.d.ts +0 -15
  33. package/dist/index.js +0 -36
  34. package/dist/models/campaign-class.d.ts +0 -105
  35. package/dist/models/campaign-class.js +0 -24
  36. package/dist/models/charge-policy-voucher-request-dto.d.ts +0 -48
  37. package/dist/models/charge-policy-voucher-request-dto.js +0 -15
  38. package/dist/models/charge-policy-voucher-response-class.d.ts +0 -96
  39. package/dist/models/charge-policy-voucher-response-class.js +0 -21
  40. package/dist/models/check-account-eligibility-request-dto.d.ts +0 -48
  41. package/dist/models/check-account-eligibility-request-dto.js +0 -15
  42. package/dist/models/check-account-eligibility-response-class.d.ts +0 -57
  43. package/dist/models/check-account-eligibility-response-class.js +0 -24
  44. package/dist/models/create-campaign-request-dto.d.ts +0 -42
  45. package/dist/models/create-campaign-request-dto.js +0 -15
  46. package/dist/models/create-campaign-response-class.d.ts +0 -25
  47. package/dist/models/create-campaign-response-class.js +0 -15
  48. package/dist/models/create-eligible-account-request-dto.d.ts +0 -30
  49. package/dist/models/create-eligible-account-request-dto.js +0 -15
  50. package/dist/models/create-eligible-account-response-class.d.ts +0 -25
  51. package/dist/models/create-eligible-account-response-class.js +0 -15
  52. package/dist/models/create-policy-voucher-request-dto.d.ts +0 -48
  53. package/dist/models/create-policy-voucher-request-dto.js +0 -15
  54. package/dist/models/create-policy-voucher-response-class.d.ts +0 -25
  55. package/dist/models/create-policy-voucher-response-class.js +0 -15
  56. package/dist/models/create-product-discount-dto.d.ts +0 -48
  57. package/dist/models/create-product-discount-dto.js +0 -15
  58. package/dist/models/create-voucher-request-dto.d.ts +0 -66
  59. package/dist/models/create-voucher-request-dto.js +0 -20
  60. package/dist/models/create-voucher-response-class.d.ts +0 -25
  61. package/dist/models/create-voucher-response-class.js +0 -15
  62. package/dist/models/eligible-account-class.d.ts +0 -78
  63. package/dist/models/eligible-account-class.js +0 -15
  64. package/dist/models/get-campaign-response-class.d.ts +0 -25
  65. package/dist/models/get-campaign-response-class.js +0 -15
  66. package/dist/models/get-policy-voucher-response-class.d.ts +0 -25
  67. package/dist/models/get-policy-voucher-response-class.js +0 -15
  68. package/dist/models/get-voucher-response-class.d.ts +0 -25
  69. package/dist/models/get-voucher-response-class.js +0 -15
  70. package/dist/models/index.d.ts +0 -37
  71. package/dist/models/index.js +0 -53
  72. package/dist/models/inline-response200.d.ts +0 -54
  73. package/dist/models/inline-response200.js +0 -15
  74. package/dist/models/inline-response503.d.ts +0 -54
  75. package/dist/models/inline-response503.js +0 -15
  76. package/dist/models/list-campaigns-response-class.d.ts +0 -43
  77. package/dist/models/list-campaigns-response-class.js +0 -15
  78. package/dist/models/list-eligible-accounts-response-class.d.ts +0 -43
  79. package/dist/models/list-eligible-accounts-response-class.js +0 -15
  80. package/dist/models/list-policy-vouchers-response-class.d.ts +0 -43
  81. package/dist/models/list-policy-vouchers-response-class.js +0 -15
  82. package/dist/models/list-vouchers-response-class.d.ts +0 -43
  83. package/dist/models/list-vouchers-response-class.js +0 -15
  84. package/dist/models/policy-voucher-class.d.ts +0 -165
  85. package/dist/models/policy-voucher-class.js +0 -21
  86. package/dist/models/policy-voucher-transaction-class.d.ts +0 -126
  87. package/dist/models/policy-voucher-transaction-class.js +0 -26
  88. package/dist/models/product-discount-class.d.ts +0 -90
  89. package/dist/models/product-discount-class.js +0 -15
  90. package/dist/models/redeem-policy-voucher-request-dto.d.ts +0 -48
  91. package/dist/models/redeem-policy-voucher-request-dto.js +0 -15
  92. package/dist/models/redeem-policy-voucher-response-class.d.ts +0 -84
  93. package/dist/models/redeem-policy-voucher-response-class.js +0 -21
  94. package/dist/models/update-campaign-request-dto.d.ts +0 -42
  95. package/dist/models/update-campaign-request-dto.js +0 -15
  96. package/dist/models/update-campaign-response-class.d.ts +0 -25
  97. package/dist/models/update-campaign-response-class.js +0 -15
  98. package/dist/models/update-campaign-status-request-dto.d.ts +0 -33
  99. package/dist/models/update-campaign-status-request-dto.js +0 -24
  100. package/dist/models/update-voucher-request-dto.d.ts +0 -60
  101. package/dist/models/update-voucher-request-dto.js +0 -20
  102. package/dist/models/update-voucher-response-class.d.ts +0 -25
  103. package/dist/models/update-voucher-response-class.js +0 -15
  104. package/dist/models/voucher-class.d.ts +0 -127
  105. package/dist/models/voucher-class.js +0 -20
  106. package/dist/models/withdraw-policy-voucher-request-dto.d.ts +0 -36
  107. package/dist/models/withdraw-policy-voucher-request-dto.js +0 -15
  108. package/dist/models/withdraw-policy-voucher-response-class.d.ts +0 -78
  109. package/dist/models/withdraw-policy-voucher-response-class.js +0 -21
  110. package/git_push.sh +0 -57
  111. package/index.ts +0 -19
  112. package/models/campaign-class.ts +0 -114
  113. package/models/charge-policy-voucher-request-dto.ts +0 -54
  114. package/models/charge-policy-voucher-response-class.ts +0 -105
  115. package/models/check-account-eligibility-request-dto.ts +0 -54
  116. package/models/check-account-eligibility-response-class.ts +0 -66
  117. package/models/create-campaign-request-dto.ts +0 -48
  118. package/models/create-campaign-response-class.ts +0 -31
  119. package/models/create-eligible-account-request-dto.ts +0 -36
  120. package/models/create-eligible-account-response-class.ts +0 -31
  121. package/models/create-policy-voucher-request-dto.ts +0 -54
  122. package/models/create-policy-voucher-response-class.ts +0 -31
  123. package/models/create-product-discount-dto.ts +0 -54
  124. package/models/create-voucher-request-dto.ts +0 -75
  125. package/models/create-voucher-response-class.ts +0 -31
  126. package/models/eligible-account-class.ts +0 -84
  127. package/models/get-campaign-response-class.ts +0 -31
  128. package/models/get-policy-voucher-response-class.ts +0 -31
  129. package/models/get-voucher-response-class.ts +0 -31
  130. package/models/index.ts +0 -37
  131. package/models/inline-response200.ts +0 -48
  132. package/models/inline-response503.ts +0 -48
  133. package/models/list-campaigns-response-class.ts +0 -49
  134. package/models/list-eligible-accounts-response-class.ts +0 -49
  135. package/models/list-policy-vouchers-response-class.ts +0 -49
  136. package/models/list-vouchers-response-class.ts +0 -49
  137. package/models/policy-voucher-class.ts +0 -174
  138. package/models/policy-voucher-transaction-class.ts +0 -136
  139. package/models/product-discount-class.ts +0 -96
  140. package/models/redeem-policy-voucher-request-dto.ts +0 -54
  141. package/models/redeem-policy-voucher-response-class.ts +0 -93
  142. package/models/update-campaign-request-dto.ts +0 -48
  143. package/models/update-campaign-response-class.ts +0 -31
  144. package/models/update-campaign-status-request-dto.ts +0 -42
  145. package/models/update-voucher-request-dto.ts +0 -69
  146. package/models/update-voucher-response-class.ts +0 -31
  147. package/models/voucher-class.ts +0 -136
  148. package/models/withdraw-policy-voucher-request-dto.ts +0 -42
  149. package/models/withdraw-policy-voucher-response-class.ts +0 -87
  150. package/tsconfig.json +0 -23
@@ -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.WithdrawPolicyVoucherResponseClassStatusEnum = void 0;
17
- exports.WithdrawPolicyVoucherResponseClassStatusEnum = {
18
- Redeemable: 'REDEEMABLE',
19
- Active: 'ACTIVE',
20
- Used: 'USED'
21
- };
package/git_push.sh DELETED
@@ -1,57 +0,0 @@
1
- #!/bin/sh
2
- # ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
3
- #
4
- # Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com"
5
-
6
- git_user_id=$1
7
- git_repo_id=$2
8
- release_note=$3
9
- git_host=$4
10
-
11
- if [ "$git_host" = "" ]; then
12
- git_host="github.com"
13
- echo "[INFO] No command line input provided. Set \$git_host to $git_host"
14
- fi
15
-
16
- if [ "$git_user_id" = "" ]; then
17
- git_user_id="Emil"
18
- echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
19
- fi
20
-
21
- if [ "$git_repo_id" = "" ]; then
22
- git_repo_id="discount-sdk"
23
- echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
24
- fi
25
-
26
- if [ "$release_note" = "" ]; then
27
- release_note="Minor update"
28
- echo "[INFO] No command line input provided. Set \$release_note to $release_note"
29
- fi
30
-
31
- # Initialize the local directory as a Git repository
32
- git init
33
-
34
- # Adds the files in the local repository and stages them for commit.
35
- git add .
36
-
37
- # Commits the tracked changes and prepares them to be pushed to a remote repository.
38
- git commit -m "$release_note"
39
-
40
- # Sets the new remote
41
- git_remote=$(git remote)
42
- if [ "$git_remote" = "" ]; then # git remote not defined
43
-
44
- if [ "$GIT_TOKEN" = "" ]; then
45
- echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
46
- git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git
47
- else
48
- git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git
49
- fi
50
-
51
- fi
52
-
53
- git pull origin master
54
-
55
- # Pushes (Forces) the changes in the local repository up to the remote repository
56
- echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git"
57
- git push origin master 2>&1 | grep -v 'To https'
package/index.ts DELETED
@@ -1,19 +0,0 @@
1
- /* tslint:disable */
2
- /* eslint-disable */
3
- /**
4
- * EMIL DiscountService
5
- * The EMIL DiscountService API description
6
- *
7
- * The version of the OpenAPI document: 1.0
8
- * Contact: kontakt@emil.de
9
- *
10
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
- * https://openapi-generator.tech
12
- * Do not edit the class manually.
13
- */
14
-
15
-
16
- export { Environment, BaseAPI } from "./base";
17
- export * from "./api";
18
- export * from "./configuration";
19
- export * from "./models";
@@ -1,114 +0,0 @@
1
- /* tslint:disable */
2
- /* eslint-disable */
3
- /**
4
- * EMIL DiscountService
5
- * The EMIL DiscountService API description
6
- *
7
- * The version of the OpenAPI document: 1.0
8
- * Contact: kontakt@emil.de
9
- *
10
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
- * https://openapi-generator.tech
12
- * Do not edit the class manually.
13
- */
14
-
15
-
16
-
17
- /**
18
- *
19
- * @export
20
- * @interface CampaignClass
21
- */
22
- export interface CampaignClass {
23
- /**
24
- * Internal unique identifier for the object. You should not have to use this, use code instead.
25
- * @type {number}
26
- * @memberof CampaignClass
27
- */
28
- 'id': number;
29
- /**
30
- * Unique identifier for the object.
31
- * @type {string}
32
- * @memberof CampaignClass
33
- */
34
- 'code': string;
35
- /**
36
- * The name of the campaign.
37
- * @type {string}
38
- * @memberof CampaignClass
39
- */
40
- 'name': string;
41
- /**
42
- * The status of the campaign.
43
- * @type {string}
44
- * @memberof CampaignClass
45
- */
46
- 'status': CampaignClassStatusEnum;
47
- /**
48
- * A unique identifier for the campaign.
49
- * @type {string}
50
- * @memberof CampaignClass
51
- */
52
- 'slug': string;
53
- /**
54
- * The date when the campaign becomes active.
55
- * @type {string}
56
- * @memberof CampaignClass
57
- */
58
- 'startDate': string;
59
- /**
60
- * The date when the campaign expires.
61
- * @type {string}
62
- * @memberof CampaignClass
63
- */
64
- 'endDate': string;
65
- /**
66
- * Time at which the object was created.
67
- * @type {string}
68
- * @memberof CampaignClass
69
- */
70
- 'createdAt': string;
71
- /**
72
- * Time at which the object was updated.
73
- * @type {string}
74
- * @memberof CampaignClass
75
- */
76
- 'updatedAt': string;
77
- /**
78
- * Identifier of the user who created the record.
79
- * @type {string}
80
- * @memberof CampaignClass
81
- */
82
- 'createdBy': string;
83
- /**
84
- * Identifier of the user who last updated the record.
85
- * @type {string}
86
- * @memberof CampaignClass
87
- */
88
- 'updatedBy': string;
89
- /**
90
- * Emil Resources Names (ERN) identifies the most specific owner of a resource.
91
- * @type {string}
92
- * @memberof CampaignClass
93
- */
94
- 'ern': string;
95
- /**
96
- * The version of the campaign.
97
- * @type {number}
98
- * @memberof CampaignClass
99
- */
100
- 'version': number;
101
- }
102
-
103
- export const CampaignClassStatusEnum = {
104
- Active: 'ACTIVE',
105
- Draft: 'DRAFT',
106
- Paused: 'PAUSED',
107
- Expired: 'EXPIRED',
108
- InProgress: 'IN_PROGRESS',
109
- Failed: 'FAILED'
110
- } as const;
111
-
112
- export type CampaignClassStatusEnum = typeof CampaignClassStatusEnum[keyof typeof CampaignClassStatusEnum];
113
-
114
-
@@ -1,54 +0,0 @@
1
- /* tslint:disable */
2
- /* eslint-disable */
3
- /**
4
- * EMIL DiscountService
5
- * The EMIL DiscountService API description
6
- *
7
- * The version of the OpenAPI document: 1.0
8
- * Contact: kontakt@emil.de
9
- *
10
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
- * https://openapi-generator.tech
12
- * Do not edit the class manually.
13
- */
14
-
15
-
16
-
17
- /**
18
- *
19
- * @export
20
- * @interface ChargePolicyVoucherRequestDto
21
- */
22
- export interface ChargePolicyVoucherRequestDto {
23
- /**
24
- * Customer-defined voucher code
25
- * @type {string}
26
- * @memberof ChargePolicyVoucherRequestDto
27
- */
28
- 'voucherCode': string;
29
- /**
30
- * Slug of the campaign the voucher is used for
31
- * @type {string}
32
- * @memberof ChargePolicyVoucherRequestDto
33
- */
34
- 'campaignSlug': string;
35
- /**
36
- * Number of the partner the voucher is used by
37
- * @type {string}
38
- * @memberof ChargePolicyVoucherRequestDto
39
- */
40
- 'partnerNumber': string;
41
- /**
42
- * Invoice number
43
- * @type {string}
44
- * @memberof ChargePolicyVoucherRequestDto
45
- */
46
- 'invoiceNumber': string;
47
- /**
48
- * Policy number
49
- * @type {string}
50
- * @memberof ChargePolicyVoucherRequestDto
51
- */
52
- 'policyNumber': string;
53
- }
54
-
@@ -1,105 +0,0 @@
1
- /* tslint:disable */
2
- /* eslint-disable */
3
- /**
4
- * EMIL DiscountService
5
- * The EMIL DiscountService API description
6
- *
7
- * The version of the OpenAPI document: 1.0
8
- * Contact: kontakt@emil.de
9
- *
10
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
- * https://openapi-generator.tech
12
- * Do not edit the class manually.
13
- */
14
-
15
-
16
-
17
- /**
18
- *
19
- * @export
20
- * @interface ChargePolicyVoucherResponseClass
21
- */
22
- export interface ChargePolicyVoucherResponseClass {
23
- /**
24
- * Unique identifier of the transaction that this object belongs to.
25
- * @type {string}
26
- * @memberof ChargePolicyVoucherResponseClass
27
- */
28
- 'transactionCode': string;
29
- /**
30
- * Transaction date
31
- * @type {string}
32
- * @memberof ChargePolicyVoucherResponseClass
33
- */
34
- 'transactionDate': string;
35
- /**
36
- * Unique identifier for the object.
37
- * @type {string}
38
- * @memberof ChargePolicyVoucherResponseClass
39
- */
40
- 'code': string;
41
- /**
42
- * Voucher status
43
- * @type {string}
44
- * @memberof ChargePolicyVoucherResponseClass
45
- */
46
- 'status': ChargePolicyVoucherResponseClassStatusEnum;
47
- /**
48
- * Customer-defined voucher code
49
- * @type {string}
50
- * @memberof ChargePolicyVoucherResponseClass
51
- */
52
- 'voucherCode': string;
53
- /**
54
- * Slug of the product the voucher is redeemed for
55
- * @type {string}
56
- * @memberof ChargePolicyVoucherResponseClass
57
- */
58
- 'productSlug': string;
59
- /**
60
- * Number of the partner the voucher is used by
61
- * @type {string}
62
- * @memberof ChargePolicyVoucherResponseClass
63
- */
64
- 'partnerNumber': string;
65
- /**
66
- * The remaining number of months left in the voucher to use
67
- * @type {number}
68
- * @memberof ChargePolicyVoucherResponseClass
69
- */
70
- 'remainingMonths': number;
71
- /**
72
- * The amount (in cents!) of remaining voucher credits
73
- * @type {number}
74
- * @memberof ChargePolicyVoucherResponseClass
75
- */
76
- 'remainingCredits': number;
77
- /**
78
- * The yearly premium of the policy
79
- * @type {number}
80
- * @memberof ChargePolicyVoucherResponseClass
81
- */
82
- 'yearlyPremium': number;
83
- /**
84
- * The amount charged for the voucher (monthly policy voucher discount)
85
- * @type {number}
86
- * @memberof ChargePolicyVoucherResponseClass
87
- */
88
- 'chargedAmount': number;
89
- /**
90
- * The end date of the voucher discount. Calculated based on the policy start date and the voucher duration.
91
- * @type {string}
92
- * @memberof ChargePolicyVoucherResponseClass
93
- */
94
- 'discountEndDate': string;
95
- }
96
-
97
- export const ChargePolicyVoucherResponseClassStatusEnum = {
98
- Redeemable: 'REDEEMABLE',
99
- Active: 'ACTIVE',
100
- Used: 'USED'
101
- } as const;
102
-
103
- export type ChargePolicyVoucherResponseClassStatusEnum = typeof ChargePolicyVoucherResponseClassStatusEnum[keyof typeof ChargePolicyVoucherResponseClassStatusEnum];
104
-
105
-
@@ -1,54 +0,0 @@
1
- /* tslint:disable */
2
- /* eslint-disable */
3
- /**
4
- * EMIL DiscountService
5
- * The EMIL DiscountService API description
6
- *
7
- * The version of the OpenAPI document: 1.0
8
- * Contact: kontakt@emil.de
9
- *
10
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
- * https://openapi-generator.tech
12
- * Do not edit the class manually.
13
- */
14
-
15
-
16
-
17
- /**
18
- *
19
- * @export
20
- * @interface CheckAccountEligibilityRequestDto
21
- */
22
- export interface CheckAccountEligibilityRequestDto {
23
- /**
24
- * The voucher code to check eligibility for
25
- * @type {string}
26
- * @memberof CheckAccountEligibilityRequestDto
27
- */
28
- 'voucherCode': string;
29
- /**
30
- * The partner number to check eligibility for
31
- * @type {string}
32
- * @memberof CheckAccountEligibilityRequestDto
33
- */
34
- 'partnerNumber': string;
35
- /**
36
- * The product slug to check eligibility for
37
- * @type {string}
38
- * @memberof CheckAccountEligibilityRequestDto
39
- */
40
- 'productSlug': string;
41
- /**
42
- * The campaign slug to check eligibility for
43
- * @type {string}
44
- * @memberof CheckAccountEligibilityRequestDto
45
- */
46
- 'campaignSlug': string;
47
- /**
48
- * The original yearly amount before applying any discount (in cents)
49
- * @type {number}
50
- * @memberof CheckAccountEligibilityRequestDto
51
- */
52
- 'yearlyAmount'?: number;
53
- }
54
-
@@ -1,66 +0,0 @@
1
- /* tslint:disable */
2
- /* eslint-disable */
3
- /**
4
- * EMIL DiscountService
5
- * The EMIL DiscountService API description
6
- *
7
- * The version of the OpenAPI document: 1.0
8
- * Contact: kontakt@emil.de
9
- *
10
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
- * https://openapi-generator.tech
12
- * Do not edit the class manually.
13
- */
14
-
15
-
16
-
17
- /**
18
- *
19
- * @export
20
- * @interface CheckAccountEligibilityResponseClass
21
- */
22
- export interface CheckAccountEligibilityResponseClass {
23
- /**
24
- * The eligibility status of the account
25
- * @type {boolean}
26
- * @memberof CheckAccountEligibilityResponseClass
27
- */
28
- 'eligible': boolean;
29
- /**
30
- * The error code if the account is not eligible
31
- * @type {string}
32
- * @memberof CheckAccountEligibilityResponseClass
33
- */
34
- 'errorCode': CheckAccountEligibilityResponseClassErrorCodeEnum;
35
- /**
36
- * The total discount amount applied to the original price (in cents)
37
- * @type {number}
38
- * @memberof CheckAccountEligibilityResponseClass
39
- */
40
- 'totalDiscount': number;
41
- /**
42
- * The monthly discount amount applied to the original price (in cents)
43
- * @type {number}
44
- * @memberof CheckAccountEligibilityResponseClass
45
- */
46
- 'monthlyDiscount': number;
47
- /**
48
- * The number of months the discount is applied
49
- * @type {number}
50
- * @memberof CheckAccountEligibilityResponseClass
51
- */
52
- 'discountMonths': number;
53
- }
54
-
55
- export const CheckAccountEligibilityResponseClassErrorCodeEnum = {
56
- NA: 'n/A',
57
- ErrorCampaignOver: 'error_campaign_over',
58
- ErrorVoucherAlreadyRedeemed: 'error_voucher_already_redeemed',
59
- ErrorCustomerHasNoVoucher: 'error_customer_has_no_voucher',
60
- ErrorVoucherIsExclusive: 'error_voucher_is_exclusive',
61
- ErrorProductNotAllowed: 'error_product_not_allowed'
62
- } as const;
63
-
64
- export type CheckAccountEligibilityResponseClassErrorCodeEnum = typeof CheckAccountEligibilityResponseClassErrorCodeEnum[keyof typeof CheckAccountEligibilityResponseClassErrorCodeEnum];
65
-
66
-
@@ -1,48 +0,0 @@
1
- /* tslint:disable */
2
- /* eslint-disable */
3
- /**
4
- * EMIL DiscountService
5
- * The EMIL DiscountService API description
6
- *
7
- * The version of the OpenAPI document: 1.0
8
- * Contact: kontakt@emil.de
9
- *
10
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
- * https://openapi-generator.tech
12
- * Do not edit the class manually.
13
- */
14
-
15
-
16
-
17
- /**
18
- *
19
- * @export
20
- * @interface CreateCampaignRequestDto
21
- */
22
- export interface CreateCampaignRequestDto {
23
- /**
24
- * The name of the campaign.
25
- * @type {string}
26
- * @memberof CreateCampaignRequestDto
27
- */
28
- 'name': string;
29
- /**
30
- * A unique identifier for the campaign.
31
- * @type {string}
32
- * @memberof CreateCampaignRequestDto
33
- */
34
- 'slug': string;
35
- /**
36
- * The date when the campaign becomes active. Must be today or a future date, and must be before the end date.
37
- * @type {string}
38
- * @memberof CreateCampaignRequestDto
39
- */
40
- 'startDate': string;
41
- /**
42
- * The date when the campaign expires. Must be after the start date.
43
- * @type {string}
44
- * @memberof CreateCampaignRequestDto
45
- */
46
- 'endDate': string;
47
- }
48
-
@@ -1,31 +0,0 @@
1
- /* tslint:disable */
2
- /* eslint-disable */
3
- /**
4
- * EMIL DiscountService
5
- * The EMIL DiscountService API description
6
- *
7
- * The version of the OpenAPI document: 1.0
8
- * Contact: kontakt@emil.de
9
- *
10
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
- * https://openapi-generator.tech
12
- * Do not edit the class manually.
13
- */
14
-
15
-
16
- import { CampaignClass } from './campaign-class';
17
-
18
- /**
19
- *
20
- * @export
21
- * @interface CreateCampaignResponseClass
22
- */
23
- export interface CreateCampaignResponseClass {
24
- /**
25
- * The created campaign.
26
- * @type {CampaignClass}
27
- * @memberof CreateCampaignResponseClass
28
- */
29
- 'campaign': CampaignClass;
30
- }
31
-
@@ -1,36 +0,0 @@
1
- /* tslint:disable */
2
- /* eslint-disable */
3
- /**
4
- * EMIL DiscountService
5
- * The EMIL DiscountService API description
6
- *
7
- * The version of the OpenAPI document: 1.0
8
- * Contact: kontakt@emil.de
9
- *
10
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
- * https://openapi-generator.tech
12
- * Do not edit the class manually.
13
- */
14
-
15
-
16
-
17
- /**
18
- *
19
- * @export
20
- * @interface CreateEligibleAccountRequestDto
21
- */
22
- export interface CreateEligibleAccountRequestDto {
23
- /**
24
- * The unique code of the voucher that will be assigned to this account. This code will be used for redemption.
25
- * @type {string}
26
- * @memberof CreateEligibleAccountRequestDto
27
- */
28
- 'voucherCode': string;
29
- /**
30
- * The unique identifier of the partner account that will be eligible to redeem the voucher.
31
- * @type {string}
32
- * @memberof CreateEligibleAccountRequestDto
33
- */
34
- 'partnerNumber': string;
35
- }
36
-
@@ -1,31 +0,0 @@
1
- /* tslint:disable */
2
- /* eslint-disable */
3
- /**
4
- * EMIL DiscountService
5
- * The EMIL DiscountService API description
6
- *
7
- * The version of the OpenAPI document: 1.0
8
- * Contact: kontakt@emil.de
9
- *
10
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
- * https://openapi-generator.tech
12
- * Do not edit the class manually.
13
- */
14
-
15
-
16
- import { EligibleAccountClass } from './eligible-account-class';
17
-
18
- /**
19
- *
20
- * @export
21
- * @interface CreateEligibleAccountResponseClass
22
- */
23
- export interface CreateEligibleAccountResponseClass {
24
- /**
25
- * The account that has been marked as eligible to redeem a voucher from a specific campaign.
26
- * @type {EligibleAccountClass}
27
- * @memberof CreateEligibleAccountResponseClass
28
- */
29
- 'eligibleAccount': EligibleAccountClass;
30
- }
31
-
@@ -1,54 +0,0 @@
1
- /* tslint:disable */
2
- /* eslint-disable */
3
- /**
4
- * EMIL DiscountService
5
- * The EMIL DiscountService API description
6
- *
7
- * The version of the OpenAPI document: 1.0
8
- * Contact: kontakt@emil.de
9
- *
10
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
- * https://openapi-generator.tech
12
- * Do not edit the class manually.
13
- */
14
-
15
-
16
-
17
- /**
18
- *
19
- * @export
20
- * @interface CreatePolicyVoucherRequestDto
21
- */
22
- export interface CreatePolicyVoucherRequestDto {
23
- /**
24
- * Customer-defined voucher code
25
- * @type {string}
26
- * @memberof CreatePolicyVoucherRequestDto
27
- */
28
- 'voucherCode': string;
29
- /**
30
- * Slug of the campaign the voucher is used for
31
- * @type {string}
32
- * @memberof CreatePolicyVoucherRequestDto
33
- */
34
- 'campaignSlug': string;
35
- /**
36
- * Number of the partner the voucher is used by
37
- * @type {string}
38
- * @memberof CreatePolicyVoucherRequestDto
39
- */
40
- 'partnerNumber': string;
41
- /**
42
- * Slug of the product the voucher is redeemed for
43
- * @type {string}
44
- * @memberof CreatePolicyVoucherRequestDto
45
- */
46
- 'productSlug'?: string;
47
- /**
48
- * The yearly premium of the policy (in cents). This value is required to ensure accurate discount calculations, especially in edge cases where the total premium is less than the discount. It helps prevent situations where the discount would exceed the actual premium amount.
49
- * @type {number}
50
- * @memberof CreatePolicyVoucherRequestDto
51
- */
52
- 'yearlyPremium'?: number;
53
- }
54
-