/// <summary>
        /// Initializes this instance with JSON data from an API response.
        /// </summary>
        /// <param name="data">JSON object</param>
        public ProductProjection(dynamic data = null)
        {
            if (data == null)
            {
                return;
            }

            this.Id                     = data.id;
            this.Key                    = data.key;
            this.Version                = data.version;
            this.CreatedAt              = data.createdAt;
            this.LastModifiedAt         = data.lastModifiedAt;
            this.ProductType            = new Reference(data.productType);
            this.Name                   = new LocalizedString(data.name);
            this.Description            = new LocalizedString(data.description);
            this.Slug                   = new LocalizedString(data.slug);
            this.Categories             = Helper.GetListFromJsonArray <Reference>(data.categories);
            this.CategoryOrderHints     = data.categoryOrderHints;
            this.MetaTitle              = new LocalizedString(data.metaTitle);
            this.MetaDescription        = new LocalizedString(data.metaDescription);
            this.MetaKeywords           = new LocalizedString(data.metaKeywords);
            this.SearchKeywords         = new SearchKeywords(data.searchKeywords);
            this.HasStagedChanges       = data.hasStagedChanges;
            this.Published              = data.published;
            this.MasterVariant          = new ProductVariant(data.masterVariant);
            this.Variants               = Helper.GetListFromJsonArray <ProductVariant>(data.variants);
            this.TaxCategory            = new Reference(data.taxCategory);
            this.State                  = new Reference(data.state);
            this.ReviewRatingStatistics = new ReviewRatingStatistics(data.reviewRatingStatistics);
        }
        /// <summary>
        /// Initializes this instance with JSON data from an API response.
        /// </summary>
        /// <param name="data">JSON object</param>
        public Product(dynamic data)
        {
            if (data == null)
            {
                return;
            }

            this.Id                     = data.id;
            this.Key                    = data.key;
            this.Version                = data.version;
            this.CreatedAt              = data.createdAt;
            this.LastModifiedAt         = data.lastModifiedAt;
            this.ProductType            = new Reference(data.productType);
            this.MasterData             = new ProductCatalogData(data.masterData);
            this.TaxCategory            = new Reference(data.taxCategory);
            this.State                  = new Reference(data.state);
            this.ReviewRatingStatistics = new ReviewRatingStatistics(data.reviewRatingStatistics);
        }