# 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 TssV2TransactionsPost201ResponseEmbeddedProcessorInformation(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 = {
        'processor': 'TssV2TransactionsGet200ResponseProcessorInformationProcessor',
        'approval_code': 'str'
    }

    attribute_map = {
        'processor': 'processor',
        'approval_code': 'approvalCode'
    }

    def __init__(self, processor=None, approval_code=None):
        """
        TssV2TransactionsPost201ResponseEmbeddedProcessorInformation - a model defined in Swagger
        """

        self._processor = None
        self._approval_code = None

        if processor is not None:
          self.processor = processor
        if approval_code is not None:
          self.approval_code = approval_code

    @property
    def processor(self):
        """
        Gets the processor of this TssV2TransactionsPost201ResponseEmbeddedProcessorInformation.

        :return: The processor of this TssV2TransactionsPost201ResponseEmbeddedProcessorInformation.
        :rtype: TssV2TransactionsGet200ResponseProcessorInformationProcessor
        """
        return self._processor

    @processor.setter
    def processor(self, processor):
        """
        Sets the processor of this TssV2TransactionsPost201ResponseEmbeddedProcessorInformation.

        :param processor: The processor of this TssV2TransactionsPost201ResponseEmbeddedProcessorInformation.
        :type: TssV2TransactionsGet200ResponseProcessorInformationProcessor
        """

        self._processor = processor

    @property
    def approval_code(self):
        """
        Gets the approval_code of this TssV2TransactionsPost201ResponseEmbeddedProcessorInformation.
        Authorization code. Returned only when the processor returns this value.  The length of this value depends on your processor.  Returned by authorization service.  #### PIN debit Authorization code that is returned by the processor.  Returned by PIN debit credit.  #### Elavon Encrypted Account Number Program The returned value is OFFLINE.  #### TSYS Acquiring Solutions The returned value for a successful zero amount authorization is 000000. 

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

    @approval_code.setter
    def approval_code(self, approval_code):
        """
        Sets the approval_code of this TssV2TransactionsPost201ResponseEmbeddedProcessorInformation.
        Authorization code. Returned only when the processor returns this value.  The length of this value depends on your processor.  Returned by authorization service.  #### PIN debit Authorization code that is returned by the processor.  Returned by PIN debit credit.  #### Elavon Encrypted Account Number Program The returned value is OFFLINE.  #### TSYS Acquiring Solutions The returned value for a successful zero amount authorization is 000000. 

        :param approval_code: The approval_code of this TssV2TransactionsPost201ResponseEmbeddedProcessorInformation.
        :type: str
        """

        self._approval_code = approval_code

    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, TssV2TransactionsPost201ResponseEmbeddedProcessorInformation):
            return False

        return self.__dict__ == other.__dict__

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