# 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 Ptsv2paymentsOrderInformationInvoiceDetails(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 = {
        'invoice_number': 'str',
        'barcode_number': 'str',
        'expiration_date': 'str',
        'purchase_order_number': 'str',
        'purchase_order_date': 'str',
        'purchase_contact_name': 'str',
        'taxable': 'bool',
        'vat_invoice_reference_number': 'str',
        'commodity_code': 'str',
        'merchandise_code': 'int',
        'transaction_advice_addendum': 'list[Ptsv2paymentsOrderInformationInvoiceDetailsTransactionAdviceAddendum]',
        'reference_data_code': 'str',
        'reference_data_number': 'str',
        'sales_slip_number': 'int',
        'invoice_date': 'str'
    }

    attribute_map = {
        'invoice_number': 'invoiceNumber',
        'barcode_number': 'barcodeNumber',
        'expiration_date': 'expirationDate',
        'purchase_order_number': 'purchaseOrderNumber',
        'purchase_order_date': 'purchaseOrderDate',
        'purchase_contact_name': 'purchaseContactName',
        'taxable': 'taxable',
        'vat_invoice_reference_number': 'vatInvoiceReferenceNumber',
        'commodity_code': 'commodityCode',
        'merchandise_code': 'merchandiseCode',
        'transaction_advice_addendum': 'transactionAdviceAddendum',
        'reference_data_code': 'referenceDataCode',
        'reference_data_number': 'referenceDataNumber',
        'sales_slip_number': 'salesSlipNumber',
        'invoice_date': 'invoiceDate'
    }

    def __init__(self, invoice_number=None, barcode_number=None, expiration_date=None, purchase_order_number=None, purchase_order_date=None, purchase_contact_name=None, taxable=None, vat_invoice_reference_number=None, commodity_code=None, merchandise_code=None, transaction_advice_addendum=None, reference_data_code=None, reference_data_number=None, sales_slip_number=None, invoice_date=None):
        """
        Ptsv2paymentsOrderInformationInvoiceDetails - a model defined in Swagger
        """

        self._invoice_number = None
        self._barcode_number = None
        self._expiration_date = None
        self._purchase_order_number = None
        self._purchase_order_date = None
        self._purchase_contact_name = None
        self._taxable = None
        self._vat_invoice_reference_number = None
        self._commodity_code = None
        self._merchandise_code = None
        self._transaction_advice_addendum = None
        self._reference_data_code = None
        self._reference_data_number = None
        self._sales_slip_number = None
        self._invoice_date = None

        if invoice_number is not None:
          self.invoice_number = invoice_number
        if barcode_number is not None:
          self.barcode_number = barcode_number
        if expiration_date is not None:
          self.expiration_date = expiration_date
        if purchase_order_number is not None:
          self.purchase_order_number = purchase_order_number
        if purchase_order_date is not None:
          self.purchase_order_date = purchase_order_date
        if purchase_contact_name is not None:
          self.purchase_contact_name = purchase_contact_name
        if taxable is not None:
          self.taxable = taxable
        if vat_invoice_reference_number is not None:
          self.vat_invoice_reference_number = vat_invoice_reference_number
        if commodity_code is not None:
          self.commodity_code = commodity_code
        if merchandise_code is not None:
          self.merchandise_code = merchandise_code
        if transaction_advice_addendum is not None:
          self.transaction_advice_addendum = transaction_advice_addendum
        if reference_data_code is not None:
          self.reference_data_code = reference_data_code
        if reference_data_number is not None:
          self.reference_data_number = reference_data_number
        if sales_slip_number is not None:
          self.sales_slip_number = sales_slip_number
        if invoice_date is not None:
          self.invoice_date = invoice_date

    @property
    def invoice_number(self):
        """
        Gets the invoice_number of this Ptsv2paymentsOrderInformationInvoiceDetails.
        Invoice Number.

        :return: The invoice_number of this Ptsv2paymentsOrderInformationInvoiceDetails.
        :rtype: str
        """
        return self._invoice_number

    @invoice_number.setter
    def invoice_number(self, invoice_number):
        """
        Sets the invoice_number of this Ptsv2paymentsOrderInformationInvoiceDetails.
        Invoice Number.

        :param invoice_number: The invoice_number of this Ptsv2paymentsOrderInformationInvoiceDetails.
        :type: str
        """

        self._invoice_number = invoice_number

    @property
    def barcode_number(self):
        """
        Gets the barcode_number of this Ptsv2paymentsOrderInformationInvoiceDetails.
        Barcode Number.

        :return: The barcode_number of this Ptsv2paymentsOrderInformationInvoiceDetails.
        :rtype: str
        """
        return self._barcode_number

    @barcode_number.setter
    def barcode_number(self, barcode_number):
        """
        Sets the barcode_number of this Ptsv2paymentsOrderInformationInvoiceDetails.
        Barcode Number.

        :param barcode_number: The barcode_number of this Ptsv2paymentsOrderInformationInvoiceDetails.
        :type: str
        """

        self._barcode_number = barcode_number

    @property
    def expiration_date(self):
        """
        Gets the expiration_date of this Ptsv2paymentsOrderInformationInvoiceDetails.
        Expiration Date.

        :return: The expiration_date of this Ptsv2paymentsOrderInformationInvoiceDetails.
        :rtype: str
        """
        return self._expiration_date

    @expiration_date.setter
    def expiration_date(self, expiration_date):
        """
        Sets the expiration_date of this Ptsv2paymentsOrderInformationInvoiceDetails.
        Expiration Date.

        :param expiration_date: The expiration_date of this Ptsv2paymentsOrderInformationInvoiceDetails.
        :type: str
        """

        self._expiration_date = expiration_date

    @property
    def purchase_order_number(self):
        """
        Gets the purchase_order_number of this Ptsv2paymentsOrderInformationInvoiceDetails.
        Value used by your customer to identify the order. This value is typically a purchase order number. CyberSource recommends that you do not populate the field with all zeros or nines.  For processor-specific information, see the `user_po` field in [Level II and Level III Processing Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/Level_2_3_SCMP_API/html) 

        :return: The purchase_order_number of this Ptsv2paymentsOrderInformationInvoiceDetails.
        :rtype: str
        """
        return self._purchase_order_number

    @purchase_order_number.setter
    def purchase_order_number(self, purchase_order_number):
        """
        Sets the purchase_order_number of this Ptsv2paymentsOrderInformationInvoiceDetails.
        Value used by your customer to identify the order. This value is typically a purchase order number. CyberSource recommends that you do not populate the field with all zeros or nines.  For processor-specific information, see the `user_po` field in [Level II and Level III Processing Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/Level_2_3_SCMP_API/html) 

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

        self._purchase_order_number = purchase_order_number

    @property
    def purchase_order_date(self):
        """
        Gets the purchase_order_date of this Ptsv2paymentsOrderInformationInvoiceDetails.
        Date the order was processed. `Format: YYYY-MM-DD`.  For processor-specific information, see the `purchaser_order_date` field in [Level II and Level III Processing Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/Level_2_3_SCMP_API/html) 

        :return: The purchase_order_date of this Ptsv2paymentsOrderInformationInvoiceDetails.
        :rtype: str
        """
        return self._purchase_order_date

    @purchase_order_date.setter
    def purchase_order_date(self, purchase_order_date):
        """
        Sets the purchase_order_date of this Ptsv2paymentsOrderInformationInvoiceDetails.
        Date the order was processed. `Format: YYYY-MM-DD`.  For processor-specific information, see the `purchaser_order_date` field in [Level II and Level III Processing Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/Level_2_3_SCMP_API/html) 

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

        self._purchase_order_date = purchase_order_date

    @property
    def purchase_contact_name(self):
        """
        Gets the purchase_contact_name of this Ptsv2paymentsOrderInformationInvoiceDetails.
        The name of the individual or the company contacted for company authorized purchases.  For processor-specific information, see the `authorized_contact_name` field in [Level II and Level III Processing Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/Level_2_3_SCMP_API/html) 

        :return: The purchase_contact_name of this Ptsv2paymentsOrderInformationInvoiceDetails.
        :rtype: str
        """
        return self._purchase_contact_name

    @purchase_contact_name.setter
    def purchase_contact_name(self, purchase_contact_name):
        """
        Sets the purchase_contact_name of this Ptsv2paymentsOrderInformationInvoiceDetails.
        The name of the individual or the company contacted for company authorized purchases.  For processor-specific information, see the `authorized_contact_name` field in [Level II and Level III Processing Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/Level_2_3_SCMP_API/html) 

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

        self._purchase_contact_name = purchase_contact_name

    @property
    def taxable(self):
        """
        Gets the taxable of this Ptsv2paymentsOrderInformationInvoiceDetails.
        Flag that indicates whether an order is taxable. This value must be true if the sum of all _lineItems[].taxAmount_ values > 0.  If you do not include any `lineItems[].taxAmount` values in your request, CyberSource does not include `invoiceDetails.taxable` in the data it sends to the processor.  For processor-specific information, see the `tax_indicator` field in [Level II and Level III Processing Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/Level_2_3_SCMP_API/html)  Possible values:  - **true**  - **false** 

        :return: The taxable of this Ptsv2paymentsOrderInformationInvoiceDetails.
        :rtype: bool
        """
        return self._taxable

    @taxable.setter
    def taxable(self, taxable):
        """
        Sets the taxable of this Ptsv2paymentsOrderInformationInvoiceDetails.
        Flag that indicates whether an order is taxable. This value must be true if the sum of all _lineItems[].taxAmount_ values > 0.  If you do not include any `lineItems[].taxAmount` values in your request, CyberSource does not include `invoiceDetails.taxable` in the data it sends to the processor.  For processor-specific information, see the `tax_indicator` field in [Level II and Level III Processing Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/Level_2_3_SCMP_API/html)  Possible values:  - **true**  - **false** 

        :param taxable: The taxable of this Ptsv2paymentsOrderInformationInvoiceDetails.
        :type: bool
        """

        self._taxable = taxable

    @property
    def vat_invoice_reference_number(self):
        """
        Gets the vat_invoice_reference_number of this Ptsv2paymentsOrderInformationInvoiceDetails.
        VAT invoice number associated with the transaction.  For processor-specific information, see the `vat_invoice_ref_number` field in [Level II and Level III Processing Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/Level_2_3_SCMP_API/html) 

        :return: The vat_invoice_reference_number of this Ptsv2paymentsOrderInformationInvoiceDetails.
        :rtype: str
        """
        return self._vat_invoice_reference_number

    @vat_invoice_reference_number.setter
    def vat_invoice_reference_number(self, vat_invoice_reference_number):
        """
        Sets the vat_invoice_reference_number of this Ptsv2paymentsOrderInformationInvoiceDetails.
        VAT invoice number associated with the transaction.  For processor-specific information, see the `vat_invoice_ref_number` field in [Level II and Level III Processing Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/Level_2_3_SCMP_API/html) 

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

        self._vat_invoice_reference_number = vat_invoice_reference_number

    @property
    def commodity_code(self):
        """
        Gets the commodity_code of this Ptsv2paymentsOrderInformationInvoiceDetails.
        International description code of the overall order’s goods or services or the Categorizes purchases for VAT reporting. Contact your acquirer for a list of codes.  For processor-specific information, see the `summary_commodity_code` field in [Level II and Level III Processing Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/Level_2_3_SCMP_API/html) 

        :return: The commodity_code of this Ptsv2paymentsOrderInformationInvoiceDetails.
        :rtype: str
        """
        return self._commodity_code

    @commodity_code.setter
    def commodity_code(self, commodity_code):
        """
        Sets the commodity_code of this Ptsv2paymentsOrderInformationInvoiceDetails.
        International description code of the overall order’s goods or services or the Categorizes purchases for VAT reporting. Contact your acquirer for a list of codes.  For processor-specific information, see the `summary_commodity_code` field in [Level II and Level III Processing Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/Level_2_3_SCMP_API/html) 

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

        self._commodity_code = commodity_code

    @property
    def merchandise_code(self):
        """
        Gets the merchandise_code of this Ptsv2paymentsOrderInformationInvoiceDetails.
        Identifier for the merchandise. This field is supported only on the processors listed in this field description.  #### American Express Direct Possible value: - 1000: Gift card  #### CyberSource through VisaNet This value must be right justified. In Japan, this value is called a _goods code_.  #### JCN Gateway This value must be right justified. In Japan, this value is called a _goods code_. 

        :return: The merchandise_code of this Ptsv2paymentsOrderInformationInvoiceDetails.
        :rtype: int
        """
        return self._merchandise_code

    @merchandise_code.setter
    def merchandise_code(self, merchandise_code):
        """
        Sets the merchandise_code of this Ptsv2paymentsOrderInformationInvoiceDetails.
        Identifier for the merchandise. This field is supported only on the processors listed in this field description.  #### American Express Direct Possible value: - 1000: Gift card  #### CyberSource through VisaNet This value must be right justified. In Japan, this value is called a _goods code_.  #### JCN Gateway This value must be right justified. In Japan, this value is called a _goods code_. 

        :param merchandise_code: The merchandise_code of this Ptsv2paymentsOrderInformationInvoiceDetails.
        :type: int
        """

        self._merchandise_code = merchandise_code

    @property
    def transaction_advice_addendum(self):
        """
        Gets the transaction_advice_addendum of this Ptsv2paymentsOrderInformationInvoiceDetails.

        :return: The transaction_advice_addendum of this Ptsv2paymentsOrderInformationInvoiceDetails.
        :rtype: list[Ptsv2paymentsOrderInformationInvoiceDetailsTransactionAdviceAddendum]
        """
        return self._transaction_advice_addendum

    @transaction_advice_addendum.setter
    def transaction_advice_addendum(self, transaction_advice_addendum):
        """
        Sets the transaction_advice_addendum of this Ptsv2paymentsOrderInformationInvoiceDetails.

        :param transaction_advice_addendum: The transaction_advice_addendum of this Ptsv2paymentsOrderInformationInvoiceDetails.
        :type: list[Ptsv2paymentsOrderInformationInvoiceDetailsTransactionAdviceAddendum]
        """

        self._transaction_advice_addendum = transaction_advice_addendum

    @property
    def reference_data_code(self):
        """
        Gets the reference_data_code of this Ptsv2paymentsOrderInformationInvoiceDetails.
        Code that identifies the value of the `referenceDataNumber` field.  For the possible values, see \"Reference Data Codes\" in [Level II and Level III Processing Using the SCMP API.](https://apps.cybersource.com/library/documentation/dev_guides/Level_2_3_SCMP_API/html/).  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 reference_data_code of this Ptsv2paymentsOrderInformationInvoiceDetails.
        :rtype: str
        """
        return self._reference_data_code

    @reference_data_code.setter
    def reference_data_code(self, reference_data_code):
        """
        Sets the reference_data_code of this Ptsv2paymentsOrderInformationInvoiceDetails.
        Code that identifies the value of the `referenceDataNumber` field.  For the possible values, see \"Reference Data Codes\" in [Level II and Level III Processing Using the SCMP API.](https://apps.cybersource.com/library/documentation/dev_guides/Level_2_3_SCMP_API/html/).  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 reference_data_code: The reference_data_code of this Ptsv2paymentsOrderInformationInvoiceDetails.
        :type: str
        """
        if reference_data_code is not None and len(reference_data_code) > 3:
            raise ValueError("Invalid value for `reference_data_code`, length must be less than or equal to `3`")

        self._reference_data_code = reference_data_code

    @property
    def reference_data_number(self):
        """
        Gets the reference_data_number of this Ptsv2paymentsOrderInformationInvoiceDetails.
        Reference number. The meaning of this value is identified by the value of the `referenceDataCode` field.  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 reference_data_number of this Ptsv2paymentsOrderInformationInvoiceDetails.
        :rtype: str
        """
        return self._reference_data_number

    @reference_data_number.setter
    def reference_data_number(self, reference_data_number):
        """
        Sets the reference_data_number of this Ptsv2paymentsOrderInformationInvoiceDetails.
        Reference number. The meaning of this value is identified by the value of the `referenceDataCode` field.  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 reference_data_number: The reference_data_number of this Ptsv2paymentsOrderInformationInvoiceDetails.
        :type: str
        """
        if reference_data_number is not None and len(reference_data_number) > 30:
            raise ValueError("Invalid value for `reference_data_number`, length must be less than or equal to `30`")

        self._reference_data_number = reference_data_number

    @property
    def sales_slip_number(self):
        """
        Gets the sales_slip_number of this Ptsv2paymentsOrderInformationInvoiceDetails.
        Transaction identifier that is generated. You have the option of printing the sales slip number on the receipt. This field is supported only on Cybersource through Visanet and JCN gateway.  Optional field.  #### Card Present processing message If you included this field in the request, the returned value is the value that you sent in the request. If you did not include this field in the request, the system generated this value for you.  The difference between this reply field and the `processorInformation.systemTraceAuditNumber` field is that the system generates the system trace audit number (STAN), and you must print the receipt number on the receipt; whereas you can generate the sales slip number, and you can choose to print the sales slip number on the receipt. 

        :return: The sales_slip_number of this Ptsv2paymentsOrderInformationInvoiceDetails.
        :rtype: int
        """
        return self._sales_slip_number

    @sales_slip_number.setter
    def sales_slip_number(self, sales_slip_number):
        """
        Sets the sales_slip_number of this Ptsv2paymentsOrderInformationInvoiceDetails.
        Transaction identifier that is generated. You have the option of printing the sales slip number on the receipt. This field is supported only on Cybersource through Visanet and JCN gateway.  Optional field.  #### Card Present processing message If you included this field in the request, the returned value is the value that you sent in the request. If you did not include this field in the request, the system generated this value for you.  The difference between this reply field and the `processorInformation.systemTraceAuditNumber` field is that the system generates the system trace audit number (STAN), and you must print the receipt number on the receipt; whereas you can generate the sales slip number, and you can choose to print the sales slip number on the receipt. 

        :param sales_slip_number: The sales_slip_number of this Ptsv2paymentsOrderInformationInvoiceDetails.
        :type: int
        """
        if sales_slip_number is not None and sales_slip_number > 99999:
            raise ValueError("Invalid value for `sales_slip_number`, must be a value less than or equal to `99999`")

        self._sales_slip_number = sales_slip_number

    @property
    def invoice_date(self):
        """
        Gets the invoice_date of this Ptsv2paymentsOrderInformationInvoiceDetails.
        Date of the tax calculation. Use format YYYYMMDD. You can provide a date in the past if you are calculating tax for a refund and want to know what the tax was on the date the order was placed. You can provide a date in the future if you are calculating the tax for a future date, such as an upcoming tax holiday.  The default is the date, in Pacific time, that the bank receives the request. Keep this in mind if you are in a different time zone and want the tax calculated with the rates that are applicable on a specific date.  #### Tax Calculation Optional field for U.S., Canadian, international tax, and value added taxes. 

        :return: The invoice_date of this Ptsv2paymentsOrderInformationInvoiceDetails.
        :rtype: str
        """
        return self._invoice_date

    @invoice_date.setter
    def invoice_date(self, invoice_date):
        """
        Sets the invoice_date of this Ptsv2paymentsOrderInformationInvoiceDetails.
        Date of the tax calculation. Use format YYYYMMDD. You can provide a date in the past if you are calculating tax for a refund and want to know what the tax was on the date the order was placed. You can provide a date in the future if you are calculating the tax for a future date, such as an upcoming tax holiday.  The default is the date, in Pacific time, that the bank receives the request. Keep this in mind if you are in a different time zone and want the tax calculated with the rates that are applicable on a specific date.  #### Tax Calculation Optional field for U.S., Canadian, international tax, and value added taxes. 

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

        self._invoice_date = invoice_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, Ptsv2paymentsOrderInformationInvoiceDetails):
            return False

        return self.__dict__ == other.__dict__

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