Skip to content

Commit 4aca85e

Browse files
committed
types: Extend the InvoinceInfo states
Change-type: minor
1 parent 77d60ed commit 4aca85e

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

src/models/billing.ts

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,22 @@ export interface BillingPlanBillingInfo {
120120
}>;
121121
}
122122

123+
type BillingV1InvoiceState =
124+
| 'pending'
125+
| 'paid'
126+
| 'failed'
127+
| 'past_due'
128+
| 'open'
129+
| 'closed'
130+
| 'voided'
131+
| 'processing';
132+
type BillingV2InvoiceState =
133+
| 'draft'
134+
| 'open'
135+
| 'paid'
136+
| 'uncollectible'
137+
| 'void';
138+
123139
export interface InvoiceInfo {
124140
closed_at: string;
125141
created_at: string;
@@ -129,7 +145,7 @@ export interface InvoiceInfo {
129145
subtotal_in_cents: string;
130146
total_in_cents: string;
131147
uuid: string;
132-
state: 'pending' | 'paid' | 'failed' | 'past_due';
148+
state: BillingV1InvoiceState | BillingV2InvoiceState;
133149
}
134150

135151
export interface PlanChangeOptions {

0 commit comments

Comments
 (0)