# coding: utf-8

"""
    The Selling Partner API for Amazon Seller Wallet Open Banking API

    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',
        'description': 'str',
        'destination_transaction_instrument': 'TransactionInstrumentDetails',
        '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',
        'description': 'description',
        'destination_transaction_instrument': 'destinationTransactionInstrument',
        '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, description=None, destination_transaction_instrument=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._description = None
        self._destination_transaction_instrument = 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.description = description
        self.destination_transaction_instrument = destination_transaction_instrument
        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 Seller Wallet bank account from which the money is 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 Seller Wallet bank account from which the money is 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

        The unique identifier of the destination bank account where the money is 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.

        The unique identifier of the destination bank account where the money is 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 description(self):
        """Gets the description of this TransactionInitiationRequest.  # noqa: E501

        A description of the transaction.  # noqa: E501

        :return: The description of this TransactionInitiationRequest.  # noqa: E501
        :rtype: str
        """
        return self._description

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

        A description of the transaction.  # noqa: E501

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

        self._description = description

    @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 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 time at which the transaction was initiated in [ISO 8601 date time format](https://developer-docs.amazon.com/sp-api/docs/iso-8601).  # 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 time at which the transaction was initiated in [ISO 8601 date time format](https://developer-docs.amazon.com/sp-api/docs/iso-8601).  # 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()
