Skip to content

Commit

Permalink
fix up billing json fixture
Browse files Browse the repository at this point in the history
  • Loading branch information
Bianca Yang committed Jan 26, 2024
1 parent a847753 commit aa17a81
Showing 1 changed file with 97 additions and 39 deletions.
136 changes: 97 additions & 39 deletions frontend/src/mocks/fixtures/_billing_v2.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ export const billingJson: BillingV2Type = {
deactivated: false,
has_active_subscription: true,
billing_period: {
current_period_start: dayjs('2024-01-25T18:52:15Z'),
current_period_end: dayjs('2024-02-25T18:52:15Z'),
current_period_start: dayjs('2023-05-01T23:59:59Z'),
current_period_end: dayjs('2023-06-01T23:59:59Z'),
interval: 'month',
},
current_total_amount_usd: '0.00',
current_total_amount_usd_after_discount: '0.00',
current_total_amount_usd: '403.07',
current_total_amount_usd_after_discount: '403.07',
products: [
{
name: 'Product analytics',
Expand Down Expand Up @@ -285,27 +285,27 @@ export const billingJson: BillingV2Type = {
unit_amount_usd: '0',
up_to: 1000000,
current_amount_usd: '0.00',
current_usage: 0,
projected_usage: null,
projected_amount_usd: null,
current_usage: 882128,
projected_usage: 1000000,
projected_amount_usd: '0.00',
},
{
flat_amount_usd: '0',
unit_amount_usd: '0.00031',
up_to: 2000000,
current_amount_usd: '0.00',
current_usage: 0,
projected_usage: null,
projected_amount_usd: null,
projected_usage: 1000000,
projected_amount_usd: '310.00',
},
{
flat_amount_usd: '0',
unit_amount_usd: '0.00013',
up_to: 15000000,
current_amount_usd: '0.00',
current_usage: 0,
projected_usage: null,
projected_amount_usd: null,
projected_usage: 5000000,
projected_amount_usd: '650.00',
},
{
flat_amount_usd: '0',
Expand Down Expand Up @@ -348,12 +348,12 @@ export const billingJson: BillingV2Type = {
unit_amount_usd: null,
current_amount_usd_before_addons: '0.00',
current_amount_usd: '0.00',
current_usage: 1379,
usage_limit: null,
current_usage: 882128,
usage_limit: 3624548,
has_exceeded_limit: false,
percentage_usage: 0,
projected_usage: 0,
projected_amount_usd: '0.00',
percentage_usage: 0.4423939206,
projected_usage: 7000000,
projected_amount_usd: '960.00',
unit: 'event',
addons: [
{
Expand All @@ -371,27 +371,27 @@ export const billingJson: BillingV2Type = {
unit_amount_usd: '0',
up_to: 1000000,
current_amount_usd: '0.00',
current_usage: 0,
projected_usage: null,
projected_amount_usd: null,
current_usage: 882128,
projected_usage: 1000000,
projected_amount_usd: '0.00',
},
{
flat_amount_usd: '0',
unit_amount_usd: '0.0000708',
up_to: 2000000,
current_amount_usd: '0.00',
current_usage: 0,
projected_usage: null,
projected_amount_usd: null,
projected_usage: 1000000,
projected_amount_usd: '70.8',
},
{
flat_amount_usd: '0',
unit_amount_usd: '0.00003',
up_to: 15000000,
current_amount_usd: '0.00',
current_usage: 0,
projected_usage: null,
projected_amount_usd: null,
projected_usage: 1910636,
projected_amount_usd: '57.32',
},
{
flat_amount_usd: '0',
Expand Down Expand Up @@ -432,13 +432,13 @@ export const billingJson: BillingV2Type = {
],
tiered: true,
included_with_main_product: false,
subscribed: false,
subscribed: true,
unit: 'event',
unit_amount_usd: null,
current_amount_usd: null,
current_usage: 0,
projected_usage: 0,
projected_amount_usd: '0.00',
current_usage: 882128,
projected_usage: 3910636,
projected_amount_usd: '128.12',
plans: [
{
plan_key: 'addon-20230509',
Expand Down Expand Up @@ -908,7 +908,7 @@ export const billingJson: BillingV2Type = {
screenshot_url: null,
icon_key: 'IconRewindPlay',
docs_url: 'https://posthog.com/docs/session-replay',
subscribed: false,
subscribed: true,
plans: [
{
plan_key: 'free-20231218',
Expand Down Expand Up @@ -1042,7 +1042,7 @@ export const billingJson: BillingV2Type = {
},
],
tiers: null,
current_plan: true,
current_plan: false,
included_if: null,
},
{
Expand Down Expand Up @@ -1191,7 +1191,7 @@ export const billingJson: BillingV2Type = {
up_to: 5000,
current_amount_usd: '0.00',
current_usage: 0,
projected_usage: null,
projected_usage: 0,
projected_amount_usd: null,
},
{
Expand Down Expand Up @@ -1240,23 +1240,78 @@ export const billingJson: BillingV2Type = {
projected_amount_usd: null,
},
],
current_plan: false,
current_plan: true,
included_if: null,
},
],
type: 'session_replay',
free_allocation: 5000,
tiers: null,
tiers: [
{
flat_amount_usd: '0',
unit_amount_usd: '0',
up_to: 5000,
current_amount_usd: '0.00',
current_usage: 5000,
projected_usage: 5000,
projected_amount_usd: '0.00',
},
{
flat_amount_usd: '0',
unit_amount_usd: '0.04',
up_to: 15000,
current_amount_usd: '0.00',
current_usage: 10000,
projected_usage: 10000,
projected_amount_usd: '400.00',
},
{
flat_amount_usd: '0',
unit_amount_usd: '0.003',
up_to: 50000,
current_amount_usd: '0.00',
current_usage: 1022,
projected_usage: 35000,
projected_amount_usd: '105',
},
{
flat_amount_usd: '0',
unit_amount_usd: '0.0027',
up_to: 150000,
current_amount_usd: '0.00',
current_usage: 0,
projected_usage: 100000,
projected_amount_usd: '270.00',
},
{
flat_amount_usd: '0',
unit_amount_usd: '0.0025',
up_to: 500000,
current_amount_usd: '0.00',
current_usage: 0,
projected_usage: null,
projected_amount_usd: null,
},
{
flat_amount_usd: '0',
unit_amount_usd: '0.002',
up_to: null,
current_amount_usd: '0.00',
current_usage: 0,
projected_usage: null,
projected_amount_usd: null,
},
],
tiered: true,
unit_amount_usd: null,
current_amount_usd_before_addons: null,
current_amount_usd: null,
current_usage: 1,
usage_limit: 5000,
current_amount_usd: '403.07',
current_usage: 16022,
usage_limit: 100000,
has_exceeded_limit: false,
percentage_usage: 0.0002,
projected_usage: 0,
projected_amount_usd: null,
percentage_usage: 0.16022,
projected_usage: 50000,
projected_amount_usd: '775.00',
unit: 'recording',
addons: [],
contact_support: false,
Expand Down Expand Up @@ -2921,5 +2976,8 @@ export const billingJson: BillingV2Type = {
],
},
],
custom_limits_usd: {},
custom_limits_usd: {
session_replay: '700',
product_analytics: '550',
},
}

0 comments on commit aa17a81

Please sign in to comment.