chargebee 2.32.0 → 2.33.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.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,25 @@
1
+ ### v2.33.0 (2024-02-29)
2
+ * * *
3
+
4
+ #### New attributes:
5
+ * usage_percentage has been added to QuoteLineGroup resource.
6
+ * usage_percentage has been added to Quote resource.
7
+ * usage_percentage has been added to CreditNoteEstimate resource.
8
+ * usage_percentage has been added to CreditNote resource.
9
+ * usage_percentage has been added to InvoiceEstimate resource.
10
+ * usage_percentage has been added to Invoice resource.
11
+ * error_detail of type GatewayErrorDetail has been added to PaymentIntent#PaymentAttempt subResource.
12
+ * origin_user has been added to Event resource.
13
+ * proration_type has been added to QuotedSubscription#SubscriptionItem and Subscription#SubscriptionItem subResources
14
+ * network_error_message, recommendation_message, processor_error_code, processor_error_message has been added to Transaction#GatewayErrorDetail subResource.
15
+
16
+ #### New Enum values:
17
+ * TAX_NOT_CONFIGURED_EXTERNAL_PROVIDER has been added to TaxExemptReasonEnum.
18
+
19
+ #### New Input parameters:
20
+ * billing_address has been added to Estimate#CreateSubItemForCustomerEstimateRequest.
21
+ * transactions[amount] has been added to Invoice#ApplyPaymentsRequest.
22
+
1
23
  ### v2.32.0 (2024-01-31)
2
24
  * * *
3
25
 
package/lib/chargebee.js CHANGED
@@ -11,7 +11,7 @@ ChargeBee._env = {
11
11
  hostSuffix: '.chargebee.com',
12
12
  apiPath: '/api/v2',
13
13
  timeout: 80000,
14
- clientVersion: 'v2.32.0',
14
+ clientVersion: 'v2.33.0',
15
15
  port: 443,
16
16
  timemachineWaitInMillis: 3000,
17
17
  exportWaitInMillis: 3000
@@ -2092,20 +2092,24 @@ var _endpoints = {
2092
2092
  true
2093
2093
  ]
2094
2094
  ],
2095
- "site_migration_detail": [[
2096
- "list",
2097
- "GET",
2098
- "/site_migration_details",
2099
- null,
2100
- false
2101
- ]],
2102
- "resource_migration": [[
2103
- "retrieve_latest",
2104
- "GET",
2105
- "/resource_migrations",
2106
- "/retrieve_latest",
2107
- false
2108
- ]],
2095
+ "site_migration_detail": [
2096
+ [
2097
+ "list",
2098
+ "GET",
2099
+ "/site_migration_details",
2100
+ null,
2101
+ false
2102
+ ]
2103
+ ],
2104
+ "resource_migration": [
2105
+ [
2106
+ "retrieve_latest",
2107
+ "GET",
2108
+ "/resource_migrations",
2109
+ "/retrieve_latest",
2110
+ false
2111
+ ]
2112
+ ],
2109
2113
  "time_machine": [
2110
2114
  [
2111
2115
  "retrieve",
@@ -2273,6 +2277,7 @@ var _endpoints = {
2273
2277
  true
2274
2278
  ]
2275
2279
  ],
2280
+ "gateway_error_detail": [],
2276
2281
  "item_family": [
2277
2282
  [
2278
2283
  "create",
@@ -2685,6 +2690,6 @@ var _endpoints = {
2685
2690
  "/payment_vouchers",
2686
2691
  true
2687
2692
  ]
2688
- ],
2693
+ ]
2689
2694
  };
2690
2695
  module.exports = _endpoints;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name":"chargebee",
3
- "version":"2.32.0",
3
+ "version":"2.33.0",
4
4
  "description":"A library for integrating with ChargeBee.",
