# coding: utf-8

"""
    The Selling Partner API for Finances

    The Selling Partner API for Finances helps you obtain financial information relevant to a seller's business. You can obtain financial events for a given order or date range without having to wait until a statement period closes.

    The version of the OpenAPI document: 2024-06-19
    Generated by OpenAPI Generator (https://openapi-generator.tech)

    Do not edit the class manually.
"""  # noqa: E501


import pprint
import re  # noqa: F401

import six

from spapi.configuration import Configuration


class Context(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 = {
        'store_name': 'str',
        'order_type': 'str',
        'channel': 'str',
        'asin': 'str',
        'sku': 'str',
        'quantity_shipped': 'int',
        'fulfillment_network': 'str',
        'payment_type': 'str',
        'payment_method': 'str',
        'payment_reference': 'str',
        'payment_date': 'datetime',
        'deferral_reason': 'str',
        'maturity_date': 'datetime',
        'start_time': 'datetime',
        'end_time': 'datetime',
        'context_type': 'str',
    }

    attribute_map = {
        'store_name': 'storeName',
        'order_type': 'orderType',
        'channel': 'channel',
        'asin': 'asin',
        'sku': 'sku',
        'quantity_shipped': 'quantityShipped',
        'fulfillment_network': 'fulfillmentNetwork',
        'payment_type': 'paymentType',
        'payment_method': 'paymentMethod',
        'payment_reference': 'paymentReference',
        'payment_date': 'paymentDate',
        'deferral_reason': 'deferralReason',
        'maturity_date': 'maturityDate',
        'start_time': 'startTime',
        'end_time': 'endTime',
        'context_type': 'contextType',
    }

    def __init__(self, store_name=None, order_type=None, channel=None, asin=None, sku=None, quantity_shipped=None, fulfillment_network=None, payment_type=None, payment_method=None, payment_reference=None, payment_date=None, deferral_reason=None, maturity_date=None, start_time=None, end_time=None, context_type=None, _configuration=None):  # noqa: E501
        """Context - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._store_name = None
        self._order_type = None
        self._channel = None
        self._asin = None
        self._sku = None
        self._quantity_shipped = None
        self._fulfillment_network = None
        self._payment_type = None
        self._payment_method = None
        self._payment_reference = None
        self._payment_date = None
        self._deferral_reason = None
        self._maturity_date = None
        self._start_time = None
        self._end_time = None
        self._context_type = None
        self.discriminator = None

        if store_name is not None:
            self.store_name = store_name
        if order_type is not None:
            self.order_type = order_type
        if channel is not None:
            self.channel = channel
        if asin is not None:
            self.asin = asin
        if sku is not None:
            self.sku = sku
        if quantity_shipped is not None:
            self.quantity_shipped = quantity_shipped
        if fulfillment_network is not None:
            self.fulfillment_network = fulfillment_network
        if payment_type is not None:
            self.payment_type = payment_type
        if payment_method is not None:
            self.payment_method = payment_method
        if payment_reference is not None:
            self.payment_reference = payment_reference
        if payment_date is not None:
            self.payment_date = payment_date
        if deferral_reason is not None:
            self.deferral_reason = deferral_reason
        if maturity_date is not None:
            self.maturity_date = maturity_date
        if start_time is not None:
            self.start_time = start_time
        if end_time is not None:
            self.end_time = end_time
        self.context_type = context_type

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

        The store name associated with the transaction.  # noqa: E501

        :return: The store_name of this Context.  # noqa: E501
        :rtype: str
        """
        return self._store_name

    @store_name.setter
    def store_name(self, store_name):
        """Sets the store_name of this Context.

        The store name associated with the transaction.  # noqa: E501

        :param store_name: The store_name of this Context.  # noqa: E501
        :type: str
        """
        allowed_values = ["AMAZON_HAUL"]  # noqa: E501
        if (self._configuration.client_side_validation and
                store_name not in allowed_values):
            raise ValueError(
                "Invalid value for `store_name` ({0}), must be one of {1}"  # noqa: E501
                .format(store_name, allowed_values)
            )

        self._store_name = store_name

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

        Order type of the transaction.  # noqa: E501

        :return: The order_type of this Context.  # noqa: E501
        :rtype: str
        """
        return self._order_type

    @order_type.setter
    def order_type(self, order_type):
        """Sets the order_type of this Context.

        Order type of the transaction.  # noqa: E501

        :param order_type: The order_type of this Context.  # noqa: E501
        :type: str
        """

        self._order_type = order_type

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

        Channel details of related transaction.  # noqa: E501

        :return: The channel of this Context.  # noqa: E501
        :rtype: str
        """
        return self._channel

    @channel.setter
    def channel(self, channel):
        """Sets the channel of this Context.

        Channel details of related transaction.  # noqa: E501

        :param channel: The channel of this Context.  # noqa: E501
        :type: str
        """

        self._channel = channel

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

        Amazon Standard Identification Number (ASIN) of the item.  # noqa: E501

        :return: The asin of this Context.  # noqa: E501
        :rtype: str
        """
        return self._asin

    @asin.setter
    def asin(self, asin):
        """Sets the asin of this Context.

        Amazon Standard Identification Number (ASIN) of the item.  # noqa: E501

        :param asin: The asin of this Context.  # noqa: E501
        :type: str
        """

        self._asin = asin

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

        Stock keeping unit (SKU) of the item.  # noqa: E501

        :return: The sku of this Context.  # noqa: E501
        :rtype: str
        """
        return self._sku

    @sku.setter
    def sku(self, sku):
        """Sets the sku of this Context.

        Stock keeping unit (SKU) of the item.  # noqa: E501

        :param sku: The sku of this Context.  # noqa: E501
        :type: str
        """

        self._sku = sku

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

        Quantity of the item shipped.  # noqa: E501

        :return: The quantity_shipped of this Context.  # noqa: E501
        :rtype: int
        """
        return self._quantity_shipped

    @quantity_shipped.setter
    def quantity_shipped(self, quantity_shipped):
        """Sets the quantity_shipped of this Context.

        Quantity of the item shipped.  # noqa: E501

        :param quantity_shipped: The quantity_shipped of this Context.  # noqa: E501
        :type: int
        """

        self._quantity_shipped = quantity_shipped

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

        Fulfillment network of the item.  # noqa: E501

        :return: The fulfillment_network of this Context.  # noqa: E501
        :rtype: str
        """
        return self._fulfillment_network

    @fulfillment_network.setter
    def fulfillment_network(self, fulfillment_network):
        """Sets the fulfillment_network of this Context.

        Fulfillment network of the item.  # noqa: E501

        :param fulfillment_network: The fulfillment_network of this Context.  # noqa: E501
        :type: str
        """

        self._fulfillment_network = fulfillment_network

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

        Type of payment made.  # noqa: E501

        :return: The payment_type of this Context.  # noqa: E501
        :rtype: str
        """
        return self._payment_type

    @payment_type.setter
    def payment_type(self, payment_type):
        """Sets the payment_type of this Context.

        Type of payment made.  # noqa: E501

        :param payment_type: The payment_type of this Context.  # noqa: E501
        :type: str
        """

        self._payment_type = payment_type

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

        Method of payment made.  # noqa: E501

        :return: The payment_method of this Context.  # noqa: E501
        :rtype: str
        """
        return self._payment_method

    @payment_method.setter
    def payment_method(self, payment_method):
        """Sets the payment_method of this Context.

        Method of payment made.  # noqa: E501

        :param payment_method: The payment_method of this Context.  # noqa: E501
        :type: str
        """

        self._payment_method = payment_method

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

        Reference number of payment made.  # noqa: E501

        :return: The payment_reference of this Context.  # noqa: E501
        :rtype: str
        """
        return self._payment_reference

    @payment_reference.setter
    def payment_reference(self, payment_reference):
        """Sets the payment_reference of this Context.

        Reference number of payment made.  # noqa: E501

        :param payment_reference: The payment_reference of this Context.  # noqa: E501
        :type: str
        """

        self._payment_reference = payment_reference

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

        Fields with a schema type of date are in ISO 8601 date time format (for example GroupBeginDate).  # noqa: E501

        :return: The payment_date of this Context.  # noqa: E501
        :rtype: datetime
        """
        return self._payment_date

    @payment_date.setter
    def payment_date(self, payment_date):
        """Sets the payment_date of this Context.

        Fields with a schema type of date are in ISO 8601 date time format (for example GroupBeginDate).  # noqa: E501

        :param payment_date: The payment_date of this Context.  # noqa: E501
        :type: datetime
        """

        self._payment_date = payment_date

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

        The deferral policy applied to the transaction.  **Examples:** `B2B` (invoiced orders), `DD7` (delivery date policy)  # noqa: E501

        :return: The deferral_reason of this Context.  # noqa: E501
        :rtype: str
        """
        return self._deferral_reason

    @deferral_reason.setter
    def deferral_reason(self, deferral_reason):
        """Sets the deferral_reason of this Context.

        The deferral policy applied to the transaction.  **Examples:** `B2B` (invoiced orders), `DD7` (delivery date policy)  # noqa: E501

        :param deferral_reason: The deferral_reason of this Context.  # noqa: E501
        :type: str
        """

        self._deferral_reason = deferral_reason

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

        Fields with a schema type of date are in ISO 8601 date time format (for example GroupBeginDate).  # noqa: E501

        :return: The maturity_date of this Context.  # noqa: E501
        :rtype: datetime
        """
        return self._maturity_date

    @maturity_date.setter
    def maturity_date(self, maturity_date):
        """Sets the maturity_date of this Context.

        Fields with a schema type of date are in ISO 8601 date time format (for example GroupBeginDate).  # noqa: E501

        :param maturity_date: The maturity_date of this Context.  # noqa: E501
        :type: datetime
        """

        self._maturity_date = maturity_date

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

        Fields with a schema type of date are in ISO 8601 date time format (for example GroupBeginDate).  # noqa: E501

        :return: The start_time of this Context.  # noqa: E501
        :rtype: datetime
        """
        return self._start_time

    @start_time.setter
    def start_time(self, start_time):
        """Sets the start_time of this Context.

        Fields with a schema type of date are in ISO 8601 date time format (for example GroupBeginDate).  # noqa: E501

        :param start_time: The start_time of this Context.  # noqa: E501
        :type: datetime
        """

        self._start_time = start_time

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

        Fields with a schema type of date are in ISO 8601 date time format (for example GroupBeginDate).  # noqa: E501

        :return: The end_time of this Context.  # noqa: E501
        :rtype: datetime
        """
        return self._end_time

    @end_time.setter
    def end_time(self, end_time):
        """Sets the end_time of this Context.

        Fields with a schema type of date are in ISO 8601 date time format (for example GroupBeginDate).  # noqa: E501

        :param end_time: The end_time of this Context.  # noqa: E501
        :type: datetime
        """

        self._end_time = end_time

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


        :return: The context_type of this Context.  # noqa: E501
        :rtype: str
        """
        return self._context_type

    @context_type.setter
    def context_type(self, context_type):
        """Sets the context_type of this Context.


        :param context_type: The context_type of this Context.  # noqa: E501
        :type: str
        """
        if self._configuration.client_side_validation and context_type is None:
            raise ValueError("Invalid value for `context_type`, must not be `None`")  # noqa: E501

        self._context_type = context_type

    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(Context, 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, Context):
            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, Context):
            return True

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