# -*- coding: utf-8 -*-

"""
zypev1

This file was automatically generated by APIMATIC v3.0 (
 https://www.apimatic.io ).
"""
from zypev1.models.redemption_code_45 import RedemptionCode45


class RedemptionCodeRequest(object):

    """Implementation of the 'RedemptionCodeRequest' model.

    TODO: type model description here.

    Attributes:
        redemption_code (RedemptionCode45): TODO: type description here.

    """

    # Create a mapping from Model property names to API property names
    _names = {
        "redemption_code": 'redemption_code'
    }

    def __init__(self,
                 redemption_code=None):
        """Constructor for the RedemptionCodeRequest class"""

        # Initialize members of the class
        self.redemption_code = redemption_code

    @classmethod
    def from_dictionary(cls,
                        dictionary):
        """Creates 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 dictionary is None:
            return None

        # Extract variables from the dictionary
        redemption_code = RedemptionCode45.from_dictionary(dictionary.get('redemption_code')) if dictionary.get('redemption_code') else None

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