# 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 Ptsv2paymentsRiskInformationBuyerHistory(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 = {
        'customer_account': 'Ptsv2paymentsRiskInformationBuyerHistoryCustomerAccount',
        'account_history': 'Ptsv2paymentsRiskInformationBuyerHistoryAccountHistory',
        'account_purchases': 'int',
        'add_card_attempts': 'int',
        'prior_suspicious_activity': 'bool',
        'payment_account_history': 'str',
        'payment_account_date': 'int',
        'transaction_count_day': 'int',
        'transaction_count_year': 'int'
    }

    attribute_map = {
        'customer_account': 'customerAccount',
        'account_history': 'accountHistory',
        'account_purchases': 'accountPurchases',
        'add_card_attempts': 'addCardAttempts',
        'prior_suspicious_activity': 'priorSuspiciousActivity',
        'payment_account_history': 'paymentAccountHistory',
        'payment_account_date': 'paymentAccountDate',
        'transaction_count_day': 'transactionCountDay',
        'transaction_count_year': 'transactionCountYear'
    }

    def __init__(self, customer_account=None, account_history=None, account_purchases=None, add_card_attempts=None, prior_suspicious_activity=None, payment_account_history=None, payment_account_date=None, transaction_count_day=None, transaction_count_year=None):
        """
        Ptsv2paymentsRiskInformationBuyerHistory - a model defined in Swagger
        """

        self._customer_account = None
        self._account_history = None
        self._account_purchases = None
        self._add_card_attempts = None
        self._prior_suspicious_activity = None
        self._payment_account_history = None
        self._payment_account_date = None
        self._transaction_count_day = None
        self._transaction_count_year = None

        if customer_account is not None:
          self.customer_account = customer_account
        if account_history is not None:
          self.account_history = account_history
        if account_purchases is not None:
          self.account_purchases = account_purchases
        if add_card_attempts is not None:
          self.add_card_attempts = add_card_attempts
        if prior_suspicious_activity is not None:
          self.prior_suspicious_activity = prior_suspicious_activity
        if payment_account_history is not None:
          self.payment_account_history = payment_account_history
        if payment_account_date is not None:
          self.payment_account_date = payment_account_date
        if transaction_count_day is not None:
          self.transaction_count_day = transaction_count_day
        if transaction_count_year is not None:
          self.transaction_count_year = transaction_count_year

    @property
    def customer_account(self):
        """
        Gets the customer_account of this Ptsv2paymentsRiskInformationBuyerHistory.

        :return: The customer_account of this Ptsv2paymentsRiskInformationBuyerHistory.
        :rtype: Ptsv2paymentsRiskInformationBuyerHistoryCustomerAccount
        """
        return self._customer_account

    @customer_account.setter
    def customer_account(self, customer_account):
        """
        Sets the customer_account of this Ptsv2paymentsRiskInformationBuyerHistory.

        :param customer_account: The customer_account of this Ptsv2paymentsRiskInformationBuyerHistory.
        :type: Ptsv2paymentsRiskInformationBuyerHistoryCustomerAccount
        """

        self._customer_account = customer_account

    @property
    def account_history(self):
        """
        Gets the account_history of this Ptsv2paymentsRiskInformationBuyerHistory.

        :return: The account_history of this Ptsv2paymentsRiskInformationBuyerHistory.
        :rtype: Ptsv2paymentsRiskInformationBuyerHistoryAccountHistory
        """
        return self._account_history

    @account_history.setter
    def account_history(self, account_history):
        """
        Sets the account_history of this Ptsv2paymentsRiskInformationBuyerHistory.

        :param account_history: The account_history of this Ptsv2paymentsRiskInformationBuyerHistory.
        :type: Ptsv2paymentsRiskInformationBuyerHistoryAccountHistory
        """

        self._account_history = account_history

    @property
    def account_purchases(self):
        """
        Gets the account_purchases of this Ptsv2paymentsRiskInformationBuyerHistory.
        Number of purchases with this cardholder account during the previous six months. Recommended for Discover ProtectBuy. 

        :return: The account_purchases of this Ptsv2paymentsRiskInformationBuyerHistory.
        :rtype: int
        """
        return self._account_purchases

    @account_purchases.setter
    def account_purchases(self, account_purchases):
        """
        Sets the account_purchases of this Ptsv2paymentsRiskInformationBuyerHistory.
        Number of purchases with this cardholder account during the previous six months. Recommended for Discover ProtectBuy. 

        :param account_purchases: The account_purchases of this Ptsv2paymentsRiskInformationBuyerHistory.
        :type: int
        """

        self._account_purchases = account_purchases

    @property
    def add_card_attempts(self):
        """
        Gets the add_card_attempts of this Ptsv2paymentsRiskInformationBuyerHistory.
        Number of add card attempts in the last 24 hours. Recommended for Discover ProtectBuy. 

        :return: The add_card_attempts of this Ptsv2paymentsRiskInformationBuyerHistory.
        :rtype: int
        """
        return self._add_card_attempts

    @add_card_attempts.setter
    def add_card_attempts(self, add_card_attempts):
        """
        Sets the add_card_attempts of this Ptsv2paymentsRiskInformationBuyerHistory.
        Number of add card attempts in the last 24 hours. Recommended for Discover ProtectBuy. 

        :param add_card_attempts: The add_card_attempts of this Ptsv2paymentsRiskInformationBuyerHistory.
        :type: int
        """

        self._add_card_attempts = add_card_attempts

    @property
    def prior_suspicious_activity(self):
        """
        Gets the prior_suspicious_activity of this Ptsv2paymentsRiskInformationBuyerHistory.
        Indicates whether the merchant experienced suspicious activity (including previous fraud) on the account. Recommended for Discover ProtectBuy. 

        :return: The prior_suspicious_activity of this Ptsv2paymentsRiskInformationBuyerHistory.
        :rtype: bool
        """
        return self._prior_suspicious_activity

    @prior_suspicious_activity.setter
    def prior_suspicious_activity(self, prior_suspicious_activity):
        """
        Sets the prior_suspicious_activity of this Ptsv2paymentsRiskInformationBuyerHistory.
        Indicates whether the merchant experienced suspicious activity (including previous fraud) on the account. Recommended for Discover ProtectBuy. 

        :param prior_suspicious_activity: The prior_suspicious_activity of this Ptsv2paymentsRiskInformationBuyerHistory.
        :type: bool
        """

        self._prior_suspicious_activity = prior_suspicious_activity

    @property
    def payment_account_history(self):
        """
        Gets the payment_account_history of this Ptsv2paymentsRiskInformationBuyerHistory.
        This only applies for NEW_ACCOUNT and EXISTING_ACCOUNT in creationHistory. Possible values are: - PAYMENT_ACCOUNT_EXISTS - PAYMENT_ACCOUNT_ADDED_NOW 

        :return: The payment_account_history of this Ptsv2paymentsRiskInformationBuyerHistory.
        :rtype: str
        """
        return self._payment_account_history

    @payment_account_history.setter
    def payment_account_history(self, payment_account_history):
        """
        Sets the payment_account_history of this Ptsv2paymentsRiskInformationBuyerHistory.
        This only applies for NEW_ACCOUNT and EXISTING_ACCOUNT in creationHistory. Possible values are: - PAYMENT_ACCOUNT_EXISTS - PAYMENT_ACCOUNT_ADDED_NOW 

        :param payment_account_history: The payment_account_history of this Ptsv2paymentsRiskInformationBuyerHistory.
        :type: str
        """

        self._payment_account_history = payment_account_history

    @property
    def payment_account_date(self):
        """
        Gets the payment_account_date of this Ptsv2paymentsRiskInformationBuyerHistory.
        Date applicable only for PAYMENT_ACCOUNT_EXISTS in paymentAccountHistory 

        :return: The payment_account_date of this Ptsv2paymentsRiskInformationBuyerHistory.
        :rtype: int
        """
        return self._payment_account_date

    @payment_account_date.setter
    def payment_account_date(self, payment_account_date):
        """
        Sets the payment_account_date of this Ptsv2paymentsRiskInformationBuyerHistory.
        Date applicable only for PAYMENT_ACCOUNT_EXISTS in paymentAccountHistory 

        :param payment_account_date: The payment_account_date of this Ptsv2paymentsRiskInformationBuyerHistory.
        :type: int
        """

        self._payment_account_date = payment_account_date

    @property
    def transaction_count_day(self):
        """
        Gets the transaction_count_day of this Ptsv2paymentsRiskInformationBuyerHistory.
        Number of transaction (successful or abandoned) for this cardholder account within the last 24 hours. Recommended for Discover ProtectBuy. 

        :return: The transaction_count_day of this Ptsv2paymentsRiskInformationBuyerHistory.
        :rtype: int
        """
        return self._transaction_count_day

    @transaction_count_day.setter
    def transaction_count_day(self, transaction_count_day):
        """
        Sets the transaction_count_day of this Ptsv2paymentsRiskInformationBuyerHistory.
        Number of transaction (successful or abandoned) for this cardholder account within the last 24 hours. Recommended for Discover ProtectBuy. 

        :param transaction_count_day: The transaction_count_day of this Ptsv2paymentsRiskInformationBuyerHistory.
        :type: int
        """

        self._transaction_count_day = transaction_count_day

    @property
    def transaction_count_year(self):
        """
        Gets the transaction_count_year of this Ptsv2paymentsRiskInformationBuyerHistory.
        Number of transaction (successful or abandoned) for this cardholder account within the last year. Recommended for Discover ProtectBuy. 

        :return: The transaction_count_year of this Ptsv2paymentsRiskInformationBuyerHistory.
        :rtype: int
        """
        return self._transaction_count_year

    @transaction_count_year.setter
    def transaction_count_year(self, transaction_count_year):
        """
        Sets the transaction_count_year of this Ptsv2paymentsRiskInformationBuyerHistory.
        Number of transaction (successful or abandoned) for this cardholder account within the last year. Recommended for Discover ProtectBuy. 

        :param transaction_count_year: The transaction_count_year of this Ptsv2paymentsRiskInformationBuyerHistory.
        :type: int
        """

        self._transaction_count_year = transaction_count_year

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

        return self.__dict__ == other.__dict__

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