# coding: utf-8

"""
    BTCPay Greenfield API

    A full API to use your BTCPay Server  # noqa: E501

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

import pprint
import re  # noqa: F401

import six

class CheckoutOptions(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 = {
        'speed_policy': 'SpeedPolicy',
        'payment_methods': 'list[str]',
        'default_payment_method': 'str',
        'expiration_minutes': 'AllOfCheckoutOptionsExpirationMinutes',
        'monitoring_minutes': 'AllOfCheckoutOptionsMonitoringMinutes',
        'payment_tolerance': 'float',
        'redirect_url': 'str',
        'redirect_automatically': 'bool',
        'requires_refund_email': 'bool',
        'default_language': 'str'
    }

    attribute_map = {
        'speed_policy': 'speedPolicy',
        'payment_methods': 'paymentMethods',
        'default_payment_method': 'defaultPaymentMethod',
        'expiration_minutes': 'expirationMinutes',
        'monitoring_minutes': 'monitoringMinutes',
        'payment_tolerance': 'paymentTolerance',
        'redirect_url': 'redirectURL',
        'redirect_automatically': 'redirectAutomatically',
        'requires_refund_email': 'requiresRefundEmail',
        'default_language': 'defaultLanguage'
    }

    def __init__(self, speed_policy=None, payment_methods=None, default_payment_method=None, expiration_minutes=None, monitoring_minutes=None, payment_tolerance=None, redirect_url=None, redirect_automatically=None, requires_refund_email=None, default_language=None):  # noqa: E501
        """CheckoutOptions - a model defined in Swagger"""  # noqa: E501
        self._speed_policy = None
        self._payment_methods = None
        self._default_payment_method = None
        self._expiration_minutes = None
        self._monitoring_minutes = None
        self._payment_tolerance = None
        self._redirect_url = None
        self._redirect_automatically = None
        self._requires_refund_email = None
        self._default_language = None
        self.discriminator = None
        if speed_policy is not None:
            self.speed_policy = speed_policy
        if payment_methods is not None:
            self.payment_methods = payment_methods
        if default_payment_method is not None:
            self.default_payment_method = default_payment_method
        if expiration_minutes is not None:
            self.expiration_minutes = expiration_minutes
        if monitoring_minutes is not None:
            self.monitoring_minutes = monitoring_minutes
        if payment_tolerance is not None:
            self.payment_tolerance = payment_tolerance
        if redirect_url is not None:
            self.redirect_url = redirect_url
        if redirect_automatically is not None:
            self.redirect_automatically = redirect_automatically
        if requires_refund_email is not None:
            self.requires_refund_email = requires_refund_email
        if default_language is not None:
            self.default_language = default_language

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


        :return: The speed_policy of this CheckoutOptions.  # noqa: E501
        :rtype: SpeedPolicy
        """
        return self._speed_policy

    @speed_policy.setter
    def speed_policy(self, speed_policy):
        """Sets the speed_policy of this CheckoutOptions.


        :param speed_policy: The speed_policy of this CheckoutOptions.  # noqa: E501
        :type: SpeedPolicy
        """

        self._speed_policy = speed_policy

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

        A specific set of payment methods to use for this invoice (ie. BTC, BTC-LightningNetwork). By default, select all payment methods enabled in the store.  # noqa: E501

        :return: The payment_methods of this CheckoutOptions.  # noqa: E501
        :rtype: list[str]
        """
        return self._payment_methods

    @payment_methods.setter
    def payment_methods(self, payment_methods):
        """Sets the payment_methods of this CheckoutOptions.

        A specific set of payment methods to use for this invoice (ie. BTC, BTC-LightningNetwork). By default, select all payment methods enabled in the store.  # noqa: E501

        :param payment_methods: The payment_methods of this CheckoutOptions.  # noqa: E501
        :type: list[str]
        """

        self._payment_methods = payment_methods

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

        Default payment type for the invoice (e.g., BTC, BTC-LightningNetwork). Default payment method set for the store is used if this parameter is not specified.  # noqa: E501

        :return: The default_payment_method of this CheckoutOptions.  # noqa: E501
        :rtype: str
        """
        return self._default_payment_method

    @default_payment_method.setter
    def default_payment_method(self, default_payment_method):
        """Sets the default_payment_method of this CheckoutOptions.

        Default payment type for the invoice (e.g., BTC, BTC-LightningNetwork). Default payment method set for the store is used if this parameter is not specified.  # noqa: E501

        :param default_payment_method: The default_payment_method of this CheckoutOptions.  # noqa: E501
        :type: str
        """

        self._default_payment_method = default_payment_method

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

        The number of minutes after which an invoice becomes expired. Defaults to the store's settings. (The default store settings is 15)  # noqa: E501

        :return: The expiration_minutes of this CheckoutOptions.  # noqa: E501
        :rtype: AllOfCheckoutOptionsExpirationMinutes
        """
        return self._expiration_minutes

    @expiration_minutes.setter
    def expiration_minutes(self, expiration_minutes):
        """Sets the expiration_minutes of this CheckoutOptions.

        The number of minutes after which an invoice becomes expired. Defaults to the store's settings. (The default store settings is 15)  # noqa: E501

        :param expiration_minutes: The expiration_minutes of this CheckoutOptions.  # noqa: E501
        :type: AllOfCheckoutOptionsExpirationMinutes
        """

        self._expiration_minutes = expiration_minutes

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

        The number of minutes after an invoice expired after which we are still monitoring for incoming payments. Defaults to the store's settings. (The default store settings is 1440, 1 day)  # noqa: E501

        :return: The monitoring_minutes of this CheckoutOptions.  # noqa: E501
        :rtype: AllOfCheckoutOptionsMonitoringMinutes
        """
        return self._monitoring_minutes

    @monitoring_minutes.setter
    def monitoring_minutes(self, monitoring_minutes):
        """Sets the monitoring_minutes of this CheckoutOptions.

        The number of minutes after an invoice expired after which we are still monitoring for incoming payments. Defaults to the store's settings. (The default store settings is 1440, 1 day)  # noqa: E501

        :param monitoring_minutes: The monitoring_minutes of this CheckoutOptions.  # noqa: E501
        :type: AllOfCheckoutOptionsMonitoringMinutes
        """

        self._monitoring_minutes = monitoring_minutes

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

        A percentage determining whether to count the invoice as paid when the invoice is paid within the specified margin of error. Defaults to the store's settings. (The default store settings is 100)  # noqa: E501

        :return: The payment_tolerance of this CheckoutOptions.  # noqa: E501
        :rtype: float
        """
        return self._payment_tolerance

    @payment_tolerance.setter
    def payment_tolerance(self, payment_tolerance):
        """Sets the payment_tolerance of this CheckoutOptions.

        A percentage determining whether to count the invoice as paid when the invoice is paid within the specified margin of error. Defaults to the store's settings. (The default store settings is 100)  # noqa: E501

        :param payment_tolerance: The payment_tolerance of this CheckoutOptions.  # noqa: E501
        :type: float
        """

        self._payment_tolerance = payment_tolerance

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

        When the customer has paid the invoice, the URL where the customer will be redirected when clicking on the `return to store` button. You can use placeholders `{InvoiceId}` or `{OrderId}` in the URL, BTCPay Server will replace those with this invoice `id` or `metadata.orderId` respectively.  # noqa: E501

        :return: The redirect_url of this CheckoutOptions.  # noqa: E501
        :rtype: str
        """
        return self._redirect_url

    @redirect_url.setter
    def redirect_url(self, redirect_url):
        """Sets the redirect_url of this CheckoutOptions.

        When the customer has paid the invoice, the URL where the customer will be redirected when clicking on the `return to store` button. You can use placeholders `{InvoiceId}` or `{OrderId}` in the URL, BTCPay Server will replace those with this invoice `id` or `metadata.orderId` respectively.  # noqa: E501

        :param redirect_url: The redirect_url of this CheckoutOptions.  # noqa: E501
        :type: str
        """

        self._redirect_url = redirect_url

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

        When the customer has paid the invoice, and a `redirectURL` is set, the checkout is redirected to `redirectURL` automatically if `redirectAutomatically` is true. Defaults to the store's settings. (The default store settings is false)  # noqa: E501

        :return: The redirect_automatically of this CheckoutOptions.  # noqa: E501
        :rtype: bool
        """
        return self._redirect_automatically

    @redirect_automatically.setter
    def redirect_automatically(self, redirect_automatically):
        """Sets the redirect_automatically of this CheckoutOptions.

        When the customer has paid the invoice, and a `redirectURL` is set, the checkout is redirected to `redirectURL` automatically if `redirectAutomatically` is true. Defaults to the store's settings. (The default store settings is false)  # noqa: E501

        :param redirect_automatically: The redirect_automatically of this CheckoutOptions.  # noqa: E501
        :type: bool
        """

        self._redirect_automatically = redirect_automatically

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

        Invoice will require user to provide a refund email if this option is set to `true`. Has no effect if `buyerEmail` metadata is set as there is no email to collect in this case.  # noqa: E501

        :return: The requires_refund_email of this CheckoutOptions.  # noqa: E501
        :rtype: bool
        """
        return self._requires_refund_email

    @requires_refund_email.setter
    def requires_refund_email(self, requires_refund_email):
        """Sets the requires_refund_email of this CheckoutOptions.

        Invoice will require user to provide a refund email if this option is set to `true`. Has no effect if `buyerEmail` metadata is set as there is no email to collect in this case.  # noqa: E501

        :param requires_refund_email: The requires_refund_email of this CheckoutOptions.  # noqa: E501
        :type: bool
        """

        self._requires_refund_email = requires_refund_email

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

        The language code (eg. en-US, en, fr-FR...) of the language presented to your customer in the checkout page. BTCPay Server tries to match the best language available. If null or not set, will fallback on the store's default language. You can see the list of language codes with [this operation](#operation/langCodes).  # noqa: E501

        :return: The default_language of this CheckoutOptions.  # noqa: E501
        :rtype: str
        """
        return self._default_language

    @default_language.setter
    def default_language(self, default_language):
        """Sets the default_language of this CheckoutOptions.

        The language code (eg. en-US, en, fr-FR...) of the language presented to your customer in the checkout page. BTCPay Server tries to match the best language available. If null or not set, will fallback on the store's default language. You can see the list of language codes with [this operation](#operation/langCodes).  # noqa: E501

        :param default_language: The default_language of this CheckoutOptions.  # noqa: E501
        :type: str
        """

        self._default_language = default_language

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

        return self.__dict__ == other.__dict__

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