# coding: utf-8

"""
    Knetik Platform API Documentation latest 

    This is the spec for the Knetik API.  Use this in conjunction with the documentation found at https://knetikcloud.com.

    OpenAPI spec version: latest 
    Contact: support@knetik.com
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""


from pprint import pformat
from six import iteritems
import re


class PaymentAuthorizationResource(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 = {
        'captured': 'bool',
        'created': 'int',
        'details': 'object',
        'id': 'int',
        'invoice': 'int',
        'payment_type': 'SimpleReferenceResourceint'
    }

    attribute_map = {
        'captured': 'captured',
        'created': 'created',
        'details': 'details',
        'id': 'id',
        'invoice': 'invoice',
        'payment_type': 'payment_type'
    }

    def __init__(self, captured=None, created=None, details=None, id=None, invoice=None, payment_type=None):
        """
        PaymentAuthorizationResource - a model defined in Swagger
        """

        self._captured = None
        self._created = None
        self._details = None
        self._id = None
        self._invoice = None
        self._payment_type = None
        self.discriminator = None

        if captured is not None:
          self.captured = captured
        if created is not None:
          self.created = created
        if details is not None:
          self.details = details
        if id is not None:
          self.id = id
        if invoice is not None:
          self.invoice = invoice
        self.payment_type = payment_type

    @property
    def captured(self):
        """
        Gets the captured of this PaymentAuthorizationResource.
        Whether this authorization has been captured

        :return: The captured of this PaymentAuthorizationResource.
        :rtype: bool
        """
        return self._captured

    @captured.setter
    def captured(self, captured):
        """
        Sets the captured of this PaymentAuthorizationResource.
        Whether this authorization has been captured

        :param captured: The captured of this PaymentAuthorizationResource.
        :type: bool
        """

        self._captured = captured

    @property
    def created(self):
        """
        Gets the created of this PaymentAuthorizationResource.
        The date this authorization was received, unix timestamp in seconds

        :return: The created of this PaymentAuthorizationResource.
        :rtype: int
        """
        return self._created

    @created.setter
    def created(self, created):
        """
        Sets the created of this PaymentAuthorizationResource.
        The date this authorization was received, unix timestamp in seconds

        :param created: The created of this PaymentAuthorizationResource.
        :type: int
        """

        self._created = created

    @property
    def details(self):
        """
        Gets the details of this PaymentAuthorizationResource.
        The details for this authorization. Format dependent on payment provider

        :return: The details of this PaymentAuthorizationResource.
        :rtype: object
        """
        return self._details

    @details.setter
    def details(self, details):
        """
        Sets the details of this PaymentAuthorizationResource.
        The details for this authorization. Format dependent on payment provider

        :param details: The details of this PaymentAuthorizationResource.
        :type: object
        """

        self._details = details

    @property
    def id(self):
        """
        Gets the id of this PaymentAuthorizationResource.
        The id of the authorization

        :return: The id of this PaymentAuthorizationResource.
        :rtype: int
        """
        return self._id

    @id.setter
    def id(self, id):
        """
        Sets the id of this PaymentAuthorizationResource.
        The id of the authorization

        :param id: The id of this PaymentAuthorizationResource.
        :type: int
        """

        self._id = id

    @property
    def invoice(self):
        """
        Gets the invoice of this PaymentAuthorizationResource.
        The invoice this authorization is intended to pay

        :return: The invoice of this PaymentAuthorizationResource.
        :rtype: int
        """
        return self._invoice

    @invoice.setter
    def invoice(self, invoice):
        """
        Sets the invoice of this PaymentAuthorizationResource.
        The invoice this authorization is intended to pay

        :param invoice: The invoice of this PaymentAuthorizationResource.
        :type: int
        """

        self._invoice = invoice

    @property
    def payment_type(self):
        """
        Gets the payment_type of this PaymentAuthorizationResource.
        The payment type (which provider) this payment is through

        :return: The payment_type of this PaymentAuthorizationResource.
        :rtype: SimpleReferenceResourceint
        """
        return self._payment_type

    @payment_type.setter
    def payment_type(self, payment_type):
        """
        Sets the payment_type of this PaymentAuthorizationResource.
        The payment type (which provider) this payment is through

        :param payment_type: The payment_type of this PaymentAuthorizationResource.
        :type: SimpleReferenceResourceint
        """
        if payment_type is None:
            raise ValueError("Invalid value for `payment_type`, must not be `None`")

        self._payment_type = payment_type

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

        return self.__dict__ == other.__dict__

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