# 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 OrderStatus(str, Enum):
    """
    The status of the order. If the order contains any `Pending Activation` or `Pending Acceptance` subscription, the order status will be `Pending`; If the order is in draft status, the order status will be `Draft`; otherwise the order status is `Completed`.  **Note**: You cannot retrieve the detailed information about draft orders or scheduled orders through the \"List orders of a subscription owner\" and  \"List orders of an invoice owner\" operations.  Draft: The order is in draft status. - `Draft`: The order is in draft status. - `Pending`: The order is in pending status. - `Completed`: The order is in completed status. - `Scheduled`: The order is in scheduled status and it is only valid if the Scheduled Orders feature is enabled. - `Executing`: The scheduled order is executed by a scheduler and it is only valid if the Scheduled Orders feature is enabled. - `Failed`: The scheduled order has failed.  **Note**: The Scheduled Orders feature is in the Early Adopter phase. We are actively soliciting feedback from a small set of early adopters before releasing it as generally available. If you want to join this early adopter program, submit a request at <a href=\"https://support.zuora.com/hc/en-us\" target=\"_blank\">Zuora Global Support</a>. 
    """

    """
    allowed enum values
    """
    DRAFT = 'Draft'
    PENDING = 'Pending'
    COMPLETED = 'Completed'
    CANCELLED = 'Cancelled'
    SCHEDULED = 'Scheduled'
    EXECUTING = 'Executing'
    FAILED = 'Failed'

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


