chargebee 2.46.0 → 2.48.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 +51 -0
- package/lib/chargebee.js +48 -25
- package/lib/resources/api_endpoints.js +2147 -407
- package/package.json +1 -1
- package/types/core.d.ts +3 -3
- package/types/index.d.ts +4 -0
- package/types/resources/AttachedItem.d.ts +20 -205
- package/types/resources/Coupon.d.ts +2 -0
- package/types/resources/CreditNote.d.ts +119 -1216
- package/types/resources/DifferentialPrice.d.ts +20 -200
- package/types/resources/Invoice.d.ts +344 -2219
- package/types/resources/InvoiceEstimate.d.ts +9 -0
- package/types/resources/Item.d.ts +2 -0
- package/types/resources/ItemFamily.d.ts +2 -0
- package/types/resources/ItemPrice.d.ts +2 -0
- package/types/resources/Order.d.ts +184 -1073
- package/types/resources/PriceVariant.d.ts +24 -163
- package/types/resources/Purchase.d.ts +13 -258
- package/types/resources/Rule.d.ts +38 -0
- package/types/resources/Subscription.d.ts +2 -0
- package/types/resources/UsageEvent.d.ts +46 -0
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
///<reference path='./../core.d.ts'/>
|
|
2
|
+
///<reference path='./../index.d.ts'/>
|
|
3
|
+
declare module 'chargebee' {
|
|
4
|
+
export interface Rule {
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
id:string;
|
|
8
|
+
|
|
9
|
+
namespace:string;
|
|
10
|
+
|
|
11
|
+
rule_name:string;
|
|
12
|
+
|
|
13
|
+
rule_order?:number;
|
|
14
|
+
|
|
15
|
+
status:'active' | 'disabled';
|
|
16
|
+
|
|
17
|
+
conditions?:string;
|
|
18
|
+
|
|
19
|
+
outcome?:string;
|
|
20
|
+
|
|
21
|
+
deleted:boolean;
|
|
22
|
+
|
|
23
|
+
created_at:number;
|
|
24
|
+
|
|
25
|
+
modified_at:number;
|
|
26
|
+
|
|
27
|
+
}
|
|
28
|
+
export namespace Rule {
|
|
29
|
+
export class RuleResource {
|
|
30
|
+
retrieve(rule_id:string):ChargebeeRequest<RetrieveResponse>;
|
|
31
|
+
}
|
|
32
|
+
export interface RetrieveResponse {
|
|
33
|
+
rule:Rule;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
}
|
|
38
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
///<reference path='./../core.d.ts'/>
|
|
2
|
+
///<reference path='./../index.d.ts'/>
|
|
3
|
+
declare module 'chargebee' {
|
|
4
|
+
export interface UsageEvent {
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
subscription_id:string;
|
|
8
|
+
|
|
9
|
+
deduplication_id:string;
|
|
10
|
+
|
|
11
|
+
usage_timestamp:number;
|
|
12
|
+
|
|
13
|
+
properties:object;
|
|
14
|
+
|
|
15
|
+
}
|
|
16
|
+
export namespace UsageEvent {
|
|
17
|
+
export class UsageEventResource {
|
|
18
|
+
create(input:CreateInputParam):ChargebeeRequest<CreateResponse>;
|
|
19
|
+
|
|
20
|
+
batch_ingest(input:BatchIngestInputParam):ChargebeeRequest<BatchIngestResponse>;
|
|
21
|
+
}
|
|
22
|
+
export interface CreateResponse {
|
|
23
|
+
usage_event:UsageEvent;
|
|
24
|
+
}
|
|
25
|
+
export interface CreateInputParam {
|
|
26
|
+
|
|
27
|
+
deduplication_id:string;
|
|
28
|
+
|
|
29
|
+
subscription_id:string;
|
|
30
|
+
|
|
31
|
+
usage_timestamp:number;
|
|
32
|
+
|
|
33
|
+
properties:object;
|
|
34
|
+
}
|
|
35
|
+
export interface BatchIngestResponse {
|
|
36
|
+
batch_id:string;
|
|
37
|
+
|
|
38
|
+
failed_events:any[];
|
|
39
|
+
}
|
|
40
|
+
export interface BatchIngestInputParam {
|
|
41
|
+
|
|
42
|
+
events:{deduplication_id:string,properties:object,subscription_id:string,usage_timestamp:number}[];
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
}
|
|
46
|
+
}
|