Some checks failed
App Prod-Parity E2E Dispatch / dispatch (push) Failing after 10s
CD Storybook UI / build (push) Failing after 3m25s
CD Storybook UI / dispatch (push) Has been skipped
CD deploy main / website-changed-files (push) Successful in 18m8s
CI Agent Skills / changed-files-check (push) Successful in 18m9s
CI Create App E2E minimal / changed-files-check (push) Successful in 24s
CI Create App / changed-files-check (push) Successful in 26s
CI Docs / changed-files-check (push) Successful in 26s
CI Emails / changed-files-check (push) Successful in 28s
CI Example App Hello World / changed-files-check (push) Successful in 23s
CI Front / changed-files-check (push) Has been skipped
CI Example App Postcard / changed-files-check (push) Successful in 27s
CI UI / changed-files-check (push) Has been skipped
CI Utils Test / changed-files-check (push) Successful in 45s
CI Twenty Apps / discover (push) Successful in 1m3s
CD deploy main / deploy-main (push) Failing after 3s
CI Agent Skills / agent-skills-validate (push) Has been skipped
CI Create App / create-app-test (lint) (push) Has been skipped
CI Emails / emails-test (push) Has been skipped
CI Front / front-task (lingui:compile) (push) Has been skipped
CI Front / front-task (lint) (push) Has been skipped
CI Example App Postcard / example-app-postcard (push) Has been skipped
CI UI / ui-task (lint) (push) Has been skipped
CI UI / ui-task (pack-size) (push) Has been skipped
CI UI / ui-task (size) (push) Has been skipped
CI UI / ui-task (test) (push) Has been skipped
CI UI / ui-task (typecheck) (push) Has been skipped
CI Utils Test / utils-test (push) Has been skipped
CI Twenty Apps / ${{ matrix.app.name }} (push) Has been skipped
CI Emails / ci-emails-status-check (push) Successful in 2s
CI Example App Hello World / ci-example-app-hello-world-status-check (push) Successful in 2s
CI Example App Postcard / ci-example-app-postcard-status-check (push) Successful in 3s
CI UI / ui-sb-test (push) Has been skipped
CI Utils Test / ci-utils-test-status-check (push) Successful in 2s
CI Twenty Apps / ci-twenty-apps-status-check (push) Successful in 2s
CI UI / ci-ui-status-check (push) Successful in 2s
CI Desktop / desktop (push) Failing after 1m8s
Push docs to Crowdin / Push documentation to Crowdin (push) Failing after 55s
Push translations to Crowdin / Extract and upload translations (push) Failing after 5s
Push website translations to Crowdin / Extract and upload website translations (push) Failing after 5s
CI Create App / create-app-test (test) (push) Has been skipped
CI Create App / create-app-test (typecheck) (push) Has been skipped
CI Docs / docs-lint (push) Has been skipped
CI Example App Hello World / example-app-hello-world (push) Has been skipped
CI Front / front-task (lingui:extract) (push) Has been skipped
CI Front / front-task (test) (push) Has been skipped
CI Front / front-task (typecheck) (push) Has been skipped
CI UI / ui-sb-build (push) Failing after 1m32s
CI Twenty Apps / ${{ matrix.app.name }} (${{ matrix.server-source }}) (push) Has been skipped
CI Agent Skills / agent-skills-publish (push) Has been skipped
CI Create App / ci-create-app-status-check (push) Successful in 2s
CI Agent Skills / agent-skills-remote-source (push) Has been skipped
CI Create App E2E minimal / create-app-e2e-minimal (push) Has been cancelled
CI E2E Main / e2e-test (push) Has been cancelled
CI Front / front-sb-build (push) Has been cancelled
CI Front / front-build (push) Has been cancelled
CI Create App E2E minimal / ci-create-app-e2e-minimal-status-check (push) Has been cancelled
CI E2E Main / ci-e2e-main-status-check (push) Has been cancelled
CI E2E Main / notify-main-ci-failure (push) Has been cancelled
CI E2E Main / qa-scout-comment (push) Has been cancelled
CI Front / front-sb-test (push) Has been cancelled
CI Front / front-sb-screenshots (push) Has been cancelled
CI Front / ci-front-status-check (push) Has been cancelled
DPA Sub-Processor Sync / sync-subprocessors (push) Failing after 3s
AI Catalog Sync / sync-catalog (push) Failing after 2s
134 lines
3.4 KiB
TypeScript
134 lines
3.4 KiB
TypeScript
import type Stripe from 'stripe';
|
|
|
|
export const createMockStripeSubscriptionCreatedData = (
|
|
overrides = {},
|
|
): Stripe.CustomerSubscriptionCreatedEvent.Data => ({
|
|
object: {
|
|
object: 'subscription',
|
|
id: 'sub_default',
|
|
customer: 'cus_default1',
|
|
customer_account: null,
|
|
status: 'active',
|
|
items: {
|
|
data: [
|
|
{
|
|
plan: {
|
|
id: 'plan_default',
|
|
object: 'plan',
|
|
active: true,
|
|
amount_decimal: '0',
|
|
billing_scheme: 'per_unit',
|
|
interval_count: 1,
|
|
livemode: false,
|
|
nickname: null,
|
|
tiers_mode: null,
|
|
transform_usage: null,
|
|
trial_period_days: null,
|
|
interval: 'month',
|
|
currency: 'usd',
|
|
amount: 0,
|
|
created: 1672531200,
|
|
product: 'prod_default',
|
|
usage_type: 'licensed',
|
|
metadata: {},
|
|
meter: null,
|
|
},
|
|
id: '',
|
|
object: 'subscription_item',
|
|
billing_thresholds: null,
|
|
created: 0,
|
|
current_period_end: 1672531200,
|
|
current_period_start: 1672531200,
|
|
discounts: [],
|
|
metadata: {},
|
|
price: {
|
|
id: 'price_default',
|
|
object: 'price',
|
|
active: true,
|
|
billing_scheme: 'per_unit',
|
|
created: 1672531200,
|
|
currency: 'usd',
|
|
custom_unit_amount: null,
|
|
livemode: false,
|
|
lookup_key: null,
|
|
metadata: {},
|
|
nickname: null,
|
|
product: 'prod_default',
|
|
recurring: {
|
|
interval: 'month',
|
|
interval_count: 1,
|
|
meter: null,
|
|
trial_period_days: null,
|
|
usage_type: 'licensed',
|
|
},
|
|
tax_behavior: null,
|
|
tiers_mode: null,
|
|
transform_quantity: null,
|
|
type: 'recurring',
|
|
unit_amount: 1000,
|
|
unit_amount_decimal: '1000',
|
|
},
|
|
subscription: '',
|
|
tax_rates: null,
|
|
},
|
|
],
|
|
object: 'list',
|
|
has_more: false,
|
|
url: '',
|
|
},
|
|
cancel_at_period_end: false,
|
|
currency: 'usd',
|
|
metadata: { workspaceId: '3b8e6458-5fc1-4e63-8563-008ccddaa6db' },
|
|
trial_end: null,
|
|
trial_start: null,
|
|
canceled_at: null,
|
|
...overrides,
|
|
application: null,
|
|
application_fee_percent: null,
|
|
automatic_tax: {
|
|
disabled_reason: null,
|
|
enabled: true,
|
|
liability: {
|
|
type: 'self',
|
|
},
|
|
},
|
|
billing_cycle_anchor: 0,
|
|
billing_cycle_anchor_config: null,
|
|
billing_mode: {
|
|
type: 'flexible',
|
|
flexible: {},
|
|
},
|
|
billing_thresholds: null,
|
|
cancel_at: null,
|
|
cancellation_details: null,
|
|
collection_method: 'charge_automatically',
|
|
created: 0,
|
|
days_until_due: null,
|
|
default_payment_method: null,
|
|
default_source: null,
|
|
description: null,
|
|
discounts: [],
|
|
ended_at: null,
|
|
invoice_settings: {
|
|
account_tax_ids: null,
|
|
issuer: {
|
|
type: 'self',
|
|
},
|
|
},
|
|
latest_invoice: null,
|
|
livemode: false,
|
|
next_pending_invoice_item_invoice: null,
|
|
on_behalf_of: null,
|
|
pause_collection: null,
|
|
payment_settings: null,
|
|
pending_invoice_item_interval: null,
|
|
pending_setup_intent: null,
|
|
pending_update: null,
|
|
schedule: null,
|
|
start_date: 0,
|
|
test_clock: null,
|
|
transfer_data: null,
|
|
trial_settings: null,
|
|
},
|
|
});
|