Files
twenty/packages/twenty-server/test/integration/billing/utils/create-mock-stripe-price-created-data.util.ts
T
Félix MalfaitandGitHub 8b4b9ef8da Change type import rule (#13751)
Forcing "type" to be explicit, works best will rollup on the frontend to
exclude depdendencies
2025-08-08 01:27:05 +02:00

35 lines
794 B
TypeScript

import type Stripe from 'stripe';
export const createMockStripePriceCreatedData = (
overrides = {},
): Stripe.PriceCreatedEvent.Data => ({
object: {
id: 'price_1Q',
object: 'price',
active: true,
billing_scheme: 'per_unit',
created: 1733734326,
currency: 'usd',
custom_unit_amount: null,
livemode: false,
lookup_key: null,
metadata: {},
nickname: null,
product: 'prod_RLN',
recurring: {
aggregate_usage: null,
interval: 'month',
interval_count: 1,
meter: null,
trial_period_days: null,
usage_type: 'licensed',
},
tax_behavior: 'unspecified',
tiers_mode: null,
transform_quantity: null,
type: 'recurring',
unit_amount: 0,
unit_amount_decimal: '0',
...overrides,
},
});