# coding: utf-8

"""
    splitit-web-api-public-sdk

    No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)  # noqa: E501

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


import pprint
import re  # noqa: F401

import six


class PlanData(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 = {
        'number_of_installments': 'int',
        'amount': 'MoneyWithCurrencyCode',
        'first_installment_amount': 'MoneyWithCurrencyCode',
        'ref_order_number': 'str',
        'test_mode': 'TestModes',
        'purchase_method': 'PurchaseMethod',
        'strategy': 'PlanStrategy',
        'extended_params': 'dict(str, str)',
        'first_charge_date': 'datetime',
        'auto_capture': 'bool',
        'is_funded': 'bool',
        'attempt3_d_secure': 'bool',
        'external_provider_supported': 'bool'
    }

    attribute_map = {
        'number_of_installments': 'NumberOfInstallments',
        'amount': 'Amount',
        'first_installment_amount': 'FirstInstallmentAmount',
        'ref_order_number': 'RefOrderNumber',
        'test_mode': 'TestMode',
        'purchase_method': 'PurchaseMethod',
        'strategy': 'Strategy',
        'extended_params': 'ExtendedParams',
        'first_charge_date': 'FirstChargeDate',
        'auto_capture': 'AutoCapture',
        'is_funded': 'IsFunded',
        'attempt3_d_secure': 'Attempt3DSecure',
        'external_provider_supported': 'ExternalProviderSupported'
    }

    def __init__(self, number_of_installments=None, amount=None, first_installment_amount=None, ref_order_number=None, test_mode=None, purchase_method=None, strategy=None, extended_params=None, first_charge_date=None, auto_capture=None, is_funded=None, attempt3_d_secure=None, external_provider_supported=None):  # noqa: E501
        """PlanData - a model defined in Swagger"""  # noqa: E501

        self._number_of_installments = None
        self._amount = None
        self._first_installment_amount = None
        self._ref_order_number = None
        self._test_mode = None
        self._purchase_method = None
        self._strategy = None
        self._extended_params = None
        self._first_charge_date = None
        self._auto_capture = None
        self._is_funded = None
        self._attempt3_d_secure = None
        self._external_provider_supported = None
        self.discriminator = None

        if number_of_installments is not None:
            self._number_of_installments = number_of_installments
        if amount is not None:
            self._amount = amount
        if first_installment_amount is not None:
            self._first_installment_amount = first_installment_amount
        if ref_order_number is not None:
            self._ref_order_number = ref_order_number
        if test_mode is not None:
            self._test_mode = test_mode
        if purchase_method is not None:
            self._purchase_method = purchase_method
        if strategy is not None:
            self._strategy = strategy
        if extended_params is not None:
            self._extended_params = extended_params
        if first_charge_date is not None:
            self._first_charge_date = first_charge_date
        if auto_capture is not None:
            self._auto_capture = auto_capture
        if is_funded is not None:
            self._is_funded = is_funded
        if attempt3_d_secure is not None:
            self._attempt3_d_secure = attempt3_d_secure
        self._external_provider_supported = external_provider_supported

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


        :return: The number_of_installments of this PlanData.  # noqa: E501
        :rtype: int
        """
        return self._number_of_installments

    @number_of_installments.setter
    def number_of_installments(self, number_of_installments):
        """Sets the number_of_installments of this PlanData.


        :param number_of_installments: The number_of_installments of this PlanData.  # noqa: E501
        :type: int
        """

        self._number_of_installments = number_of_installments

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


        :return: The amount of this PlanData.  # noqa: E501
        :rtype: MoneyWithCurrencyCode
        """
        return self._amount

    @amount.setter
    def amount(self, amount):
        """Sets the amount of this PlanData.


        :param amount: The amount of this PlanData.  # noqa: E501
        :type: MoneyWithCurrencyCode
        """

        self._amount = amount

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


        :return: The first_installment_amount of this PlanData.  # noqa: E501
        :rtype: MoneyWithCurrencyCode
        """
        return self._first_installment_amount

    @first_installment_amount.setter
    def first_installment_amount(self, first_installment_amount):
        """Sets the first_installment_amount of this PlanData.


        :param first_installment_amount: The first_installment_amount of this PlanData.  # noqa: E501
        :type: MoneyWithCurrencyCode
        """

        self._first_installment_amount = first_installment_amount

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


        :return: The ref_order_number of this PlanData.  # noqa: E501
        :rtype: str
        """
        return self._ref_order_number

    @ref_order_number.setter
    def ref_order_number(self, ref_order_number):
        """Sets the ref_order_number of this PlanData.


        :param ref_order_number: The ref_order_number of this PlanData.  # noqa: E501
        :type: str
        """

        self._ref_order_number = ref_order_number

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


        :return: The test_mode of this PlanData.  # noqa: E501
        :rtype: TestModes
        """
        return self._test_mode

    @test_mode.setter
    def test_mode(self, test_mode):
        """Sets the test_mode of this PlanData.


        :param test_mode: The test_mode of this PlanData.  # noqa: E501
        :type: TestModes
        """

        self._test_mode = test_mode

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


        :return: The purchase_method of this PlanData.  # noqa: E501
        :rtype: PurchaseMethod
        """
        return self._purchase_method

    @purchase_method.setter
    def purchase_method(self, purchase_method):
        """Sets the purchase_method of this PlanData.


        :param purchase_method: The purchase_method of this PlanData.  # noqa: E501
        :type: PurchaseMethod
        """

        self._purchase_method = purchase_method

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


        :return: The strategy of this PlanData.  # noqa: E501
        :rtype: PlanStrategy
        """
        return self._strategy

    @strategy.setter
    def strategy(self, strategy):
        """Sets the strategy of this PlanData.


        :param strategy: The strategy of this PlanData.  # noqa: E501
        :type: PlanStrategy
        """

        self._strategy = strategy

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


        :return: The extended_params of this PlanData.  # noqa: E501
        :rtype: dict(str, str)
        """
        return self._extended_params

    @extended_params.setter
    def extended_params(self, extended_params):
        """Sets the extended_params of this PlanData.


        :param extended_params: The extended_params of this PlanData.  # noqa: E501
        :type: dict(str, str)
        """

        self._extended_params = extended_params

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


        :return: The first_charge_date of this PlanData.  # noqa: E501
        :rtype: datetime
        """
        return self._first_charge_date

    @first_charge_date.setter
    def first_charge_date(self, first_charge_date):
        """Sets the first_charge_date of this PlanData.


        :param first_charge_date: The first_charge_date of this PlanData.  # noqa: E501
        :type: datetime
        """

        self._first_charge_date = first_charge_date

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


        :return: The auto_capture of this PlanData.  # noqa: E501
        :rtype: bool
        """
        return self._auto_capture

    @auto_capture.setter
    def auto_capture(self, auto_capture):
        """Sets the auto_capture of this PlanData.


        :param auto_capture: The auto_capture of this PlanData.  # noqa: E501
        :type: bool
        """

        self._auto_capture = auto_capture

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


        :return: The is_funded of this PlanData.  # noqa: E501
        :rtype: bool
        """
        return self._is_funded

    @is_funded.setter
    def is_funded(self, is_funded):
        """Sets the is_funded of this PlanData.


        :param is_funded: The is_funded of this PlanData.  # noqa: E501
        :type: bool
        """

        self._is_funded = is_funded

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


        :return: The attempt3_d_secure of this PlanData.  # noqa: E501
        :rtype: bool
        """
        return self._attempt3_d_secure

    @attempt3_d_secure.setter
    def attempt3_d_secure(self, attempt3_d_secure):
        """Sets the attempt3_d_secure of this PlanData.


        :param attempt3_d_secure: The attempt3_d_secure of this PlanData.  # noqa: E501
        :type: bool
        """

        self._attempt3_d_secure = attempt3_d_secure

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


        :return: The external_provider_supported of this PlanData.  # noqa: E501
        :rtype: bool
        """
        return self._external_provider_supported

    @external_provider_supported.setter
    def external_provider_supported(self, external_provider_supported):
        """Sets the external_provider_supported of this PlanData.


        :param external_provider_supported: The external_provider_supported of this PlanData.  # noqa: E501
        :type: bool
        """
        external_provider_supported = bool(external_provider_supported)
        if external_provider_supported is None:
            raise ValueError("Invalid value for `external_provider_supported`, must not be `None`")  # noqa: E501

        self._external_provider_supported = external_provider_supported

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

        return self.__dict__ == other.__dict__

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