# coding: utf-8

"""
    CyberSource Merged Spec

    All CyberSource API specs merged together. These are available at https://developer.cybersource.com/api/reference/api-reference.html

    OpenAPI spec version: 0.0.1
    
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""


from pprint import pformat
from six import iteritems
import re


class PtsV2PaymentsReversalsPost201ResponseAuthorizationInformation(object):
    """
    NOTE: This class is auto generated by the swagger code generator program.
    Do not edit the class manually.
    """


    """
    Attributes:
      swagger_types (dict): The key is attribute name
                            and the value is attribute type.
      attribute_map (dict): The key is attribute name
                            and the value is json key in definition.
    """
    swagger_types = {
        'approval_code': 'str',
        'reason_code': 'str',
        'reversal_submitted': 'str'
    }

    attribute_map = {
        'approval_code': 'approvalCode',
        'reason_code': 'reasonCode',
        'reversal_submitted': 'reversalSubmitted'
    }

    def __init__(self, approval_code=None, reason_code=None, reversal_submitted=None):
        """
        PtsV2PaymentsReversalsPost201ResponseAuthorizationInformation - a model defined in Swagger
        """

        self._approval_code = None
        self._reason_code = None
        self._reversal_submitted = None

        if approval_code is not None:
          self.approval_code = approval_code
        if reason_code is not None:
          self.reason_code = reason_code
        if reversal_submitted is not None:
          self.reversal_submitted = reversal_submitted

    @property
    def approval_code(self):
        """
        Gets the approval_code of this PtsV2PaymentsReversalsPost201ResponseAuthorizationInformation.
        The authorization code returned by the processor.

        :return: The approval_code of this PtsV2PaymentsReversalsPost201ResponseAuthorizationInformation.
        :rtype: str
        """
        return self._approval_code

    @approval_code.setter
    def approval_code(self, approval_code):
        """
        Sets the approval_code of this PtsV2PaymentsReversalsPost201ResponseAuthorizationInformation.
        The authorization code returned by the processor.

        :param approval_code: The approval_code of this PtsV2PaymentsReversalsPost201ResponseAuthorizationInformation.
        :type: str
        """
        if approval_code is not None and len(approval_code) > 6:
            raise ValueError("Invalid value for `approval_code`, length must be less than or equal to `6`")

        self._approval_code = approval_code

    @property
    def reason_code(self):
        """
        Gets the reason_code of this PtsV2PaymentsReversalsPost201ResponseAuthorizationInformation.
        Reply flag for the original transaction.

        :return: The reason_code of this PtsV2PaymentsReversalsPost201ResponseAuthorizationInformation.
        :rtype: str
        """
        return self._reason_code

    @reason_code.setter
    def reason_code(self, reason_code):
        """
        Sets the reason_code of this PtsV2PaymentsReversalsPost201ResponseAuthorizationInformation.
        Reply flag for the original transaction.

        :param reason_code: The reason_code of this PtsV2PaymentsReversalsPost201ResponseAuthorizationInformation.
        :type: str
        """
        if reason_code is not None and len(reason_code) > 50:
            raise ValueError("Invalid value for `reason_code`, length must be less than or equal to `50`")

        self._reason_code = reason_code

    @property
    def reversal_submitted(self):
        """
        Gets the reversal_submitted of this PtsV2PaymentsReversalsPost201ResponseAuthorizationInformation.
        Flag indicating whether a full authorization reversal was successfully submitted.  Possible values: - Y: The authorization reversal was successfully submitted. - N: The authorization reversal was not successfully submitted. You must send a credit request for a refund.  This field is supported only for **FDC Nashville Global**. 

        :return: The reversal_submitted of this PtsV2PaymentsReversalsPost201ResponseAuthorizationInformation.
        :rtype: str
        """
        return self._reversal_submitted

    @reversal_submitted.setter
    def reversal_submitted(self, reversal_submitted):
        """
        Sets the reversal_submitted of this PtsV2PaymentsReversalsPost201ResponseAuthorizationInformation.
        Flag indicating whether a full authorization reversal was successfully submitted.  Possible values: - Y: The authorization reversal was successfully submitted. - N: The authorization reversal was not successfully submitted. You must send a credit request for a refund.  This field is supported only for **FDC Nashville Global**. 

        :param reversal_submitted: The reversal_submitted of this PtsV2PaymentsReversalsPost201ResponseAuthorizationInformation.
        :type: str
        """
        if reversal_submitted is not None and len(reversal_submitted) > 1:
            raise ValueError("Invalid value for `reversal_submitted`, length must be less than or equal to `1`")

        self._reversal_submitted = reversal_submitted

    def to_dict(self):
        """
        Returns the model properties as a dict
        """
        result = {}

        for attr, _ in iteritems(self.swagger_types):
            value = getattr(self, attr)
            if isinstance(value, list):
                result[attr] = list(map(
                    lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
                    value
                ))
            elif hasattr(value, "to_dict"):
                result[attr] = value.to_dict()
            elif isinstance(value, dict):
                result[attr] = dict(map(
                    lambda item: (item[0], item[1].to_dict())
                    if hasattr(item[1], "to_dict") else item,
                    value.items()
                ))
            else:
                result[attr] = value

        return result

    def to_str(self):
        """
        Returns the string representation of the model
        """
        return pformat(self.to_dict())

    def __repr__(self):
        """
        For `print` and `pprint`
        """
        return self.to_str()

    def __eq__(self, other):
        """
        Returns true if both objects are equal
        """
        if not isinstance(other, PtsV2PaymentsReversalsPost201ResponseAuthorizationInformation):
            return False

        return self.__dict__ == other.__dict__

    def __ne__(self, other):
        """
        Returns true if both objects are not equal
        """
        return not self == other
