chargebee 2.41.0 → 2.42.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.
@@ -0,0 +1,41 @@
1
+ ///<reference path='./../core.d.ts'/>
2
+ ///<reference path='./../index.d.ts'/>
3
+ declare module 'chargebee' {
4
+ export interface PaymentSchedule {
5
+
6
+
7
+ id:string;
8
+
9
+ scheme_id:string;
10
+
11
+ entity_type:'invoice';
12
+
13
+ entity_id:string;
14
+
15
+ amount?:number;
16
+
17
+ created_at:number;
18
+
19
+ resource_version?:number;
20
+
21
+ updated_at?:number;
22
+
23
+ currency_code?:string;
24
+
25
+ schedule_entries?:PaymentSchedule.ScheduleEntry[];
26
+
27
+ }
28
+ export namespace PaymentSchedule {
29
+
30
+
31
+ export interface ScheduleEntry {
32
+ id:string;
33
+
34
+ date:number;
35
+
36
+ amount:number;
37
+
38
+ status:'posted' | 'payment_due' | 'paid';
39
+ }
40
+ }
41
+ }
@@ -0,0 +1,61 @@
1
+ ///<reference path='./../core.d.ts'/>
2
+ ///<reference path='./../index.d.ts'/>
3
+ declare module 'chargebee' {
4
+ export interface PaymentScheduleScheme {
5
+
6
+
7
+ id:string;
8
+
9
+ description?:string;
10
+
11
+ number_of_schedules:number;
12
+
13
+ period_unit:'day' | 'week' | 'month';
14
+
15
+ period?:number;
16
+
17
+ created_at:number;
18
+
19
+ resource_version?:number;
20
+
21
+ updated_at?:number;
22
+
23
+ preferred_schedules?:PaymentScheduleScheme.PreferredSchedule[];
24
+
25
+ }
26
+ export namespace PaymentScheduleScheme {
27
+ export class PaymentScheduleSchemeResource {
28
+ create(input:CreateInputParam):ChargebeeRequest<CreateResponse>;
29
+
30
+ retrieve(payment_schedule_scheme_id:string):ChargebeeRequest<RetrieveResponse>;
31
+
32
+ delete(payment_schedule_scheme_id:string):ChargebeeRequest<DeleteResponse>;
33
+ }
34
+ export interface CreateResponse {
35
+ payment_schedule_scheme:PaymentScheduleScheme;
36
+ }
37
+ export interface CreateInputParam {
38
+
39
+ number_of_schedules:number;
40
+
41
+ period_unit:'day' | 'week' | 'month';
42
+
43
+ period?:number;
44
+
45
+ description?:string;
46
+ }
47
+ export interface RetrieveResponse {
48
+ payment_schedule_scheme:PaymentScheduleScheme;
49
+ }
50
+
51
+ export interface DeleteResponse {
52
+ payment_schedule_scheme:PaymentScheduleScheme;
53
+ }
54
+
55
+ export interface PreferredSchedule {
56
+ period?:number;
57
+
58
+ amount_percentage?:number;
59
+ }
60
+ }
61
+ }
@@ -1,4 +1,5 @@
1
1
  ///<reference path='./../core.d.ts'/>