5
5
  "keywords":[
6
6
  "payments",
package/types/core.d.ts CHANGED
@@ -73,7 +73,7 @@ declare module 'chargebee' {
73
73
  type Role = 'backup' | 'none' | 'primary'
74
74
  type ScheduleType = 'immediate' | 'specific_dates' | 'fixed_intervals'
75
75
  type Source = 'admin_console' | 'system' | 'scheduled_job' | 'js_api' | 'bulk_operation' | 'hosted_page' | 'migration' | 'api' | 'none' | 'portal' | 'external_service'
76
- type TaxExemptReason = 'high_value_physical_goods' | 'tax_not_configured' | 'reverse_charge' | 'zero_rated' | 'customer_exempt' | 'region_non_taxable' | 'zero_value_item' | 'export' | 'product_exempt'
76
+ type TaxExemptReason = 'high_value_physical_goods' | 'tax_not_configured' | 'reverse_charge' | 'zero_rated' | 'tax_not_configured_external_provider' | 'customer_exempt' | 'region_non_taxable' | 'zero_value_item' | 'export' | 'product_exempt'
77
77
  type TaxJurisType = 'special' | 'country' | 'unincorporated' | 'other' | 'city' | 'federal' | 'county' | 'state'
78
78
  type TaxOverrideReason = 'id_exempt' | 'customer_exempt' | 'export'
79
79
  type Taxability = 'taxable' | 'exempt'
package/types/index.d.ts CHANGED
@@ -20,6 +20,7 @@
20
20
  ///<reference path='./resources/Event.d.ts' />
21
21
  ///<reference path='./resources/Export.d.ts' />
22
22
  ///<reference path='./resources/Feature.d.ts' />
23
+ ///<reference path='./resources/GatewayErrorDetail.d.ts' />
23
24
  ///<reference path='./resources/Gift.d.ts' />
24
25
  ///<reference path='./resources/Hierarchy.d.ts' />
25
26
  ///<reference path='./resources/HostedPage.d.ts' />
@@ -511,7 +511,7 @@ This endpoint schedules e-invoices manually. This operation is not allowed when
511
511
 
512
512
  */
513
513
 
514
- line_items?:{amount?:number,date_from?:number,date_to?:number,description?:string,quantity?:number,quantity_in_decimal?:string,reference_line_item_id:string,unit_amount?:number,unit_amount_in_decimal?:string}[];
514
+ line_items:{amount?:number,date_from?:number,date_to?:number,description?:string,quantity?:number,quantity_in_decimal?:string,reference_line_item_id:string,unit_amount?:number,unit_amount_in_decimal?:string}[];
515
515
  }
516
516
  export interface RetrieveResponse {
517
517
  credit_note:CreditNote;
@@ -794,7 +794,7 @@ This endpoint schedules e-invoices manually. This operation is not allowed when
794
794
 
795
795
  */
796
796
 
797
- tax_withheld?:{id:string};
797
+ tax_withheld:{id:string};
798
798
  }
799
799
  export interface ResendEinvoiceResponse {
800
800
  credit_note:CreditNote;
@@ -931,42 +931,42 @@ Ireland** . The first two characters of the VAT number in such a case is &#x60;X
931
931
 
932
932
  */
933
933
 
934
- line_items?:{amount?:number,amount_in_decimal?:string,date_from?:number,date_to?:number,description:string,entity_id?:string,entity_type?:'addon_item_price' | 'plan_item_price' | 'charge_item_price' | 'adhoc',id?:string,item_level_discount1_amount?:number,item_level_discount1_entity_id?:string,item_level_discount2_amount?:number,item_level_discount2_entity_id?:string,quantity?:number,quantity_in_decimal?:string,reference_line_item_id?:string,subscription_id?:string,tax10_amount?:number,tax10_name?:string,tax1_amount?:number,tax1_name?:string,tax2_amount?:number,tax2_name?:string,tax3_amount?:number,tax3_name?:string,tax4_amount?:number,tax4_name?:string,tax5_amount?:number,tax5_name?:string,tax6_amount?:number,tax6_name?:string,tax7_amount?:number,tax7_name?:string,tax8_amount?:number,tax8_name?:string,tax9_amount?:number,tax9_name?:string,unit_amount?:number,unit_amount_in_decimal?:string}[];
934
+ line_items:{amount?:number,amount_in_decimal?:string,date_from?:number,date_to?:number,description:string,entity_id?:string,entity_type?:'addon_item_price' | 'plan_item_price' | 'charge_item_price' | 'adhoc',id?:string,item_level_discount1_amount?:number,item_level_discount1_entity_id?:string,item_level_discount2_amount?:number,item_level_discount2_entity_id?:string,quantity?:number,quantity_in_decimal?:string,reference_line_item_id?:string,subscription_id?:string,tax10_amount?:number,tax10_name?:string,tax1_amount?:number,tax1_name?:string,tax2_amount?:number,tax2_name?:string,tax3_amount?:number,tax3_name?:string,tax4_amount?:number,tax4_name?:string,tax5_amount?:number,tax5_name?:string,tax6_amount?:number,tax6_name?:string,tax7_amount?:number,tax7_name?:string,tax8_amount?:number,tax8_name?:string,tax9_amount?:number,tax9_name?:string,unit_amount?:number,unit_amount_in_decimal?:string}[];
935
935
 
936
936
  /**
937
937
  * @description Parameters for line_item_tiers
938
938
 
939
939
  */
940
940
 
941
- line_item_tiers?:{ending_unit?:number,ending_unit_in_decimal?:string,line_item_id:string,quantity_used?:number,quantity_used_in_decimal?:string,starting_unit?:number,starting_unit_in_decimal?:string,unit_amount?:number,unit_amount_in_decimal?:string}[];
941
+ line_item_tiers:{ending_unit?:number,ending_unit_in_decimal?:string,line_item_id:string,quantity_used?:number,quantity_used_in_decimal?:string,starting_unit?:number,starting_unit_in_decimal?:string,unit_amount?:number,unit_amount_in_decimal?:string}[];
942
942
 
943
943
  /**
944
944
  * @description Parameters for discounts
945
945
 
946
946
  */
947
947
 
948
- discounts?:{amount:number,description?:string,entity_id?:string,entity_type:'item_level_coupon' | 'promotional_credits' | 'item_level_discount' | 'document_level_discount' | 'document_level_coupon',line_item_id?:string}[];
948
+ discounts:{amount:number,description?:string,entity_id?:string,entity_type:'item_level_coupon' | 'promotional_credits' | 'item_level_discount' | 'document_level_discount' | 'document_level_coupon',line_item_id?:string}[];
949
949
 
950
950
  /**
951
951
  * @description Parameters for taxes
952
952
 
953
953
  */
954
954
 
955
- taxes?:{amount?:number,description?:string,juris_code?:string,juris_name?:string,juris_type?:'special' | 'country' | 'unincorporated' | 'other' | 'city' | 'federal' | 'county' | 'state',name:string,rate:number}[];
955
+ taxes:{amount?:number,description?:string,juris_code?:string,juris_name?:string,juris_type?:'special' | 'country' | 'unincorporated' | 'other' | 'city' | 'federal' | 'county' | 'state',name:string,rate:number}[];
956
956
 
957
957
  /**
958
958
  * @description Parameters for allocations
959
959
 
960
960
  */
961
961
 
962
- allocations?:{allocated_amount:number,allocated_at:number,invoice_id:string}[];
962
+ allocations:{allocated_amount:number,allocated_at:number,invoice_id:string}[];
963
963
 
964
964
  /**
965
965
  * @description Parameters for linked_refunds
966
966
 
967
967
  */
968
968
 
969
- linked_refunds?:{amount:number,date:number,payment_method:PaymentMethod,reference_number?:string}[];
969
+ linked_refunds:{amount:number,date:number,payment_method:PaymentMethod,reference_number?:string}[];
970
970
  }
971
971
  export interface Einvoice {
972
972
  /**
@@ -1146,7 +1146,7 @@ Ireland** . The first two characters of the VAT number in such a case is &#x60;X
1146
1146
 
1147
1147
  */
1148
1148
 
1149
- tax_exempt_reason?:'high_value_physical_goods' | 'tax_not_configured' | 'reverse_charge' | 'zero_rated' | 'customer_exempt' | 'region_non_taxable' | 'zero_value_item' | 'export' | 'product_exempt';
1149
+ tax_exempt_reason?:'high_value_physical_goods' | 'tax_not_configured' | 'reverse_charge' | 'zero_rated' | 'tax_not_configured_external_provider' | 'customer_exempt' | 'region_non_taxable' | 'zero_value_item' | 'export' | 'product_exempt';
1150
1150
 
1151
1151
  /**
1152
1152
  * @description The identifier of the modelled entity this line item is based on. Will be null for &#x27;adhoc&#x27; entity type
@@ -46,7 +46,7 @@ declare module 'chargebee' {
46
46
 
47
47
  date_to:number;
48
48
 
49
- unit_amount?:number;
49
+ unit_amount:number;
50
50
 
51
51
  quantity?:number;
52
52
 
@@ -54,7 +54,7 @@ declare module 'chargebee' {
54
54
 
55
55
  pricing_model?:'volume' | 'per_unit' | 'tiered' | 'flat_fee' | 'stairstep';
56
56
 
57
- is_taxed?:boolean;
57
+ is_taxed:boolean;
58
58
 
59
59
  tax_amount?:number;
60
60
 
@@ -69,29 +69,31 @@ declare module 'chargebee' {
69
69
  discount_amount?:number;
70
70
 
71
71
  item_level_discount_amount?:number;
72
+
73
+ usage_percentage?:string;
72
74
 
73
75
  reference_line_item_id?:string;
74
76
 
75
- description?:string;
77
+ description:string;
76
78
 
77
79
  entity_description?:string;
78
80
 
79
- entity_type?:'addon_item_price' | 'plan_item_price' | 'charge_item_price' | 'adhoc';
81
+ entity_type:'addon_item_price' | 'plan_item_price' | 'charge_item_price' | 'adhoc';
80
82
 
81
- tax_exempt_reason?:'high_value_physical_goods' | 'tax_not_configured' | 'reverse_charge' | 'zero_rated' | 'customer_exempt' | 'region_non_taxable' | 'zero_value_item' | 'export' | 'product_exempt';
83
+ tax_exempt_reason?:'high_value_physical_goods' | 'tax_not_configured' | 'reverse_charge' | 'zero_rated' | 'tax_not_configured_external_provider' | 'customer_exempt' | 'region_non_taxable' | 'zero_value_item' | 'export' | 'product_exempt';
82
84
 
83
85
  entity_id?:string;
84
86
 
85
87
  customer_id?:string;
86
88
  }
87
89
  export interface Discount {
88
- amount?:number;
90
+ amount:number;
89
91
 
90
92
  description?:string;
91
93
 
92
94
  line_item_id?:string;
93
95
 
94
- entity_type?:'item_level_coupon' | 'promotional_credits' | 'item_level_discount' | 'prorated_credits' | 'document_level_discount' | 'document_level_coupon';
96
+ entity_type:'item_level_coupon' | 'promotional_credits' | 'item_level_discount' | 'prorated_credits' | 'document_level_discount' | 'document_level_coupon';
95
97
 
96
98
  discount_type?:'fixed_amount' | 'percentage';
97
99
 
@@ -100,26 +102,32 @@ declare module 'chargebee' {
100
102
  coupon_set_code?:string;
101
103
  }
102
104
  export interface Tax {
103
- name?:string;
105
+ name:string;
104
106
 
105
- amount?:number;
107
+ amount:number;
106
108
 
107
109
  description?:string;
108
110
  }
109
111
  export interface LineItemTax {
110
112
  line_item_id?:string;
111
113
 
112
- tax_name?:string;
114
+ tax_name:string;
113
115
 
114
- tax_rate?:number;
116
+ tax_rate:number;
117
+
118
+ date_to?:number;
119
+
120
+ date_from?:number;
121
+
122
+ prorated_taxable_amount?:number;
115
123
 
116
124
  is_partial_tax_applied?:boolean;
117
125
 
118
126
  is_non_compliance_tax?:boolean;
119
127
 
120
- taxable_amount?:number;
128
+ taxable_amount:number;
121
129
 
122
- tax_amount?:number;
130
+ tax_amount:number;
123
131
 
124
132
  tax_juris_type?:'special' | 'country' | 'unincorporated' | 'other' | 'city' | 'federal' | 'county' | 'state';
125
133
 
@@ -132,26 +140,26 @@ declare module 'chargebee' {
132
140
  local_currency_code?:string;
133
141
  }
134
142
  export interface LineItemDiscount {
135
- line_item_id?:string;
143
+ line_item_id:string;
136
144
 
137
- discount_type?:'item_level_coupon' | 'promotional_credits' | 'item_level_discount' | 'prorated_credits' | 'document_level_discount' | 'document_level_coupon';
145
+ discount_type:'item_level_coupon' | 'promotional_credits' | 'item_level_discount' | 'prorated_credits' | 'document_level_discount' | 'document_level_coupon';
138
146
 
139
147
  coupon_id?:string;
140
148
 
141
149
  entity_id?:string;
142
150
 
143
- discount_amount?:number;
151
+ discount_amount:number;
144
152
  }
145
153
  export interface LineItemTier {
146
154
  line_item_id?:string;
147
155
 
148
- starting_unit?:number;
156
+ starting_unit:number;
149
157
 
150
158
  ending_unit?:number;
151
159
 
152
- quantity_used?:number;
160
+ quantity_used:number;
153
161
 
154
- unit_amount?:number;
162
+ unit_amount:number;
155
163
 
156
164
  starting_unit_in_decimal?:string;
157
165
 
@@ -2,63 +2,150 @@
2
2
  declare module 'chargebee' {
3
3
  export interface Entitlement {
4
4
 
5
+ /**
6
+ * @description A unique identifier for the entitlement. This is auto-generated.
7
+
8
+ */
9
+
5
10
  id:string;
6
11
 
12
+ /**
13
+ * @description The unique identifier of the entity being granted entitlement to a specific &#x60;feature&#x60;.
14
+
15
+ */
16
+
7
17
  entity_id?:string;
8
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
+
9
38
  entity_type?:'charge' | 'addon' | 'addon_price' | 'plan_price' | 'plan';
10
39
 
40
+ /**
41
+ * @description The unique identifier of the &#x60;feature&#x60; to which the entity gains entitlement.
42
+
43
+ */
44
+
11
45
  feature_id?:string;
12
46
 
47
+ /**
48
+ * @description The &#x60;name&#x60; of the feature associated with this entitlement.
49
+
50
+ */
51
+
13
52
  feature_name?:string;
14
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
+
15
72
  value?:string;
16
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
+
17
82
  name?:string;
18
83
  }
19
84
  export namespace Entitlement {
20
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
+
21
91
  list(input?:ListInputParam):ChargebeeRequest<ListResponse>;
22
92
 
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
+
23
100
  create(input:CreateInputParam):ChargebeeRequest<CreateResponse>;
24
101
  }
25
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
+
106
+ */
107
+
26
108
  list:{entitlement:Entitlement}[];
27
109
 
110
+ /**
111
+ * @description Retrieves a list of all the &#x60;entitlement&#x60;s associated with the specified &#x60;feature&#x60;.
112
+
113
+ */
114
+
28
115
  next_offset?:string;
29
116
  }
