# 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 OrderLineItemState(str, Enum):
    """
    The state of the Order Line Item (OLI). See [State transitions for an order, order line item, and fulfillment](https://knowledgecenter.zuora.com/Billing/Subscriptions/Orders/Order_Line_Items/AB_Order_Line_Item_States_and_Order_States) for more information.  To generate invoice for an OLI, you must set this field to `SentToBilling` and set the `billTargetDate` field .  You can update this field for a sales or return OLI only when the OLI is in the `Executing` or 'Booked' or `SentToBilling`state (when the `itemState` field is set as `Executing` or `SentToBilling`). 
    """

    """
    allowed enum values
    """
    EXECUTING = 'Executing'
    BOOKED = 'Booked'
    SENTTOBILLING = 'SentToBilling'
    COMPLETE = 'Complete'
    CANCELED = 'Canceled'

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


