# 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 Ptsv2paymentsProcessingInformationElectronicBenefitsTransfer(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 = {
        'category': 'str',
        'voucher_serial_number': 'str'
    }

    attribute_map = {
        'category': 'category',
        'voucher_serial_number': 'voucherSerialNumber'
    }

    def __init__(self, category=None, voucher_serial_number=None):
        """
        Ptsv2paymentsProcessingInformationElectronicBenefitsTransfer - a model defined in Swagger
        """

        self._category = None
        self._voucher_serial_number = None

        if category is not None:
          self.category = category
        if voucher_serial_number is not None:
          self.voucher_serial_number = voucher_serial_number

    @property
    def category(self):
        """
        Gets the category of this Ptsv2paymentsProcessingInformationElectronicBenefitsTransfer.
        Flag that specifies the category for the EBT transaction.  Possible values: - `CASH`: Cash benefits, which can be used to purchase any item at a participating retailer, as well as to obtain cash-back or make a cash withdrawal from a participating ATM. - `FOOD`: Food stamp benefits, which can be used only to purchase food items authorized by the USDA SNAP program.  #### PIN debit Required field for EBT transactions that use PIN debit credit or PIN debit purchase; otherwise, not used. 

        :return: The category of this Ptsv2paymentsProcessingInformationElectronicBenefitsTransfer.
        :rtype: str
        """
        return self._category

    @category.setter
    def category(self, category):
        """
        Sets the category of this Ptsv2paymentsProcessingInformationElectronicBenefitsTransfer.
        Flag that specifies the category for the EBT transaction.  Possible values: - `CASH`: Cash benefits, which can be used to purchase any item at a participating retailer, as well as to obtain cash-back or make a cash withdrawal from a participating ATM. - `FOOD`: Food stamp benefits, which can be used only to purchase food items authorized by the USDA SNAP program.  #### PIN debit Required field for EBT transactions that use PIN debit credit or PIN debit purchase; otherwise, not used. 

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

        self._category = category

    @property
    def voucher_serial_number(self):
        """
        Gets the voucher_serial_number of this Ptsv2paymentsProcessingInformationElectronicBenefitsTransfer.
        The serial number printed on the EBT voucher.  #### PIN debit Required field for EBT voucher transactions that use PIN debit purchase; otherwise, not used. 

        :return: The voucher_serial_number of this Ptsv2paymentsProcessingInformationElectronicBenefitsTransfer.
        :rtype: str
        """
        return self._voucher_serial_number

    @voucher_serial_number.setter
    def voucher_serial_number(self, voucher_serial_number):
        """
        Sets the voucher_serial_number of this Ptsv2paymentsProcessingInformationElectronicBenefitsTransfer.
        The serial number printed on the EBT voucher.  #### PIN debit Required field for EBT voucher transactions that use PIN debit purchase; otherwise, not used. 

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

        self._voucher_serial_number = voucher_serial_number

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

        return self.__dict__ == other.__dict__

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