# 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 BillingPeriodAlignment(str, Enum):
    """
    Specifies how Zuora determines when to start new billing periods. You can use this field to align the billing periods of different charges.  * `AlignToCharge` - Zuora starts a new billing period on the first billing day that falls on or after the date when the charge becomes active. * `AlignToSubscriptionStart` - Zuora starts a new billing period on the first billing day that falls on or after the start date of the subscription. * `AlignToTermStart` - For each term of the subscription, Zuora starts a new billing period on the first billing day that falls on or after the start date of the term.  See the `billCycleType` field for information about how Zuora determines the billing day. **Note:** `AlignToTermEnd` is only available for prepayment charges by default. To enable this value for non-prepaid recurring charges, contact <a href=\"http://support.zuora.com/\" target=\"_blank\">Zuora Global Support</a>. 
    """

    """
    allowed enum values
    """
    ALIGNTOCHARGE = 'AlignToCharge'
    ALIGNTOSUBSCRIPTIONSTART = 'AlignToSubscriptionStart'
    ALIGNTOTERMSTART = 'AlignToTermStart'
    ALIGNTOTERMEND = 'AlignToTermEnd'

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


