# 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 PtsV2IncrementalAuthorizationPatch201ResponseProcessorInformation(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',
        'transaction_id': 'str',
        'response_code': 'str',
        'system_trace_audit_number': 'str',
        'response_details': 'str',
        'merchant_advice': 'PtsV2PaymentsPost201ResponseProcessorInformationMerchantAdvice'
    }

    attribute_map = {
        'approval_code': 'approvalCode',
        'transaction_id': 'transactionId',
        'response_code': 'responseCode',
        'system_trace_audit_number': 'systemTraceAuditNumber',
        'response_details': 'responseDetails',
        'merchant_advice': 'merchantAdvice'
    }

    def __init__(self, approval_code=None, transaction_id=None, response_code=None, system_trace_audit_number=None, response_details=None, merchant_advice=None):
        """
        PtsV2IncrementalAuthorizationPatch201ResponseProcessorInformation - a model defined in Swagger
        """

        self._approval_code = None
        self._transaction_id = None
        self._response_code = None
        self._system_trace_audit_number = None
        self._response_details = None
        self._merchant_advice = None

        if approval_code is not None:
          self.approval_code = approval_code
        if transaction_id is not None:
          self.transaction_id = transaction_id
        if response_code is not None:
          self.response_code = response_code
        if system_trace_audit_number is not None:
          self.system_trace_audit_number = system_trace_audit_number
        if response_details is not None:
          self.response_details = response_details
        if merchant_advice is not None:
          self.merchant_advice = merchant_advice

    @property
    def approval_code(self):
        """
        Gets the approval_code of this PtsV2IncrementalAuthorizationPatch201ResponseProcessorInformation.
        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 PtsV2IncrementalAuthorizationPatch201ResponseProcessorInformation.
        :rtype: str
        """
        return self._approval_code

    @approval_code.setter
    def approval_code(self, approval_code):
        """
        Sets the approval_code of this PtsV2IncrementalAuthorizationPatch201ResponseProcessorInformation.
        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 PtsV2IncrementalAuthorizationPatch201ResponseProcessorInformation.
        :type: str
        """

        self._approval_code = approval_code

    @property
    def transaction_id(self):
        """
        Gets the transaction_id of this PtsV2IncrementalAuthorizationPatch201ResponseProcessorInformation.
        Network transaction identifier (TID). You can use this value to identify a specific transaction when you are discussing the transaction with your processor. Not all processors provide this value.  Returned by the authorization service.  #### PIN debit Transaction identifier generated by the processor.  Returned by PIN debit credit.  #### GPX Processor transaction ID.  #### Cielo For Cielo, this value is the non-sequential unit (NSU) and is supported for all transactions. The value is generated by Cielo or the issuing bank.  #### Comercio Latino For Comercio Latino, this value is the proof of sale or non-sequential unit (NSU) number generated by the acquirers Cielo and Rede, or the issuing bank.  #### CyberSource through VisaNet and GPN For details about this value for CyberSource through VisaNet and GPN, see \"Network Transaction Identifiers\" in [Credit Card Services Using the SCMP API.](https://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html/)  #### Moneris This value identifies the transaction on a host system. It contains the following information: - Terminal used to process the transaction - Shift during which the transaction took place - Batch number - Transaction number within the batch You must store this value. If you give the customer a receipt, display this value on the receipt.  **Example** For the value 66012345001069003: - Terminal ID = 66012345 - Shift number = 001 - Batch number = 069 - Transaction number = 003 

        :return: The transaction_id of this PtsV2IncrementalAuthorizationPatch201ResponseProcessorInformation.
        :rtype: str
        """
        return self._transaction_id

    @transaction_id.setter
    def transaction_id(self, transaction_id):
        """
        Sets the transaction_id of this PtsV2IncrementalAuthorizationPatch201ResponseProcessorInformation.
        Network transaction identifier (TID). You can use this value to identify a specific transaction when you are discussing the transaction with your processor. Not all processors provide this value.  Returned by the authorization service.  #### PIN debit Transaction identifier generated by the processor.  Returned by PIN debit credit.  #### GPX Processor transaction ID.  #### Cielo For Cielo, this value is the non-sequential unit (NSU) and is supported for all transactions. The value is generated by Cielo or the issuing bank.  #### Comercio Latino For Comercio Latino, this value is the proof of sale or non-sequential unit (NSU) number generated by the acquirers Cielo and Rede, or the issuing bank.  #### CyberSource through VisaNet and GPN For details about this value for CyberSource through VisaNet and GPN, see \"Network Transaction Identifiers\" in [Credit Card Services Using the SCMP API.](https://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html/)  #### Moneris This value identifies the transaction on a host system. It contains the following information: - Terminal used to process the transaction - Shift during which the transaction took place - Batch number - Transaction number within the batch You must store this value. If you give the customer a receipt, display this value on the receipt.  **Example** For the value 66012345001069003: - Terminal ID = 66012345 - Shift number = 001 - Batch number = 069 - Transaction number = 003 

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

        self._transaction_id = transaction_id

    @property
    def response_code(self):
        """
        Gets the response_code of this PtsV2IncrementalAuthorizationPatch201ResponseProcessorInformation.
        For most processors, this is the error message sent directly from the bank. Returned only when the processor returns this value.  **Important** Do not use this field to evaluate the result of the authorization.  #### PIN debit Response value that is returned by the processor or bank. **Important** Do not use this field to evaluate the results of the transaction request.  Returned by PIN debit credit, PIN debit purchase, and PIN debit reversal.  #### AIBMS If this value is `08`, you can accept the transaction if the customer provides you with identification.  #### Atos This value is the response code sent from Atos and it might also include the response code from the bank. Format: `aa,bb` with the two values separated by a comma and where: - `aa` is the two-digit error message from Atos. - `bb` is the optional two-digit error message from the bank.  #### Comercio Latino This value is the status code and the error or response code received from the processor separated by a colon. Format: [status code]:E[error code] or [status code]:R[response code] Example `2:R06`  #### JCN Gateway Processor-defined detail error code. The associated response category code is in the `processorInformation.responseCategoryCode` field. String (3) 

        :return: The response_code of this PtsV2IncrementalAuthorizationPatch201ResponseProcessorInformation.
        :rtype: str
        """
        return self._response_code

    @response_code.setter
    def response_code(self, response_code):
        """
        Sets the response_code of this PtsV2IncrementalAuthorizationPatch201ResponseProcessorInformation.
        For most processors, this is the error message sent directly from the bank. Returned only when the processor returns this value.  **Important** Do not use this field to evaluate the result of the authorization.  #### PIN debit Response value that is returned by the processor or bank. **Important** Do not use this field to evaluate the results of the transaction request.  Returned by PIN debit credit, PIN debit purchase, and PIN debit reversal.  #### AIBMS If this value is `08`, you can accept the transaction if the customer provides you with identification.  #### Atos This value is the response code sent from Atos and it might also include the response code from the bank. Format: `aa,bb` with the two values separated by a comma and where: - `aa` is the two-digit error message from Atos. - `bb` is the optional two-digit error message from the bank.  #### Comercio Latino This value is the status code and the error or response code received from the processor separated by a colon. Format: [status code]:E[error code] or [status code]:R[response code] Example `2:R06`  #### JCN Gateway Processor-defined detail error code. The associated response category code is in the `processorInformation.responseCategoryCode` field. String (3) 

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

        self._response_code = response_code

    @property
    def system_trace_audit_number(self):
        """
        Gets the system_trace_audit_number of this PtsV2IncrementalAuthorizationPatch201ResponseProcessorInformation.
        This field is returned only for **American Express Direct** and **CyberSource through VisaNet**. Returned by authorization and incremental authorization services.  #### American Express Direct  System trace audit number (STAN). This value identifies the transaction and is useful when investigating a chargeback dispute.  #### CyberSource through VisaNet  System trace number that must be printed on the customer’s receipt. 

        :return: The system_trace_audit_number of this PtsV2IncrementalAuthorizationPatch201ResponseProcessorInformation.
        :rtype: str
        """
        return self._system_trace_audit_number

    @system_trace_audit_number.setter
    def system_trace_audit_number(self, system_trace_audit_number):
        """
        Sets the system_trace_audit_number of this PtsV2IncrementalAuthorizationPatch201ResponseProcessorInformation.
        This field is returned only for **American Express Direct** and **CyberSource through VisaNet**. Returned by authorization and incremental authorization services.  #### American Express Direct  System trace audit number (STAN). This value identifies the transaction and is useful when investigating a chargeback dispute.  #### CyberSource through VisaNet  System trace number that must be printed on the customer’s receipt. 

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

        self._system_trace_audit_number = system_trace_audit_number

    @property
    def response_details(self):
        """
        Gets the response_details of this PtsV2IncrementalAuthorizationPatch201ResponseProcessorInformation.
        This field might contain information about a decline. This field is supported only for **CyberSource through VisaNet**. 

        :return: The response_details of this PtsV2IncrementalAuthorizationPatch201ResponseProcessorInformation.
        :rtype: str
        """
        return self._response_details

    @response_details.setter
    def response_details(self, response_details):
        """
        Sets the response_details of this PtsV2IncrementalAuthorizationPatch201ResponseProcessorInformation.
        This field might contain information about a decline. This field is supported only for **CyberSource through VisaNet**. 

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

        self._response_details = response_details

    @property
    def merchant_advice(self):
        """
        Gets the merchant_advice of this PtsV2IncrementalAuthorizationPatch201ResponseProcessorInformation.

        :return: The merchant_advice of this PtsV2IncrementalAuthorizationPatch201ResponseProcessorInformation.
        :rtype: PtsV2PaymentsPost201ResponseProcessorInformationMerchantAdvice
        """
        return self._merchant_advice

    @merchant_advice.setter
    def merchant_advice(self, merchant_advice):
        """
        Sets the merchant_advice of this PtsV2IncrementalAuthorizationPatch201ResponseProcessorInformation.

        :param merchant_advice: The merchant_advice of this PtsV2IncrementalAuthorizationPatch201ResponseProcessorInformation.
        :type: PtsV2PaymentsPost201ResponseProcessorInformationMerchantAdvice
        """

        self._merchant_advice = merchant_advice

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

        return self.__dict__ == other.__dict__

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