# coding: utf-8

"""
    The Selling Partner API for Transfers.

    The Selling Partner API for Transfers enables selling partners to retrieve payment methods and initiate payouts for their seller accounts. This API supports the following marketplaces: DE, FR, IT, ES, SE, NL, PL, and BE.

    The version of the OpenAPI document: 2024-06-01
    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 PaymentMethodDetails(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 = {
        'account_holder_name': 'str',
        'payment_method_id': 'str',
        'tail': 'str',
        'expiry_date': 'ExpiryDate',
        'country_code': 'str',
        'payment_method_type': 'PaymentMethodType',
        'assignment_type': 'AssignmentType',
    }

    attribute_map = {
        'account_holder_name': 'accountHolderName',
        'payment_method_id': 'paymentMethodId',
        'tail': 'tail',
        'expiry_date': 'expiryDate',
        'country_code': 'countryCode',
        'payment_method_type': 'paymentMethodType',
        'assignment_type': 'assignmentType',
    }

    def __init__(self, account_holder_name=None, payment_method_id=None, tail=None, expiry_date=None, country_code=None, payment_method_type=None, assignment_type=None, _configuration=None):  # noqa: E501
        """PaymentMethodDetails - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._account_holder_name = None
        self._payment_method_id = None
        self._tail = None
        self._expiry_date = None
        self._country_code = None
        self._payment_method_type = None
        self._assignment_type = None
        self.discriminator = None

        if account_holder_name is not None:
            self.account_holder_name = account_holder_name
        if payment_method_id is not None:
            self.payment_method_id = payment_method_id
        if tail is not None:
            self.tail = tail
        if expiry_date is not None:
            self.expiry_date = expiry_date
        if country_code is not None:
            self.country_code = country_code
        if payment_method_type is not None:
            self.payment_method_type = payment_method_type
        if assignment_type is not None:
            self.assignment_type = assignment_type

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

        The name of the account holder who is registered for the payment method.  # noqa: E501

        :return: The account_holder_name of this PaymentMethodDetails.  # noqa: E501
        :rtype: str
        """
        return self._account_holder_name

    @account_holder_name.setter
    def account_holder_name(self, account_holder_name):
        """Sets the account_holder_name of this PaymentMethodDetails.

        The name of the account holder who is registered for the payment method.  # noqa: E501

        :param account_holder_name: The account_holder_name of this PaymentMethodDetails.  # noqa: E501
        :type: str
        """

        self._account_holder_name = account_holder_name

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

        The payment method identifier.  # noqa: E501

        :return: The payment_method_id of this PaymentMethodDetails.  # noqa: E501
        :rtype: str
        """
        return self._payment_method_id

    @payment_method_id.setter
    def payment_method_id(self, payment_method_id):
        """Sets the payment_method_id of this PaymentMethodDetails.

        The payment method identifier.  # noqa: E501

        :param payment_method_id: The payment_method_id of this PaymentMethodDetails.  # noqa: E501
        :type: str
        """

        self._payment_method_id = payment_method_id

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

        The last three or four digits of the payment method.  # noqa: E501

        :return: The tail of this PaymentMethodDetails.  # noqa: E501
        :rtype: str
        """
        return self._tail

    @tail.setter
    def tail(self, tail):
        """Sets the tail of this PaymentMethodDetails.

        The last three or four digits of the payment method.  # noqa: E501

        :param tail: The tail of this PaymentMethodDetails.  # noqa: E501
        :type: str
        """

        self._tail = tail

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


        :return: The expiry_date of this PaymentMethodDetails.  # noqa: E501
        :rtype: ExpiryDate
        """
        return self._expiry_date

    @expiry_date.setter
    def expiry_date(self, expiry_date):
        """Sets the expiry_date of this PaymentMethodDetails.


        :param expiry_date: The expiry_date of this PaymentMethodDetails.  # noqa: E501
        :type: ExpiryDate
        """

        self._expiry_date = expiry_date

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

        The two-letter country code in ISO 3166-1 alpha-2 format. For payment methods in the `card` category, the code is for the country where the card was issued. For payment methods in the `bank account` category, the code is for the country where the account is located.  # noqa: E501

        :return: The country_code of this PaymentMethodDetails.  # noqa: E501
        :rtype: str
        """
        return self._country_code

    @country_code.setter
    def country_code(self, country_code):
        """Sets the country_code of this PaymentMethodDetails.

        The two-letter country code in ISO 3166-1 alpha-2 format. For payment methods in the `card` category, the code is for the country where the card was issued. For payment methods in the `bank account` category, the code is for the country where the account is located.  # noqa: E501

        :param country_code: The country_code of this PaymentMethodDetails.  # noqa: E501
        :type: str
        """

        self._country_code = country_code

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


        :return: The payment_method_type of this PaymentMethodDetails.  # noqa: E501
        :rtype: PaymentMethodType
        """
        return self._payment_method_type

    @payment_method_type.setter
    def payment_method_type(self, payment_method_type):
        """Sets the payment_method_type of this PaymentMethodDetails.


        :param payment_method_type: The payment_method_type of this PaymentMethodDetails.  # noqa: E501
        :type: PaymentMethodType
        """

        self._payment_method_type = payment_method_type

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


        :return: The assignment_type of this PaymentMethodDetails.  # noqa: E501
        :rtype: AssignmentType
        """
        return self._assignment_type

    @assignment_type.setter
    def assignment_type(self, assignment_type):
        """Sets the assignment_type of this PaymentMethodDetails.


        :param assignment_type: The assignment_type of this PaymentMethodDetails.  # noqa: E501
        :type: AssignmentType
        """

        self._assignment_type = assignment_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(PaymentMethodDetails, 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, PaymentMethodDetails):
            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, PaymentMethodDetails):
            return True

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