2
+ ///<reference path='./../index.d.ts'/>
2
3
  declare module 'chargebee' {
3
4
  export interface Purchase {
4
5
 
@@ -144,13 +145,6 @@ Discounts, both [manual discounts](discounts) and &lt;coupons&gt;, can be applie
144
145
 
145
146
  invoice_info?:{notes?:string,po_number?:string};
146
147
 
147
- /**
148
- * @description Parameters for installment_info
149
-
150
- */
151
-
152
- installment_info?:{amount?:number,config_id?:string};
153
-
154
148
  /**
155
149
  * @description Parameters for purchase_items
156
150
 
@@ -251,6 +245,7 @@ Discounts, both [manual discounts](discounts) and &lt;coupons&gt;, can be applie
251
245
 
252
246
  contract_terms:{action_at_term_end?:'cancel' | 'renew_once' | 'renew' | 'evergreen',cancellation_cutoff_period?:number,index:number}[];
253
247
  statement_descriptor?:{descriptor?:string};
248
+ payment_schedule?:{amount?:number,scheme_id?:string};
254
249
  }
255
250
  export interface EstimateResponse {
256
251
  estimate:Estimate;
@@ -1,123 +0,0 @@
1
- ///<reference path='./../core.d.ts'/>
2
- declare module 'chargebee' {
3
- export interface Installment {
4
-
5
- /**
6
- * @description An auto-generated unique identifier for the Payment installment.
7
-
8
- */
9
-
10
- id:string;
11
-
12
- /**
13
- * @description The ID of the invoice to which this installment belongs.
14
-
15
- */
16
-
17
- invoice_id:string;
18
-
19
- /**
20
- * @description The date when this installment is in effect.
21
-
22
- */
23
-
24
- date:number;
25
-
26
- /**
27
- * @description The part of invoice.amount_due allocated to this installment.
28
-
29
- */
30
-
31
- amount:number;
32
-
33
- /**
34
- * @description The payment status of the installment. Possible values are paid, payment_due: The payment is due, posted. \* posted - The invoice is finalized but the payment is not due yet. \* payment_due - The payment is due. One or more payments were attempted for the installment but were unsuccessful. \* paid - The installment has been paid.
35
-
36
- */
37
-
38
- status:'paid' | 'posted' | 'payment_due';
39
-
40
- /**
41
- * @description The time when this resource was created.
42
-
43
- */
44
-
45
- created_at:number;
46
-
47
- resource_version?:number;
48
-
49
- /**
50
- * @description The time when this resource was last updated.
51
-
52
- */
53
-
54
- updated_at?:number;
55
- }
56
- export namespace Installment {
57
- export class InstallmentResource {
58
- /**
59
- * @description Retrieves a specific installment resource.
60
-
61
- */
62
-
63
- retrieve(installment_id:string):ChargebeeRequest<RetrieveResponse>;
64
-
65
- /**
66
- * @description Lists the installments that match the criteria provided in the filter parameters.
67
-
68
- */
69
-
70
- list(input:ListInputParam):ChargebeeRequest<ListResponse>;
71
- }
72
- export interface RetrieveResponse {
73
- installment:Installment;
74
- }
75
-
76
- export interface ListResponse {
77
- /**
78
- * @description Lists the installments that match the criteria provided in the filter parameters.
79
-
80
- */
81
-
82
- list:{installment:Installment}[];
83
-
84
- /**
85
- * @description Lists the installments that match the criteria provided in the filter parameters.
86
-
87
- */
88
-
89
- next_offset?:string;
90
- }
91
- export interface ListInputParam {
92
- [key : string]: any;
93
- /**
94
- * @description Lists the installments that match the criteria provided in the filter parameters.
95
-
96
- */
97
-
98
- limit?:number;
99
-
100
- /**
101
- * @description Lists the installments that match the criteria provided in the filter parameters.
102
-
103
- */
104
-
105
- offset?:string;
106
-
107
- /**
108
- * @description Lists the installments that match the criteria provided in the filter parameters.
109
-
110
- */
111
-
112
- sort_by?:string;
113
-
114
- /**
115
- * @description Lists the installments that match the criteria provided in the filter parameters.
116
-
117
- */
118
-
119
- invoice_id:{in?:string,is?:string};
120
- }
121
-
122
- }
123
- }
@@ -1,169 +0,0 @@
1
- ///<reference path='./../core.d.ts'/>
2
- declare module 'chargebee' {
3
- export interface InstallmentConfig {
4
-
5
- /**
6
- * @description An auto-generated unique identifier for the Payment installment Configuration.
7
-
8
- */
9
-
10
- id:string;
11
-
12
- /**
13
- * @description A brief description for this installment configuration.
14
-
15
- */
16
-
17
- description?:string;
18
-
19
- /**
20
- * @description Specifies the total number of installments for the invoice.
21
-
22
- */
23
-
24
- number_of_installments:number;
25
-
26
- /**
27
- * @description Defines the time unit for intervals between installments.Possible values are: day, week, month \* month - month \* week - week \* day - day
28
-
29
- */
30
-
31
- period_unit:'week' | 'month' | 'day';
32
-
33
- /**
34
- * @description The time period between the effective dates of two consecutive installments, expressed in period_units.
35
-
36
- */
37
-
38
- period?:number;
39
-
40
- /**
41
- * @description The day of the week (or month) when the installment is in effect. For week: A value between 1 (Sunday) and 7 (Saturday) indicating the preferred day of the week for the installment dates. For example, 2 represents Monday. For month: A value from 1 to 31, indicating the preferred day of the month for installment dates. For example, 15 represents the 15th day of the month. If the month has fewer days than the specified preferred_day, the installment date is the last day of the month.
42
-
43
- */
44
-
45
- preferred_day?:number;
46
-
47
- /**
48
- * @description The timestamp at which the installment_config was created.
49
-
50
- */
51
-
52
- created_at:number;
53
-
54
- /**
55
- * @description Version number of this resource. The &#x60;resource_version&#x60; is updated with a new timestamp in milliseconds for every change made to the resource. This attribute will be present only if the resource has been updated after 2016-09-28.
56
-
57
- */
58
-
59
- resource_version?:number;
60
-
61
- /**
62
- * @description The timestamp at which the installment_config was last updated at.
63
-
64
- */
65
-
66
- updated_at?:number;
67
-
68
- /**
69
- * @description Defines the details for each installment individually.
70
-
71
- */
72
-
73
- installments?:InstallmentConfig.Installments[];
74
- }
75
- export namespace InstallmentConfig {
76
- export class InstallmentConfigResource {
77
- /**
78
- * @description Creates an installment configuration. After creating an installment_config, you can use it to generate installments for multiple invoices.
79
-
80
- */
81
-
82
- create(input:CreateInputParam):ChargebeeRequest<CreateResponse>;
83
-
84
- /**
85
- * @description This endpoint retrieves an installment_config resource.
86
-
87
- */
88
-
89
- retrieve(installment_config_id:string):ChargebeeRequest<RetrieveResponse>;
90
-
91
- /**
92
- * @description This endpoint deletes an installment_config resource.
93
-
94
- */
95
-
96
- delete(installment_config_id:string):ChargebeeRequest<DeleteResponse>;
97
- }
98
- export interface CreateResponse {
99
- installment_config:InstallmentConfig;
100
- }
101
- export interface CreateInputParam {
102
-
103
- /**
104
- * @description Specifies the total number of installments for the invoice.
105
-
106
- */
107
-
108
- number_of_installments:number;
109
-
110
- /**
111
- * @description Defines the time unit for intervals between installments.Possible values are: day, week, month \* month - month \* week - week \* day - day
112
-
113
- */
114
-
115
- period_unit:'week' | 'month' | 'day';
116
-
117
- /**
118
- * @description The time period between the effective dates of two consecutive installments, expressed in period_units.
119
-
120
- */
121
-
122
- period?:number;
123
-
124
- /**
125
- * @description The day of the week (or month) when the installment is in effect. For week: A value between 1 (Sunday) and 7 (Saturday) indicating the preferred day of the week for the installment dates. For example, 2 represents Monday. For month: A value from 1 to 31, indicating the preferred day of the month for installment dates. For example, 15 represents the 15th day of the month. If the month has fewer days than the specified preferred_day, the installment date is the last day of the month.
126
-
127
- */
128
-
129
- preferred_day?:number;
130
-
131
- /**
132
- * @description A brief description for this installment configuration.
133
-
134
- */
135
-
136
- description?:string;
137
-
138
- /**
139
- * @description Parameters for installments
140
-
141
- */
142
-
143
- installments?:{amount_percentage?:number,period?:number}[];
144
- }
145
- export interface RetrieveResponse {
146
- installment_config:InstallmentConfig;
147
- }
148
-
149
- export interface DeleteResponse {
150
- installment_config:InstallmentConfig;
151
- }
152
-
153
- export interface Installments {
154
- /**
155
- * @description The period of time (expressed in period_units) after the invoice.date, marking the date when installment is in effect. For example, when installments.period is 3 and period_unit is month, this installment is effective 3 months after the invoice.date
156
-
157
- */
158
-
159
- period?:number;
160
-
161
- /**
162
- * @description The percentage of invoice.amount_due allocated to this installment. If unspecified, the invoice.amount_due is distributed equally among the installments.
163
-
164
- */
165
-
166
- amount_percentage?:number;
167
- }
168
- }
169
- }
@@ -1,34 +0,0 @@
1
- ///<reference path='./../core.d.ts'/>
2
- declare module 'chargebee' {
3
- export interface InstallmentDetail {
4
-
5
- id?:string;
6
-
7
- invoice_id?:string;
8
-
9
- amount?:number;
10
-
11
- installments?:InstallmentDetail.Installment[];
12
- }
13
- export namespace InstallmentDetail {
14
-
15
-
16
- export interface Installment {
17
- id:string;
18
-
19
- invoice_id:string;
20
-
21
- date:number;
22
-
23
- amount:number;
24
-
25
- status:'posted' | 'payment_due' | 'paid';
26
-
27
- created_at:number;
28
-
29
- resource_version?:number;
30
-
31
- updated_at?:number;
32
- }
33
- }
34
- }