Merge pull request #21556 from overleaf/em-subscription-change-interstitial

Add-on purchase preview page

GitOrigin-RevId: 660e39a94e6112af020ea783d6acf01a19432605
This commit is contained in:
Eric Mc Sween
2024-11-07 09:04:49 +00:00
committed by Copybot
parent bc1e3dacda
commit 29be4f66d4
23 changed files with 708 additions and 99 deletions
+18
View File
@@ -0,0 +1,18 @@
export type CurrencyCode =
| 'AUD'
| 'BRL'
| 'CAD'
| 'CHF'
| 'CLP'
| 'COP'
| 'DKK'
| 'EUR'
| 'GBP'
| 'INR'
| 'MXN'
| 'NOK'
| 'NZD'
| 'PEN'
| 'SEK'
| 'SGD'
| 'USD'
@@ -0,0 +1,38 @@
export type SubscriptionChangePreview = {
change: SubscriptionChange
currency: string
paymentMethod: string
immediateCharge: number
nextInvoice: {
date: string
plan: {
name: string
amount: number
}
addOns: AddOn[]
subtotal: number
tax: {
rate: number
amount: number
}
total: number
}
}
type AddOn = {
code: string
name: string
quantity: number
unitAmount: number
amount: number
}
type SubscriptionChange = AddOnPurchase
type AddOnPurchase = {
type: 'add-on-purchase'
addOn: {
code: string
name: string
}
}