30
117
  export interface ListInputParam {
31
118
  [key : string]: any;
32
119
  /**
33
- * @description The number of resources to be returned.
120
+ * @description Retrieves a list of all the &#x60;entitlement&#x60;s associated with the specified &#x60;feature&#x60;.
34
121
 
35
122
  */
36
123
 
37
124
  limit?:number;
38
125
 
39
126
  /**
40
- * @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.
127
+ * @description Retrieves a list of all the &#x60;entitlement&#x60;s associated with the specified &#x60;feature&#x60;.
41
128
 
42
129
  */
43
130
 
44
131
  offset?:string;
45
132
 
46
133
  /**
47
- * @description The &#x60;id&#x60; of the feature towards which this entitlement has been granted.
134
+ * @description Retrieves a list of all the &#x60;entitlement&#x60;s associated with the specified &#x60;feature&#x60;.
48
135
 
49
136
  */
50
137
 
51
138
  feature_id?:{in?:string,is?:string};
52
139
 
53
140
  /**
54
- * @description The &#x60;type&#x60; of the &#x60;entity&#x60; to which this entitlement belongs.
141
+ * @description Retrieves a list of all the &#x60;entitlement&#x60;s associated with the specified &#x60;feature&#x60;.
55
142
 
56
143
  */
57
144
 
58
145
  entity_type?:{in?:string,is?:'charge' | 'addon' | 'addon_price' | 'plan_price' | 'plan'};
59
146
 
60
147
  /**
61
- * @description The &#x60;id&#x60; of the &#x60;entity&#x60; to which this entitlement belongs.
148
+ * @description Retrieves a list of all the &#x60;entitlement&#x60;s associated with the specified &#x60;feature&#x60;.
62
149
 
63
150
  */
64
151
 
@@ -69,8 +156,18 @@ declare module 'chargebee' {
69
156
  }
70
157
  export interface CreateInputParam {
71
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
+
72
164
  action:Action;
73
165
 
166
+ /**
167
+ * @description Parameters for entitlements
168
+
169
+ */
170
+
74
171
  entitlements:{entity_id:string,entity_type?:'charge' | 'addon' | 'addon_price' | 'plan_price' | 'plan',feature_id:string,value?:string}[];
75
172
  }
76
173
 
@@ -80,7 +80,7 @@ The response contains one or more of the following objects:
80
80
 
81
81
  */
82
82
 
83
- create_sub_item_estimate(input?:CreateSubItemEstimateInputParam):ChargebeeRequest<CreateSubItemEstimateResponse>;
83
+ create_sub_item_estimate(input:CreateSubItemEstimateInputParam):ChargebeeRequest<CreateSubItemEstimateResponse>;
84
84
 
85
85
  /**
86
86
  * @description Generates an estimate without creating a subscription. This endpoint can be called when you want to preview details of a new subscription before actually creating one.
@@ -90,7 +90,7 @@ The response contains one or more of the following objects:
90
90
 
91
91
  */
92
92
 
93
- create_sub_item_for_customer_estimate(customer_id:string, input?:CreateSubItemForCustomerEstimateInputParam):ChargebeeRequest<CreateSubItemForCustomerEstimateResponse>;
93
+ create_sub_item_for_customer_estimate(customer_id:string, input:CreateSubItemForCustomerEstimateInputParam):ChargebeeRequest<CreateSubItemForCustomerEstimateResponse>;
94
94
 
95
95
  /**
96
96
  * @description Returns an estimate for updating a subscription.
@@ -109,7 +109,7 @@ In the response,
109
109
 
110
110
  */
111
111
 
112
- update_subscription_for_items(input?:UpdateSubscriptionForItemsInputParam):ChargebeeRequest<UpdateSubscriptionForItemsResponse>;
112
+ update_subscription_for_items(input:UpdateSubscriptionForItemsInputParam):ChargebeeRequest<UpdateSubscriptionForItemsResponse>;
113
113
 
114
114
  /**
115
115
  * @description This returns an estimate of the amount that will be charged when the subscription is billed next. The estimate is calculated based on the current recurring items of the subscription - plan, addons, and coupons.
@@ -237,14 +237,14 @@ In the response,
237
237
 
238
238
  */
239
239
 
240
- gift_subscription_for_items(input?:GiftSubscriptionForItemsInputParam):ChargebeeRequest<GiftSubscriptionForItemsResponse>;
240
+ gift_subscription_for_items(input:GiftSubscriptionForItemsInputParam):ChargebeeRequest<GiftSubscriptionForItemsResponse>;
241
241
 
242
242
  /**
243
243
  * @description This endpoint creates an invoice estimate for non-recurring items.
244
244
 
245
245
  */
246
246
 
247
- create_invoice_for_items(input?:CreateInvoiceForItemsInputParam):ChargebeeRequest<CreateInvoiceForItemsResponse>;
247
+ create_invoice_for_items(input:CreateInvoiceForItemsInputParam):ChargebeeRequest<CreateInvoiceForItemsResponse>;
248
248
  }
