# coding: utf-8

"""
    splitit-web-api-public-sdk

    No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)  # noqa: E501

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


import pprint
import re  # noqa: F401

import six


class TransactionResult(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 = {
        'gateway_transaction_id': 'str',
        'splitit_transaction_id': 'int',
        'gateway_result_code': 'str',
        'gateway_result_message': 'str',
        'operation_type': 'ReferenceEntityBase',
        'gateway_result': 'bool',
        'gateway_transaction_date': 'datetime',
        'is_chargeback': 'bool',
        'avs_result': 'CardResult',
        'cvc_result': 'CardResult',
        'is_in_dispute': 'bool',
        'dispute_status': 'DisputeStatus'
    }

    attribute_map = {
        'gateway_transaction_id': 'GatewayTransactionId',
        'splitit_transaction_id': 'SplititTransactionId',
        'gateway_result_code': 'GatewayResultCode',
        'gateway_result_message': 'GatewayResultMessage',
        'operation_type': 'OperationType',
        'gateway_result': 'GatewayResult',
        'gateway_transaction_date': 'GatewayTransactionDate',
        'is_chargeback': 'IsChargeback',
        'avs_result': 'AVSResult',
        'cvc_result': 'CVCResult',
        'is_in_dispute': 'IsInDispute',
        'dispute_status': 'DisputeStatus'
    }

    def __init__(self, gateway_transaction_id=None, splitit_transaction_id=None, gateway_result_code=None, gateway_result_message=None, operation_type=None, gateway_result=None, gateway_transaction_date=None, is_chargeback=None, avs_result=None, cvc_result=None, is_in_dispute=None, dispute_status=None):  # noqa: E501
        """TransactionResult - a model defined in Swagger"""  # noqa: E501

        self._gateway_transaction_id = None
        self._splitit_transaction_id = None
        self._gateway_result_code = None
        self._gateway_result_message = None
        self._operation_type = None
        self._gateway_result = None
        self._gateway_transaction_date = None
        self._is_chargeback = None
        self._avs_result = None
        self._cvc_result = None
        self._is_in_dispute = None
        self._dispute_status = None
        self.discriminator = None

        if gateway_transaction_id is not None:
            self._gateway_transaction_id = gateway_transaction_id
        self._splitit_transaction_id = splitit_transaction_id
        if gateway_result_code is not None:
            self._gateway_result_code = gateway_result_code
        if gateway_result_message is not None:
            self._gateway_result_message = gateway_result_message
        if operation_type is not None:
            self._operation_type = operation_type
        self._gateway_result = gateway_result
        self._gateway_transaction_date = gateway_transaction_date
        self._is_chargeback = is_chargeback
        if avs_result is not None:
            self._avs_result = avs_result
        if cvc_result is not None:
            self._cvc_result = cvc_result
        if is_in_dispute is not None:
            self._is_in_dispute = is_in_dispute
        if dispute_status is not None:
            self._dispute_status = dispute_status

    @property
    def gateway_transaction_id(self):
        """Gets the gateway_transaction_id of this TransactionResult.  # noqa: E501


        :return: The gateway_transaction_id of this TransactionResult.  # noqa: E501
        :rtype: str
        """
        return self._gateway_transaction_id

    @gateway_transaction_id.setter
    def gateway_transaction_id(self, gateway_transaction_id):
        """Sets the gateway_transaction_id of this TransactionResult.


        :param gateway_transaction_id: The gateway_transaction_id of this TransactionResult.  # noqa: E501
        :type: str
        """

        self._gateway_transaction_id = gateway_transaction_id

    @property
    def splitit_transaction_id(self):
        """Gets the splitit_transaction_id of this TransactionResult.  # noqa: E501


        :return: The splitit_transaction_id of this TransactionResult.  # noqa: E501
        :rtype: int
        """
        return self._splitit_transaction_id

    @splitit_transaction_id.setter
    def splitit_transaction_id(self, splitit_transaction_id):
        """Sets the splitit_transaction_id of this TransactionResult.


        :param splitit_transaction_id: The splitit_transaction_id of this TransactionResult.  # noqa: E501
        :type: int
        """
        
        if splitit_transaction_id is None:
            raise ValueError("Invalid value for `splitit_transaction_id`, must not be `None`")  # noqa: E501

        self._splitit_transaction_id = splitit_transaction_id

    @property
    def gateway_result_code(self):
        """Gets the gateway_result_code of this TransactionResult.  # noqa: E501


        :return: The gateway_result_code of this TransactionResult.  # noqa: E501
        :rtype: str
        """
        return self._gateway_result_code

    @gateway_result_code.setter
    def gateway_result_code(self, gateway_result_code):
        """Sets the gateway_result_code of this TransactionResult.


        :param gateway_result_code: The gateway_result_code of this TransactionResult.  # noqa: E501
        :type: str
        """

        self._gateway_result_code = gateway_result_code

    @property
    def gateway_result_message(self):
        """Gets the gateway_result_message of this TransactionResult.  # noqa: E501


        :return: The gateway_result_message of this TransactionResult.  # noqa: E501
        :rtype: str
        """
        return self._gateway_result_message

    @gateway_result_message.setter
    def gateway_result_message(self, gateway_result_message):
        """Sets the gateway_result_message of this TransactionResult.


        :param gateway_result_message: The gateway_result_message of this TransactionResult.  # noqa: E501
        :type: str
        """

        self._gateway_result_message = gateway_result_message

    @property
    def operation_type(self):
        """Gets the operation_type of this TransactionResult.  # noqa: E501


        :return: The operation_type of this TransactionResult.  # noqa: E501
        :rtype: ReferenceEntityBase
        """
        return self._operation_type

    @operation_type.setter
    def operation_type(self, operation_type):
        """Sets the operation_type of this TransactionResult.


        :param operation_type: The operation_type of this TransactionResult.  # noqa: E501
        :type: ReferenceEntityBase
        """

        self._operation_type = operation_type

    @property
    def gateway_result(self):
        """Gets the gateway_result of this TransactionResult.  # noqa: E501


        :return: The gateway_result of this TransactionResult.  # noqa: E501
        :rtype: bool
        """
        return self._gateway_result

    @gateway_result.setter
    def gateway_result(self, gateway_result):
        """Sets the gateway_result of this TransactionResult.


        :param gateway_result: The gateway_result of this TransactionResult.  # noqa: E501
        :type: bool
        """
        gateway_result = bool(gateway_result)
        if gateway_result is None:
            raise ValueError("Invalid value for `gateway_result`, must not be `None`")  # noqa: E501

        self._gateway_result = gateway_result

    @property
    def gateway_transaction_date(self):
        """Gets the gateway_transaction_date of this TransactionResult.  # noqa: E501


        :return: The gateway_transaction_date of this TransactionResult.  # noqa: E501
        :rtype: datetime
        """
        return self._gateway_transaction_date

    @gateway_transaction_date.setter
    def gateway_transaction_date(self, gateway_transaction_date):
        """Sets the gateway_transaction_date of this TransactionResult.


        :param gateway_transaction_date: The gateway_transaction_date of this TransactionResult.  # noqa: E501
        :type: datetime
        """
        
        if gateway_transaction_date is None:
            raise ValueError("Invalid value for `gateway_transaction_date`, must not be `None`")  # noqa: E501

        self._gateway_transaction_date = gateway_transaction_date

    @property
    def is_chargeback(self):
        """Gets the is_chargeback of this TransactionResult.  # noqa: E501


        :return: The is_chargeback of this TransactionResult.  # noqa: E501
        :rtype: bool
        """
        return self._is_chargeback

    @is_chargeback.setter
    def is_chargeback(self, is_chargeback):
        """Sets the is_chargeback of this TransactionResult.


        :param is_chargeback: The is_chargeback of this TransactionResult.  # noqa: E501
        :type: bool
        """
        is_chargeback = bool(is_chargeback)
        if is_chargeback is None:
            raise ValueError("Invalid value for `is_chargeback`, must not be `None`")  # noqa: E501

        self._is_chargeback = is_chargeback

    @property
    def avs_result(self):
        """Gets the avs_result of this TransactionResult.  # noqa: E501


        :return: The avs_result of this TransactionResult.  # noqa: E501
        :rtype: CardResult
        """
        return self._avs_result

    @avs_result.setter
    def avs_result(self, avs_result):
        """Sets the avs_result of this TransactionResult.


        :param avs_result: The avs_result of this TransactionResult.  # noqa: E501
        :type: CardResult
        """

        self._avs_result = avs_result

    @property
    def cvc_result(self):
        """Gets the cvc_result of this TransactionResult.  # noqa: E501


        :return: The cvc_result of this TransactionResult.  # noqa: E501
        :rtype: CardResult
        """
        return self._cvc_result

    @cvc_result.setter
    def cvc_result(self, cvc_result):
        """Sets the cvc_result of this TransactionResult.


        :param cvc_result: The cvc_result of this TransactionResult.  # noqa: E501
        :type: CardResult
        """

        self._cvc_result = cvc_result

    @property
    def is_in_dispute(self):
        """Gets the is_in_dispute of this TransactionResult.  # noqa: E501


        :return: The is_in_dispute of this TransactionResult.  # noqa: E501
        :rtype: bool
        """
        return self._is_in_dispute

    @is_in_dispute.setter
    def is_in_dispute(self, is_in_dispute):
        """Sets the is_in_dispute of this TransactionResult.


        :param is_in_dispute: The is_in_dispute of this TransactionResult.  # noqa: E501
        :type: bool
        """

        self._is_in_dispute = is_in_dispute

    @property
    def dispute_status(self):
        """Gets the dispute_status of this TransactionResult.  # noqa: E501


        :return: The dispute_status of this TransactionResult.  # noqa: E501
        :rtype: DisputeStatus
        """
        return self._dispute_status

    @dispute_status.setter
    def dispute_status(self, dispute_status):
        """Sets the dispute_status of this TransactionResult.


        :param dispute_status: The dispute_status of this TransactionResult.  # noqa: E501
        :type: DisputeStatus
        """

        self._dispute_status = dispute_status

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

        for attr, _ in six.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
        if issubclass(TransactionResult, dict):
            for key, value in self.items():
                result[key] = value

        return result

    def to_str(self):
        """Returns the string representation of the model"""
        return pprint.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, TransactionResult):
            return False

        return self.__dict__ == other.__dict__

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