# coding: utf-8

"""
    CyberSource Merged Spec

    All CyberSource API specs merged together. These are available at https://developer.cybersource.com/api/reference/api-reference.html

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


from pprint import pformat
from six import iteritems
import re


class Ptsv2paymentsPaymentInformation(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 = {
        'card': 'Ptsv2paymentsPaymentInformationCard',
        'tokenized_card': 'Ptsv2paymentsPaymentInformationTokenizedCard',
        'fluid_data': 'Ptsv2paymentsPaymentInformationFluidData',
        'customer': 'Ptsv2paymentsPaymentInformationCustomer',
        'payment_instrument': 'Ptsv2paymentsPaymentInformationPaymentInstrument',
        'instrument_identifier': 'Ptsv2paymentsPaymentInformationInstrumentIdentifier',
        'shipping_address': 'Ptsv2paymentsPaymentInformationShippingAddress',
        'legacy_token': 'Ptsv2paymentsPaymentInformationLegacyToken',
        'bank': 'Ptsv2paymentsPaymentInformationBank',
        'payment_type': 'Ptsv2paymentsPaymentInformationPaymentType',
        'initiation_channel': 'str'
    }

    attribute_map = {
        'card': 'card',
        'tokenized_card': 'tokenizedCard',
        'fluid_data': 'fluidData',
        'customer': 'customer',
        'payment_instrument': 'paymentInstrument',
        'instrument_identifier': 'instrumentIdentifier',
        'shipping_address': 'shippingAddress',
        'legacy_token': 'legacyToken',
        'bank': 'bank',
        'payment_type': 'paymentType',
        'initiation_channel': 'initiationChannel'
    }

    def __init__(self, card=None, tokenized_card=None, fluid_data=None, customer=None, payment_instrument=None, instrument_identifier=None, shipping_address=None, legacy_token=None, bank=None, payment_type=None, initiation_channel=None):
        """
        Ptsv2paymentsPaymentInformation - a model defined in Swagger
        """

        self._card = None
        self._tokenized_card = None
        self._fluid_data = None
        self._customer = None
        self._payment_instrument = None
        self._instrument_identifier = None
        self._shipping_address = None
        self._legacy_token = None
        self._bank = None
        self._payment_type = None
        self._initiation_channel = None

        if card is not None:
          self.card = card
        if tokenized_card is not None:
          self.tokenized_card = tokenized_card
        if fluid_data is not None:
          self.fluid_data = fluid_data
        if customer is not None:
          self.customer = customer
        if payment_instrument is not None:
          self.payment_instrument = payment_instrument
        if instrument_identifier is not None:
          self.instrument_identifier = instrument_identifier
        if shipping_address is not None:
          self.shipping_address = shipping_address
        if legacy_token is not None:
          self.legacy_token = legacy_token
        if bank is not None:
          self.bank = bank
        if payment_type is not None:
          self.payment_type = payment_type
        if initiation_channel is not None:
          self.initiation_channel = initiation_channel

    @property
    def card(self):
        """
        Gets the card of this Ptsv2paymentsPaymentInformation.

        :return: The card of this Ptsv2paymentsPaymentInformation.
        :rtype: Ptsv2paymentsPaymentInformationCard
        """
        return self._card

    @card.setter
    def card(self, card):
        """
        Sets the card of this Ptsv2paymentsPaymentInformation.

        :param card: The card of this Ptsv2paymentsPaymentInformation.
        :type: Ptsv2paymentsPaymentInformationCard
        """

        self._card = card

    @property
    def tokenized_card(self):
        """
        Gets the tokenized_card of this Ptsv2paymentsPaymentInformation.

        :return: The tokenized_card of this Ptsv2paymentsPaymentInformation.
        :rtype: Ptsv2paymentsPaymentInformationTokenizedCard
        """
        return self._tokenized_card

    @tokenized_card.setter
    def tokenized_card(self, tokenized_card):
        """
        Sets the tokenized_card of this Ptsv2paymentsPaymentInformation.

        :param tokenized_card: The tokenized_card of this Ptsv2paymentsPaymentInformation.
        :type: Ptsv2paymentsPaymentInformationTokenizedCard
        """

        self._tokenized_card = tokenized_card

    @property
    def fluid_data(self):
        """
        Gets the fluid_data of this Ptsv2paymentsPaymentInformation.

        :return: The fluid_data of this Ptsv2paymentsPaymentInformation.
        :rtype: Ptsv2paymentsPaymentInformationFluidData
        """
        return self._fluid_data

    @fluid_data.setter
    def fluid_data(self, fluid_data):
        """
        Sets the fluid_data of this Ptsv2paymentsPaymentInformation.

        :param fluid_data: The fluid_data of this Ptsv2paymentsPaymentInformation.
        :type: Ptsv2paymentsPaymentInformationFluidData
        """

        self._fluid_data = fluid_data

    @property
    def customer(self):
        """
        Gets the customer of this Ptsv2paymentsPaymentInformation.

        :return: The customer of this Ptsv2paymentsPaymentInformation.
        :rtype: Ptsv2paymentsPaymentInformationCustomer
        """
        return self._customer

    @customer.setter
    def customer(self, customer):
        """
        Sets the customer of this Ptsv2paymentsPaymentInformation.

        :param customer: The customer of this Ptsv2paymentsPaymentInformation.
        :type: Ptsv2paymentsPaymentInformationCustomer
        """

        self._customer = customer

    @property
    def payment_instrument(self):
        """
        Gets the payment_instrument of this Ptsv2paymentsPaymentInformation.

        :return: The payment_instrument of this Ptsv2paymentsPaymentInformation.
        :rtype: Ptsv2paymentsPaymentInformationPaymentInstrument
        """
        return self._payment_instrument

    @payment_instrument.setter
    def payment_instrument(self, payment_instrument):
        """
        Sets the payment_instrument of this Ptsv2paymentsPaymentInformation.

        :param payment_instrument: The payment_instrument of this Ptsv2paymentsPaymentInformation.
        :type: Ptsv2paymentsPaymentInformationPaymentInstrument
        """

        self._payment_instrument = payment_instrument

    @property
    def instrument_identifier(self):
        """
        Gets the instrument_identifier of this Ptsv2paymentsPaymentInformation.

        :return: The instrument_identifier of this Ptsv2paymentsPaymentInformation.
        :rtype: Ptsv2paymentsPaymentInformationInstrumentIdentifier
        """
        return self._instrument_identifier

    @instrument_identifier.setter
    def instrument_identifier(self, instrument_identifier):
        """
        Sets the instrument_identifier of this Ptsv2paymentsPaymentInformation.

        :param instrument_identifier: The instrument_identifier of this Ptsv2paymentsPaymentInformation.
        :type: Ptsv2paymentsPaymentInformationInstrumentIdentifier
        """

        self._instrument_identifier = instrument_identifier

    @property
    def shipping_address(self):
        """
        Gets the shipping_address of this Ptsv2paymentsPaymentInformation.

        :return: The shipping_address of this Ptsv2paymentsPaymentInformation.
        :rtype: Ptsv2paymentsPaymentInformationShippingAddress
        """
        return self._shipping_address

    @shipping_address.setter
    def shipping_address(self, shipping_address):
        """
        Sets the shipping_address of this Ptsv2paymentsPaymentInformation.

        :param shipping_address: The shipping_address of this Ptsv2paymentsPaymentInformation.
        :type: Ptsv2paymentsPaymentInformationShippingAddress
        """

        self._shipping_address = shipping_address

    @property
    def legacy_token(self):
        """
        Gets the legacy_token of this Ptsv2paymentsPaymentInformation.

        :return: The legacy_token of this Ptsv2paymentsPaymentInformation.
        :rtype: Ptsv2paymentsPaymentInformationLegacyToken
        """
        return self._legacy_token

    @legacy_token.setter
    def legacy_token(self, legacy_token):
        """
        Sets the legacy_token of this Ptsv2paymentsPaymentInformation.

        :param legacy_token: The legacy_token of this Ptsv2paymentsPaymentInformation.
        :type: Ptsv2paymentsPaymentInformationLegacyToken
        """

        self._legacy_token = legacy_token

    @property
    def bank(self):
        """
        Gets the bank of this Ptsv2paymentsPaymentInformation.

        :return: The bank of this Ptsv2paymentsPaymentInformation.
        :rtype: Ptsv2paymentsPaymentInformationBank
        """
        return self._bank

    @bank.setter
    def bank(self, bank):
        """
        Sets the bank of this Ptsv2paymentsPaymentInformation.

        :param bank: The bank of this Ptsv2paymentsPaymentInformation.
        :type: Ptsv2paymentsPaymentInformationBank
        """

        self._bank = bank

    @property
    def payment_type(self):
        """
        Gets the payment_type of this Ptsv2paymentsPaymentInformation.

        :return: The payment_type of this Ptsv2paymentsPaymentInformation.
        :rtype: Ptsv2paymentsPaymentInformationPaymentType
        """
        return self._payment_type

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

        :param payment_type: The payment_type of this Ptsv2paymentsPaymentInformation.
        :type: Ptsv2paymentsPaymentInformationPaymentType
        """

        self._payment_type = payment_type

    @property
    def initiation_channel(self):
        """
        Gets the initiation_channel of this Ptsv2paymentsPaymentInformation.
        Mastercard-defined code that indicates how the account information was obtained.  - `00` (default): Card - `01`: Removable secure element that is personalized for use with a mobile phone and controlled by the wireless service provider; examples: subscriber identity module (SIM), universal integrated circuit card (UICC) - `02`: Key fob - `03`: Watch - `04`: Mobile tag - `05`: Wristband - `06`: Mobile phone case or sleeve - `07`: Mobile phone with a non-removable, secure element that is controlled by the wireless service provider; for example, code division multiple access (CDMA) - `08`: Removable secure element that is personalized for use with a mobile phone and not controlled by the wireless service provider; example: memory card - `09`: Mobile phone with a non-removable, secure element that is not controlled by the wireless service provider - `10`: Removable secure element that is personalized for use with a tablet or e-book and is controlled by the wireless service provider; examples: subscriber identity module (SIM), universal integrated circuit card (UICC) - `11`: Tablet or e-book with a non-removable, secure element that is controlled by the wireless service provider - `12`: Removable secure element that is personalized for use with a tablet or e-book and is not controlled by the wireless service provider - `13`: Tablet or e-book with a non-removable, secure element that is not controlled by the wireless service provider  This field is supported only for Mastercard on CyberSource through VisaNet.  #### Used by **Authorization** Optional field. 

        :return: The initiation_channel of this Ptsv2paymentsPaymentInformation.
        :rtype: str
        """
        return self._initiation_channel

    @initiation_channel.setter
    def initiation_channel(self, initiation_channel):
        """
        Sets the initiation_channel of this Ptsv2paymentsPaymentInformation.
        Mastercard-defined code that indicates how the account information was obtained.  - `00` (default): Card - `01`: Removable secure element that is personalized for use with a mobile phone and controlled by the wireless service provider; examples: subscriber identity module (SIM), universal integrated circuit card (UICC) - `02`: Key fob - `03`: Watch - `04`: Mobile tag - `05`: Wristband - `06`: Mobile phone case or sleeve - `07`: Mobile phone with a non-removable, secure element that is controlled by the wireless service provider; for example, code division multiple access (CDMA) - `08`: Removable secure element that is personalized for use with a mobile phone and not controlled by the wireless service provider; example: memory card - `09`: Mobile phone with a non-removable, secure element that is not controlled by the wireless service provider - `10`: Removable secure element that is personalized for use with a tablet or e-book and is controlled by the wireless service provider; examples: subscriber identity module (SIM), universal integrated circuit card (UICC) - `11`: Tablet or e-book with a non-removable, secure element that is controlled by the wireless service provider - `12`: Removable secure element that is personalized for use with a tablet or e-book and is not controlled by the wireless service provider - `13`: Tablet or e-book with a non-removable, secure element that is not controlled by the wireless service provider  This field is supported only for Mastercard on CyberSource through VisaNet.  #### Used by **Authorization** Optional field. 

        :param initiation_channel: The initiation_channel of this Ptsv2paymentsPaymentInformation.
        :type: str
        """
        if initiation_channel is not None and len(initiation_channel) > 2:
            raise ValueError("Invalid value for `initiation_channel`, length must be less than or equal to `2`")

        self._initiation_channel = initiation_channel

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

        for attr, _ in 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

        return result

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

        return self.__dict__ == other.__dict__

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