"""mindbodypublicapi.

This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).
"""

# ruff: noqa: E501
class DeactivatePromoCodeRequest(object):
    """Implementation of the 'DeactivatePromoCodeRequest' model.

    Attributes:
        promotion_id (int): The promocodeID

    """

    # Create a mapping from Model property names to API property names
    _names = {
        "promotion_id": "PromotionId",
    }

    def __init__(
        self,
        promotion_id=None):
        """Initialize a DeactivatePromoCodeRequest instance."""
        # Initialize members of the class
        self.promotion_id = promotion_id

    @classmethod
    def from_dictionary(cls,
                        dictionary):
        """Create an instance of this model from a dictionary

        Args:
            dictionary (dictionary): A dictionary representation of the object
            as obtained from the deserialization of the server's response. The
            keys MUST match property names in the API description.

        Returns:
            object: An instance of this structure class.

        """
        if not isinstance(dictionary, dict) or dictionary is None:
            return None

        # Extract variables from the dictionary
        promotion_id =\
            dictionary.get("PromotionId")\
            if dictionary.get("PromotionId")\
                else None

        # Return an object of this model
        return cls(promotion_id)

    def __repr__(self):
        """Return a unambiguous string representation."""
        _promotion_id=self.promotion_id
        return (
            f"{self.__class__.__name__}("
            f"promotion_id={_promotion_id!r}, "
            f")"
        )

    def __str__(self):
        """Return a human-readable string representation."""
        _promotion_id=self.promotion_id
        return (
            f"{self.__class__.__name__}("
            f"promotion_id={_promotion_id!s}, "
            f")"
        )
