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

"""
pqapiv2

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


class PaymentPurpose(object):

    """Implementation of the '_paymentPurpose' model.

    Purpose for the payment being made.

    Attributes:
        purpose (PaymentPurposeTypesEnum): Used to identify the purpose of a
            payment and impacts reporting and calculated taxable earnings (if
            utilizing tax services)

    """

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

    def __init__(self,
                 purpose=None):
        """Constructor for the PaymentPurpose class"""

        # Initialize members of the class
        self.purpose = purpose

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

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