# coding: utf-8

"""
    The Selling Partner API for Amazon Seller Wallet Open Banking API Spec.  For more information, refer to the [Seller Wallet Open Banking API Use Case Guide](doc:seller-wallet-open-banking-api-v2024-03-01-use-case-guide).

    The Selling Partner API for Seller Wallet (Seller Wallet API) provides financial information that is relevant to a seller's Seller Wallet account. You can obtain financial events, balances, and transfer schedules for Seller Wallet accounts. You can also schedule and initiate transactions.

    The version of the OpenAPI document: 2024-03-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 TransactionInitiationRequest(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 = {
        'source_account_id': 'str',
        'destination_account_id': 'str',
        'destination_transaction_instrument': 'TransactionInstrumentDetails',
        'transaction_description': 'str',
        'customer_payment_reference': 'str',
        'destination_account_holder_address': 'AccountHolderAddress',
        'source_amount': 'Currency',
        'transfer_rate_details': 'TransferRatePreview',
        'request_time': 'datetime',
    }

    attribute_map = {
        'source_account_id': 'sourceAccountId',
        'destination_account_id': 'destinationAccountId',
        'destination_transaction_instrument': 'destinationTransactionInstrument',
        'transaction_description': 'transactionDescription',
        'customer_payment_reference': 'customerPaymentReference',
        'destination_account_holder_address': 'destinationAccountHolderAddress',
        'source_amount': 'sourceAmount',
        'transfer_rate_details': 'transferRateDetails',
        'request_time': 'requestTime',
    }

    def __init__(self, source_account_id=None, destination_account_id=None, destination_transaction_instrument=None, transaction_description=None, customer_payment_reference=None, destination_account_holder_address=None, source_amount=None, transfer_rate_details=None, request_time=None, _configuration=None):  # noqa: E501
        """TransactionInitiationRequest - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._source_account_id = None
        self._destination_account_id = None
        self._destination_transaction_instrument = None
        self._transaction_description = None
        self._customer_payment_reference = None
        self._destination_account_holder_address = None
        self._source_amount = None
        self._transfer_rate_details = None
        self._request_time = None
        self.discriminator = None

        self.source_account_id = source_account_id
        if destination_account_id is not None:
            self.destination_account_id = destination_account_id
        self.destination_transaction_instrument = destination_transaction_instrument
        if transaction_description is not None:
            self.transaction_description = transaction_description
        if customer_payment_reference is not None:
            self.customer_payment_reference = customer_payment_reference
        if destination_account_holder_address is not None:
            self.destination_account_holder_address = destination_account_holder_address
        self.source_amount = source_amount
        if transfer_rate_details is not None:
            self.transfer_rate_details = transfer_rate_details
        self.request_time = request_time

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

        The unique identifier of the source Amazon SW bank account from where the money needs to be debited   # noqa: E501

        :return: The source_account_id of this TransactionInitiationRequest.  # noqa: E501
        :rtype: str
        """
        return self._source_account_id

    @source_account_id.setter
    def source_account_id(self, source_account_id):
        """Sets the source_account_id of this TransactionInitiationRequest.

        The unique identifier of the source Amazon SW bank account from where the money needs to be debited   # noqa: E501

        :param source_account_id: The source_account_id of this TransactionInitiationRequest.  # noqa: E501
        :type: str
        """
        if self._configuration.client_side_validation and source_account_id is None:
            raise ValueError("Invalid value for `source_account_id`, must not be `None`")  # noqa: E501

        self._source_account_id = source_account_id

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

        Optional field to specify the unique identifier of the destination bank account where the money needs to be deposited   # noqa: E501

        :return: The destination_account_id of this TransactionInitiationRequest.  # noqa: E501
        :rtype: str
        """
        return self._destination_account_id

    @destination_account_id.setter
    def destination_account_id(self, destination_account_id):
        """Sets the destination_account_id of this TransactionInitiationRequest.

        Optional field to specify the unique identifier of the destination bank account where the money needs to be deposited   # noqa: E501

        :param destination_account_id: The destination_account_id of this TransactionInitiationRequest.  # noqa: E501
        :type: str
        """

        self._destination_account_id = destination_account_id

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


        :return: The destination_transaction_instrument of this TransactionInitiationRequest.  # noqa: E501
        :rtype: TransactionInstrumentDetails
        """
        return self._destination_transaction_instrument

    @destination_transaction_instrument.setter
    def destination_transaction_instrument(self, destination_transaction_instrument):
        """Sets the destination_transaction_instrument of this TransactionInitiationRequest.


        :param destination_transaction_instrument: The destination_transaction_instrument of this TransactionInitiationRequest.  # noqa: E501
        :type: TransactionInstrumentDetails
        """
        if self._configuration.client_side_validation and destination_transaction_instrument is None:
            raise ValueError("Invalid value for `destination_transaction_instrument`, must not be `None`")  # noqa: E501

        self._destination_transaction_instrument = destination_transaction_instrument

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

        A description of the transaction.  # noqa: E501

        :return: The transaction_description of this TransactionInitiationRequest.  # noqa: E501
        :rtype: str
        """
        return self._transaction_description

    @transaction_description.setter
    def transaction_description(self, transaction_description):
        """Sets the transaction_description of this TransactionInitiationRequest.

        A description of the transaction.  # noqa: E501

        :param transaction_description: The transaction_description of this TransactionInitiationRequest.  # noqa: E501
        :type: str
        """

        self._transaction_description = transaction_description

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

        If the payment is for VAT (Value-Added-Tax) then enter VAT identification number in this field which will be mandatory. The length constraint is 140 characters and do not allow user to enter any sensitive information other than VAT-ID.  # noqa: E501

        :return: The customer_payment_reference of this TransactionInitiationRequest.  # noqa: E501
        :rtype: str
        """
        return self._customer_payment_reference

    @customer_payment_reference.setter
    def customer_payment_reference(self, customer_payment_reference):
        """Sets the customer_payment_reference of this TransactionInitiationRequest.

        If the payment is for VAT (Value-Added-Tax) then enter VAT identification number in this field which will be mandatory. The length constraint is 140 characters and do not allow user to enter any sensitive information other than VAT-ID.  # noqa: E501

        :param customer_payment_reference: The customer_payment_reference of this TransactionInitiationRequest.  # noqa: E501
        :type: str
        """

        self._customer_payment_reference = customer_payment_reference

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


        :return: The destination_account_holder_address of this TransactionInitiationRequest.  # noqa: E501
        :rtype: AccountHolderAddress
        """
        return self._destination_account_holder_address

    @destination_account_holder_address.setter
    def destination_account_holder_address(self, destination_account_holder_address):
        """Sets the destination_account_holder_address of this TransactionInitiationRequest.


        :param destination_account_holder_address: The destination_account_holder_address of this TransactionInitiationRequest.  # noqa: E501
        :type: AccountHolderAddress
        """

        self._destination_account_holder_address = destination_account_holder_address

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


        :return: The source_amount of this TransactionInitiationRequest.  # noqa: E501
        :rtype: Currency
        """
        return self._source_amount

    @source_amount.setter
    def source_amount(self, source_amount):
        """Sets the source_amount of this TransactionInitiationRequest.


        :param source_amount: The source_amount of this TransactionInitiationRequest.  # noqa: E501
        :type: Currency
        """
        if self._configuration.client_side_validation and source_amount is None:
            raise ValueError("Invalid value for `source_amount`, must not be `None`")  # noqa: E501

        self._source_amount = source_amount

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


        :return: The transfer_rate_details of this TransactionInitiationRequest.  # noqa: E501
        :rtype: TransferRatePreview
        """
        return self._transfer_rate_details

    @transfer_rate_details.setter
    def transfer_rate_details(self, transfer_rate_details):
        """Sets the transfer_rate_details of this TransactionInitiationRequest.


        :param transfer_rate_details: The transfer_rate_details of this TransactionInitiationRequest.  # noqa: E501
        :type: TransferRatePreview
        """

        self._transfer_rate_details = transfer_rate_details

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

        The transaction initiation request time in date-time format   # noqa: E501

        :return: The request_time of this TransactionInitiationRequest.  # noqa: E501
        :rtype: datetime
        """
        return self._request_time

    @request_time.setter
    def request_time(self, request_time):
        """Sets the request_time of this TransactionInitiationRequest.

        The transaction initiation request time in date-time format   # noqa: E501

        :param request_time: The request_time of this TransactionInitiationRequest.  # noqa: E501
        :type: datetime
        """
        if self._configuration.client_side_validation and request_time is None:
            raise ValueError("Invalid value for `request_time`, must not be `None`")  # noqa: E501

        self._request_time = request_time

    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(TransactionInitiationRequest, 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, TransactionInitiationRequest):
            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, TransactionInitiationRequest):
            return True

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