# 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 Ptsv2paymentsRiskInformationBuyerHistoryAccountHistory(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 = {
        'first_use_of_shipping_address': 'bool',
        'shipping_address_usage_date': 'str'
    }

    attribute_map = {
        'first_use_of_shipping_address': 'firstUseOfShippingAddress',
        'shipping_address_usage_date': 'shippingAddressUsageDate'
    }

    def __init__(self, first_use_of_shipping_address=None, shipping_address_usage_date=None):
        """
        Ptsv2paymentsRiskInformationBuyerHistoryAccountHistory - a model defined in Swagger
        """

        self._first_use_of_shipping_address = None
        self._shipping_address_usage_date = None

        if first_use_of_shipping_address is not None:
          self.first_use_of_shipping_address = first_use_of_shipping_address
        if shipping_address_usage_date is not None:
          self.shipping_address_usage_date = shipping_address_usage_date

    @property
    def first_use_of_shipping_address(self):
        """
        Gets the first_use_of_shipping_address of this Ptsv2paymentsRiskInformationBuyerHistoryAccountHistory.
        Applicable when this is not a guest account. 

        :return: The first_use_of_shipping_address of this Ptsv2paymentsRiskInformationBuyerHistoryAccountHistory.
        :rtype: bool
        """
        return self._first_use_of_shipping_address

    @first_use_of_shipping_address.setter
    def first_use_of_shipping_address(self, first_use_of_shipping_address):
        """
        Sets the first_use_of_shipping_address of this Ptsv2paymentsRiskInformationBuyerHistoryAccountHistory.
        Applicable when this is not a guest account. 

        :param first_use_of_shipping_address: The first_use_of_shipping_address of this Ptsv2paymentsRiskInformationBuyerHistoryAccountHistory.
        :type: bool
        """

        self._first_use_of_shipping_address = first_use_of_shipping_address

    @property
    def shipping_address_usage_date(self):
        """
        Gets the shipping_address_usage_date of this Ptsv2paymentsRiskInformationBuyerHistoryAccountHistory.
        Date when the shipping address for this transaction was first used. Recommended for Discover ProtectBuy. If `firstUseOfShippingAddress` is false and not a guest account, then this date is entered. 

        :return: The shipping_address_usage_date of this Ptsv2paymentsRiskInformationBuyerHistoryAccountHistory.
        :rtype: str
        """
        return self._shipping_address_usage_date

    @shipping_address_usage_date.setter
    def shipping_address_usage_date(self, shipping_address_usage_date):
        """
        Sets the shipping_address_usage_date of this Ptsv2paymentsRiskInformationBuyerHistoryAccountHistory.
        Date when the shipping address for this transaction was first used. Recommended for Discover ProtectBuy. If `firstUseOfShippingAddress` is false and not a guest account, then this date is entered. 

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

        self._shipping_address_usage_date = shipping_address_usage_date

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

        return self.__dict__ == other.__dict__

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