Files
overleaf-cep/services/web/test/frontend/features/subscription/fixtures/subscriptions.ts
T
Antoine Clausse ba4f024f34 [web] Remove SubscriptionFormatters, format subscription dates in the frontend (#36409)
* [web] Remove SubscriptionFormatters, format subscription dates in the frontend

Replace the server-formatted nextPaymentDueAt/nextPaymentDueDate/
trialEndsAtFormatted fields with the raw periodEnd date and format in
the React dashboard (same strings as before, English + UTC). Also
consolidate hand-rolled trial checks onto isInFreeTrial /
SubscriptionHelper.isInTrial.

* [web] Remove the now-unused dateformat dependency

* [web] Address review: payment-dates unit test, UTC dates in acceptance test

Add a dedicated unit test asserting the exact formatted strings from
formatPaymentDate/formatPaymentDateTime, and use explicit UTC timestamps
in the SubscriptionDashboard acceptance fixtures instead of
local-timezone Date constructors.

GitOrigin-RevId: 16ac4f1098b14ef9f1478d22cf39c1357ead7dea
2026-09-17 11:52:44 +00:00

856 lines
23 KiB
TypeScript

import {
CustomSubscription,
GroupSubscription,
PaidSubscription,
} from '../../../../../types/subscription/dashboard/subscription'
const today = new Date()
const oneYearFromToday = new Date().setFullYear(today.getFullYear() + 1)
const periodEnd = new Date(oneYearFromToday).toISOString()
const sevenDaysFromToday = new Date().setDate(today.getDate() + 7)
const sevenDaysFromTodayISO = new Date(sevenDaysFromToday).toISOString()
export const annualActiveSubscription: PaidSubscription = {
manager_ids: ['abc123'],
member_ids: [],
invited_emails: [],
groupPlan: false,
membersLimit: 0,
_id: 'def456',
admin_id: 'abc123',
teamInvites: [],
planCode: 'collaborator-annual',
plan: {
planCode: 'collaborator-annual',
name: 'Standard annual',
price_in_cents: 21900,
annual: true,
featureDescription: [],
canUseFlexibleLicensing: false,
},
payment: {
taxRate: 0,
billingDetailsLink: '/user/subscription/payment/billing-details',
accountManagementLink: '/user/subscription/payment/account-management',
additionalLicenses: 0,
totalLicenses: 0,
periodEnd,
currency: 'USD',
state: 'active',
trialEndsAt: null,
activeCoupons: [],
accountEmail: 'fake@example.com',
hasPastDueInvoice: false,
displayPrice: '$199.00',
planPrice: 199,
planOnlyDisplayPrice: '$199.00',
addOns: [],
addOnDisplayPricesWithoutAdditionalLicense: {},
isEligibleForGroupPlan: true,
isEligibleForPause: false,
isEligibleForDowngradeUpsell: false,
isMigratedFromRecurly: false,
},
}
export const pastDueActiveSubscription: PaidSubscription = {
manager_ids: ['abc123'],
member_ids: [],
invited_emails: [],
groupPlan: false,
membersLimit: 0,
_id: 'def456',
admin_id: 'abc123',
teamInvites: [],
planCode: 'collaborator-annual',
plan: {
planCode: 'collaborator-annual',
name: 'Standard annual',
price_in_cents: 21900,
annual: true,
featureDescription: [],
canUseFlexibleLicensing: false,
},
payment: {
taxRate: 0,
billingDetailsLink: '/user/subscription/payment/billing-details',
accountManagementLink: '/user/subscription/payment/account-management',
additionalLicenses: 0,
totalLicenses: 0,
periodEnd,
currency: 'USD',
state: 'past_due',
trialEndsAt: null,
activeCoupons: [],
accountEmail: 'fake@example.com',
hasPastDueInvoice: true,
displayPrice: '$199.00',
planPrice: 199,
planOnlyDisplayPrice: '$199.00',
addOns: [],
addOnDisplayPricesWithoutAdditionalLicense: {},
isEligibleForGroupPlan: true,
isEligibleForPause: false,
isEligibleForDowngradeUpsell: false,
isMigratedFromRecurly: false,
},
}
export const annualActiveSubscriptionWithCoupons: PaidSubscription = {
manager_ids: ['abc123'],
member_ids: [],
invited_emails: [],
groupPlan: false,
membersLimit: 0,
_id: 'def456',
admin_id: 'abc123',
teamInvites: [],
planCode: 'collaborator-annual',
plan: {
planCode: 'collaborator-annual',
name: 'Standard annual',
price_in_cents: 21900,
annual: true,
featureDescription: [],
canUseFlexibleLicensing: false,
},
payment: {
taxRate: 0,
billingDetailsLink: '/user/subscription/payment/billing-details',
accountManagementLink: '/user/subscription/payment/account-management',
additionalLicenses: 0,
totalLicenses: 0,
periodEnd,
currency: 'USD',
state: 'active',
trialEndsAt: null,
activeCoupons: [
{ name: 'Coupon1', code: 'c1', description: 'Coupon1 for 10% off' },
{ name: 'Coupon2', code: 'c2', description: 'Coupon2 for 15% off' },
],
accountEmail: 'fake@example.com',
hasPastDueInvoice: false,
displayPrice: '$199.00',
planPrice: 199,
planOnlyDisplayPrice: '$199.00',
addOns: [],
addOnDisplayPricesWithoutAdditionalLicense: {},
isEligibleForGroupPlan: true,
isEligibleForPause: false,
isEligibleForDowngradeUpsell: false,
isMigratedFromRecurly: false,
},
}
export const pendingPausedSubscription: PaidSubscription = {
manager_ids: ['abc123'],
member_ids: [],
invited_emails: [],
groupPlan: false,
membersLimit: 0,
_id: 'def456',
admin_id: 'abc123',
teamInvites: [],
planCode: 'collaborator-annual',
plan: {
planCode: 'collaborator-annual',
name: 'Standard annual',
price_in_cents: 21900,
annual: true,
featureDescription: [],
canUseFlexibleLicensing: false,
},
payment: {
taxRate: 0,
billingDetailsLink: '/user/subscription/payment/billing-details',
accountManagementLink: '/user/subscription/payment/account-management',
additionalLicenses: 0,
totalLicenses: 0,
periodEnd,
currency: 'USD',
state: 'active',
remainingPauseCycles: 1,
trialEndsAt: null,
activeCoupons: [],
accountEmail: 'fake@example.com',
hasPastDueInvoice: false,
displayPrice: '$199.00',
planPrice: 199,
planOnlyDisplayPrice: '$199.00',
addOns: [],
addOnDisplayPricesWithoutAdditionalLicense: {},
isEligibleForGroupPlan: true,
isEligibleForPause: false,
isEligibleForDowngradeUpsell: false,
isMigratedFromRecurly: false,
},
}
export const pausedSubscription: PaidSubscription = {
manager_ids: ['abc123'],
member_ids: [],
invited_emails: [],
groupPlan: false,
membersLimit: 0,
_id: 'def456',
admin_id: 'abc123',
teamInvites: [],
planCode: 'collaborator-annual',
plan: {
planCode: 'collaborator-annual',
name: 'Standard annual',
price_in_cents: 21900,
annual: true,
featureDescription: [],
canUseFlexibleLicensing: false,
},
payment: {
taxRate: 0,
billingDetailsLink: '/user/subscription/payment/billing-details',
accountManagementLink: '/user/subscription/payment/account-management',
additionalLicenses: 0,
totalLicenses: 0,
periodEnd,
currency: 'USD',
state: 'paused',
remainingPauseCycles: 1,
trialEndsAt: null,
activeCoupons: [],
accountEmail: 'fake@example.com',
hasPastDueInvoice: false,
displayPrice: '$199.00',
planPrice: 199,
planOnlyDisplayPrice: '$199.00',
addOns: [],
addOnDisplayPricesWithoutAdditionalLicense: {},
isEligibleForGroupPlan: true,
isEligibleForPause: false,
isEligibleForDowngradeUpsell: false,
isMigratedFromRecurly: false,
},
}
export const annualActiveSubscriptionWithAddons: PaidSubscription = {
manager_ids: ['abc123'],
member_ids: [],
invited_emails: [],
groupPlan: false,
membersLimit: 0,
_id: 'def456',
admin_id: 'abc123',
teamInvites: [],
planCode: 'collaborator-annual',
plan: {
planCode: 'collaborator-annual',
name: 'Standard annual',
price_in_cents: 21900,
annual: true,
featureDescription: [],
canUseFlexibleLicensing: false,
},
payment: {
taxRate: 0,
billingDetailsLink: '/user/subscription/payment/billing-details',
accountManagementLink: '/user/subscription/payment/account-management',
additionalLicenses: 0,
totalLicenses: 0,
periodEnd,
currency: 'USD',
state: 'active',
trialEndsAt: null,
activeCoupons: [],
accountEmail: 'fake@example.com',
hasPastDueInvoice: false,
displayPrice: '$199.00',
planPrice: 199,
planOnlyDisplayPrice: '$199.00',
addOns: [],
addOnDisplayPricesWithoutAdditionalLicense: {
assistant: '$100.00',
},
isEligibleForGroupPlan: true,
isEligibleForPause: false,
isEligibleForDowngradeUpsell: false,
isMigratedFromRecurly: false,
},
addOns: [{ addOnCode: 'assistant', quantity: 1, unitAmountInCents: 10000 }],
}
export const annualActiveSubscriptionEuro: PaidSubscription = {
manager_ids: ['abc123'],
member_ids: [],
invited_emails: [],
groupPlan: false,
membersLimit: 0,
_id: 'def456',
admin_id: 'abc123',
teamInvites: [],
planCode: 'collaborator-annual',
plan: {
planCode: 'collaborator-annual',
name: 'Standard annual',
price_in_cents: 21900,
annual: true,
featureDescription: [],
canUseFlexibleLicensing: false,
},
payment: {
taxRate: 0.24,
billingDetailsLink: '/user/subscription/payment/billing-details',
accountManagementLink: '/user/subscription/payment/account-management',
additionalLicenses: 0,
totalLicenses: 0,
periodEnd,
currency: 'EUR',
state: 'active',
trialEndsAt: null,
activeCoupons: [],
accountEmail: 'fake@example.com',
hasPastDueInvoice: false,
displayPrice: '€221.96',
planPrice: 179,
planOnlyDisplayPrice: '€221.96',
addOns: [],
addOnDisplayPricesWithoutAdditionalLicense: {},
isEligibleForGroupPlan: true,
isEligibleForPause: true,
isEligibleForDowngradeUpsell: false,
isMigratedFromRecurly: false,
},
}
export const annualActiveSubscriptionPro: PaidSubscription = {
manager_ids: ['abc123'],
member_ids: [],
invited_emails: [],
groupPlan: false,
membersLimit: 0,
_id: 'def456',
admin_id: 'abc123',
teamInvites: [],
planCode: 'professional',
plan: {
planCode: 'professional',
name: 'Pro monthly',
price_in_cents: 4500,
featureDescription: [],
canUseFlexibleLicensing: false,
},
payment: {
taxRate: 0,
billingDetailsLink: '/user/subscription/payment/billing-details',
accountManagementLink: '/user/subscription/payment/account-management',
additionalLicenses: 0,
totalLicenses: 0,
periodEnd,
currency: 'USD',
state: 'active',
trialEndsAt: null,
activeCoupons: [],
accountEmail: 'fake@example.com',
hasPastDueInvoice: false,
displayPrice: '$42.00',
planPrice: 42,
planOnlyDisplayPrice: '$42.00',
addOns: [],
addOnDisplayPricesWithoutAdditionalLicense: {},
isEligibleForGroupPlan: true,
isEligibleForPause: true,
isEligibleForDowngradeUpsell: false,
isMigratedFromRecurly: false,
},
}
export const pastDueExpiredSubscription: PaidSubscription = {
manager_ids: ['abc123'],
member_ids: [],
invited_emails: [],
groupPlan: false,
membersLimit: 0,
_id: 'def456',
admin_id: 'abc123',
teamInvites: [],
planCode: 'collaborator-annual',
plan: {
planCode: 'collaborator-annual',
name: 'Standard annual',
price_in_cents: 21900,
annual: true,
featureDescription: [],
canUseFlexibleLicensing: false,
},
payment: {
taxRate: 0,
billingDetailsLink: '/user/subscription/payment/billing-details',
accountManagementLink: '/user/subscription/payment/account-management',
additionalLicenses: 0,
totalLicenses: 0,
periodEnd,
currency: 'USD',
state: 'expired',
trialEndsAt: null,
activeCoupons: [],
accountEmail: 'fake@example.com',
hasPastDueInvoice: true,
displayPrice: '$199.00',
planPrice: 199,
planOnlyDisplayPrice: '$199.00',
addOns: [],
addOnDisplayPricesWithoutAdditionalLicense: {},
isEligibleForGroupPlan: true,
isEligibleForPause: true,
isEligibleForDowngradeUpsell: false,
isMigratedFromRecurly: false,
},
}
export const canceledSubscription: PaidSubscription = {
manager_ids: ['abc123'],
member_ids: [],
invited_emails: [],
groupPlan: false,
membersLimit: 0,
_id: 'def456',
admin_id: 'abc123',
teamInvites: [],
planCode: 'collaborator-annual',
plan: {
planCode: 'collaborator-annual',
name: 'Standard annual',
price_in_cents: 21900,
annual: true,
featureDescription: [],
canUseFlexibleLicensing: false,
},
payment: {
taxRate: 0,
billingDetailsLink: '/user/subscription/payment/billing-details',
accountManagementLink: '/user/subscription/payment/account-management',
additionalLicenses: 0,
totalLicenses: 0,
periodEnd,
currency: 'USD',
state: 'canceled',
trialEndsAt: null,
activeCoupons: [],
accountEmail: 'fake@example.com',
hasPastDueInvoice: false,
displayPrice: '$199.00',
planPrice: 199,
planOnlyDisplayPrice: '$199.00',
addOns: [],
addOnDisplayPricesWithoutAdditionalLicense: {},
isEligibleForGroupPlan: true,
isEligibleForPause: true,
isEligibleForDowngradeUpsell: false,
isMigratedFromRecurly: false,
},
}
export const pendingAddOnChange: PaidSubscription = {
manager_ids: ['abc123'],
member_ids: [],
invited_emails: [],
groupPlan: false,
membersLimit: 0,
_id: 'add-on-change-123',
admin_id: 'abc123',
teamInvites: [],
planCode: 'collaborator-annual',
plan: {
planCode: 'collaborator-annual',
name: 'Standard annual',
price_in_cents: 21900,
annual: true,
featureDescription: [],
canUseFlexibleLicensing: false,
},
payment: {
taxRate: 0,
billingDetailsLink: '/user/subscription/payment/billing-details',
accountManagementLink: '/user/subscription/payment/account-management',
additionalLicenses: 0,
totalLicenses: 0,
periodEnd,
currency: 'USD',
state: 'active',
trialEndsAt: null,
activeCoupons: [],
accountEmail: 'fake@example.com',
hasPastDueInvoice: false,
displayPrice: '$199.00',
planPrice: 199,
planOnlyDisplayPrice: '$199.00',
addOns: [
{
code: 'AI',
quantity: 1,
unitPrice: 1000,
name: 'AI Add-on',
},
],
addOnDisplayPricesWithoutAdditionalLicense: {},
isEligibleForGroupPlan: true,
isEligibleForPause: false,
isEligibleForDowngradeUpsell: false,
isMigratedFromRecurly: false,
},
pendingPlan: {
planCode: 'collaborator-annual',
name: 'Standard annual',
price_in_cents: 21900,
annual: true,
featureDescription: [],
},
}
export const pendingSubscriptionChange: PaidSubscription = {
manager_ids: ['abc123'],
member_ids: [],
invited_emails: [],
groupPlan: false,
membersLimit: 0,
_id: 'def456',
admin_id: 'abc123',
teamInvites: [],
planCode: 'collaborator-annual',
plan: {
planCode: 'collaborator-annual',
name: 'Standard annual',
price_in_cents: 21900,
annual: true,
featureDescription: [],
canUseFlexibleLicensing: false,
},
payment: {
taxRate: 0,
billingDetailsLink: '/user/subscription/payment/billing-details',
accountManagementLink: '/user/subscription/payment/account-management',
additionalLicenses: 0,
totalLicenses: 0,
periodEnd,
currency: 'USD',
state: 'active',
trialEndsAt: null,
activeCoupons: [],
accountEmail: 'fake@example.com',
hasPastDueInvoice: false,
displayPrice: '$199.00',
planPrice: 199,
planOnlyDisplayPrice: '$199.00',
addOns: [],
addOnDisplayPricesWithoutAdditionalLicense: {},
isEligibleForGroupPlan: true,
isEligibleForPause: false,
isEligibleForDowngradeUpsell: false,
isMigratedFromRecurly: false,
},
pendingPlan: {
planCode: 'professional-annual',
name: 'Pro annual',
price_in_cents: 42900,
annual: true,
featureDescription: [],
},
}
export const groupActiveSubscription: GroupSubscription = {
manager_ids: ['abc123'],
member_ids: ['abc123'],
invited_emails: [],
groupPlan: true,
teamName: 'GAS',
membersLimit: 10,
_id: 'bcd567',
admin_id: 'abc123',
teamInvites: [],
planCode: 'group_collaborator_10_enterprise',
plan: {
planCode: 'group_collaborator_10_enterprise',
name: 'Standard group (10 licenses)',
hideFromUsers: true,
price_in_cents: 129000,
annual: true,
groupPlan: true,
membersLimit: 10,
membersLimitAddOn: 'additional-license',
canUseFlexibleLicensing: true,
},
payment: {
taxRate: 0,
billingDetailsLink: '/user/subscription/payment/billing-details',
accountManagementLink: '/user/subscription/payment/account-management',
additionalLicenses: 0,
totalLicenses: 10,
periodEnd,
currency: 'USD',
state: 'active',
trialEndsAt: null,
activeCoupons: [],
accountEmail: 'fake@example.com',
hasPastDueInvoice: false,
displayPrice: '$1290.00',
planPrice: 1290,
planOnlyDisplayPrice: '$1290.00',
addOns: [],
addOnDisplayPricesWithoutAdditionalLicense: {},
isEligibleForGroupPlan: true,
isEligibleForPause: false,
isEligibleForDowngradeUpsell: false,
isMigratedFromRecurly: false,
},
}
export const groupProfessionalActiveSubscription: GroupSubscription = {
manager_ids: ['abc123'],
member_ids: ['abc123'],
invited_emails: [],
groupPlan: true,
teamName: 'GAS',
membersLimit: 2,
_id: 'bcd567',
admin_id: 'abc123',
teamInvites: [],
planCode: 'group_professional_2_enterprise',
plan: {
planCode: 'group_professional_2_enterprise',
name: 'Pro group (2 licenses)',
hideFromUsers: true,
price_in_cents: 129000,
annual: true,
groupPlan: true,
membersLimit: 2,
membersLimitAddOn: 'additional-license',
canUseFlexibleLicensing: true,
},
payment: {
taxRate: 0,
billingDetailsLink: '/user/subscription/payment/billing-details',
accountManagementLink: '/user/subscription/payment/account-management',
additionalLicenses: 0,
totalLicenses: 10,
periodEnd,
currency: 'USD',
state: 'active',
trialEndsAt: null,
activeCoupons: [],
accountEmail: 'fake@example.com',
hasPastDueInvoice: false,
displayPrice: '$1290.00',
planPrice: 1290,
planOnlyDisplayPrice: '$1290.00',
addOns: [],
addOnDisplayPricesWithoutAdditionalLicense: {},
isEligibleForGroupPlan: true,
isEligibleForPause: false,
isEligibleForDowngradeUpsell: false,
isMigratedFromRecurly: false,
},
}
export const groupActiveSubscriptionWithPendingLicenseChange: GroupSubscription =
{
manager_ids: ['abc123'],
member_ids: ['abc123'],
invited_emails: [],
groupPlan: true,
teamName: 'GASWPLC',
membersLimit: 10,
_id: 'def456',
admin_id: 'abc123',
teamInvites: [],
planCode: 'group_collaborator_10_enterprise',
plan: {
planCode: 'group_collaborator_10_enterprise',
name: 'Standard group (10 licenses)',
hideFromUsers: true,
price_in_cents: 129000,
annual: true,
groupPlan: true,
membersLimit: 10,
membersLimitAddOn: 'additional-license',
canUseFlexibleLicensing: true,
},
payment: {
taxRate: 0,
billingDetailsLink: '/user/subscription/payment/billing-details',
accountManagementLink: '/user/subscription/payment/account-management',
additionalLicenses: 11,
totalLicenses: 21,
periodEnd,
currency: 'USD',
state: 'active',
trialEndsAt: null,
activeCoupons: [],
accountEmail: 'fake@example.com',
hasPastDueInvoice: false,
displayPrice: '$2967.00',
planPrice: 1290,
pendingAdditionalLicenses: 13,
pendingTotalLicenses: 23,
planOnlyDisplayPrice: '$2967.00',
addOns: [],
addOnDisplayPricesWithoutAdditionalLicense: {},
isEligibleForGroupPlan: true,
isEligibleForPause: false,
isEligibleForDowngradeUpsell: false,
isMigratedFromRecurly: false,
},
pendingPlan: {
planCode: 'group_collaborator_10_enterprise',
name: 'Standard group (10 licenses)',
hideFromUsers: true,
price_in_cents: 129000,
annual: true,
groupPlan: true,
membersLimit: 10,
membersLimitAddOn: 'additional-license',
},
}
export const trialSubscription: PaidSubscription = {
manager_ids: ['abc123'],
member_ids: [],
invited_emails: [],
groupPlan: false,
membersLimit: 0,
_id: 'def456',
admin_id: 'abc123',
teamInvites: [],
planCode: 'paid-personal_free_trial_7_days',
plan: {
planCode: 'paid-personal_free_trial_7_days',
name: 'Personal',
price_in_cents: 1500,
featureDescription: [],
hideFromUsers: true,
},
payment: {
taxRate: 0,
billingDetailsLink: '/user/subscription/payment/billing-details',
accountManagementLink: '/user/subscription/payment/account-management',
additionalLicenses: 0,
totalLicenses: 0,
periodEnd: sevenDaysFromTodayISO,
currency: 'USD',
state: 'active',
trialEndsAt: sevenDaysFromTodayISO,
activeCoupons: [],
accountEmail: 'fake@example.com',
hasPastDueInvoice: false,
displayPrice: '$14.00',
planPrice: 14,
planOnlyDisplayPrice: '$14.00',
addOns: [],
addOnDisplayPricesWithoutAdditionalLicense: {},
isEligibleForGroupPlan: true,
isEligibleForPause: false,
isEligibleForDowngradeUpsell: false,
isMigratedFromRecurly: false,
},
}
export const customSubscription: CustomSubscription = {
manager_ids: ['abc123'],
member_ids: [],
invited_emails: [],
groupPlan: false,
membersLimit: 0,
_id: 'def456',
admin_id: 'abc123',
teamInvites: [],
planCode: 'collaborator-annual',
plan: {
planCode: 'collaborator-annual',
name: 'Standard annual',
price_in_cents: 21900,
annual: true,
featureDescription: [],
},
customAccount: true,
}
export const trialCollaboratorSubscription: PaidSubscription = {
manager_ids: ['abc123'],
member_ids: [],
invited_emails: [],
groupPlan: false,
membersLimit: 0,
_id: 'def456',
admin_id: 'abc123',
teamInvites: [],
planCode: 'collaborator_free_trial_7_days',
plan: {
planCode: 'collaborator_free_trial_7_days',
name: 'Standard',
price_in_cents: 2300,
featureDescription: [],
hideFromUsers: true,
canUseFlexibleLicensing: false,
},
payment: {
taxRate: 0,
billingDetailsLink: '/user/subscription/payment/billing-details',
accountManagementLink: '/user/subscription/payment/account-management',
additionalLicenses: 0,
totalLicenses: 0,
periodEnd: sevenDaysFromTodayISO,
currency: 'USD',
state: 'active',
trialEndsAt: sevenDaysFromTodayISO,
activeCoupons: [],
accountEmail: 'foo@example.com',
hasPastDueInvoice: false,
displayPrice: '$21.00',
planPrice: 21,
planOnlyDisplayPrice: '$21.00',
addOns: [],
addOnDisplayPricesWithoutAdditionalLicense: {},
isEligibleForGroupPlan: true,
isEligibleForPause: true,
isEligibleForDowngradeUpsell: false,
isMigratedFromRecurly: false,
},
}
export const monthlyActiveCollaborator: PaidSubscription = {
manager_ids: ['abc123'],
member_ids: [],
invited_emails: [],
groupPlan: false,
membersLimit: 0,
_id: 'def456',
admin_id: 'abc123',
teamInvites: [],
planCode: 'collaborator',
plan: {
planCode: 'collaborator',
name: 'Standard',
price_in_cents: 212300900,
featureDescription: [],
canUseFlexibleLicensing: false,
},
payment: {
taxRate: 0,
billingDetailsLink: '/user/subscription/payment/billing-details',
accountManagementLink: '/user/subscription/payment/account-management',
additionalLicenses: 0,
totalLicenses: 0,
periodEnd,
currency: 'USD',
state: 'active',
trialEndsAt: null,
activeCoupons: [],
accountEmail: 'foo@example.com',
hasPastDueInvoice: false,
displayPrice: '$21.00',
planPrice: 21,
planOnlyDisplayPrice: '$21.00',
addOns: [],
addOnDisplayPricesWithoutAdditionalLicense: {},
isEligibleForGroupPlan: true,
isEligibleForPause: true,
isEligibleForDowngradeUpsell: true,
isMigratedFromRecurly: false,
},
}