# coding: utf-8

"""
    Allegro REST API

    https://developer.allegro.pl/about  # noqa: E501

    The version of the OpenAPI document: 2020.03.10
    Generated by: https://openapi-generator.tech
"""


from __future__ import absolute_import

import unittest
import datetime

import allegro_api
from allegro_api.models.order_event_data import OrderEventData  # noqa: E501
from allegro_api.rest import ApiException

class TestOrderEventData(unittest.TestCase):
    """OrderEventData unit test stubs"""

    def setUp(self):
        pass

    def tearDown(self):
        pass

    def make_instance(self, include_optional):
        """Test OrderEventData
            include_option is a boolean, when False only required
            params are included, when True both required and
            optional params are included """
        # model = allegro_api.models.order_event_data.OrderEventData()  # noqa: E501
        if include_optional :
            return OrderEventData(
                seller = allegro_api.models.seller_reference.SellerReference(
                    id = '437848322', ), 
                buyer = allegro_api.models.buyer_reference.BuyerReference(
                    id = '23123123', 
                    email = 'user-email@allegro.pl', 
                    login = 'User_Login', 
                    guest = False, ), 
                line_items = [
                    allegro_api.models.order_line_item.OrderLineItem(
                        id = '62ae358b-8f65-4fc4-9c77-bedf604a2e2b', 
                        offer = allegro_api.models.offer_reference.OfferReference(
                            id = '3213213', 
                            name = 'Name of purchased offer', 
                            external = allegro_api.models.external_id.ExternalId(
                                id = 'AH-129834', ), ), 
                        quantity = 1, 
                        original_price = allegro_api.models.price.Price(
                            amount = '123.45', 
                            currency = 'PLN', ), 
                        price = allegro_api.models.price.Price(
                            amount = '123.45', 
                            currency = 'PLN', ), 
                        bought_at = '2018-01-01T10:23:43.123Z', )
                    ], 
                checkout_form = allegro_api.models.checkout_form_reference.CheckoutFormReference(
                    id = '88ae369b-8f65-4fc4-9c77-bedf604a2e2b', )
            )
        else :
            return OrderEventData(
                seller = allegro_api.models.seller_reference.SellerReference(
                    id = '437848322', ),
                buyer = allegro_api.models.buyer_reference.BuyerReference(
                    id = '23123123', 
                    email = 'user-email@allegro.pl', 
                    login = 'User_Login', 
                    guest = False, ),
                line_items = [
                    allegro_api.models.order_line_item.OrderLineItem(
                        id = '62ae358b-8f65-4fc4-9c77-bedf604a2e2b', 
                        offer = allegro_api.models.offer_reference.OfferReference(
                            id = '3213213', 
                            name = 'Name of purchased offer', 
                            external = allegro_api.models.external_id.ExternalId(
                                id = 'AH-129834', ), ), 
                        quantity = 1, 
                        original_price = allegro_api.models.price.Price(
                            amount = '123.45', 
                            currency = 'PLN', ), 
                        price = allegro_api.models.price.Price(
                            amount = '123.45', 
                            currency = 'PLN', ), 
                        bought_at = '2018-01-01T10:23:43.123Z', )
                    ],
        )

    def testOrderEventData(self):
        """Test OrderEventData"""
        inst_req_only = self.make_instance(include_optional=False)
        inst_req_and_optional = self.make_instance(include_optional=True)


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