249
249
  export interface CreateSubItemEstimateResponse {
250
250
  estimate:Estimate;
@@ -348,14 +348,14 @@ In the response,
348
348
 
349
349
  */
350
350
 
351
- subscription_items?:{billing_cycles?:number,charge_on_event?:ChargeOnEvent,charge_on_option?:ChargeOnOption,charge_once?:boolean,item_price_id:string,quantity?:number,quantity_in_decimal?:string,service_period_days?:number,trial_end?:number,unit_price?:number,unit_price_in_decimal?:string}[];
351
+ subscription_items:{billing_cycles?:number,charge_on_event?:ChargeOnEvent,charge_on_option?:ChargeOnOption,charge_once?:boolean,item_price_id:string,quantity?:number,quantity_in_decimal?:string,service_period_days?:number,trial_end?:number,unit_price?:number,unit_price_in_decimal?:string}[];
352
352
 
353
353
  /**
354
354
  * @description Parameters for discounts
355
355
 
356
356
  */
357
357
 
358
- discounts?:{amount?:number,apply_on:ApplyOn,duration_type:DurationType,included_in_mrr?:boolean,item_price_id?:string,percentage?:number,period?:number,period_unit?:PeriodUnit}[];
358
+ discounts:{amount?:number,apply_on:ApplyOn,duration_type:DurationType,included_in_mrr?:boolean,item_price_id?:string,percentage?:number,period?:number,period_unit?:PeriodUnit}[];
359
359
 
360
360
  /**
361
361
  * @description Parameters for item_tiers
@@ -440,6 +440,16 @@ In the response,
440
440
 
441
441
  shipping_address?:{city?:string,country?:string,line1?:string,line2?:string,line3?:string,state_code?:string,validation_status?:ValidationStatus,zip?:string};
442
442
 
443
+ /**
444
+ * @description Generates an estimate without creating a subscription. This endpoint can be called when you want to preview details of a new subscription before actually creating one.
445
+ **See also**
446
+
447
+ * [Estimate a purchase](https://apidocs.chargebee.com/docs/api/purchases#estimates_for_purchase): an operation that estimates a &#x60;purchase&#x60; representing multiple subscriptions bought together by a customer.
448
+
449
+ */
450
+
451
+ billing_address?:{city?:string,country?:string,line1?:string,line2?:string,line3?:string,state_code?:string,validation_status?:ValidationStatus,zip?:string};
452
+
443
453
  /**
444
454
  * @description Parameters for contract_term
445
455
 
@@ -452,14 +462,14 @@ In the response,
452
462
 
453
463
  */
454
464
 
455
- subscription_items?:{billing_cycles?:number,charge_on_event?:ChargeOnEvent,charge_on_option?:ChargeOnOption,charge_once?:boolean,item_price_id:string,quantity?:number,quantity_in_decimal?:string,service_period_days?:number,trial_end?:number,unit_price?:number,unit_price_in_decimal?:string}[];
465
+ subscription_items:{billing_cycles?:number,charge_on_event?:ChargeOnEvent,charge_on_option?:ChargeOnOption,charge_once?:boolean,item_price_id:string,quantity?:number,quantity_in_decimal?:string,service_period_days?:number,trial_end?:number,unit_price?:number,unit_price_in_decimal?:string}[];
456
466
 
457
467
  /**
458
468
  * @description Parameters for discounts
459
469
 
460
470
  */
461
471
 
462
- discounts?:{amount?:number,apply_on:ApplyOn,duration_type:DurationType,included_in_mrr?:boolean,item_price_id?:string,percentage?:number,period?:number,period_unit?:PeriodUnit}[];
472
+ discounts:{amount?:number,apply_on:ApplyOn,duration_type:DurationType,included_in_mrr?:boolean,item_price_id?:string,percentage?:number,period?:number,period_unit?:PeriodUnit}[];
463
473
 
464
474
  /**
465
475
  * @description Parameters for item_tiers
@@ -617,7 +627,7 @@ An immediate previous change was made
617
627
 
618
628
  */
619
629
 
620
- subscription?:{auto_collection?:AutoCollection,free_period?:number,free_period_unit?:FreePeriodUnit,id:string,offline_payment_method?:OfflinePaymentMethod,start_date?:number,trial_end?:number,trial_end_action?:TrialEndAction};
630
+ subscription:{auto_collection?:AutoCollection,free_period?:number,free_period_unit?:FreePeriodUnit,id:string,offline_payment_method?:OfflinePaymentMethod,start_date?:number,trial_end?:number,trial_end_action?:TrialEndAction};
621
631
 
622
632
  /**
623
633
  * @description Parameters for billing_address
@@ -645,14 +655,14 @@ An immediate previous change was made
645
655
 
646
656
  */
647
657
 
648
- subscription_items?:{billing_cycles?:number,charge_on_event?:ChargeOnEvent,charge_on_option?:ChargeOnOption,charge_once?:boolean,item_price_id:string,quantity?:number,quantity_in_decimal?:string,service_period_days?:number,trial_end?:number,unit_price?:number,unit_price_in_decimal?:string}[];
658
+ subscription_items:{billing_cycles?:number,charge_on_event?:ChargeOnEvent,charge_on_option?:ChargeOnOption,charge_once?:boolean,item_price_id:string,proration_type?:ProrationType,quantity?:number,quantity_in_decimal?:string,service_period_days?:number,trial_end?:number,unit_price?:number,unit_price_in_decimal?:string}[];
649
659
 
650
660
  /**
651
661
  * @description Parameters for discounts
652
662
 
653
663
  */
654
664
 
655
- discounts?:{amount?:number,apply_on:ApplyOn,duration_type:DurationType,id?:string,included_in_mrr?:boolean,item_price_id?:string,operation_type:OperationType,percentage?:number,period?:number,period_unit?:PeriodUnit}[];
665
+ discounts:{amount?:number,apply_on:ApplyOn,duration_type:DurationType,id?:string,included_in_mrr?:boolean,item_price_id?:string,operation_type:OperationType,percentage?:number,period?:number,period_unit?:PeriodUnit}[];
656
666
 
657
667
  /**
658
668
  * @description Parameters for item_tiers
@@ -1051,14 +1061,14 @@ If &#x60;no_action&#x60; is chosen, charges are added to the resumption invoice.
1051
1061
 
1052
1062
  */
1053
1063
 
1054
- gifter?:{customer_id:string,note?:string,payment_src_id?:string,signature:string};
1064
+ gifter:{customer_id:string,note?:string,payment_src_id?:string,signature:string};
1055
1065
 
1056
1066
  /**
1057
1067
  * @description Parameters for gift_receiver
1058
1068
 
1059
1069
  */
1060
1070
 
1061
- gift_receiver?:{customer_id:string,email:string,first_name:string,last_name:string};
1071
+ gift_receiver:{customer_id:string,email:string,first_name:string,last_name:string};
1062
1072
 
1063
1073
  /**
1064
1074
  * @description Parameters for payment_intent
@@ -1189,7 +1199,7 @@ If &#x60;no_action&#x60; is chosen, charges are added to the resumption invoice.
1189
1199
 
1190
1200
  */
1191
1201
 
1192
- discounts?:{amount?:number,apply_on:ApplyOn,item_price_id?:string,percentage?:number}[];
1202
+ discounts:{amount?:number,apply_on:ApplyOn,item_price_id?:string,percentage?:number}[];
1193
1203
  }
1194
1204
 
1195
1205
  }
@@ -56,6 +56,8 @@ declare module 'chargebee' {
56
56
 
57
57
  content:object;
58
58
 
59
+ origin_user?:string;
60
+
59
61
  /**
60
62
  * @description Array of webhook call statuses: one for each of the webhooks configured for the site. This object is only available after the first webhook call for the event has completed or timed out. Also, creation/updation of the &#x60;webhook&#x60; object data is a queued operation and hence there can be an additional delay of up to 5 seconds.
61
63