# coding: utf-8

"""
    Cyclos 4.11.5 API

    The REST API for Cyclos 4.11.5  # noqa: E501

    OpenAPI spec version: 4.11.5
    
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""


import pprint
import re  # noqa: F401

import six

from swagger_client.configuration import Configuration


class OrderResult(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 = {
        'status': 'OrderStatusEnum',
        'creation_date': 'datetime',
        'currency': 'Currency',
        'number': 'str',
        'total_price': 'BigDecimal',
        'image': 'Image'
    }

    attribute_map = {
        'status': 'status',
        'creation_date': 'creationDate',
        'currency': 'currency',
        'number': 'number',
        'total_price': 'totalPrice',
        'image': 'image'
    }

    def __init__(self, status=None, creation_date=None, currency=None, number=None, total_price=None, image=None, _configuration=None):  # noqa: E501
        """OrderResult - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._status = None
        self._creation_date = None
        self._currency = None
        self._number = None
        self._total_price = None
        self._image = None
        self.discriminator = None

        if status is not None:
            self.status = status
        if creation_date is not None:
            self.creation_date = creation_date
        if currency is not None:
            self.currency = currency
        if number is not None:
            self.number = number
        if total_price is not None:
            self.total_price = total_price
        if image is not None:
            self.image = image

    @property
    def status(self):
        """Gets the status of this OrderResult.  # noqa: E501

        The possible statuses for an order Possible values are: * completed: The order was accepted by the seller and/or buyer and the related payment was done. * disposed: The order was marked as disposed because the seller and/or buyer were removed or they do not have any account in the order's currency. * draft: The order has been created by the seller, but has not yet been sent to the buyer for approval * paymentCanceled: The related payment was not done because was canceled after finish the authorization process. * paymentDenied: The related payment was not done because was denied. * paymentPending: The order was accepted by the seller and/or buyer and the related payment is waiting for authorization. * pendingBuyer: The order is pending by the buyer's action. * pendingSeller: The order is pending by the seller's action. * rejectedByBuyer: The order was rejected by the buyer. * rejectedBySeller: The order was rejected by the seller.   # noqa: E501

        :return: The status of this OrderResult.  # noqa: E501
        :rtype: OrderStatusEnum
        """
        return self._status

    @status.setter
    def status(self, status):
        """Sets the status of this OrderResult.

        The possible statuses for an order Possible values are: * completed: The order was accepted by the seller and/or buyer and the related payment was done. * disposed: The order was marked as disposed because the seller and/or buyer were removed or they do not have any account in the order's currency. * draft: The order has been created by the seller, but has not yet been sent to the buyer for approval * paymentCanceled: The related payment was not done because was canceled after finish the authorization process. * paymentDenied: The related payment was not done because was denied. * paymentPending: The order was accepted by the seller and/or buyer and the related payment is waiting for authorization. * pendingBuyer: The order is pending by the buyer's action. * pendingSeller: The order is pending by the seller's action. * rejectedByBuyer: The order was rejected by the buyer. * rejectedBySeller: The order was rejected by the seller.   # noqa: E501

        :param status: The status of this OrderResult.  # noqa: E501
        :type: OrderStatusEnum
        """

        self._status = status

    @property
    def creation_date(self):
        """Gets the creation_date of this OrderResult.  # noqa: E501

        The creation date corresponding to the date when the first item of  this order was added to the shopping cart.   # noqa: E501

        :return: The creation_date of this OrderResult.  # noqa: E501
        :rtype: datetime
        """
        return self._creation_date

    @creation_date.setter
    def creation_date(self, creation_date):
        """Sets the creation_date of this OrderResult.

        The creation date corresponding to the date when the first item of  this order was added to the shopping cart.   # noqa: E501

        :param creation_date: The creation_date of this OrderResult.  # noqa: E501
        :type: datetime
        """

        self._creation_date = creation_date

    @property
    def currency(self):
        """Gets the currency of this OrderResult.  # noqa: E501

        The currency of the order.  # noqa: E501

        :return: The currency of this OrderResult.  # noqa: E501
        :rtype: Currency
        """
        return self._currency

    @currency.setter
    def currency(self, currency):
        """Sets the currency of this OrderResult.

        The currency of the order.  # noqa: E501

        :param currency: The currency of this OrderResult.  # noqa: E501
        :type: Currency
        """

        self._currency = currency

    @property
    def number(self):
        """Gets the number of this OrderResult.  # noqa: E501

        The generated order number according to the webshop settings.  # noqa: E501

        :return: The number of this OrderResult.  # noqa: E501
        :rtype: str
        """
        return self._number

    @number.setter
    def number(self, number):
        """Sets the number of this OrderResult.

        The generated order number according to the webshop settings.  # noqa: E501

        :param number: The number of this OrderResult.  # noqa: E501
        :type: str
        """

        self._number = number

    @property
    def total_price(self):
        """Gets the total_price of this OrderResult.  # noqa: E501

        The total price of the order, i.e the sum of the total price of all  of its `items` and the delivery method (if any).   # noqa: E501

        :return: The total_price of this OrderResult.  # noqa: E501
        :rtype: BigDecimal
        """
        return self._total_price

    @total_price.setter
    def total_price(self, total_price):
        """Sets the total_price of this OrderResult.

        The total price of the order, i.e the sum of the total price of all  of its `items` and the delivery method (if any).   # noqa: E501

        :param total_price: The total_price of this OrderResult.  # noqa: E501
        :type: BigDecimal
        """

        self._total_price = total_price

    @property
    def image(self):
        """Gets the image of this OrderResult.  # noqa: E501

        This represents the first image of the first item in the  order (if any)   # noqa: E501

        :return: The image of this OrderResult.  # noqa: E501
        :rtype: Image
        """
        return self._image

    @image.setter
    def image(self, image):
        """Sets the image of this OrderResult.

        This represents the first image of the first item in the  order (if any)   # noqa: E501

        :param image: The image of this OrderResult.  # noqa: E501
        :type: Image
        """

        self._image = image

    def to_dict(self):
        """Returns the model properties as a dict"""
        result = {}

        for attr, _ in six.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
        if issubclass(OrderResult, dict):
            for key, value in self.items():
                result[key] = value

        return result

    def to_str(self):
        """Returns the string representation of the model"""
        return pprint.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, OrderResult):
            return False

        return self.to_dict() == other.to_dict()

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

        return self.to_dict() != other.to_dict()
