# 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 Ptsv2paymentsOrderInformation(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_details': 'Ptsv2paymentsOrderInformationAmountDetails',
        'bill_to': 'Ptsv2paymentsOrderInformationBillTo',
        'ship_to': 'Ptsv2paymentsOrderInformationShipTo',
        'line_items': 'list[Ptsv2paymentsOrderInformationLineItems]',
        'invoice_details': 'Ptsv2paymentsOrderInformationInvoiceDetails',
        'shipping_details': 'Ptsv2paymentsOrderInformationShippingDetails',
        'returns_accepted': 'bool',
        'pre_order': 'str',
        'pre_order_date': 'str',
        'reordered': 'bool',
        'total_offers_count': 'str'
    }

    attribute_map = {
        'amount_details': 'amountDetails',
        'bill_to': 'billTo',
        'ship_to': 'shipTo',
        'line_items': 'lineItems',
        'invoice_details': 'invoiceDetails',
        'shipping_details': 'shippingDetails',
        'returns_accepted': 'returnsAccepted',
        'pre_order': 'preOrder',
        'pre_order_date': 'preOrderDate',
        'reordered': 'reordered',
        'total_offers_count': 'totalOffersCount'
    }

    def __init__(self, amount_details=None, bill_to=None, ship_to=None, line_items=None, invoice_details=None, shipping_details=None, returns_accepted=None, pre_order=None, pre_order_date=None, reordered=None, total_offers_count=None):
        """
        Ptsv2paymentsOrderInformation - a model defined in Swagger
        """

        self._amount_details = None
        self._bill_to = None
        self._ship_to = None
        self._line_items = None
        self._invoice_details = None
        self._shipping_details = None
        self._returns_accepted = None
        self._pre_order = None
        self._pre_order_date = None
        self._reordered = None
        self._total_offers_count = None

        if amount_details is not None:
          self.amount_details = amount_details
        if bill_to is not None:
          self.bill_to = bill_to
        if ship_to is not None:
          self.ship_to = ship_to
        if line_items is not None:
          self.line_items = line_items
        if invoice_details is not None:
          self.invoice_details = invoice_details
        if shipping_details is not None:
          self.shipping_details = shipping_details
        if returns_accepted is not None:
          self.returns_accepted = returns_accepted
        if pre_order is not None:
          self.pre_order = pre_order
        if pre_order_date is not None:
          self.pre_order_date = pre_order_date
        if reordered is not None:
          self.reordered = reordered
        if total_offers_count is not None:
          self.total_offers_count = total_offers_count

    @property
    def amount_details(self):
        """
        Gets the amount_details of this Ptsv2paymentsOrderInformation.

        :return: The amount_details of this Ptsv2paymentsOrderInformation.
        :rtype: Ptsv2paymentsOrderInformationAmountDetails
        """
        return self._amount_details

    @amount_details.setter
    def amount_details(self, amount_details):
        """
        Sets the amount_details of this Ptsv2paymentsOrderInformation.

        :param amount_details: The amount_details of this Ptsv2paymentsOrderInformation.
        :type: Ptsv2paymentsOrderInformationAmountDetails
        """

        self._amount_details = amount_details

    @property
    def bill_to(self):
        """
        Gets the bill_to of this Ptsv2paymentsOrderInformation.

        :return: The bill_to of this Ptsv2paymentsOrderInformation.
        :rtype: Ptsv2paymentsOrderInformationBillTo
        """
        return self._bill_to

    @bill_to.setter
    def bill_to(self, bill_to):
        """
        Sets the bill_to of this Ptsv2paymentsOrderInformation.

        :param bill_to: The bill_to of this Ptsv2paymentsOrderInformation.
        :type: Ptsv2paymentsOrderInformationBillTo
        """

        self._bill_to = bill_to

    @property
    def ship_to(self):
        """
        Gets the ship_to of this Ptsv2paymentsOrderInformation.

        :return: The ship_to of this Ptsv2paymentsOrderInformation.
        :rtype: Ptsv2paymentsOrderInformationShipTo
        """
        return self._ship_to

    @ship_to.setter
    def ship_to(self, ship_to):
        """
        Sets the ship_to of this Ptsv2paymentsOrderInformation.

        :param ship_to: The ship_to of this Ptsv2paymentsOrderInformation.
        :type: Ptsv2paymentsOrderInformationShipTo
        """

        self._ship_to = ship_to

    @property
    def line_items(self):
        """
        Gets the line_items of this Ptsv2paymentsOrderInformation.

        :return: The line_items of this Ptsv2paymentsOrderInformation.
        :rtype: list[Ptsv2paymentsOrderInformationLineItems]
        """
        return self._line_items

    @line_items.setter
    def line_items(self, line_items):
        """
        Sets the line_items of this Ptsv2paymentsOrderInformation.

        :param line_items: The line_items of this Ptsv2paymentsOrderInformation.
        :type: list[Ptsv2paymentsOrderInformationLineItems]
        """

        self._line_items = line_items

    @property
    def invoice_details(self):
        """
        Gets the invoice_details of this Ptsv2paymentsOrderInformation.

        :return: The invoice_details of this Ptsv2paymentsOrderInformation.
        :rtype: Ptsv2paymentsOrderInformationInvoiceDetails
        """
        return self._invoice_details

    @invoice_details.setter
    def invoice_details(self, invoice_details):
        """
        Sets the invoice_details of this Ptsv2paymentsOrderInformation.

        :param invoice_details: The invoice_details of this Ptsv2paymentsOrderInformation.
        :type: Ptsv2paymentsOrderInformationInvoiceDetails
        """

        self._invoice_details = invoice_details

    @property
    def shipping_details(self):
        """
        Gets the shipping_details of this Ptsv2paymentsOrderInformation.

        :return: The shipping_details of this Ptsv2paymentsOrderInformation.
        :rtype: Ptsv2paymentsOrderInformationShippingDetails
        """
        return self._shipping_details

    @shipping_details.setter
    def shipping_details(self, shipping_details):
        """
        Sets the shipping_details of this Ptsv2paymentsOrderInformation.

        :param shipping_details: The shipping_details of this Ptsv2paymentsOrderInformation.
        :type: Ptsv2paymentsOrderInformationShippingDetails
        """

        self._shipping_details = shipping_details

    @property
    def returns_accepted(self):
        """
        Gets the returns_accepted of this Ptsv2paymentsOrderInformation.
        This is only needed when you are requesting both payment and DM service at same time.  Boolean that indicates whether returns are accepted for this order. This field can contain one of the following values: - true: Returns are accepted for this order. - false: Returns are not accepted for this order. 

        :return: The returns_accepted of this Ptsv2paymentsOrderInformation.
        :rtype: bool
        """
        return self._returns_accepted

    @returns_accepted.setter
    def returns_accepted(self, returns_accepted):
        """
        Sets the returns_accepted of this Ptsv2paymentsOrderInformation.
        This is only needed when you are requesting both payment and DM service at same time.  Boolean that indicates whether returns are accepted for this order. This field can contain one of the following values: - true: Returns are accepted for this order. - false: Returns are not accepted for this order. 

        :param returns_accepted: The returns_accepted of this Ptsv2paymentsOrderInformation.
        :type: bool
        """

        self._returns_accepted = returns_accepted

    @property
    def pre_order(self):
        """
        Gets the pre_order of this Ptsv2paymentsOrderInformation.
        Indicates whether cardholder is placing an order with a future availability or release date. This field can contain one of these values: - MERCHANDISE_AVAILABLE: Merchandise available - FUTURE_AVAILABILITY: Future availability 

        :return: The pre_order of this Ptsv2paymentsOrderInformation.
        :rtype: str
        """
        return self._pre_order

    @pre_order.setter
    def pre_order(self, pre_order):
        """
        Sets the pre_order of this Ptsv2paymentsOrderInformation.
        Indicates whether cardholder is placing an order with a future availability or release date. This field can contain one of these values: - MERCHANDISE_AVAILABLE: Merchandise available - FUTURE_AVAILABILITY: Future availability 

        :param pre_order: The pre_order of this Ptsv2paymentsOrderInformation.
        :type: str
        """

        self._pre_order = pre_order

    @property
    def pre_order_date(self):
        """
        Gets the pre_order_date of this Ptsv2paymentsOrderInformation.
        Expected date that a pre-ordered purchase will be available. Format: YYYYMMDD 

        :return: The pre_order_date of this Ptsv2paymentsOrderInformation.
        :rtype: str
        """
        return self._pre_order_date

    @pre_order_date.setter
    def pre_order_date(self, pre_order_date):
        """
        Sets the pre_order_date of this Ptsv2paymentsOrderInformation.
        Expected date that a pre-ordered purchase will be available. Format: YYYYMMDD 

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

        self._pre_order_date = pre_order_date

    @property
    def reordered(self):
        """
        Gets the reordered of this Ptsv2paymentsOrderInformation.
        Indicates whether the cardholder is reordering previously purchased merchandise. This field can contain one of these values: - false: First time ordered - true: Reordered 

        :return: The reordered of this Ptsv2paymentsOrderInformation.
        :rtype: bool
        """
        return self._reordered

    @reordered.setter
    def reordered(self, reordered):
        """
        Sets the reordered of this Ptsv2paymentsOrderInformation.
        Indicates whether the cardholder is reordering previously purchased merchandise. This field can contain one of these values: - false: First time ordered - true: Reordered 

        :param reordered: The reordered of this Ptsv2paymentsOrderInformation.
        :type: bool
        """

        self._reordered = reordered

    @property
    def total_offers_count(self):
        """
        Gets the total_offers_count of this Ptsv2paymentsOrderInformation.
        Total number of articles/items in the order as a numeric decimal count. Possible values: 00 - 99 

        :return: The total_offers_count of this Ptsv2paymentsOrderInformation.
        :rtype: str
        """
        return self._total_offers_count

    @total_offers_count.setter
    def total_offers_count(self, total_offers_count):
        """
        Sets the total_offers_count of this Ptsv2paymentsOrderInformation.
        Total number of articles/items in the order as a numeric decimal count. Possible values: 00 - 99 

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

        self._total_offers_count = total_offers_count

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

        return self.__dict__ == other.__dict__

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