chargebee 2.51.0 → 2.52.0

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 (64) hide show
  1. package/CHANGELOG.md +27 -0
  2. package/lib/chargebee.js +1 -1
  3. package/lib/resources/api_endpoints.js +14 -1
  4. package/package.json +1 -1
  5. package/types/core.d.ts +4 -4
  6. package/types/index.d.ts +2 -0
  7. package/types/resources/Address.d.ts +2 -194
  8. package/types/resources/AdvanceInvoiceSchedule.d.ts +5 -67
  9. package/types/resources/Attribute.d.ts +4 -1
  10. package/types/resources/BillingConfiguration.d.ts +21 -0
  11. package/types/resources/Brand.d.ts +12 -0
  12. package/types/resources/BusinessEntity.d.ts +8 -6
  13. package/types/resources/BusinessEntityTransfer.d.ts +10 -7
  14. package/types/resources/Card.d.ts +11 -311
  15. package/types/resources/Comment.d.ts +7 -124
  16. package/types/resources/Contact.d.ts +2 -44
  17. package/types/resources/ContractTerm.d.ts +4 -72
  18. package/types/resources/Coupon.d.ts +0 -37
  19. package/types/resources/CouponCode.d.ts +67 -35
  20. package/types/resources/CouponSet.d.ts +12 -121
  21. package/types/resources/CreditNote.d.ts +0 -6
  22. package/types/resources/Currency.d.ts +8 -5
  23. package/types/resources/Customer.d.ts +90 -89
  24. package/types/resources/Discount.d.ts +2 -89
  25. package/types/resources/Download.d.ts +2 -14
  26. package/types/resources/Entitlement.d.ts +15 -103
  27. package/types/resources/EntitlementOverride.d.ts +4 -89
  28. package/types/resources/Estimate.d.ts +2 -10
  29. package/types/resources/Event.d.ts +23 -108
  30. package/types/resources/Export.d.ts +116 -432
  31. package/types/resources/Feature.d.ts +17 -319
  32. package/types/resources/GatewayErrorDetail.d.ts +6 -48
  33. package/types/resources/Gift.d.ts +34 -294
  34. package/types/resources/Hierarchy.d.ts +4 -24
  35. package/types/resources/ImpactedItem.d.ts +4 -36
  36. package/types/resources/ImpactedItemPrice.d.ts +5 -2
  37. package/types/resources/ImpactedSubscription.d.ts +3 -30
  38. package/types/resources/InAppSubscription.d.ts +13 -355
  39. package/types/resources/Invoice.d.ts +2 -16
  40. package/types/resources/InvoiceEstimate.d.ts +1 -1
  41. package/types/resources/Item.d.ts +0 -7
  42. package/types/resources/ItemEntitlement.d.ts +15 -155
  43. package/types/resources/NonSubscription.d.ts +9 -6
  44. package/types/resources/PaymentIntent.d.ts +9 -255
  45. package/types/resources/PaymentReferenceNumber.d.ts +3 -20
  46. package/types/resources/PaymentSource.d.ts +2 -2
  47. package/types/resources/PaymentVoucher.d.ts +20 -203
  48. package/types/resources/PortalSession.d.ts +4 -146
  49. package/types/resources/PromotionalCredit.d.ts +10 -215
  50. package/types/resources/Purchase.d.ts +3 -1
  51. package/types/resources/Quote.d.ts +19 -1
  52. package/types/resources/QuotedRamp.d.ts +11 -16
  53. package/types/resources/RecordedPurchase.d.ts +2 -0
  54. package/types/resources/ResourceMigration.d.ts +2 -54
  55. package/types/resources/SiteMigrationDetail.d.ts +13 -55
  56. package/types/resources/Subscription.d.ts +11 -9
  57. package/types/resources/SubscriptionEntitlement.d.ts +6 -106
  58. package/types/resources/SubscriptionEstimate.d.ts +14 -11
  59. package/types/resources/TaxWithheld.d.ts +14 -26
  60. package/types/resources/ThirdPartyPaymentMethod.d.ts +2 -19
  61. package/types/resources/TimeMachine.d.ts +3 -64
  62. package/types/resources/Token.d.ts +3 -60
  63. package/types/resources/Transaction.d.ts +2 -2
  64. package/types/resources/Usage.d.ts +21 -165
