chargebee 2.51.0 → 2.53.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 (89) hide show
  1. package/CHANGELOG.md +83 -0
  2. package/lib/chargebee.js +1 -1
  3. package/lib/resources/api_endpoints.js +103 -5
  4. package/package.json +1 -1
  5. package/types/core.d.ts +6 -6
  6. package/types/index.d.ts +10 -0
  7. package/types/resources/Addon.d.ts +3 -3
  8. package/types/resources/Address.d.ts +2 -194
  9. package/types/resources/AdvanceInvoiceSchedule.d.ts +5 -67
  10. package/types/resources/AttachedItem.d.ts +1 -1
  11. package/types/resources/Attribute.d.ts +4 -1
  12. package/types/resources/BillingConfiguration.d.ts +21 -0
  13. package/types/resources/Brand.d.ts +12 -0
  14. package/types/resources/BusinessEntity.d.ts +10 -8
  15. package/types/resources/BusinessEntityTransfer.d.ts +10 -7
  16. package/types/resources/Card.d.ts +11 -311
  17. package/types/resources/Comment.d.ts +10 -125
  18. package/types/resources/Contact.d.ts +2 -44
  19. package/types/resources/ContractTerm.d.ts +4 -72
  20. package/types/resources/Coupon.d.ts +4 -41
  21. package/types/resources/CouponCode.d.ts +67 -35
  22. package/types/resources/CouponSet.d.ts +12 -121
  23. package/types/resources/CreditNote.d.ts +89 -95
  24. package/types/resources/Currency.d.ts +8 -5
  25. package/types/resources/Customer.d.ts +96 -95
  26. package/types/resources/CustomerEntitlement.d.ts +3 -1
  27. package/types/resources/DifferentialPrice.d.ts +1 -1
  28. package/types/resources/Discount.d.ts +5 -90
  29. package/types/resources/Download.d.ts +2 -14
  30. package/types/resources/Entitlement.d.ts +15 -103
  31. package/types/resources/EntitlementOverride.d.ts +4 -89
  32. package/types/resources/Estimate.d.ts +6 -14
  33. package/types/resources/Event.d.ts +24 -109
  34. package/types/resources/Export.d.ts +116 -432
  35. package/types/resources/Feature.d.ts +19 -321
  36. package/types/resources/GatewayErrorDetail.d.ts +6 -48
  37. package/types/resources/Gift.d.ts +34 -294
  38. package/types/resources/Hierarchy.d.ts +4 -24
  39. package/types/resources/HostedPage.d.ts +4 -4
  40. package/types/resources/ImpactedCustomer.d.ts +23 -0
  41. package/types/resources/ImpactedItem.d.ts +4 -36
  42. package/types/resources/ImpactedItemPrice.d.ts +5 -2
  43. package/types/resources/ImpactedSubscription.d.ts +3 -30
  44. package/types/resources/InAppSubscription.d.ts +13 -355
  45. package/types/resources/Invoice.d.ts +112 -126
  46. package/types/resources/InvoiceEstimate.d.ts +1 -1
  47. package/types/resources/Item.d.ts +4 -11
  48. package/types/resources/ItemEntitlement.d.ts +15 -155
  49. package/types/resources/ItemFamily.d.ts +3 -3
  50. package/types/resources/ItemPrice.d.ts +7 -7
  51. package/types/resources/NonSubscription.d.ts +9 -6
  52. package/types/resources/OmnichannelOneTimeOrder.d.ts +90 -0
  53. package/types/resources/OmnichannelOneTimeOrderItem.d.ts +24 -0
  54. package/types/resources/OmnichannelSubscription.d.ts +2 -2
  55. package/types/resources/OmnichannelSubscriptionItem.d.ts +1 -1
  56. package/types/resources/OmnichannelSubscriptionItemScheduledChange.d.ts +1 -1
  57. package/types/resources/Order.d.ts +3 -3
  58. package/types/resources/PaymentIntent.d.ts +9 -255
  59. package/types/resources/PaymentReferenceNumber.d.ts +3 -20
  60. package/types/resources/PaymentSource.d.ts +4 -4
  61. package/types/resources/PaymentVoucher.d.ts +22 -205
  62. package/types/resources/Plan.d.ts +3 -3
  63. package/types/resources/PortalSession.d.ts +4 -146
  64. package/types/resources/PriceVariant.d.ts +2 -2
  65. package/types/resources/PricingPageSession.d.ts +2 -2
  66. package/types/resources/PromotionalCredit.d.ts +12 -215
  67. package/types/resources/Purchase.d.ts +5 -3
  68. package/types/resources/Quote.d.ts +32 -14
  69. package/types/resources/QuotedCharge.d.ts +7 -0
  70. package/types/resources/QuotedRamp.d.ts +11 -16
  71. package/types/resources/Ramp.d.ts +7 -7
  72. package/types/resources/RecordedPurchase.d.ts +8 -1
  73. package/types/resources/ResourceMigration.d.ts +2 -54
  74. package/types/resources/SiteMigrationDetail.d.ts +13 -55
  75. package/types/resources/Subscription.d.ts +33 -29
  76. package/types/resources/SubscriptionEntitlement.d.ts +6 -106
  77. package/types/resources/SubscriptionEntitlementsCreatedDetail.d.ts +12 -0
  78. package/types/resources/SubscriptionEntitlementsUpdatedDetail.d.ts +12 -0
  79. package/types/resources/SubscriptionEstimate.d.ts +14 -11
  80. package/types/resources/TaxWithheld.d.ts +14 -26
  81. package/types/resources/ThirdPartyPaymentMethod.d.ts +2 -19
  82. package/types/resources/TimeMachine.d.ts +3 -64
  83. package/types/resources/Token.d.ts +3 -60
  84. package/types/resources/Transaction.d.ts +8 -8
  85. package/types/resources/UnbilledCharge.d.ts +1 -1
  86. package/types/resources/Usage.d.ts +21 -165
  87. package/types/resources/UsageFile.d.ts +5 -5
  88. package/types/resources/VirtualBankAccount.d.ts +1 -1
  89. package/types/resources/WebhookEndpoint.d.ts +117 -0
