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

"""
pqapiv2

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


class Currency(object):

    """Implementation of the '_currency' model.

    Currency code used for the object

    Attributes:
        currency (CurrencyTypesEnum): Currency code type for the object

    """

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

    def __init__(self,
                 currency=None):
        """Constructor for the Currency class"""

        # Initialize members of the class
        self.currency = currency

    @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
        currency = dictionary.get('currency')

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