# -*- coding: utf-8 -*-
# File generated from our OpenAPI spec
from decimal import Decimal
from stripe._stripe_object import StripeObject
from typing import ClassVar, Optional
from typing_extensions import Literal, TYPE_CHECKING

if TYPE_CHECKING:
    from stripe.billing._alert import Alert


class AlertRecovered(StripeObject):
    OBJECT_NAME: ClassVar[Literal["billing.alert_recovered"]] = (
        "billing.alert_recovered"
    )
    alert: "Alert"
    """
    A billing alert is a resource that notifies you when a certain usage threshold on a meter is crossed. For example, you might create a billing alert to notify you when a certain user made 100 API requests.
    """
    created: int
    """
    Time at which the object was created. Measured in seconds since the Unix epoch.
    """
    currency: Optional[str]
    """
    Currency for the threshold value
    """
    custom_pricing_unit: Optional[str]
    """
    Custom pricing unit for the threshold value
    """
    customer: str
    """
    ID of customer for which the alert recovered
    """
    external_customer_id: Optional[str]
    """
    External customer ID for the customer for which the alert recovered
    """
    livemode: bool
    """
    If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.
    """
    object: Literal["billing.alert_recovered"]
    """
    String representing the object's type. Objects of the same type share the same value.
    """
    value: Decimal
    """
    The value at which the alert recovered
    """
    _field_encodings = {"value": "decimal_string"}
