chargebee 2.41.0 → 3.0.0-beta.2

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 (118) hide show
  1. package/CHANGELOG.md +11 -15
  2. package/LICENSE +1 -1
  3. package/README.md +90 -170
  4. package/cjs/RequestWrapper.js +84 -0
  5. package/cjs/asyncApiSupport.js +39 -0
  6. package/cjs/chargebee.cjs.js +13 -0
  7. package/cjs/chargebee.cjs.worker.js +9 -0
  8. package/cjs/chargebeeError.js +17 -0
  9. package/cjs/coreCommon.js +72 -0
  10. package/cjs/createChargebee.js +92 -0
  11. package/cjs/environment.js +18 -0
  12. package/cjs/filter.js +1 -0
  13. package/cjs/net/ClientInterface.js +40 -0
  14. package/cjs/net/FetchClient.js +86 -0
  15. package/cjs/net/NodeClient.js +61 -0
  16. package/cjs/package.json +1 -0
  17. package/cjs/resources/api_endpoints.js +1086 -0
  18. package/cjs/util.js +218 -0
  19. package/esm/RequestWrapper.js +80 -0
  20. package/esm/asyncApiSupport.js +35 -0
  21. package/esm/chargebee.esm.js +9 -0
  22. package/esm/chargebee.esm.worker.js +5 -0
  23. package/esm/chargebeeError.js +13 -0
  24. package/esm/coreCommon.js +67 -0
  25. package/esm/createChargebee.js +88 -0
  26. package/esm/environment.js +15 -0
  27. package/esm/filter.js +1 -0
  28. package/esm/net/ClientInterface.js +35 -0
  29. package/esm/net/FetchClient.js +81 -0
  30. package/esm/net/NodeClient.js +56 -0
  31. package/esm/package.json +1 -0
  32. package/esm/resources/api_endpoints.js +1083 -0
  33. package/esm/util.js +202 -0
  34. package/package.json +69 -38
  35. package/types/core.d.ts +558 -89
  36. package/types/index.d.ts +90 -55
  37. package/types/resources/Address.d.ts +57 -272
  38. package/types/resources/AdvanceInvoiceSchedule.d.ts +21 -94
  39. package/types/resources/AttachedItem.d.ts +91 -329
  40. package/types/resources/Attribute.d.ts +5 -5
  41. package/types/resources/BusinessEntity.d.ts +49 -69
  42. package/types/resources/BusinessEntityTransfer.d.ts +11 -17
  43. package/types/resources/Card.d.ts +146 -424
  44. package/types/resources/Comment.d.ts +72 -189
  45. package/types/resources/Contact.d.ts +12 -64
  46. package/types/resources/ContractTerm.d.ts +15 -96
  47. package/types/resources/Coupon.d.ts +282 -758
  48. package/types/resources/CouponCode.d.ts +56 -52
  49. package/types/resources/CouponSet.d.ts +92 -234
  50. package/types/resources/CreditNote.d.ts +588 -1758
  51. package/types/resources/CreditNoteEstimate.d.ts +131 -157
  52. package/types/resources/Currency.d.ts +75 -62
  53. package/types/resources/Customer.d.ts +892 -835
  54. package/types/resources/CustomerEntitlement.d.ts +24 -35
  55. package/types/resources/DifferentialPrice.d.ts +116 -314
  56. package/types/resources/Discount.d.ts +20 -125
  57. package/types/resources/Download.d.ts +6 -22
  58. package/types/resources/Entitlement.d.ts +51 -160
  59. package/types/resources/EntitlementOverride.d.ts +58 -139
  60. package/types/resources/Estimate.d.ts +1178 -527
  61. package/types/resources/Event.d.ts +67 -178
  62. package/types/resources/Export.d.ts +563 -723
  63. package/types/resources/Feature.d.ts +117 -433
  64. package/types/resources/GatewayErrorDetail.d.ts +16 -72
  65. package/types/resources/Gift.d.ts +265 -432
  66. package/types/resources/Hierarchy.d.ts +8 -36
  67. package/types/resources/HostedPage.d.ts +1017 -1153
  68. package/types/resources/ImpactedItem.d.ts +13 -50
  69. package/types/resources/ImpactedItemPrice.d.ts +13 -15
  70. package/types/resources/ImpactedSubscription.d.ts +13 -45
  71. package/types/resources/InAppSubscription.d.ts +93 -389
  72. package/types/resources/Installment.d.ts +35 -110
  73. package/types/resources/InstallmentConfig.d.ts +54 -155
  74. package/types/resources/InstallmentDetail.d.ts +19 -27
  75. package/types/resources/Invoice.d.ts +1574 -3157
  76. package/types/resources/InvoiceEstimate.d.ts +131 -161
  77. package/types/resources/Item.d.ts +133 -611
  78. package/types/resources/ItemEntitlement.d.ts +78 -215
  79. package/types/resources/ItemFamily.d.ts +69 -178
  80. package/types/resources/ItemPrice.d.ts +291 -1203
  81. package/types/resources/Metadata.d.ts +3 -5
  82. package/types/resources/Order.d.ts +538 -1471
  83. package/types/resources/PaymentIntent.d.ts +163 -347
  84. package/types/resources/PaymentReferenceNumber.d.ts +7 -29
  85. package/types/resources/PaymentSource.d.ts +476 -1272
  86. package/types/resources/PaymentVoucher.d.ts +87 -306
  87. package/types/resources/PortalSession.d.ts +71 -207
  88. package/types/resources/PriceVariant.d.ts +91 -279
  89. package/types/resources/PricingPageSession.d.ts +92 -41
  90. package/types/resources/PromotionalCredit.d.ts +90 -346
  91. package/types/resources/Purchase.d.ts +185 -315
  92. package/types/resources/Quote.d.ts +1406 -887
  93. package/types/resources/QuoteLineGroup.d.ts +125 -452
  94. package/types/resources/QuotedCharge.d.ts +45 -274
  95. package/types/resources/QuotedSubscription.d.ts +100 -488
  96. package/types/resources/Ramp.d.ts +230 -747
  97. package/types/resources/ResourceMigration.d.ts +25 -80
  98. package/types/resources/SiteMigrationDetail.d.ts +34 -112
  99. package/types/resources/Subscription.d.ts +2390 -4336
  100. package/types/resources/SubscriptionEntitlement.d.ts +59 -160
  101. package/types/resources/SubscriptionEstimate.d.ts +51 -75
  102. package/types/resources/TaxWithheld.d.ts +15 -40
  103. package/types/resources/ThirdPartyPaymentMethod.d.ts +7 -29
  104. package/types/resources/TimeMachine.d.ts +43 -97
  105. package/types/resources/Token.d.ts +15 -85
  106. package/types/resources/Transaction.d.ts +276 -911
  107. package/types/resources/UnbilledCharge.d.ts +189 -164
  108. package/types/resources/Usage.d.ts +89 -279
  109. package/types/resources/VirtualBankAccount.d.ts +103 -255
  110. package/types/resources/filter.d.ts +52 -0
  111. package/.github/ISSUE_TEMPLATE/bug_report.yml +0 -81
  112. package/.github/ISSUE_TEMPLATE/config.yml +0 -6
  113. package/.github/ISSUE_TEMPLATE/feature_request.yml +0 -34
  114. package/.github/PULL_REQUEST_TEMPLATE.md +0 -8
  115. package/lib/chargebee.js +0 -512
  116. package/lib/resources/api_endpoints.js +0 -2935
  117. package/types/resources/NonSubscription.d.ts +0 -30
  118. package/types/resources/Session.d.ts +0 -41
