# 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 Ptsv2paymentsTravelInformationAutoRentalTaxDetails(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 = {
        'amount': 'str',
        'rate': 'str',
        'applied': 'bool',
        'exemption_code': 'str',
        'tax_type': 'str',
        'tax_summary': 'str'
    }

    attribute_map = {
        'amount': 'amount',
        'rate': 'rate',
        'applied': 'applied',
        'exemption_code': 'exemptionCode',
        'tax_type': 'taxType',
        'tax_summary': 'taxSummary'
    }

    def __init__(self, amount=None, rate=None, applied=None, exemption_code=None, tax_type=None, tax_summary=None):
        """
        Ptsv2paymentsTravelInformationAutoRentalTaxDetails - a model defined in Swagger
        """

        self._amount = None
        self._rate = None
        self._applied = None
        self._exemption_code = None
        self._tax_type = None
        self._tax_summary = None

        if amount is not None:
          self.amount = amount
        if rate is not None:
          self.rate = rate
        if applied is not None:
          self.applied = applied
        if exemption_code is not None:
          self.exemption_code = exemption_code
        if tax_type is not None:
          self.tax_type = tax_type
        if tax_summary is not None:
          self.tax_summary = tax_summary

    @property
    def amount(self):
        """
        Gets the amount of this Ptsv2paymentsTravelInformationAutoRentalTaxDetails.
        Indicates the amount of tax based on the `type` field as described in the table below: 

        :return: The amount of this Ptsv2paymentsTravelInformationAutoRentalTaxDetails.
        :rtype: str
        """
        return self._amount

    @amount.setter
    def amount(self, amount):
        """
        Sets the amount of this Ptsv2paymentsTravelInformationAutoRentalTaxDetails.
        Indicates the amount of tax based on the `type` field as described in the table below: 

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

        self._amount = amount

    @property
    def rate(self):
        """
        Gets the rate of this Ptsv2paymentsTravelInformationAutoRentalTaxDetails.
        Rate of VAT or other tax for the order.  Example 0.040 (=4%)  Valid range: 0.01 to 0.99 (1% to 99%, with only whole percentage values accepted; values with additional decimal places will be truncated) 

        :return: The rate of this Ptsv2paymentsTravelInformationAutoRentalTaxDetails.
        :rtype: str
        """
        return self._rate

    @rate.setter
    def rate(self, rate):
        """
        Sets the rate of this Ptsv2paymentsTravelInformationAutoRentalTaxDetails.
        Rate of VAT or other tax for the order.  Example 0.040 (=4%)  Valid range: 0.01 to 0.99 (1% to 99%, with only whole percentage values accepted; values with additional decimal places will be truncated) 

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

        self._rate = rate

    @property
    def applied(self):
        """
        Gets the applied of this Ptsv2paymentsTravelInformationAutoRentalTaxDetails.
        Flag that indicates whether the tax amount (`travelInformation.autoRental.taxDetails.amount`) is included in the request.  Possible values: - `false`: tax amount is not included in the request. - `true`:  tax amount is included in the request. 

        :return: The applied of this Ptsv2paymentsTravelInformationAutoRentalTaxDetails.
        :rtype: bool
        """
        return self._applied

    @applied.setter
    def applied(self, applied):
        """
        Sets the applied of this Ptsv2paymentsTravelInformationAutoRentalTaxDetails.
        Flag that indicates whether the tax amount (`travelInformation.autoRental.taxDetails.amount`) is included in the request.  Possible values: - `false`: tax amount is not included in the request. - `true`:  tax amount is included in the request. 

        :param applied: The applied of this Ptsv2paymentsTravelInformationAutoRentalTaxDetails.
        :type: bool
        """

        self._applied = applied

    @property
    def exemption_code(self):
        """
        Gets the exemption_code of this Ptsv2paymentsTravelInformationAutoRentalTaxDetails.
        Status code for exemption from sales and use tax. This field is a pass-through, which means that CyberSource does not verify the value or modify it in any way before sending it to the processor. 

        :return: The exemption_code of this Ptsv2paymentsTravelInformationAutoRentalTaxDetails.
        :rtype: str
        """
        return self._exemption_code

    @exemption_code.setter
    def exemption_code(self, exemption_code):
        """
        Sets the exemption_code of this Ptsv2paymentsTravelInformationAutoRentalTaxDetails.
        Status code for exemption from sales and use tax. This field is a pass-through, which means that CyberSource does not verify the value or modify it in any way before sending it to the processor. 

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

        self._exemption_code = exemption_code

    @property
    def tax_type(self):
        """
        Gets the tax_type of this Ptsv2paymentsTravelInformationAutoRentalTaxDetails.
        Different taxes the rental agency applies to the rental agreement such as tourist tax, airport tax, or rental tax. 

        :return: The tax_type of this Ptsv2paymentsTravelInformationAutoRentalTaxDetails.
        :rtype: str
        """
        return self._tax_type

    @tax_type.setter
    def tax_type(self, tax_type):
        """
        Sets the tax_type of this Ptsv2paymentsTravelInformationAutoRentalTaxDetails.
        Different taxes the rental agency applies to the rental agreement such as tourist tax, airport tax, or rental tax. 

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

        self._tax_type = tax_type

    @property
    def tax_summary(self):
        """
        Gets the tax_summary of this Ptsv2paymentsTravelInformationAutoRentalTaxDetails.
        Summary of all tax types 

        :return: The tax_summary of this Ptsv2paymentsTravelInformationAutoRentalTaxDetails.
        :rtype: str
        """
        return self._tax_summary

    @tax_summary.setter
    def tax_summary(self, tax_summary):
        """
        Sets the tax_summary of this Ptsv2paymentsTravelInformationAutoRentalTaxDetails.
        Summary of all tax types 

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

        self._tax_summary = tax_summary

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

        return self.__dict__ == other.__dict__

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