"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""

from __future__ import annotations
from polar_sdk.types import BaseModel
from typing import Union
from typing_extensions import TypeAliasType, TypedDict


MetricsTotalsOrdersTypedDict = TypeAliasType(
    "MetricsTotalsOrdersTypedDict", Union[int, float]
)


MetricsTotalsOrders = TypeAliasType("MetricsTotalsOrders", Union[int, float])


MetricsTotalsRevenueTypedDict = TypeAliasType(
    "MetricsTotalsRevenueTypedDict", Union[int, float]
)


MetricsTotalsRevenue = TypeAliasType("MetricsTotalsRevenue", Union[int, float])


MetricsTotalsNetRevenueTypedDict = TypeAliasType(
    "MetricsTotalsNetRevenueTypedDict", Union[int, float]
)


MetricsTotalsNetRevenue = TypeAliasType("MetricsTotalsNetRevenue", Union[int, float])


MetricsTotalsCumulativeRevenueTypedDict = TypeAliasType(
    "MetricsTotalsCumulativeRevenueTypedDict", Union[int, float]
)


MetricsTotalsCumulativeRevenue = TypeAliasType(
    "MetricsTotalsCumulativeRevenue", Union[int, float]
)


MetricsTotalsNetCumulativeRevenueTypedDict = TypeAliasType(
    "MetricsTotalsNetCumulativeRevenueTypedDict", Union[int, float]
)


MetricsTotalsNetCumulativeRevenue = TypeAliasType(
    "MetricsTotalsNetCumulativeRevenue", Union[int, float]
)


MetricsTotalsAverageOrderValueTypedDict = TypeAliasType(
    "MetricsTotalsAverageOrderValueTypedDict", Union[int, float]
)


MetricsTotalsAverageOrderValue = TypeAliasType(
    "MetricsTotalsAverageOrderValue", Union[int, float]
)


MetricsTotalsNetAverageOrderValueTypedDict = TypeAliasType(
    "MetricsTotalsNetAverageOrderValueTypedDict", Union[int, float]
)


MetricsTotalsNetAverageOrderValue = TypeAliasType(
    "MetricsTotalsNetAverageOrderValue", Union[int, float]
)


MetricsTotalsOneTimeProductsTypedDict = TypeAliasType(
    "MetricsTotalsOneTimeProductsTypedDict", Union[int, float]
)


MetricsTotalsOneTimeProducts = TypeAliasType(
    "MetricsTotalsOneTimeProducts", Union[int, float]
)


MetricsTotalsOneTimeProductsRevenueTypedDict = TypeAliasType(
    "MetricsTotalsOneTimeProductsRevenueTypedDict", Union[int, float]
)


MetricsTotalsOneTimeProductsRevenue = TypeAliasType(
    "MetricsTotalsOneTimeProductsRevenue", Union[int, float]
)


MetricsTotalsOneTimeProductsNetRevenueTypedDict = TypeAliasType(
    "MetricsTotalsOneTimeProductsNetRevenueTypedDict", Union[int, float]
)


MetricsTotalsOneTimeProductsNetRevenue = TypeAliasType(
    "MetricsTotalsOneTimeProductsNetRevenue", Union[int, float]
)


MetricsTotalsNewSubscriptionsTypedDict = TypeAliasType(
    "MetricsTotalsNewSubscriptionsTypedDict", Union[int, float]
)


MetricsTotalsNewSubscriptions = TypeAliasType(
    "MetricsTotalsNewSubscriptions", Union[int, float]
)


MetricsTotalsNewSubscriptionsRevenueTypedDict = TypeAliasType(
    "MetricsTotalsNewSubscriptionsRevenueTypedDict", Union[int, float]
)


MetricsTotalsNewSubscriptionsRevenue = TypeAliasType(
    "MetricsTotalsNewSubscriptionsRevenue", Union[int, float]
)


MetricsTotalsNewSubscriptionsNetRevenueTypedDict = TypeAliasType(
    "MetricsTotalsNewSubscriptionsNetRevenueTypedDict", Union[int, float]
)


