# coding: utf-8

"""
    Pinterest REST API

    Pinterest's REST API

    The version of the OpenAPI document: 5.23.0
    Contact: blah+oapicf@cliffano.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 PromotionType(str, Enum):
    """
    Determines the displayed promotion text along with what parameters (if any) are needed to complete the template. This list is not finalized, and will be updated as new types are supported.
    """

    """
    allowed enum values
    """
    VARIABLE = 'VARIABLE'
    SITEWIDE = 'SITEWIDE'
    CHECKOUT = 'CHECKOUT'
    SAVE_X_ON_Y = 'SAVE_X_ON_Y'
    BUY_X_GET_Y = 'BUY_X_GET_Y'
    SPEND_X_SAVE_Y = 'SPEND_X_SAVE_Y'
    FREE_SHIPPING = 'FREE_SHIPPING'
    FREE_SHIPPING_MINIMUM = 'FREE_SHIPPING_MINIMUM'
    FREE_SHIPPING_WITH_DISCOUNT = 'FREE_SHIPPING_WITH_DISCOUNT'
    SITEWIDE_IN_STORES = 'SITEWIDE_IN_STORES'
    EXTRA_PERCENT_OFF = 'EXTRA_PERCENT_OFF'
    GIFT_WITH_PURCHASE = 'GIFT_WITH_PURCHASE'
    GIFT_WITH_PURCHASE_MINIMUM = 'GIFT_WITH_PURCHASE_MINIMUM'
    FIXED = 'FIXED'
    PERCENT_OFF_CLEARANCE = 'PERCENT_OFF_CLEARANCE'
    X_OFF_Y = 'X_OFF_Y'
    GIFT_WITH_FIRST_PURCHASE = 'GIFT_WITH_FIRST_PURCHASE'
    BUY_X_GET_ONE_FREE = 'BUY_X_GET_ONE_FREE'
    CASH_BACK = 'CASH_BACK'
    POINTS_ON_ALL_PURCHASES = 'POINTS_ON_ALL_PURCHASES'
    BONUS = 'BONUS'
    POINTS_WITH_PURCHASE = 'POINTS_WITH_PURCHASE'
    CUSTOM = 'CUSTOM'

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


