> ## Documentation Index
> Fetch the complete documentation index at: https://docs.flexprice.io/llms.txt
> Use this file to discover all available pages before exploring further.

# invoice.update.finalized

> Fired when an invoice is finalized and locked for payment. `invoice.line_items` omits line items with neither an amount nor a quantity (period fan-out emits one per window whether or not usage landed in it), and `invoice.subscription.plan.prices` carries only the prices this invoice references, not the plan's full catalogue. Doc-only for parsing.



## OpenAPI

````yaml /api-reference/openapi.json post /webhook-events/invoice.update.finalized
openapi: 3.0.1
info:
  title: Flexprice API
  description: Flexprice API Service
  contact:
    name: API Support
  license:
    name: AGPL-3.0
    url: https://www.gnu.org/licenses/agpl-3.0.html
  version: '1.0'
servers:
  - url: https://us.api.flexprice.io/v1
    description: US Region
  - url: https://api.cloud.flexprice.io/v1
    description: India Region
security: []
paths:
  /webhook-events/invoice.update.finalized:
    post:
      tags:
        - Webhook Events
      summary: invoice.update.finalized
      description: >-
        Fired when an invoice is finalized and locked for payment.
        `invoice.line_items` omits line items with neither an amount nor a
        quantity (period fan-out emits one per window whether or not usage
        landed in it), and `invoice.subscription.plan.prices` carries only the
        prices this invoice references, not the plan's full catalogue. Doc-only
        for parsing.
      responses:
        '200':
          description: Webhook payload
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/webhookDto.InvoiceWebhookPayload'
components:
  schemas:
    webhookDto.InvoiceWebhookPayload:
      type: object
      properties:
        event_type:
          $ref: '#/components/schemas/types.WebhookEventName'
        invoice:
          $ref: '#/components/schemas/webhookDto.Invoice'
    types.WebhookEventName:
      type: string
      enum:
        - subscription.created
        - subscription.draft.created
        - subscription.activated
        - subscription.updated
        - subscription.paused
        - subscription.cancelled
        - subscription.resumed
        - subscription.plan_changed
        - subscription.phase.created
        - subscription.phase.updated
        - subscription.phase.deleted
        - feature.created
        - feature.updated
        - feature.deleted
        - feature.wallet_balance.alert
        - entitlement.created
        - entitlement.updated
        - entitlement.deleted
        - wallet.created
        - wallet.updated
        - wallet.terminated
        - wallet.transaction.created
        - wallet.transaction.updated
        - payment.created
        - payment.updated
        - payment.failed
        - payment.success
        - payment.pending
        - refund.created
        - refund.succeeded
        - refund.failed
        - customer.created
        - customer.updated
        - customer.deleted
        - invoice.update.finalized
        - invoice.update.payment
        - invoice.update.voided
        - invoice.update
        - invoice.payment.overdue
        - wallet.credit_balance.dropped
        - wallet.credit_balance.recovered
        - wallet.ongoing_balance.dropped
        - wallet.ongoing_balance.recovered
        - wallet.ongoing_balance.updated
        - subscription.spend.threshold_reached
        - subscription.spend.threshold_recovered
        - subscription.line_item_spend.threshold_reached
        - subscription.line_item_spend.threshold_recovered
        - subscription.group_spend.threshold_reached
        - subscription.group_spend.threshold_recovered
        - entitlement.grant.exhausted
        - subscription.renewal.due
        - invoice.communication.triggered
        - credit_note.created
        - credit_note.updated
        - checkout.session.initiated
        - checkout.session.completed
        - checkout.session.failed
        - checkout.session.expired
        - event.rejected
      x-enum-varnames:
        - WebhookEventSubscriptionCreated
        - WebhookEventSubscriptionDraftCreated
        - WebhookEventSubscriptionActivated
        - WebhookEventSubscriptionUpdated
        - WebhookEventSubscriptionPaused
        - WebhookEventSubscriptionCancelled
        - WebhookEventSubscriptionResumed
        - WebhookEventSubscriptionPlanChanged
        - WebhookEventSubscriptionPhaseCreated
        - WebhookEventSubscriptionPhaseUpdated
        - WebhookEventSubscriptionPhaseDeleted
        - WebhookEventFeatureCreated
        - WebhookEventFeatureUpdated
        - WebhookEventFeatureDeleted
        - WebhookEventFeatureWalletBalanceAlert
        - WebhookEventEntitlementCreated
        - WebhookEventEntitlementUpdated
        - WebhookEventEntitlementDeleted
        - WebhookEventWalletCreated
        - WebhookEventWalletUpdated
        - WebhookEventWalletTerminated
        - WebhookEventWalletTransactionCreated
        - WebhookEventWalletTransactionUpdated
        - WebhookEventPaymentCreated
        - WebhookEventPaymentUpdated
        - WebhookEventPaymentFailed
        - WebhookEventPaymentSuccess
        - WebhookEventPaymentPending
        - WebhookEventRefundCreated
        - WebhookEventRefundSucceeded
        - WebhookEventRefundFailed
        - WebhookEventCustomerCreated
        - WebhookEventCustomerUpdated
        - WebhookEventCustomerDeleted
        - WebhookEventInvoiceUpdateFinalized
        - WebhookEventInvoiceUpdatePayment
        - WebhookEventInvoiceUpdateVoided
        - WebhookEventInvoiceUpdate
        - WebhookEventInvoicePaymentOverdue
        - WebhookEventWalletCreditBalanceDropped
        - WebhookEventWalletCreditBalanceRecovered
        - WebhookEventWalletOngoingBalanceDropped
        - WebhookEventWalletOngoingBalanceRecovered
        - WebhookEventWalletOngoingBalanceUpdated
        - WebhookEventSubscriptionSpendThresholdReached
        - WebhookEventSubscriptionSpendThresholdRecovered
        - WebhookEventSubscriptionLineItemSpendThresholdReached
        - WebhookEventSubscriptionLineItemSpendThresholdRecovered
        - WebhookEventSubscriptionGroupSpendThresholdReached
        - WebhookEventSubscriptionGroupSpendThresholdRecovered
        - WebhookEventEntitlementGrantExhausted
        - WebhookEventSubscriptionRenewalDue
        - WebhookEventInvoiceCommunicationTriggered
        - WebhookEventCreditNoteCreated
        - WebhookEventCreditNoteUpdated
        - WebhookEventCheckoutSessionInitiated
        - WebhookEventCheckoutSessionCompleted
        - WebhookEventCheckoutSessionFailed
        - WebhookEventCheckoutSessionExpired
        - WebhookEventEventRejected
      x-speakeasy-name-override: WebhookEventName
    webhookDto.Invoice:
      type: object
      properties:
        amount_due:
          type: string
        amount_paid:
          type: string
        amount_remaining:
          type: string
        billing_period:
          type: string
        billing_reason:
          type: string
        billing_sequence:
          type: integer
        coupon_applications:
          type: array
          items:
            $ref: '#/components/schemas/webhookDto.CouponApplication'
        created_at:
          type: string
          format: date-time
        currency:
          type: string
        customer:
          $ref: '#/components/schemas/webhookDto.Customer'
        customer_id:
          type: string
        description:
          type: string
        due_date:
          type: string
          format: date-time
        environment_id:
          type: string
        finalized_at:
          type: string
          format: date-time
        id:
          type: string
        idempotency_key:
          type: string
        invoice_number:
          type: string
        invoice_pdf_url:
          type: string
        invoice_status:
          $ref: '#/components/schemas/types.InvoiceStatus'
        invoice_type:
          $ref: '#/components/schemas/types.InvoiceType'
        line_items:
          type: array
          items:
            $ref: '#/components/schemas/webhookDto.InvoiceLineItem'
        metadata:
          $ref: '#/components/schemas/types.Metadata'
        paid_at:
          type: string
          format: date-time
        payment_status:
          $ref: '#/components/schemas/types.PaymentStatus'
        period_end:
          type: string
          format: date-time
        period_start:
          type: string
          format: date-time
        subscription:
          $ref: '#/components/schemas/webhookDto.Subscription'
        subscription_id:
          type: string
        subtotal:
          type: string
        tax_summary:
          $ref: '#/components/schemas/TaxSummary'
        taxes:
          type: array
          items:
            $ref: '#/components/schemas/webhookDto.TaxApplied'
        total:
          type: string
        total_discount:
          type: string
        total_prepaid_credits_applied:
          type: string
        total_tax:
          type: string
        updated_at:
          type: string
          format: date-time
        voided_at:
          type: string
          format: date-time
    webhookDto.CouponApplication:
      type: object
      properties:
        applied_at:
          type: string
          format: date-time
        coupon_association_id:
          type: string
        coupon_id:
          type: string
        coupon_snapshot:
          type: object
          additionalProperties: true
        currency:
          type: string
        discount_percentage:
          type: string
        discount_type:
          $ref: '#/components/schemas/types.CouponType'
        discounted_amount:
          type: string
        final_price:
          type: string
        id:
          type: string
        invoice_line_item_id:
          type: string
        metadata:
          type: object
          additionalProperties:
            type: string
        original_price:
          type: string
        subscription_id:
          type: string
    webhookDto.Customer:
      type: object
      properties:
        address_city:
          type: string
        address_country:
          type: string
        address_line1:
          type: string
        address_line2:
          type: string
        address_postal_code:
          type: string
        address_state:
          type: string
        email:
          type: string
        environment_id:
          type: string
        external_id:
          type: string
        id:
          type: string
        metadata:
          type: object
          additionalProperties:
            type: string
        name:
          type: string
        timezone:
          type: string
    types.InvoiceStatus:
      type: string
      enum:
        - DRAFT
        - FINALIZED
        - VOIDED
        - SKIPPED
      x-enum-varnames:
        - InvoiceStatusDraft
        - InvoiceStatusFinalized
        - InvoiceStatusVoided
        - InvoiceStatusSkipped
      x-speakeasy-name-override: InvoiceStatus
    types.InvoiceType:
      type: string
      enum:
        - SUBSCRIPTION
        - ONE_OFF
        - CREDIT
      x-enum-varnames:
        - InvoiceTypeSubscription
        - InvoiceTypeOneOff
        - InvoiceTypeCredit
      x-speakeasy-name-override: InvoiceType
    webhookDto.InvoiceLineItem:
      type: object
      properties:
        adjusted_entitlement_quantity:
          type: string
        amount:
          type: string
        commitment_info:
          $ref: '#/components/schemas/types.CommitmentInfo'
        currency:
          type: string
        display_name:
          type: string
        entity_id:
          type: string
        entity_type:
          type: string
        id:
          type: string
        invoice_level_discount:
          type: string
        line_item_discount:
          type: string
        metadata:
          $ref: '#/components/schemas/types.Metadata'
        meter_display_name:
          type: string
        meter_id:
          type: string
        period_end:
          type: string
          format: date-time
        period_start:
          type: string
          format: date-time
        plan_display_name:
          type: string
        prepaid_credits_applied:
          type: string
        price_id:
          type: string
        price_type:
          type: string
        price_unit:
          type: string
        price_unit_amount:
          type: string
        quantity:
          type: string
        subscription_line_item_id:
          type: string
    types.Metadata:
      type: object
      additionalProperties:
        type: string
      x-speakeasy-name-override: Metadata
    types.PaymentStatus:
      type: string
      enum:
        - INITIATED
        - PENDING
        - PROCESSING
        - SUCCEEDED
        - OVERPAID
        - FAILED
        - REFUNDED
        - PARTIALLY_REFUNDED
        - VOIDED
      x-enum-varnames:
        - PaymentStatusInitiated
        - PaymentStatusPending
        - PaymentStatusProcessing
        - PaymentStatusSucceeded
        - PaymentStatusOverpaid
        - PaymentStatusFailed
        - PaymentStatusRefunded
        - PaymentStatusPartiallyRefunded
        - PaymentStatusVoided
      x-speakeasy-name-override: PaymentStatus
    webhookDto.Subscription:
      type: object
      properties:
        billing_cadence:
          $ref: '#/components/schemas/types.BillingCadence'
        billing_period:
          $ref: '#/components/schemas/types.BillingPeriod'
        billing_period_count:
          type: integer
        cancel_at:
          type: string
          format: date-time
        cancel_at_period_end:
          type: boolean
        cancelled_at:
          type: string
          format: date-time
        coupon_associations:
          type: array
          items:
            $ref: '#/components/schemas/webhookDto.CouponAssociation'
        currency:
          type: string
        current_period_end:
          type: string
          format: date-time
        current_period_start:
          type: string
          format: date-time
        customer:
          $ref: '#/components/schemas/webhookDto.Customer'
        customer_id:
          type: string
        end_date:
          type: string
          format: date-time
        id:
          type: string
        invoicing_customer_id:
          type: string
        line_items:
          type: array
          items:
            $ref: '#/components/schemas/webhookDto.SubscriptionLineItem'
        lookup_key:
          type: string
        metadata:
          $ref: '#/components/schemas/types.Metadata'
        parent_subscription_id:
          type: string
        pause_status:
          $ref: '#/components/schemas/types.PauseStatus'
        plan:
          $ref: '#/components/schemas/webhookDto.Plan'
        plan_id:
          type: string
        start_date:
          type: string
          format: date-time
        subscription_status:
          $ref: '#/components/schemas/types.SubscriptionStatus'
        subscription_type:
          $ref: '#/components/schemas/types.SubscriptionType'
        trial_end:
          type: string
          format: date-time
        trial_start:
          type: string
          format: date-time
    TaxSummary:
      type: object
      properties:
        exclusive_tax:
          type: string
        exemption:
          $ref: '#/components/schemas/TaxExemptionSummary'
        inclusive_tax:
          type: string
        total_tax:
          type: string
    webhookDto.TaxApplied:
      type: object
      properties:
        applied_at:
          type: string
          format: date-time
        currency:
          type: string
        id:
          type: string
        metadata:
          type: object
          additionalProperties:
            type: string
        tax_amount:
          type: string
        tax_behavior:
          $ref: '#/components/schemas/types.TaxBehavior'
        tax_rate:
          $ref: '#/components/schemas/webhookDto.TaxRate'
        tax_rate_id:
          type: string
        taxable_amount:
          type: string
    types.CouponType:
      type: string
      enum:
        - fixed
        - percentage
      x-enum-varnames:
        - CouponTypeFixed
        - CouponTypePercentage
      x-speakeasy-name-override: CouponType
    types.CommitmentInfo:
      type: object
      properties:
        amount:
          type: string
        computed_commitment_utilized_amount:
          type: string
        computed_overage_amount:
          type: string
        computed_true_up_amount:
          type: string
          description: >-
            total_cost = computed_commitment_utilized_amount +
            computed_overage_amount + computed_true_up_amount
        duration:
          $ref: '#/components/schemas/types.BillingPeriod'
        is_windowed:
          type: boolean
        overage_factor:
          type: string
        quantity:
          type: string
          description: Only used for quantity-based commitments
        true_up_enabled:
          type: boolean
        type:
          $ref: '#/components/schemas/types.CommitmentType'
      x-speakeasy-name-override: CommitmentInfo
    types.BillingCadence:
      type: string
      enum:
        - RECURRING
      x-enum-varnames:
        - BILLING_CADENCE_RECURRING
      x-speakeasy-name-override: BillingCadence
    types.BillingPeriod:
      type: string
      enum:
        - MONTHLY
        - ANNUAL
        - WEEKLY
        - DAILY
        - QUARTERLY
        - HALF_YEARLY
        - ONETIME
      x-enum-varnames:
        - BILLING_PERIOD_MONTHLY
        - BILLING_PERIOD_ANNUAL
        - BILLING_PERIOD_WEEKLY
        - BILLING_PERIOD_DAILY
        - BILLING_PERIOD_QUARTER
        - BILLING_PERIOD_HALF_YEAR
        - BILLING_PERIOD_ONETIME
      x-speakeasy-name-override: BillingPeriod
    webhookDto.CouponAssociation:
      type: object
      properties:
        coupon_id:
          type: string
        end_date:
          type: string
          format: date-time
        id:
          type: string
        metadata:
          type: object
          additionalProperties:
            type: string
        start_date:
          type: string
          format: date-time
        subscription_id:
          type: string
        subscription_line_item_id:
          type: string
    webhookDto.SubscriptionLineItem:
      type: object
      properties:
        billing_period:
          $ref: '#/components/schemas/types.BillingPeriod'
        billing_period_count:
          type: integer
        currency:
          type: string
        display_name:
          type: string
        end_date:
          type: string
          format: date-time
        entity_id:
          type: string
        entity_type:
          $ref: '#/components/schemas/types.SubscriptionLineItemEntityType'
        id:
          type: string
        invoice_cadence:
          $ref: '#/components/schemas/types.InvoiceCadence'
        metadata:
          type: object
          additionalProperties:
            type: string
        meter_display_name:
          type: string
        meter_id:
          type: string
        plan_display_name:
          type: string
        price:
          $ref: '#/components/schemas/webhookDto.Price'
        price_id:
          type: string
        price_type:
          $ref: '#/components/schemas/types.PriceType'
        price_unit:
          type: string
        quantity:
          type: string
        start_date:
          type: string
          format: date-time
        subscription_id:
          type: string
    types.PauseStatus:
      type: string
      enum:
        - none
        - active
        - scheduled
        - completed
        - cancelled
      x-enum-varnames:
        - PauseStatusNone
        - PauseStatusActive
        - PauseStatusScheduled
        - PauseStatusCompleted
        - PauseStatusCancelled
      x-speakeasy-name-override: PauseStatus
    webhookDto.Plan:
      type: object
      properties:
        description:
          type: string
        id:
          type: string
        lookup_key:
          type: string
        metadata:
          $ref: '#/components/schemas/types.Metadata'
        name:
          type: string
        prices:
          type: array
          items:
            $ref: '#/components/schemas/webhookDto.Price'
    types.SubscriptionStatus:
      type: string
      enum:
        - active
        - paused
        - cancelled
        - incomplete
        - trialing
        - draft
      x-enum-varnames:
        - SubscriptionStatusActive
        - SubscriptionStatusPaused
        - SubscriptionStatusCancelled
        - SubscriptionStatusIncomplete
        - SubscriptionStatusTrialing
        - SubscriptionStatusDraft
      x-speakeasy-name-override: SubscriptionStatus
    types.SubscriptionType:
      type: string
      enum:
        - standalone
        - delegated_invoicing
        - parent
        - inherited
        - grouped_invoicing
      x-enum-varnames:
        - SubscriptionTypeStandalone
        - SubscriptionTypeDelegatedInvoicing
        - SubscriptionTypeParent
        - SubscriptionTypeInherited
        - SubscriptionTypeGroupedInvoicing
      x-speakeasy-name-override: SubscriptionType
    TaxExemptionSummary:
      type: object
      properties:
        reason:
          type: string
        reason_code:
          $ref: '#/components/schemas/types.TaxExemptionReasonCode'
    types.TaxBehavior:
      type: string
      enum:
        - inclusive
        - exclusive
      x-enum-varnames:
        - TaxBehaviorInclusive
        - TaxBehaviorExclusive
      x-speakeasy-name-override: TaxBehavior
    webhookDto.TaxRate:
      type: object
      properties:
        code:
          type: string
        description:
          type: string
        id:
          type: string
        name:
          type: string
        percentage_value:
          type: string
        tax_rate_type:
          $ref: '#/components/schemas/types.TaxRateType'
    types.CommitmentType:
      type: string
      enum:
        - amount
        - quantity
      x-enum-varnames:
        - COMMITMENT_TYPE_AMOUNT
        - COMMITMENT_TYPE_QUANTITY
      x-speakeasy-name-override: CommitmentType
    types.SubscriptionLineItemEntityType:
      type: string
      enum:
        - plan
        - addon
        - subscription
      x-enum-varnames:
        - SubscriptionLineItemEntityTypePlan
        - SubscriptionLineItemEntityTypeAddon
        - SubscriptionLineItemEntityTypeSubscription
      x-speakeasy-name-override: SubscriptionLineItemEntityType
    types.InvoiceCadence:
      type: string
      enum:
        - ARREAR
        - ADVANCE
      x-enum-varnames:
        - InvoiceCadenceArrear
        - InvoiceCadenceAdvance
      x-speakeasy-name-override: InvoiceCadence
    webhookDto.Price:
      type: object
      properties:
        amount:
          type: string
        billing_cadence:
          $ref: '#/components/schemas/types.BillingCadence'
        billing_model:
          $ref: '#/components/schemas/types.BillingModel'
        billing_period:
          $ref: '#/components/schemas/types.BillingPeriod'
        billing_period_count:
          type: integer
        currency:
          type: string
        description:
          type: string
        display_amount:
          type: string
        display_name:
          type: string
        display_price_unit_amount:
          type: string
        id:
          type: string
        invoice_cadence:
          $ref: '#/components/schemas/types.InvoiceCadence'
        lookup_key:
          type: string
        metadata:
          $ref: '#/components/schemas/price.JSONBMetadata'
        meter:
          $ref: '#/components/schemas/webhookDto.Meter'
        meter_id:
          type: string
        price_unit:
          type: string
        price_unit_amount:
          type: string
        tier_mode:
          $ref: '#/components/schemas/types.BillingTier'
        tiers:
          type: array
          items:
            $ref: '#/components/schemas/price.PriceTier'
        transform_quantity:
          $ref: '#/components/schemas/price.JSONBTransformQuantity'
        type:
          $ref: '#/components/schemas/types.PriceType'
    types.PriceType:
      type: string
      enum:
        - USAGE
        - FIXED
      x-enum-varnames:
        - PRICE_TYPE_USAGE
        - PRICE_TYPE_FIXED
      x-speakeasy-name-override: PriceType
    types.TaxExemptionReasonCode:
      type: string
      enum:
        - customer_exempt
        - no_tax_configured
      x-enum-varnames:
        - TaxExemptionReasonCustomerExempt
        - TaxExemptionReasonNoTaxConfigured
      x-speakeasy-name-override: TaxExemptionReasonCode
    types.TaxRateType:
      type: string
      enum:
        - percentage
      x-enum-varnames:
        - TaxRateTypePercentage
      x-speakeasy-name-override: TaxRateType
    types.BillingModel:
      type: string
      enum:
        - FLAT_FEE
        - PACKAGE
        - TIERED
      x-enum-varnames:
        - BILLING_MODEL_FLAT_FEE
        - BILLING_MODEL_PACKAGE
        - BILLING_MODEL_TIERED
      x-speakeasy-name-override: BillingModel
    price.JSONBMetadata:
      type: object
      additionalProperties:
        type: string
    webhookDto.Meter:
      type: object
      properties:
        aggregation:
          $ref: '#/components/schemas/meter.Aggregation'
        event_name:
          type: string
        id:
          type: string
        name:
          type: string
        reset_usage:
          $ref: '#/components/schemas/types.ResetUsage'
    types.BillingTier:
      type: string
      enum:
        - VOLUME
        - SLAB
      x-enum-varnames:
        - BILLING_TIER_VOLUME
        - BILLING_TIER_SLAB
      x-speakeasy-name-override: BillingTier
    price.PriceTier:
      type: object
      properties:
        flat_amount:
          type: string
          description: >-
            flat_amount is the flat amount for the given tier (optional)

            Applied on top of unit_amount*quantity. Useful for cases like "2.7$
            + 5c"
        unit_amount:
          type: string
          description: unit_amount is the amount per unit for the given tier
        up_to:
          type: integer
          description: >-
            up_to is the quantity up to which this tier applies. It is null for
            the last tier.

            IMPORTANT: Tier boundaries are INCLUSIVE.

            - If up_to is 1000, then quantity less than or equal to 1000 belongs
            to this tier

            - This behavior is consistent across both VOLUME and SLAB tier modes
    price.JSONBTransformQuantity:
      type: object
      properties:
        divide_by:
          type: integer
          description: Divide quantity by this number
        round:
          $ref: '#/components/schemas/types.RoundType'
    meter.Aggregation:
      type: object
      properties:
        bucket_size:
          $ref: '#/components/schemas/types.WindowSize'
        expression:
          type: string
          description: >-
            Expression is an optional CEL expression to compute per-event
            quantity from event.properties.

            When set, it replaces Field-based extraction. Property names are
            used directly (e.g., token * duration * pixel).
        field:
          type: string
          description: >-
            Field is the key in $event.properties on which the aggregation is to
            be applied

            For ex if the aggregation type is sum for API usage, the field could
            be "duration_ms"

            Ignored when Expression is set.
        group_by:
          type: string
          description: >-
            GroupBy is the property name in event.properties to group by before
            aggregating.

            Requires MAX aggregation. Windowing comes from the price, so this no
            longer

            implies a meter-level bucket_size.

            When set, aggregation is applied per unique value of this property
            within each bucket,

            then the per-group results are summed to produce the bucket total.
        multiplier:
          type: string
          description: >-
            Multiplier is the multiplier for the aggregation

            For ex if the aggregation type is sum_with_multiplier for API usage,
            the multiplier could be 1000

            to scale up by a factor of 1000. If not provided, it will be null.
        type:
          $ref: '#/components/schemas/types.AggregationType'
    types.ResetUsage:
      type: string
      enum:
        - BILLING_PERIOD
        - NEVER
      x-enum-varnames:
        - ResetUsageBillingPeriod
        - ResetUsageNever
      x-speakeasy-name-override: ResetUsage
    types.RoundType:
      type: string
      enum:
        - up
        - down
      x-enum-varnames:
        - ROUND_UP
        - ROUND_DOWN
      x-speakeasy-name-override: RoundType
    types.WindowSize:
      type: string
      enum:
        - MINUTE
        - 15MIN
        - 30MIN
        - HOUR
        - 3HOUR
        - 6HOUR
        - 12HOUR
        - DAY
        - WEEK
        - MONTH
      x-enum-varnames:
        - WindowSizeMinute
        - WindowSize15Min
        - WindowSize30Min
        - WindowSizeHour
        - WindowSize3Hour
        - WindowSize6Hour
        - WindowSize12Hour
        - WindowSizeDay
        - WindowSizeWeek
        - WindowSizeMonth
      x-speakeasy-name-override: WindowSize
    types.AggregationType:
      type: string
      enum:
        - COUNT
        - SUM
        - AVG
        - COUNT_UNIQUE
        - LATEST
        - SUM_WITH_MULTIPLIER
        - MAX
        - WEIGHTED_SUM
      x-enum-comments:
        AggregationSumWithMultiplier: Sum with a multiplier - [sum(value) * multiplier]
      x-enum-varnames:
        - AggregationCount
        - AggregationSum
        - AggregationAvg
        - AggregationCountUnique
        - AggregationLatest
        - AggregationSumWithMultiplier
        - AggregationMax
        - AggregationWeightedSum
      x-speakeasy-name-override: AggregationType

````