MetricsTotalsNewSubscriptionsNetRevenue = TypeAliasType(
    "MetricsTotalsNewSubscriptionsNetRevenue", Union[int, float]
)


MetricsTotalsRenewedSubscriptionsTypedDict = TypeAliasType(
    "MetricsTotalsRenewedSubscriptionsTypedDict", Union[int, float]
)


MetricsTotalsRenewedSubscriptions = TypeAliasType(
    "MetricsTotalsRenewedSubscriptions", Union[int, float]
)


MetricsTotalsRenewedSubscriptionsRevenueTypedDict = TypeAliasType(
    "MetricsTotalsRenewedSubscriptionsRevenueTypedDict", Union[int, float]
)


MetricsTotalsRenewedSubscriptionsRevenue = TypeAliasType(
    "MetricsTotalsRenewedSubscriptionsRevenue", Union[int, float]
)


MetricsTotalsRenewedSubscriptionsNetRevenueTypedDict = TypeAliasType(
    "MetricsTotalsRenewedSubscriptionsNetRevenueTypedDict", Union[int, float]
)


MetricsTotalsRenewedSubscriptionsNetRevenue = TypeAliasType(
    "MetricsTotalsRenewedSubscriptionsNetRevenue", Union[int, float]
)


MetricsTotalsActiveSubscriptionsTypedDict = TypeAliasType(
    "MetricsTotalsActiveSubscriptionsTypedDict", Union[int, float]
)


MetricsTotalsActiveSubscriptions = TypeAliasType(
    "MetricsTotalsActiveSubscriptions", Union[int, float]
)


MetricsTotalsMonthlyRecurringRevenueTypedDict = TypeAliasType(
    "MetricsTotalsMonthlyRecurringRevenueTypedDict", Union[int, float]
)


MetricsTotalsMonthlyRecurringRevenue = TypeAliasType(
    "MetricsTotalsMonthlyRecurringRevenue", Union[int, float]
)


MetricsTotalsCommittedMonthlyRecurringRevenueTypedDict = TypeAliasType(
    "MetricsTotalsCommittedMonthlyRecurringRevenueTypedDict", Union[int, float]
)


MetricsTotalsCommittedMonthlyRecurringRevenue = TypeAliasType(
    "MetricsTotalsCommittedMonthlyRecurringRevenue", Union[int, float]
)


MetricsTotalsCheckoutsTypedDict = TypeAliasType(
    "MetricsTotalsCheckoutsTypedDict", Union[int, float]
)


MetricsTotalsCheckouts = TypeAliasType("MetricsTotalsCheckouts", Union[int, float])


MetricsTotalsSucceededCheckoutsTypedDict = TypeAliasType(
    "MetricsTotalsSucceededCheckoutsTypedDict", Union[int, float]
)


MetricsTotalsSucceededCheckouts = TypeAliasType(
    "MetricsTotalsSucceededCheckouts", Union[int, float]
)


MetricsTotalsCheckoutsConversionTypedDict = TypeAliasType(
    "MetricsTotalsCheckoutsConversionTypedDict", Union[int, float]
)


MetricsTotalsCheckoutsConversion = TypeAliasType(
    "MetricsTotalsCheckoutsConversion", Union[int, float]
)


MetricsTotalsCanceledSubscriptionsTypedDict = TypeAliasType(
    "MetricsTotalsCanceledSubscriptionsTypedDict", Union[int, float]
)


MetricsTotalsCanceledSubscriptions = TypeAliasType(
    "MetricsTotalsCanceledSubscriptions", Union[int, float]
)


MetricsTotalsCanceledSubscriptionsCustomerServiceTypedDict = TypeAliasType(
    "MetricsTotalsCanceledSubscriptionsCustomerServiceTypedDict", Union[int, float]
)


MetricsTotalsCanceledSubscriptionsCustomerService = TypeAliasType(
    "MetricsTotalsCanceledSubscriptionsCustomerService", Union[int, float]
)


MetricsTotalsCanceledSubscriptionsLowQualityTypedDict = TypeAliasType(
    "MetricsTotalsCanceledSubscriptionsLowQualityTypedDict", Union[int, float]
)


