forked from orbcorp/orb-node
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathshared.ts
88 lines (66 loc) · 2.03 KB
/
shared.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
export interface AmountDiscount {
/**
* Only available if discount_type is `amount`.
*/
amount_discount: string;
/**
* List of price_ids that this discount applies to. For plan/plan phase discounts,
* this can be a subset of prices.
*/
applies_to_price_ids: Array<string>;
discount_type: 'amount';
reason?: string | null;
}
export type BillingCycleRelativeDate = 'start_of_term' | 'end_of_term';
export type Discount = PercentageDiscount | TrialDiscount | UsageDiscount | AmountDiscount;
export interface UsageDiscount {
/**
* List of price_ids that this discount applies to. For plan/plan phase discounts,
* this can be a subset of prices.
*/
applies_to_price_ids: Array<string>;
discount_type: 'usage';
/**
* Only available if discount_type is `usage`. Number of usage units that this
* discount is for
*/
usage_discount: number;
reason?: string | null;
}
export type InvoiceLevelDiscount = PercentageDiscount | AmountDiscount | TrialDiscount;
export interface PaginationMetadata {
has_more: boolean;
next_cursor: string | null;
}
export interface PercentageDiscount {
/**
* List of price_ids that this discount applies to. For plan/plan phase discounts,
* this can be a subset of prices.
*/
applies_to_price_ids: Array<string>;
discount_type: 'percentage';
/**
* Only available if discount_type is `percentage`. This is a number between 0
* and 1.
*/
percentage_discount: number;
reason?: string | null;
}
export interface TrialDiscount {
/**
* List of price_ids that this discount applies to. For plan/plan phase discounts,
* this can be a subset of prices.
*/
applies_to_price_ids: Array<string>;
discount_type: 'trial';
reason?: string | null;
/**
* Only available if discount_type is `trial`
*/
trial_amount_discount?: string | null;
/**
* Only available if discount_type is `trial`
*/
trial_percentage_discount?: number | null;
}