-
Notifications
You must be signed in to change notification settings - Fork 719
/
Discounts.d.ts
134 lines (111 loc) · 5.16 KB
/
Discounts.d.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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
// File generated from our OpenAPI spec
declare module 'stripe' {
namespace Stripe {
/**
* A discount represents the actual application of a [coupon](https://stripe.com/docs/api#coupons) or [promotion code](https://stripe.com/docs/api#promotion_codes).
* It contains information about when the discount began, when it will end, and what it is applied to.
*
* Related guide: [Applying Discounts to Subscriptions](https://stripe.com/docs/billing/subscriptions/discounts).
*/
interface Discount {
/**
* The ID of the discount object. Discounts cannot be fetched by ID. Use `expand[]=discounts` in API calls to expand discount IDs in an array.
*/
id: string;
/**
* String representing the object's type. Objects of the same type share the same value.
*/
object: 'discount';
/**
* The Checkout session that this coupon is applied to, if it is applied to a particular session in payment mode. Will not be present for subscription mode.
*/
checkout_session: string | null;
/**
* A coupon contains information about a percent-off or amount-off discount you
* might want to apply to a customer. Coupons may be applied to [subscriptions](https://stripe.com/docs/api#subscriptions), [invoices](https://stripe.com/docs/api#invoices),
* [checkout sessions](https://stripe.com/docs/api/checkout/sessions), [quotes](https://stripe.com/docs/api#quotes), and more. Coupons do not work with conventional one-off [charges](https://stripe.com/docs/api#create_charge) or [payment intents](https://stripe.com/docs/api/payment_intents).
*/
coupon: Stripe.Coupon;
/**
* The ID of the customer associated with this discount.
*/
customer: string | Stripe.Customer | Stripe.DeletedCustomer | null;
deleted?: void;
/**
* If the coupon has a duration of `repeating`, the date that this discount will end. If the coupon has a duration of `once` or `forever`, this attribute will be null.
*/
end: number | null;
/**
* The invoice that the discount's coupon was applied to, if it was applied directly to a particular invoice.
*/
invoice: string | null;
/**
* The invoice item `id` (or invoice line item `id` for invoice line items of type='subscription') that the discount's coupon was applied to, if it was applied directly to a particular invoice item or invoice line item.
*/
invoice_item: string | null;
/**
* The promotion code applied to create this discount.
*/
promotion_code: string | Stripe.PromotionCode | null;
/**
* Date that the coupon was applied.
*/
start: number;
/**
* The subscription that this coupon is applied to, if it is applied to a particular subscription.
*/
subscription: string | null;
}
/**
* The DeletedDiscount object.
*/
interface DeletedDiscount {
/**
* The ID of the discount object. Discounts cannot be fetched by ID. Use `expand[]=discounts` in API calls to expand discount IDs in an array.
*/
id: string;
/**
* String representing the object's type. Objects of the same type share the same value.
*/
object: 'discount';
/**
* The Checkout session that this coupon is applied to, if it is applied to a particular session in payment mode. Will not be present for subscription mode.
*/
checkout_session: string | null;
/**
* A coupon contains information about a percent-off or amount-off discount you
* might want to apply to a customer. Coupons may be applied to [subscriptions](https://stripe.com/docs/api#subscriptions), [invoices](https://stripe.com/docs/api#invoices),
* [checkout sessions](https://stripe.com/docs/api/checkout/sessions), [quotes](https://stripe.com/docs/api#quotes), and more. Coupons do not work with conventional one-off [charges](https://stripe.com/docs/api#create_charge) or [payment intents](https://stripe.com/docs/api/payment_intents).
*/
coupon: Stripe.Coupon;
/**
* The ID of the customer associated with this discount.
*/
customer: string | Stripe.Customer | Stripe.DeletedCustomer | null;
/**
* Always true for a deleted object
*/
deleted: true;
/**
* The invoice that the discount's coupon was applied to, if it was applied directly to a particular invoice.
*/
invoice: string | null;
/**
* The invoice item `id` (or invoice line item `id` for invoice line items of type='subscription') that the discount's coupon was applied to, if it was applied directly to a particular invoice item or invoice line item.
*/
invoice_item: string | null;
/**
* The promotion code applied to create this discount.
*/
promotion_code: string | Stripe.PromotionCode | null;
/**
* Date that the coupon was applied.
*/
start: number;
/**
* The subscription that this coupon is applied to, if it is applied to a particular subscription.
*/
subscription: string | null;
}
}
}