@@ -1,26 +1,10 @@
1
1
  ///<reference path='./../core.d.ts'/>
2
+ ///<reference path='./../index.d.ts'/>
3
+
2
4
  declare module 'chargebee' {
3
5
  export interface Download {
4
-
5
- /**
6
- * @description The URL at which the file is available for download.
7
-
8
- */
9
-
10
- download_url:string;
11
-
12
- /**
13
- * @description The time until which the &#x60;download_url&#x60; is valid.
14
-
15
- */
16
-
17
- valid_till:number;
18
-
19
- /**
20
- * @description The [media type](https://en.wikipedia.org/wiki/Media_type) of the file.
21
-
22
- */
23
-
24
- mime_type?:string;
6
+ download_url: string;
7
+ valid_till: number;
8
+ mime_type?: string;
25
9
  }
26
- }
10
+ }
@@ -1,175 +1,66 @@
1
1
  ///<reference path='./../core.d.ts'/>
2
+ ///<reference path='./../index.d.ts'/>
3
+ ///<reference path='./filter.d.ts'/>
2
4
  declare module 'chargebee' {
3
5
  export interface Entitlement {
4
-
5
- /**
6
- * @description A unique identifier for the entitlement. This is auto-generated.
7
-
8
- */
9
-
10
- id:string;
11
-
12
- /**
13
- * @description The unique identifier of the entity being granted entitlement to a specific &#x60;feature&#x60;.
14
-
15
- */
16
-
17
- entity_id?:string;
18
-
19
- /**
20
- * @description The type of the entity that holds this entitlement. \* plan -
21
-
22
- Indicates that the entity is an &#x60;item&#x60; with [type](items?prod_cat_ver&#x3D;2#item_type) set to &#x60;plan&#x60;.
23
- \* addon -
24
-
25
- Indicates that the entity is an &#x60;item&#x60; with [type](items?prod_cat_ver&#x3D;2#item_type) set to &#x60;addon&#x60;.
26
- \* addon_price -
27
-
28
- Indicates that the entity is an &#x60;item_price&#x60; associated with an &#x60;item&#x60; with [type](items?prod_cat_ver&#x3D;2#item_type) set to &#x60;addon&#x60;.
29
- \* charge -
30
-
31
- Indicates that the entity is an &#x60;item&#x60; with [type](items?prod_cat_ver&#x3D;2#item_type) set to &#x60;charge&#x60;.
32
- \* plan_price -
33
-
34
- Indicates that the entity is an &#x60;item_price&#x60; associated with an &#x60;item&#x60; of [type](items?prod_cat_ver&#x3D;2#item_type) &#x60;plan&#x60;.
35
-
36
- */
37
-
38
- entity_type?:'charge' | 'addon' | 'addon_price' | 'plan_price' | 'plan';
39
-
40
- /**
41
- * @description The unique identifier of the &#x60;feature&#x60; to which the entity gains entitlement.
42
-
43
- */
44
-
45
- feature_id?:string;
46
-
47
- /**
48
- * @description The &#x60;name&#x60; of the feature associated with this entitlement.
49
-
50
- */
51
-
52
- feature_name?:string;
53
-
54
- /**
55
- * @description The level of entitlement that the entity has towards the feature. The possible values depend on the value of &#x60;feature.type&#x60;:
56
-
57
- * When &#x60;feature.type&#x60; is &#x60;quantity&#x60; and:
58
- * If &#x60;feature.levels[is_unlimited]&#x60; is not &#x60;true&#x60; for any one of &#x60;feature.levels[]&#x60;, then the value can be any one of &#x60;feature.levels[value][]&#x60;.
59
- * If &#x60;feature.levels[is_unlimited]&#x60; is &#x60;true&#x60; for one of the &#x60;feature.levels[]&#x60;, then the value can be:
60
- * any one of &#x60;feature.levels[value][]&#x60;
61
- * or it can be &#x60;unlimited&#x60; (case-insensitive), indicating unlimited entitlement.
62
- * When &#x60;type&#x60; is &#x60;range&#x60; and:
63
- * If &#x60;feature.levels[is_unlimited]&#x60; is not &#x60;true&#x60; for any one of &#x60;feature.levels[]&#x60;, then the value can be any whole number between &#x60;levels[value][0]&#x60; and &#x60;levels[value][1]&#x60; (inclusive).
64
- * If &#x60;feature.levels[is_unlimited]&#x60; is &#x60;true&#x60; for one of the &#x60;feature.levels[]&#x60;, then the value can be:
65
- * any whole number equal to or greater than &#x60;levels[value][0]&#x60;
66
- * or it can be &#x60;unlimited&#x60; (case-insensitive), indicating unlimited entitlement.
67
- * When &#x60;type&#x60; is &#x60;custom&#x60;, then the value can be any one of &#x60;feature.levels[value][]&#x60;.
68
- * When &#x60;type&#x60; is &#x60;switch&#x60;, then the value is set as &#x60;available&#x60; or &#x60;true&#x60;.
69
-
70
- */
71
-
72
- value?:string;
73
-
74
- /**
75
- * @description The display name for the entitlement level. The value is automatically generated based on &#x60;feature.type&#x60;:
76
-
77
- * When &#x60;feature.type&#x60; is &#x60;quantity&#x60; or &#x60;range&#x60;, the &#x60;name&#x60; is the space-separated concatenation of &#x60;value&#x60; and the plural form of &#x60;feature.unit&#x60;. For instance, if &#x60;value&#x60; is &#x60;20&#x60; and &#x60;feature.unit&#x60; is &#x60;user&#x60;, the &#x60;name&#x60; will be &#x60;20 users&#x60;.
78
- * When &#x60;feature.type&#x60; is &#x60;custom&#x60;, the &#x60;name&#x60; matches the &#x60;value&#x60;.
79
-
80
- */
81
-
82
- name?:string;
6
+ id: string;
7
+ entity_id?: string;
8
+ entity_type?: 'plan' | 'addon' | 'charge' | 'plan_price' | 'addon_price';
9
+ feature_id?: string;
10
+ feature_name?: string;
11
+ value?: string;
12
+ name?: string;
83
13
  }
84
- export namespace Entitlement {
85
- export class EntitlementResource {
86
- /**
87
- * @description Retrieves a list of all the &#x60;entitlement&#x60;s associated with the specified &#x60;feature&#x60;.
88
-
89
- */
90
-
91
- list(input?:ListInputParam):ChargebeeRequest<ListResponse>;
92
-
93
- /**
94
- * @description Create, update, or remove a set of &#x60;entitlement&#x60;s for a feature.
95
14
 
96
- The behavior depends on the specified &#x60;action&#x60;. It tries to create, update, or delete &#x60;entitlement&#x60; objects. If any of the entitlement objects fail to process, the entire operation stops with an error, and no entitlements are processed. In essence, the request processes either all the provided entitlements or none of them.
97
-
98
- */
99
-
100
- create(input:CreateInputParam):ChargebeeRequest<CreateResponse>;
15
+ export namespace Entitlement {
16
+ export class EntitlementResource {
17
+ list(
18
+ input?: ListInputParam,
19
+ headers?: ChargebeeRequestHeader,
20
+ ): Promise<ChargebeeResponse<ListResponse>>;
21
+
22
+ create(
23
+ input: CreateInputParam,
24
+ headers?: ChargebeeRequestHeader,
25
+ ): Promise<ChargebeeResponse<CreateResponse>>;
101
26
  }
102
- export interface ListResponse {
103
- /**
104
- * @description Retrieves a list of all the &#x60;entitlement&#x60;s associated with the specified &#x60;feature&#x60;.
105
27
 
106
- */
107
-
108
- list:{entitlement:Entitlement}[];
109
-
110
- /**
111
- * @description Retrieves a list of all the &#x60;entitlement&#x60;s associated with the specified &#x60;feature&#x60;.
112
-
113
- */
114
-
115
- next_offset?:string;
28
+ export interface ListResponse {
29
+ list: { entitlement: Entitlement }[];
30
+ next_offset?: string;
116
31
  }
117
- export interface ListInputParam {
118
- [key : string]: any;
119
- /**
120
- * @description Retrieves a list of all the &#x60;entitlement&#x60;s associated with the specified &#x60;feature&#x60;.
121
-
122
- */
123
-
124
- limit?:number;
125
-
126
- /**
127
- * @description Retrieves a list of all the &#x60;entitlement&#x60;s associated with the specified &#x60;feature&#x60;.
128
32
 
129
- */
130
-
131
- offset?:string;
132
-
133
- /**
134
- * @description Retrieves a list of all the &#x60;entitlement&#x60;s associated with the specified &#x60;feature&#x60;.
135
-
136
- */
137
-
138
- feature_id?:{in?:string,is?:string};
139
-
140
- /**
141
- * @description Retrieves a list of all the &#x60;entitlement&#x60;s associated with the specified &#x60;feature&#x60;.
33
+ export interface CreateResponse {
34
+ entitlement: Entitlement;
35
+ }
142
36
 
143
- */
144
-
145
- entity_type?:{in?:string,is?:'charge' | 'addon' | 'addon_price' | 'plan_price' | 'plan'};
146
-
147
- /**
148
- * @description Retrieves a list of all the &#x60;entitlement&#x60;s associated with the specified &#x60;feature&#x60;.
37
+ // REQUEST PARAMS
38
+ //---------------
149
39
 
150
- */
151
-
152
- entity_id?:{in?:string,is?:string};
153
- }
154
- export interface CreateResponse {
155
- entitlement:Entitlement;
40
+ export interface ListInputParam {
41
+ limit?: number;
42
+ offset?: string;
43
+ feature_id?: filter.String;
44
+ entity_type?: filter.Enum;
45
+ entity_id?: filter.String /**
46
+ * @deprecated Please refer API docs to use other attributes
47
+ */;
48
+
49
+ include_drafts?: boolean /**
50
+ * @deprecated Please refer API docs to use other attributes
51
+ */;
52
+
53
+ embed?: string;
156
54
  }
157
55
  export interface CreateInputParam {
158
-
159
- /**
160
- * @description The specific action to be performed for each &#x60;entitlement&#x60; specified. \* upsert - If the &#x60;entitlement&#x60; already exists for the &#x60;feature_id&#x60; and &#x60;entity_id&#x60; combination, the &#x60;value&#x60; of the &#x60;entitlement&#x60; is updated. If it doesn&#x27;t exist, a new &#x60;entitlement&#x60; is created. \* remove - Deletes the &#x60;entitlement&#x60; for the &#x60;feature_id&#x60; and &#x60;entity_id&#x60; combination, if it exists.
161
-
162
- */
163
-
164
- action:Action;
165
-
166
- /**
167
- * @description Parameters for entitlements
168
-
169
- */
170
-
171
- entitlements:{entity_id:string,entity_type?:'charge' | 'addon' | 'addon_price' | 'plan_price' | 'plan',feature_id:string,value?:string}[];
56
+ action: Action;
57
+ entitlements?: EntitlementsCreateInputParam[];
58
+ }
59
+ export interface EntitlementsCreateInputParam {
60
+ entity_id: string;
61
+ feature_id: string;
62
+ entity_type?: 'plan' | 'addon' | 'charge' | 'plan_price' | 'addon_price';
63
+ value?: string;
172
64
  }
173
-
174
65
  }
175
- }
66
+ }
@@ -1,157 +1,76 @@
1
1
  ///<reference path='./../core.d.ts'/>
2
2
  ///<reference path='./../index.d.ts'/>
3
+ ///<reference path='./filter.d.ts'/>
3
4
  declare module 'chargebee' {
4
5
  export interface EntitlementOverride {
5
-
6
- /**
7
- * @description Unique identifier for the entitlement override. This is always auto-generated.
8
-
9
- */
10
-
11
- id:string;
12
-
13
- /**
14
- * @description The &#x60;id&#x60; of the subscription to which this entitlement override belongs.
15
-
16
- */
17
-
18
- entity_id?:string;
19
-
20
- /**
21
- * @description The name of Chargebee resource that this entitlement override is associated with. The value is always &#x60;subscription&#x60;.
22
-
23
- */
24
-
25
- entity_type?:string;
26
-
27
- /**
28
- * @description The &#x60;id&#x60; of the &#x60;feature&#x60; towards which this entitlement override has been granted.
29
-
30
- */
31
-
32
- feature_id?:string;
33
-
34
- /**
35
- * @description The &#x60;name&#x60; of the &#x60;feature&#x60; towards which this entitlement override has been granted.
36
-
37
- */
38
-
39
- feature_name?:string;
40
-
41
- /**
42
- * @description The level of entitlement that the item has towards the feature. The possible values depend on the value of &#x60;feature.type&#x60;:
43
-
44
- * When &#x60;feature.type&#x60; is &#x60;quantity&#x60; and:
45
- * If &#x60;feature.levels[is_unlimited]&#x60; is not &#x60;true&#x60; for any one of &#x60;feature.levels[]&#x60;, then the value can be any one of &#x60;feature.levels[value][]&#x60;.
46
- * If &#x60;feature.levels[is_unlimited]&#x60; is &#x60;true&#x60; for one of the &#x60;feature.levels[]&#x60;, then the value can also be:
47
- * any one of &#x60;feature.levels[value][]&#x60;
48
- * or it can be &#x60;unlimited&#x60; (case-insensitive), indicating unlimited entitlement.
49
- * When &#x60;type&#x60; is &#x60;range&#x60; and:
50
- * If &#x60;feature.levels[is_unlimited]&#x60; is not &#x60;true&#x60; for any one of &#x60;feature.levels[]&#x60;, then the value can be any whole number between &#x60;levels[value][0]&#x60; and &#x60;levels[value][1]&#x60; (inclusive).
51
- * If &#x60;feature.levels[is_unlimited]&#x60; is &#x60;true&#x60; for one of the &#x60;feature.levels[]&#x60;, then the value can be:
52
- * any whole number equal to or greater than &#x60;levels[value][0]&#x60;
53
- * or it can be &#x60;unlimited&#x60; (case-insensitive), indicating unlimited entitlement.
54
- * When &#x60;type&#x60; is &#x60;custom&#x60;, then the value can be any one of &#x60;feature.levels[value][]&#x60;.
55
- * When &#x60;type&#x60; is &#x60;switch&#x60;, then the value is set as &#x60;true&#x60; if the feature is available; it is set as &#x60;false&#x60; when the feature is unavailable.
56
-
57
- */
58
-
59
- value?:string;
60
-
61
- /**
62
- * @description The display name for the entitlement level. The default values are auto-generated based on &#x60;feature.type&#x60; as follows:
63
-
64
- * When &#x60;feature.type&#x60; is &#x60;quantity&#x60; or &#x60;range&#x60;, then &#x60;name&#x60; is the space-separated concatenation of &#x60;value&#x60; and the pluralized version of &#x60;feature.unit&#x60;. For example, if &#x60;value&#x60; is &#x60;20&#x60; and &#x60;feature.unit&#x60; is &#x60;user&#x60;, then &#x60;name&#x60; becomes &#x60;20 users&#x60;.
65
- * When &#x60;feature.type&#x60; is &#x60;custom&#x60;, then &#x60;name&#x60; is the same as &#x60;value&#x60;
66
-
67
- */
68
-
69
- name?:string;
70
-
71
- /**
72
- * @description The expiry date for the &#x60;entitlement_override&#x60;. Once expired, the &#x60;entitlement_override&#x60; object is no longer returned.
73
-
74
- */
75
-
76
- expires_at?:number;
77
-
78
- effective_from?:number;
79
-
80
- schedule_status?:'activated' | 'scheduled' | 'failed';
81
-
6
+ id: string;
7
+ entity_id?: string;
8
+ entity_type?: string;
9
+ feature_id?: string;
10
+ feature_name?: string;
11
+ value?: string;
12
+ name?: string;
13
+ expires_at?: number;
14
+ effective_from?: number;
15
+ schedule_status?: 'activated' | 'scheduled' | 'failed';
82
16
  }
83
- export namespace EntitlementOverride {
84
- export class EntitlementOverrideResource {
85
- /**
86
- * @description Upserts or removes a set of &#x60;entitlement_overrides&#x60; for a &#x60;subscription&#x60; depending on the &#x60;action&#x60; specified. The API returns the upserted or deleted &#x60;entitlement_overrides&#x60; after successfully completing the operation. The operation returns an error when the first &#x60;entitlement_override&#x60; fails to be processed. Either all the &#x60;entitlement_overrides&#x60; provided in the request are processed or none.
87
17
 
88
- */
89
-
90
- add_entitlement_override_for_subscription(subscription_id:string, input?:AddEntitlementOverrideForSubscriptionInputParam):ChargebeeRequest<AddEntitlementOverrideForSubscriptionResponse>;
91
-
92
- /**
93
- * @description Retrieve the list of entitlement overrides for a subscription.
94
-
95
- */
96
-
97
- list_entitlement_override_for_subscription(subscription_id:string, input?:ListEntitlementOverrideForSubscriptionInputParam):ChargebeeRequest<ListEntitlementOverrideForSubscriptionResponse>;
98
- }
99
- export interface AddEntitlementOverrideForSubscriptionResponse {
100
- entitlement_override:EntitlementOverride;
18
+ export namespace EntitlementOverride {
19
+ export class EntitlementOverrideResource {
20
+ addEntitlementOverrideForSubscription(
21
+ subscription_id: string,
22
+ input: AddEntitlementOverrideForSubscriptionInputParam,
23
+ headers?: ChargebeeRequestHeader,
24
+ ): Promise<
25
+ ChargebeeResponse<AddEntitlementOverrideForSubscriptionResponse>
26
+ >;
27
+
28
+ listEntitlementOverrideForSubscription(
29
+ subscription_id: string,
30
+ input?: ListEntitlementOverrideForSubscriptionInputParam,
31
+ headers?: ChargebeeRequestHeader,
32
+ ): Promise<
33
+ ChargebeeResponse<ListEntitlementOverrideForSubscriptionResponse>
34
+ >;
101
35
  }
102
- export interface AddEntitlementOverrideForSubscriptionInputParam {
103
-
104
- /**
105
- * @description The specific action to be performed for each &#x60;entitlement_override&#x60; specified. . \* remove - Deletes the &#x60;entitlement_override&#x60; for the &#x60;feature_id&#x60; and &#x60;item_id&#x60; combination, if it exists. \* upsert - If the &#x60;entitlement_override&#x60; already exists for the &#x60;feature_id&#x60; and &#x60;{subscription_id}&#x60; combination, the &#x60;value&#x60; of the &#x60;entitlement_override&#x60; is updated. If it doesn&#x27;t exist, a new &#x60;entitlement_override&#x60; is created.
106
36
 
107
- */
108
-
109
- action?:Action;
110
-
111
- /**
112
- * @description Parameters for entitlement_overrides
37
+ export interface AddEntitlementOverrideForSubscriptionResponse {
38
+ entitlement_override: EntitlementOverride;
39
+ }
113
40
 
114
- */
115
-
116
- entitlement_overrides?:{expires_at?:number,feature_id:string,value?:string}[];
41
+ export interface ListEntitlementOverrideForSubscriptionResponse {
42
+ list: { entitlement_override: EntitlementOverride }[];
43
+ next_offset?: string;
117
44
  }
118
- export interface ListEntitlementOverrideForSubscriptionResponse {
119
- /**
120
- * @description Retrieve the list of entitlement overrides for a subscription.
121
45
 
122
- */
123
-
124
- list:{entitlement_override:EntitlementOverride}[];
125
-
126
- /**
127
- * @description Retrieve the list of entitlement overrides for a subscription.
46
+ // REQUEST PARAMS
47
+ //---------------
128
48
 
129
- */
130
-
131
- next_offset?:string;
49
+ export interface AddEntitlementOverrideForSubscriptionInputParam {
50
+ action?: Action;
51
+ entitlement_overrides?: EntitlementOverridesAddEntitlementOverrideForSubscriptionInputParam[];
132
52
  }
133
53
  export interface ListEntitlementOverrideForSubscriptionInputParam {
134
- [key : string]: any;
135
- /**
136
- * @description Retrieve the list of entitlement overrides for a subscription.
54
+ limit?: number;
55
+ offset?: string /**
56
+ * @deprecated Please refer API docs to use other attributes
57
+ */;
137
58
 
138
- */
139
-
140
- limit?:number;
141
-
142
- /**
143
- * @description Retrieve the list of entitlement overrides for a subscription.
59
+ embed?: string /**
60
+ * @deprecated Please refer API docs to use other attributes
61
+ */;
144
62
 
145
- */
146
-
147
- offset?:string;
148
-
149
- embed?:string;
150
-
151
- include_drafts?:boolean;
152
-
153
- include_scheduled_overrides?:boolean;
63
+ include_drafts?: boolean /**
64
+ * @deprecated Please refer API docs to use other attributes
65
+ */;
66
+
67
+ include_scheduled_overrides?: boolean;
68
+ }
69
+ export interface EntitlementOverridesAddEntitlementOverrideForSubscriptionInputParam {
70
+ feature_id: string;
71
+ value?: string;
72
+ expires_at?: number;
73
+ effective_from?: number;
154
74
  }
155
-
156
75
  }
157
- }
76
+ }