# coding: utf-8

"""
    Nomad Envoy

    This is the API descriptor for the Nomad Envoy API, responsible for order creation and product lists.<br><br> Developed by <a href=\"https://samarkand.global\">Samarkand Global</a> in partnership with <a href=\"https://www.sf-express.com/cn/sc/\">SF Express</a><br><br> Install for node with <br>`npm install nomad_envoy_cli`<br><br> Install for python with <br>`pip install nomad-envoy-cli`<br>  # noqa: E501

    The version of the OpenAPI document: 1.40.0
    Contact: paul@samarkand.global
    Generated by: https://openapi-generator.tech
"""


from __future__ import absolute_import

import unittest
import datetime

import nomad_envoy_cli
from nomad_envoy_cli.models.product import Product  # noqa: E501
from nomad_envoy_cli.rest import ApiException

class TestProduct(unittest.TestCase):
    """Product unit test stubs"""

    def setUp(self):
        pass

    def tearDown(self):
        pass

    def make_instance(self, include_optional):
        """Test Product
            include_option is a boolean, when False only required
            params are included, when True both required and
            optional params are included """
        # model = nomad_envoy_cli.models.product.Product()  # noqa: E501
        if include_optional :
            return Product(
                product_id = '123456', 
                name = 'COLAB Dry Shampoo', 
                name_en = 'COLAB Dry Shampoo', 
                skus = [
                    nomad_envoy_cli.models.sku.Sku(
                        sku_number = 'SMK123', 
                        price = 10, 
                        rrp = 8.0, 
                        group_buying_price = 6.0, 
                        images = nomad_envoy_cli.models.images.Images(
                            ids = [
                                '0'
                                ], 
                            urls = [
                                '0'
                                ], 
                            uploads = [
                                '0'
                                ], ), 
                        barcode = '55001234567', 
                        color = 'green', 
                        size = 'small', 
                        quantity = 10, 
                        is_onsale = False, 
                        net_weight = 30.3, 
                        gross_weight = 35.3, 
                        shipping_cost = 4.2, 
                        shipping_time = 7, 
                        model = 'iPhone XR', 
                        spec = '25mm', 
                        customs_unit_code = '142, 007, 瓶, ...', 
                        customs_unit_code_package = '142, 011, 140', 
                        customs_unit_code_weight = '035', 
                        cost = 200.0, )
                    ], 
                currency = 'RMB', 
                mass_unit = 'Kilogram', 
                time_unit = 'days', 
                barcode = '55001234567', 
                description = 'Some nice dry shampoo for when you cant be bothered to shower', 
                price = 7.0, 
                rrp = 8.0, 
                group_buying_price = 6.0, 
                net_weight = 30.3, 
                gross_weight = 35.3, 
                images = nomad_envoy_cli.models.images.Images(
                    ids = [
                        '0'
                        ], 
                    urls = [
                        '0'
                        ], 
                    uploads = [
                        '0'
                        ], ), 
                is_onsale = False, 
                status = 'draft', 
                category = ["All","Cloth","Top"], 
                vendor = 'Apple', 
                country = 'France', 
                shelf_life = 21, 
                created_at = '2019-03-19T08:57:41.133719+00:00', 
                updated_at = '2019-03-19T08:57:41.133719+00:00', 
                logistics_mode = 'red_auto', 
                shipping_cost = 4.2, 
                shipping_time = 7, 
                hs_code = '7606929900', 
                personal_postal_articles_tax = '01000000', 
                ingredient = 'Silk', 
                model = 'iPhone XR', 
                spec = '25mm', 
                warranty_period = 180, 
                express_type = '0', 
                discount = 0.0, 
                tax_rate = 0.0, 
                brand = 'Other'
            )
        else :
            return Product(
                currency = 'RMB',
                mass_unit = 'Kilogram',
        )

    def testProduct(self):
        """Test Product"""
        inst_req_only = self.make_instance(include_optional=False)
        inst_req_and_optional = self.make_instance(include_optional=True)


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