@@ -3,157 +3,139 @@
3
3
  declare module 'chargebee' {
4
4
  export interface Customer {
5
5
  [key : string] : any;
6
- /**
7
- * @description Identifier of the customer.
8
6
 
9
- */
10
-
11
7
  id:string;
12
-
13
- /**
14
- * @description First name of the customer
15
8
 
16
- */
17
-
18
9
  first_name?:string;
19
-
20
- /**
21
- * @description Last name of the customer
22
10
 
23
- */
24
-
25
11
  last_name?:string;
26
-
27
- /**
28
- * @description Email of the customer. Configured email notifications will be sent to this email.
29
12
 
30
- */
31
-
32
13
  email?:string;
33
-
14
+
34
15
  phone?:string;
35
-
16
+
36
17
  company?:string;
37
-
18
+
38
19
  vat_number?:string;
39
-
20
+
40
21
  auto_collection:AutoCollection;
41
-
22
+
42
23
  offline_payment_method?:OfflinePaymentMethod;
43
-
24
+
44
25
  net_term_days:number;
45
-
26
+
46
27
  vat_number_validated_time?:number;
47
-
28
+
48
29
  vat_number_status?:'valid' | 'invalid' | 'not_validated' | 'undetermined';
49
-
30
+
50
31
  allow_direct_debit:boolean;
51
-
32
+
52
33
  is_location_valid?:boolean;
53
-
34
+
54
35
  created_at:number;
55
-
36
+
56
37
  created_from_ip?:string;
57
-
38
+
58
39
  exemption_details?:any[];
59
-
40
+
60
41
  taxability?:Taxability;
61
-
42
+
62
43
  entity_code?:EntityCode;
63
-
44
+
64
45
  exempt_number?:string;
65
-
46
+
66
47
  resource_version?:number;
67
-
48
+
68
49
  updated_at?:number;
69
-
50
+
70
51
  locale?:string;
71
-
52
+
72
53
  billing_date?:number;
73
-
54
+
74
55
  billing_month?:number;
75
-
56
+
76
57
  billing_date_mode?:BillingDateMode;
77
-
58
+
78
59
  billing_day_of_week?:'sunday' | 'monday' | 'tuesday' | 'wednesday' | 'thursday' | 'friday' | 'saturday';
79
-
60
+
80
61
  billing_day_of_week_mode?:BillingDayOfWeekMode;
81
-
62
+
82
63
  pii_cleared?:'active' | 'scheduled_for_clear' | 'cleared';
83
-
64
+
84
65
  auto_close_invoices?:boolean;
85
-
66
+
86
67
  channel?:Channel;
87
-
68
+
88
69
  active_id?:string;
89
-
70
+
90
71
  card_status?:'no_card' | 'valid' | 'expiring' | 'expired' | 'pending_verification' | 'invalid';
91
-
72
+
92
73
  fraud_flag?:'safe' | 'suspicious' | 'fraudulent';
93
-
74
+
94
75
  primary_payment_source_id?:string;
95
-
76
+
96
77
  backup_payment_source_id?:string;
97
-
78
+
98
79
  billing_address?:Customer.BillingAddress;
99
-
80
+
100
81
  referral_urls?:Customer.ReferralUrl[];
101
-
82
+
102
83
  contacts?:Customer.Contact[];
103
-
84
+
104
85
  payment_method?:Customer.PaymentMethod;
105
-
86
+
106
87
  invoice_notes?:string;
107
-
88
+
108
89
  business_entity_id?:string;
109
-
90
+
110
91
  preferred_currency_code?:string;
111
-
92
+
112
93
  promotional_credits:number;
113
-
94
+
114
95
  unbilled_charges:number;
115
-
96
+
116
97
  refundable_credits:number;
117
-
98
+
118
99
  excess_payments:number;
119
-
100
+
120
101
  balances?:Customer.Balance[];
121
-
102
+
122
103
  entity_identifiers?:Customer.EntityIdentifier[];
123
-
104
+
124
105
  tax_providers_fields?:Customer.TaxProvidersField[];
125
-
106
+
126
107
  is_einvoice_enabled?:boolean;
127
-
108
+
128
109
  einvoicing_method?:EinvoicingMethod;
129
-
110
+
130
111
  meta_data?:object;
131
-
112
+
132
113
  deleted:boolean;
133
-
114
+
134
115
  registered_for_gst?:boolean;
135
-
116
+
136
117
  consolidated_invoicing?:boolean;
137
-
118
+
138
119
  customer_type?:CustomerType;
139
-
120
+
140
121
  business_customer_without_vat_number?:boolean;
141
-
122
+
142
123
  client_profile_id?:string;
143
-
124
+
144
125
  relationship?:Customer.Relationship;
145
-
126
+
146
127
  use_default_hierarchy_settings?:boolean;
147
-
128
+
148
129
  parent_account_access?:Customer.ParentAccountAccess;
149
-
130
+
150
131
  child_account_access?:Customer.ChildAccountAccess;
151
-
132
+
152
133
  vat_number_prefix?:string;
153
-
134
+
154
135
  entity_identifier_scheme?:string;
155
-
136
+
156
137
  entity_identifier_standard?:string;
138
+
157
139
  }
158
140
  export namespace Customer {
159
141
  export class CustomerResource {
@@ -205,6 +187,8 @@ declare module 'chargebee' {
205
187
 
206
188
  hierarchy(customer_id:string, input:HierarchyInputParam):ChargebeeRequest<HierarchyResponse>;
207
189
 
190
+ list_hierarchy_detail(customer_id:string, input:ListHierarchyDetailInputParam):ChargebeeRequest<ListHierarchyDetailResponse>;
191
+
208
192
  update_hierarchy_settings(customer_id:string, input?:UpdateHierarchySettingsInputParam):ChargebeeRequest<UpdateHierarchySettingsResponse>;
209
193
  }
210
194
  export interface CreateResponse {
@@ -220,7 +204,7 @@ declare module 'chargebee' {
220
204
 
221
205
  payment_method?:{additional_information?:object,gateway?:Gateway,gateway_account_id?:string,issuing_country?:string,reference_id?:string,tmp_token?:string,type?:Type};
222
206
 
223
- payment_intent?:{additional_information?:object,gateway_account_id?:string,gw_payment_method_id?:string,gw_token?:string,id?:string,payment_method_type?:'card' | 'ideal' | 'sofort' | 'bancontact' | 'google_pay' | 'dotpay' | 'giropay' | 'apple_pay' | 'upi' | 'netbanking_emandates' | 'paypal_express_checkout' | 'direct_debit' | 'boleto' | 'venmo' | 'amazon_payments' | 'pay_to' | 'faster_payments' | 'sepa_instant_transfer' | 'klarna_pay_now' | 'online_banking_poland',reference_id?:string};
207
+ payment_intent?:{additional_information?:object,gateway_account_id?:string,gw_payment_method_id?:string,gw_token?:string,id?:string,payment_method_type?:'card' | 'ideal' | 'sofort' | 'bancontact' | 'google_pay' | 'dotpay' | 'giropay' | 'apple_pay' | 'upi' | 'netbanking_emandates' | 'paypal_express_checkout' | 'direct_debit' | 'boleto' | 'venmo' | 'amazon_payments' | 'pay_to' | 'faster_payments' | 'sepa_instant_transfer' | 'klarna_pay_now' | 'online_banking_poland' | 'payconiq_by_bancontact',reference_id?:string};
224
208
 
225
209
  billing_address?:{city?:string,company?:string,country?:string,email?:string,first_name?:string,last_name?:string,line1?:string,line2?:string,line3?:string,phone?:string,state?:string,state_code?:string,validation_status?:ValidationStatus,zip?:string};
226
210
 
@@ -331,8 +315,6 @@ declare module 'chargebee' {
331
315
 
332
316
  include_deleted?:boolean;
333
317
 
334
- include_deprecated?:boolean;
335
-
336
318
  /**
337
319
  * @description Identifier of the customer.
338
320
 
@@ -662,7 +644,7 @@ The ID of the business entity created for the site. For Product Catalog 1.0, all
662
644
 
663
645
  card?:{additional_information?:object,billing_addr1?:string,billing_addr2?:string,billing_city?:string,billing_country?:string,billing_state?:string,billing_state_code?:string,billing_zip?:string,cvv?:string,expiry_month?:number,expiry_year?:number,first_name?:string,gateway_account_id?:string,last_name?:string,number?:string,preferred_scheme?:'cartes_bancaires' | 'mastercard' | 'visa'};
664
646
 
665
- payment_intent?:{additional_information?:object,gateway_account_id?:string,gw_payment_method_id?:string,gw_token?:string,id?:string,payment_method_type?:'card' | 'ideal' | 'sofort' | 'bancontact' | 'google_pay' | 'dotpay' | 'giropay' | 'apple_pay' | 'upi' | 'netbanking_emandates' | 'paypal_express_checkout' | 'direct_debit' | 'boleto' | 'venmo' | 'amazon_payments' | 'pay_to' | 'faster_payments' | 'sepa_instant_transfer' | 'klarna_pay_now' | 'online_banking_poland',reference_id?:string};
647
+ payment_intent?:{additional_information?:object,gateway_account_id?:string,gw_payment_method_id?:string,gw_token?:string,id?:string,payment_method_type?:'card' | 'ideal' | 'sofort' | 'bancontact' | 'google_pay' | 'dotpay' | 'giropay' | 'apple_pay' | 'upi' | 'netbanking_emandates' | 'paypal_express_checkout' | 'direct_debit' | 'boleto' | 'venmo' | 'amazon_payments' | 'pay_to' | 'faster_payments' | 'sepa_instant_transfer' | 'klarna_pay_now' | 'online_banking_poland' | 'payconiq_by_bancontact',reference_id?:string};
666
648
 
667
649
  invoice_allocations:{allocation_amount?:number,invoice_id:string}[];
668
650
 
@@ -692,8 +674,6 @@ The ID of the business entity created for the site. For Product Catalog 1.0, all
692
674
  }
693
675
  export interface MoveInputParam {
694
676
 
695
- tax_providers_fields?:{field_id?:string,field_value?:string,provider_name?:string}[];
696
-
697
677
  id_at_from_site:string;
698
678
 
699
679
  from_site:string;
@@ -718,8 +698,6 @@ The ID of the business entity created for the site. For Product Catalog 1.0, all
718
698
  }
719
699
  export interface MergeInputParam {
720
700
 
721
- tax_providers_fields?:{field_id?:string,field_value?:string,provider_name?:string}[];
722
-
723
701
  from_customer_id:string;
724
702
 
725
703
  to_customer_id:string;
@@ -756,6 +734,29 @@ The ID of the business entity created for the site. For Product Catalog 1.0, all
756
734
 
757
735
  hierarchy_operation_type:'complete_hierarchy' | 'subordinates' | 'path_to_root';
758
736
  }
737
+ export interface ListHierarchyDetailResponse {
738
+ list:{hierarchies:any[]}[];
739
+
740
+ next_offset?:string;
741
+ }
742
+ export interface ListHierarchyDetailInputParam {
743
+ [key : string]: any;
744
+ /**
745
+ * @description The number of resources to be returned.
746
+
747
+ */
748
+
749
+ limit?:number;
750
+
751
+ /**
752
+ * @description Determines your position in the list for pagination. To ensure that the next page is retrieved correctly, always set \&#x60;offset\&#x60; to the value of \&#x60;next_offset\&#x60; obtained in the previous iteration of the API call.
753
+
754
+ */
755
+
756
+ offset?:string;
757
+
758
+ hierarchy_operation_type:'complete_hierarchy' | 'subordinates' | 'path_to_root';
759
+ }
759
760
  export interface UpdateHierarchySettingsResponse {
760
761
  customer:Customer;
761
762
  }
@@ -1,129 +1,42 @@
1
1
  ///<reference path='./../core.d.ts'/>
2
+ ///<reference path='./../index.d.ts'/>
2
3
  declare module 'chargebee' {
3
4
  export interface Discount {
4
5
 
5
- /**
6
- * @description An immutable unique id for the discount. It is always auto-generated.
7
6
 
8
- */
9
-
10
7
  id:string;
11
-
12
- /**
13
- * @description The name of the discount as it should appear on customer-facing pages and documents such as [invoices](/docs/api/invoices?prod_cat_ver&#x3D;2) and [hosted pages](/docs/api/hosted_pages?prod_cat_ver&#x3D;2). This is auto-generated based on the &#x60;type&#x60;, &#x60;amount&#x60;, and &#x60;currency_code&#x60; of the discount. For example, it can be &#x60;10% off&#x60; or &#x60;10$ off&#x60;.
14
8
 
15
- */
16
-
17
9
  invoice_name?:string;
18
-
19
- /**
20
- * @description The type of discount. Possible value are: \* percentage - The specified percentage will be given as discount. \* fixed_amount - The specified amount will be given as discount.
21
10
 
22
- */
23
-
24
11
  type:'fixed_amount' | 'percentage';
25
-
26
- /**
27
- * @description The percentage of the original amount that should be deducted from it. Only applicable when &#x60;discount.type&#x60; is percentage.
28
12
 
29
- */
30
-
31
13
  percentage?:number;
32
-
33
- /**
34
- * @description The value of the discount. [The format of this value](https://apidocs.chargebee.com/docs/api?prod_cat_ver&#x3D;2#currencies) depends on the kind of currency. This is only applicable when &#x60;discount.type&#x60; is &#x60;fixed_amount&#x60;.
35
14
 
36
- */
37
-
38
15
  amount?:number;
39
-
40
- /**
41
- * @description The currency code ([ISO 4217 format](https://www.chargebee.com/docs/supported-currencies.html)) of the discount. This is only applicable when &#x60;discount.type&#x60; is &#x60;fixed_amount&#x60;.
42
16
 
43
- */
44
-
45
17
  currency_code?:string;
46
-
47
- /**
48
- * @description Specifies the time duration for which this discount is attached to the subscription. \* forever - The discount is attached to the subscription and applied on the invoices till it is [explicitly removed](/docs/api/subscriptions?prod_cat_ver&#x3D;2#update_subscription_for_items_discounts_operation_type). \* limited_period - The discount is attached to the subscription and applied on the invoices for a limited duration. This duration starts from the point it is applied to an invoice for the first time and expires after a period specified by &#x60;period&#x60; and &#x60;period_unit&#x60;. \* one_time - The discount stays attached to the subscription till it is applied on an invoice **once**. It is removed after that from the subscription.
49
18
 
50
- */
51
-
52
19
  duration_type:DurationType;
53
-
54
- /**
55
- * @description The duration of time for which the discount is attached to the subscription, in &#x60;period_units&#x60;. Applicable only when &#x60;duration_type&#x60; is &#x60;limited_period&#x60;.
56
20
 
57
- */
58
-
59
21
  period?:number;
60
-
61
- /**
62
- * @description The unit of time for &#x60;period&#x60;. Applicable only when &#x60;duration_type&#x60; is &#x60;limited_period&#x60;. \* year - A period of 1 calendar year. \* month - A period of 1 calendar month. \* week - A period of 7 days. \* day - A period of 24 hours.
63
22
 
64
- */
65
-
66
23
  period_unit?:PeriodUnit;
67
-
68
- /**
69
- * @description The discount is included in MRR calculations for your site. This attribute is only applicable when &#x60;duration_type&#x60; is &#x60;one_time&#x60; and when the [feature is enabled](https://www.chargebee.com/docs/reporting.html#dashboards_flexible-mrr-calculation) in Chargebee. Also, If the [site-level setting](https://www.chargebee.com/docs/reporting.html#chart_flexible-mrr-calculation) is to exclude one-time discounts from MRR calculations, this value is always returned &#x60;false&#x60;.
70
24
 
71
- */
72
-
73
25
  included_in_mrr:boolean;
74
-
75
- /**
76
- * @description The amount on the invoice to which the discount is applied. \* invoice_amount - The discount is applied to the invoice &#x60;sub_total&#x60;. \* specific_item_price - The discount is applied to the &#x60;invoice.line_item.amount&#x60; that corresponds to the item price specified by &#x60;item_price_id&#x60;.
77
26
 
78
- */
79
-
80
27
  apply_on:ApplyOn;
81
-
82
- /**
83
- * @description The [id of the item price](/docs/api/subscriptions?prod_cat_ver&#x3D;2#subscription_subscription_items_item_price_id) in the subscription to which the discount is to be applied. Relevant only when &#x60;apply_on&#x60; &#x3D; &#x60;specific_item_price&#x60;.
84
28
 
85
- */
86
-
87
29
  item_price_id?:string;
88
-
89
- /**
90
- * @description Timestamp indicating when this discount is created.
91
30
 
92
- */
93
-
94
31
  created_at:number;
95
-
96
- /**
97
- * @description Specifies till when the limited period discount is applicable. This attribute will be sent in the response only for &#x60;limited_period&#x60; duration type discount.
98
32
 
99
- */
100
-
101
33
  apply_till?:number;
102
-
103
- /**
104
- * @description Specifies the number of times the discount has been applied.
105
34
 
106
- */
107
-
108
35
  applied_count?:number;
109
-
110
- /**
111
- * @description Used to uniquely identify the coupon in your website/application and to integrate with Chargebee.
112
- **Note:**
113
-
114
-
115
- When the coupon ID contains a special character; for example: &#x60;#&#x60;, the API returns an error.
116
- Make sure that you [encode](https://www.urlencoder.org/) the coupon ID in the path parameter before making an API call.
117
36
 
118
- */
119
-
120
37
  coupon_id:string;
121
-
122
- /**
123
- * @description The index number of the subscription to which the item price is added. Provide a unique number between &#x60;0&#x60; and &#x60;4&#x60; (inclusive) for each subscription that is to be created.
124
38
 
125
- */
126
-
127
39
  index:number;
40
+
128
41
  }
129
42
  }
@@ -1,26 +1,14 @@
1
1
  ///<reference path='./../core.d.ts'/>
2
+ ///<reference path='./../index.d.ts'/>
2
3
  declare module 'chargebee' {
3
4
  export interface Download {
4
5
 
5
- /**
6
- * @description The URL at which the file is available for download.
7
6
 
8
- */
9
-
10
7
  download_url:string;
11
-
12
- /**
13
- * @description The time until which the &#x60;download_url&#x60; is valid.
14
8
 
15
- */
16
-
17
9
  valid_till:number;
18
-
19
- /**
20
- * @description The [media type](https://en.wikipedia.org/wiki/Media_type) of the file.
21
10
 
22
- */
23
-
24
11
  mime_type?:string;
12
+
25
13
  }
26
14
  }
@@ -1,174 +1,86 @@
1
1
  ///<reference path='./../core.d.ts'/>
2
+ ///<reference path='./../index.d.ts'/>
2
3
  declare module 'chargebee' {
3
4
  export interface Entitlement {
4
5
 
5
- /**
6
- * @description A unique identifier for the entitlement. This is auto-generated.
7
6
 
8
- */
9
-
10
7
  id:string;
11
-
12
- /**
13
- * @description The unique identifier of the entity being granted entitlement to a specific &#x60;feature&#x60;.
14
8
 
15
- */
16
-
17
9
  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
10
 
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 -
11
+ entity_type?:'plan' | 'addon' | 'charge' | 'plan_price' | 'addon_price';
30
12
 
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
13
  feature_id?:string;
46
-
47
- /**
48
- * @description The &#x60;name&#x60; of the feature associated with this entitlement.
49
14
 
50
- */
51
-
52
15
  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
16
 
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
17
  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
18
 
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
19
  name?:string;
20
+
83
21
  }
84
22
  export namespace Entitlement {
85
23
  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
24
  list(input?:ListInputParam):ChargebeeRequest<ListResponse>;
92
25
 
93
- /**
94
- * @description Create, update, or remove a set of &#x60;entitlement&#x60;s for a feature.
95
-
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
26
  create(input:CreateInputParam):ChargebeeRequest<CreateResponse>;
101
27
  }
102
28
  export interface ListResponse {
103
- /**
104
- * @description Retrieves a list of all the &#x60;entitlement&#x60;s associated with the specified &#x60;feature&#x60;.
105
-
106
- */
107
-
108
29
  list:{entitlement:Entitlement}[];
109
30
 
110
- /**
111
- * @description Retrieves a list of all the &#x60;entitlement&#x60;s associated with the specified &#x60;feature&#x60;.
112
-
113
- */
114
-
115
31
  next_offset?:string;
116
32
  }
117
33
  export interface ListInputParam {
118
34
  [key : string]: any;
119
35
  /**
120
- * @description Retrieves a list of all the &#x60;entitlement&#x60;s associated with the specified &#x60;feature&#x60;.
36
+ * @description The number of resources to be returned.
121
37
 
122
38
  */
123
39
 
124
40
  limit?:number;
125
41
 
126
42
  /**
127
- * @description Retrieves a list of all the &#x60;entitlement&#x60;s associated with the specified &#x60;feature&#x60;.
43
+ * @description Determines your position in the list for pagination. To ensure that the next page is retrieved correctly, always set \&#x60;offset\&#x60; to the value of \&#x60;next_offset\&#x60; obtained in the previous iteration of the API call.
128
44
 
129
45
  */
130
46
 
131
47
  offset?:string;
132
48
 
133
49
  /**
134
- * @description Retrieves a list of all the &#x60;entitlement&#x60;s associated with the specified &#x60;feature&#x60;.
50
+ * @description The &#x60;id&#x60; of the feature towards which this entitlement has been granted.
135
51
 
136
52
  */
137
53
 
138
54
  feature_id?:{in?:string,is?:string};
139
55
 
140
56
  /**
141
- * @description Retrieves a list of all the &#x60;entitlement&#x60;s associated with the specified &#x60;feature&#x60;.
57
+ * @description The &#x60;type&#x60; of the &#x60;entity&#x60; to which this entitlement belongs.
142
58
 
143
59
  */
144
60
 
145
- entity_type?:{in?:string,is?:'charge' | 'addon' | 'addon_price' | 'plan_price' | 'plan'};
61
+ entity_type?:{in?:string,is?:'plan' | 'addon' | 'charge' | 'plan_price' | 'addon_price'};
146
62
 
147
63
  /**
148
- * @description Retrieves a list of all the &#x60;entitlement&#x60;s associated with the specified &#x60;feature&#x60;.
64
+ * @description The &#x60;id&#x60; of the &#x60;entity&#x60; to which this entitlement belongs.
149
65
 
150
66
  */
151
67
 
152
68
  entity_id?:{in?:string,is?:string};
69
+
70
+ include_drafts?:boolean;
71
+
72
+ embed?:string;
153
73
  }
154
74
  export interface CreateResponse {
155
75
  entitlement:Entitlement;
156
76
  }
157
77
  export interface CreateInputParam {
158
78
 
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
- */
79
+ entitlements:{apply_grandfathering?:boolean,entity_id:string,entity_type?:'plan' | 'addon' | 'charge' | 'plan_price' | 'addon_price',feature_id:string,value?:string}[];
163
80
 
164
81
  action:Action;
165
82
 
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}[];
83
+ change_reason?:string;
172
84
  }
173
85
 
174
86
  }