@@ -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 {
@@ -213,14 +197,14 @@ declare module 'chargebee' {
213
197
  card?:Card;
214
198
  }
215
199
  export interface CreateInputParam {
216
- [key : string] : any;
200
+
217
201
  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?:Gateway,gateway_account_id?:string,ip_address?:string,last_name?:string,number?:string,preferred_scheme?:'cartes_bancaires' | 'mastercard' | 'visa',tmp_token?:string};
218
202
 
219
203
  bank_account?:{account_holder_type?:AccountHolderType,account_number?:string,account_type?:AccountType,bank_code?:string,bank_name?:string,billing_address?:object,company?:string,echeck_type?:EcheckType,email?:string,first_name?:string,gateway_account_id?:string,iban?:string,issuing_country?:string,last_name?:string,phone?:string,routing_number?:string,swedish_identity_number?:string};
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
 
@@ -311,7 +295,7 @@ declare module 'chargebee' {
311
295
  limit?:number;
312
296
 
313
297
  /**
314
- * @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.
298
+ * @description Determines your position in the list for pagination. To ensure that the next page is retrieved correctly, always set &#x27;offset&#x27; to the value of &#x27;next_offset&#x27; obtained in the previous iteration of the API call.
315
299
 
316
300
  */
317
301
 
@@ -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
 
@@ -435,7 +417,7 @@ The ID of the business entity created for the site. For Product Catalog 1.0, all
435
417
 
436
418
  business_entity_id?:{is?:string};
437
419
 
438
- sort_by?:{asc?:'created_at' | 'updated_at',desc?:'created_at' | 'updated_at'};
420
+ sort_by?:object;
439
421
  }
440
422
  export interface RetrieveResponse {
441
423
  customer:Customer;
@@ -449,7 +431,7 @@ The ID of the business entity created for the site. For Product Catalog 1.0, all
449
431
  card?:Card;
450
432
  }
451
433
  export interface UpdateInputParam {
452
- [key : string] : any;
434
+
453
435
  tax_providers_fields?:{field_id?:string,field_value?:string,provider_name?:string}[];
454
436
 
455
437
  first_name?:string;
@@ -551,7 +533,7 @@ The ID of the business entity created for the site. For Product Catalog 1.0, all
551
533
  limit?:number;
552
534
 
553
535
  /**
554
- * @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.
536
+ * @description Determines your position in the list for pagination. To ensure that the next page is retrieved correctly, always set &#x27;offset&#x27; to the value of &#x27;next_offset&#x27; obtained in the previous iteration of the API call.
555
537
 
556
538
  */
557
539
 
@@ -647,7 +629,7 @@ The ID of the business entity created for the site. For Product Catalog 1.0, all
647
629
  }
648
630
  export interface RecordExcessPaymentInputParam {
649
631
 
650
- transaction:{amount:number,currency_code?:string,custom_payment_method_id?:string,date:number,payment_method:PaymentMethod,reference_number?:string};
632
+ transaction:{amount:number,currency_code?:string,custom_payment_method_id?:string,date:number,id?:string,payment_method:PaymentMethod,reference_number?:string};
651
633
 
652
634
  comment?:string;
653
635
  }
@@ -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 &#x27;offset&#x27; to the value of &#x27;next_offset&#x27; 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
  }
@@ -36,11 +36,13 @@ declare module 'chargebee' {
36
36
  limit?:number;
37
37
 
38
38
  /**
39
- * @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.
39
+ * @description Determines your position in the list for pagination. To ensure that the next page is retrieved correctly, always set &#x27;offset&#x27; to the value of &#x27;next_offset&#x27; obtained in the previous iteration of the API call.
40
40
 
41
41
  */
42
42
 
43
43
  offset?:string;
44
+
45
+ consolidate_entitlements?:boolean;
44
46
  }
45
47
 
46
48
  }
@@ -108,7 +108,7 @@ declare module 'chargebee' {
108
108
  limit?:number;
109
109
 
110
110
  /**
111
- * @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.
111
+ * @description Determines your position in the list for pagination. To ensure that the next page is retrieved correctly, always set &#x27;offset&#x27; to the value of &#x27;next_offset&#x27; obtained in the previous iteration of the API call.
112
112
 
113
113
  */
114
114
 
@@ -1,129 +1,44 @@
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
- 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.
11
+ type:'fixed_amount' | 'percentage' | 'offer_quantity';
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
-
17
+ quantity?:number;
18
+
45
19
  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
20
 
50
- */
51
-
52
21
  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
22
 
57
- */
58
-
59
23
  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
24
 
64
- */
65
-
66
25
  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
26
 
71
- */
72
-
73
27
  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
28
 
78
- */
79
-
80
29
  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
30
 
85
- */
86
-
87
31
  item_price_id?:string;
88
-
89
- /**
90
- * @description Timestamp indicating when this discount is created.
91
32
 
92
- */
93
-
94
33
  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
34
 
99
- */
100
-
101
35
  apply_till?:number;
102
-
103
- /**
104
- * @description Specifies the number of times the discount has been applied.
105
36
 
106
- */
107
-
108
37
  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
38
 
118
- */
119
-
120
39
  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
40
 
125
- */
126
-
127
41
  index:number;
42
+
128
43
  }
129
44
  }
@@ -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
  }