# coding: utf-8

"""
    Zuora API Reference

    REST API reference for the Zuora Billing, Payments, and Central Platform! Check out the [REST API Overview](https://www.zuora.com/developer/api-references/api/overview/).

    The version of the OpenAPI document: 2024-05-20
    Contact: docs@zuora.com
    Generated by OpenAPI Generator (https://openapi-generator.tech)

    Do not edit the class manually.
"""  # noqa: E501


from __future__ import annotations
import json
from enum import Enum
from typing_extensions import Self


class EndDateConditionProductRatePlanChargeRest(str, Enum):
    """
    Defines when the charge ends after the charge trigger date.  **Values**:    - `SubscriptionEnd`: The charge ends on the subscription end date after a specified period based on the trigger date of the charge.    - `FixedPeriod`: The charge ends after a specified period based on the trigger date of the charge. If you set this field to `FixedPeriod`, you must specify the length of the period and a period type by defining the `UpToPeriods` and `UpToPeriodsType` fields.     **Note**: If the subscription ends before the charge end date, the charge ends when the subscription ends. But if the subscription end date is subsequently changed through a Renewal, or Terms and Conditions amendment, the charge will end on the charge end date. 
    """

    """
    allowed enum values
    """
    SUBSCRIPTIONEND = 'SubscriptionEnd'
    FIXEDPERIOD = 'FixedPeriod'

    @classmethod
    def from_json(cls, json_str: str) -> Self:
        """Create an instance of EndDateConditionProductRatePlanChargeRest from a JSON string"""
        return cls(json.loads(json_str))