MetricsTotalsCanceledSubscriptionsLowQuality = TypeAliasType(
    "MetricsTotalsCanceledSubscriptionsLowQuality", Union[int, float]
)


MetricsTotalsCanceledSubscriptionsMissingFeaturesTypedDict = TypeAliasType(
    "MetricsTotalsCanceledSubscriptionsMissingFeaturesTypedDict", Union[int, float]
)


MetricsTotalsCanceledSubscriptionsMissingFeatures = TypeAliasType(
    "MetricsTotalsCanceledSubscriptionsMissingFeatures", Union[int, float]
)


MetricsTotalsCanceledSubscriptionsSwitchedServiceTypedDict = TypeAliasType(
    "MetricsTotalsCanceledSubscriptionsSwitchedServiceTypedDict", Union[int, float]
)


MetricsTotalsCanceledSubscriptionsSwitchedService = TypeAliasType(
    "MetricsTotalsCanceledSubscriptionsSwitchedService", Union[int, float]
)


MetricsTotalsCanceledSubscriptionsTooComplexTypedDict = TypeAliasType(
    "MetricsTotalsCanceledSubscriptionsTooComplexTypedDict", Union[int, float]
)


MetricsTotalsCanceledSubscriptionsTooComplex = TypeAliasType(
    "MetricsTotalsCanceledSubscriptionsTooComplex", Union[int, float]
)


MetricsTotalsCanceledSubscriptionsTooExpensiveTypedDict = TypeAliasType(
    "MetricsTotalsCanceledSubscriptionsTooExpensiveTypedDict", Union[int, float]
)


MetricsTotalsCanceledSubscriptionsTooExpensive = TypeAliasType(
    "MetricsTotalsCanceledSubscriptionsTooExpensive", Union[int, float]
)


MetricsTotalsCanceledSubscriptionsUnusedTypedDict = TypeAliasType(
    "MetricsTotalsCanceledSubscriptionsUnusedTypedDict", Union[int, float]
)


MetricsTotalsCanceledSubscriptionsUnused = TypeAliasType(
    "MetricsTotalsCanceledSubscriptionsUnused", Union[int, float]
)


MetricsTotalsCanceledSubscriptionsOtherTypedDict = TypeAliasType(
    "MetricsTotalsCanceledSubscriptionsOtherTypedDict", Union[int, float]
)


MetricsTotalsCanceledSubscriptionsOther = TypeAliasType(
    "MetricsTotalsCanceledSubscriptionsOther", Union[int, float]
)


class MetricsTotalsTypedDict(TypedDict):
    orders: MetricsTotalsOrdersTypedDict
    revenue: MetricsTotalsRevenueTypedDict
    net_revenue: MetricsTotalsNetRevenueTypedDict
    cumulative_revenue: MetricsTotalsCumulativeRevenueTypedDict
    net_cumulative_revenue: MetricsTotalsNetCumulativeRevenueTypedDict
    average_order_value: MetricsTotalsAverageOrderValueTypedDict
    net_average_order_value: MetricsTotalsNetAverageOrderValueTypedDict
    one_time_products: MetricsTotalsOneTimeProductsTypedDict
    one_time_products_revenue: MetricsTotalsOneTimeProductsRevenueTypedDict
    one_time_products_net_revenue: MetricsTotalsOneTimeProductsNetRevenueTypedDict
    new_subscriptions: MetricsTotalsNewSubscriptionsTypedDict
    new_subscriptions_revenue: MetricsTotalsNewSubscriptionsRevenueTypedDict
    new_subscriptions_net_revenue: MetricsTotalsNewSubscriptionsNetRevenueTypedDict
    renewed_subscriptions: MetricsTotalsRenewedSubscriptionsTypedDict
    renewed_subscriptions_revenue: MetricsTotalsRenewedSubscriptionsRevenueTypedDict
    renewed_subscriptions_net_revenue: (
        MetricsTotalsRenewedSubscriptionsNetRevenueTypedDict
    )
    active_subscriptions: MetricsTotalsActiveSubscriptionsTypedDict
    monthly_recurring_revenue: MetricsTotalsMonthlyRecurringRevenueTypedDict
    committed_monthly_recurring_revenue: (
        MetricsTotalsCommittedMonthlyRecurringRevenueTypedDict
    )
    checkouts: MetricsTotalsCheckoutsTypedDict
    succeeded_checkouts: MetricsTotalsSucceededCheckoutsTypedDict
    checkouts_conversion: MetricsTotalsCheckoutsConversionTypedDict
    canceled_subscriptions: MetricsTotalsCanceledSubscriptionsTypedDict
    canceled_subscriptions_customer_service: (
        MetricsTotalsCanceledSubscriptionsCustomerServiceTypedDict
    )
    canceled_subscriptions_low_quality: (
        MetricsTotalsCanceledSubscriptionsLowQualityTypedDict
    )
    canceled_subscriptions_missing_features: (
        MetricsTotalsCanceledSubscriptionsMissingFeaturesTypedDict
    )
    canceled_subscriptions_switched_service: (
        MetricsTotalsCanceledSubscriptionsSwitchedServiceTypedDict
    )
    canceled_subscriptions_too_complex: (
        MetricsTotalsCanceledSubscriptionsTooComplexTypedDict
    )
    canceled_subscriptions_too_expensive: (
        MetricsTotalsCanceledSubscriptionsTooExpensiveTypedDict
    )
    canceled_subscriptions_unused: MetricsTotalsCanceledSubscriptionsUnusedTypedDict
    canceled_subscriptions_other: MetricsTotalsCanceledSubscriptionsOtherTypedDict


