# coding: utf-8

"""
    TrueLayer Resource API

    No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)  # noqa: E501

    The version of the OpenAPI document: v1.0
    Contact: rienafairefr@gmail.com
    Generated by: https://openapi-generator.tech
"""


from __future__ import absolute_import

import unittest
import datetime

import truelayer
from truelayer.models.transaction import Transaction  # noqa: E501
from truelayer.rest import ApiException

class TestTransaction(unittest.TestCase):
    """Transaction unit test stubs"""

    def setUp(self):
        pass

    def tearDown(self):
        pass

    def make_instance(self, include_optional):
        """Test Transaction
            include_option is a boolean, when False only required
            params are included, when True both required and
            optional params are included """
        # model = truelayer.models.transaction.Transaction()  # noqa: E501
        if include_optional :
            return Transaction(
                amount = 1.337, 
                balance = truelayer.models.balance.Balance(
                    available = 1.337, 
                    currency = '0', 
                    current = 1.337, 
                    update_timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ), 
                currency = '0', 
                description = '0', 
                meta = {
                    'key' : '0'
                    }, 
                timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), 
                transaction_id = '0', 
                transaction_type = '0'
            )
        else :
            return Transaction(
        )

    def testTransaction(self):
        """Test Transaction"""
        inst_req_only = self.make_instance(include_optional=False)
        inst_req_and_optional = self.make_instance(include_optional=True)


if __name__ == '__main__':
    unittest.main()
