public ShopifyLineItem(ShopifyProduct thisProduct, ShopifyVariant thisVariant) { Id = 0; FulfillmentService = thisVariant.FulfillmentService; FulfillmentStatus = null; Grams = thisVariant.Grams; Price = thisVariant.Price; ProductId = thisProduct.Id == null ? 0 : (int)thisProduct.Id; Quantity = thisVariant.InventoryQuantity == null ? 0 : (int) thisVariant.InventoryQuantity; RequiresShipping = thisVariant.RequiresShipping; Sku = thisVariant.Sku; Title = thisProduct.Title; VariantId = thisVariant.Id == null ? 0 : (int)thisVariant.Id; VariantTitle = thisVariant.Title; Vendor = thisProduct.Vendor; Name = thisVariant.Title; }
//All possible options public ShopifyProduct(string body, string bodyHtml, DateTime? created, string handle, int id, string productType, DateTime? publishedAt, string templateSuffix, string title, DateTime? updatedAt, string vendor, string tags, ShopifyVariant[] variants, ShopifyImage[] images, ShopifyOption[] options) { this.body = body; this.bodyHtml = bodyHtml; this.created = created; this.handle = handle; this.id = id; this.productType = productType; this.publishedAt = publishedAt; this.templateSuffix = templateSuffix; this.title = title; this.updatedAt = updatedAt; this.vendor = vendor; this.tags = tags; this.variants = variants; this.images = images; this.options = options; }