class MetricsTotals(BaseModel):
    orders: MetricsTotalsOrders

    revenue: MetricsTotalsRevenue

    net_revenue: MetricsTotalsNetRevenue

    cumulative_revenue: MetricsTotalsCumulativeRevenue

    net_cumulative_revenue: MetricsTotalsNetCumulativeRevenue

    average_order_value: MetricsTotalsAverageOrderValue

    net_average_order_value: MetricsTotalsNetAverageOrderValue

    one_time_products: MetricsTotalsOneTimeProducts

    one_time_products_revenue: MetricsTotalsOneTimeProductsRevenue

    one_time_products_net_revenue: MetricsTotalsOneTimeProductsNetRevenue

    new_subscriptions: MetricsTotalsNewSubscriptions

    new_subscriptions_revenue: MetricsTotalsNewSubscriptionsRevenue

    new_subscriptions_net_revenue: MetricsTotalsNewSubscriptionsNetRevenue

    renewed_subscriptions: MetricsTotalsRenewedSubscriptions

    renewed_subscriptions_revenue: MetricsTotalsRenewedSubscriptionsRevenue

    renewed_subscriptions_net_revenue: MetricsTotalsRenewedSubscriptionsNetRevenue

    active_subscriptions: MetricsTotalsActiveSubscriptions

    monthly_recurring_revenue: MetricsTotalsMonthlyRecurringRevenue

    committed_monthly_recurring_revenue: MetricsTotalsCommittedMonthlyRecurringRevenue

    checkouts: MetricsTotalsCheckouts

    succeeded_checkouts: MetricsTotalsSucceededCheckouts

    checkouts_conversion: MetricsTotalsCheckoutsConversion

    canceled_subscriptions: MetricsTotalsCanceledSubscriptions

    canceled_subscriptions_customer_service: (
        MetricsTotalsCanceledSubscriptionsCustomerService
    )

    canceled_subscriptions_low_quality: MetricsTotalsCanceledSubscriptionsLowQuality

    canceled_subscriptions_missing_features: (
        MetricsTotalsCanceledSubscriptionsMissingFeatures
    )

    canceled_subscriptions_switched_service: (
        MetricsTotalsCanceledSubscriptionsSwitchedService
    )

    canceled_subscriptions_too_complex: MetricsTotalsCanceledSubscriptionsTooComplex

    canceled_subscriptions_too_expensive: MetricsTotalsCanceledSubscriptionsTooExpensive

    canceled_subscriptions_unused: MetricsTotalsCanceledSubscriptionsUnused

    canceled_subscriptions_other: MetricsTotalsCanceledSubscriptionsOther
