public ShopifyResponse<ShopifyProduct> UpdateProduct(ShopifyStoreAuth storeAuth, ShopifyProduct shopifyProduct)
{
if (shopifyProduct == null || shopifyProduct.Id == null)
{
throw new ArgumentNullException(
"shopifyProduct");
}
var xS = new XmlSerializer(typeof (ShopifyProduct));
var memStream = new MemoryStream();
var xDoc = new XmlDocument();
xS.Serialize(memStream, shopifyProduct);
memStream.Seek(0, SeekOrigin.Begin);
xDoc.Load(memStream);
memStream.Close();
XmlDocument productResponse =
ShopifyPutPost(
(_protocol + storeAuth.StoreSubDomain + _domain + "/admin/products/" + shopifyProduct.Id + ".xml"),
HashString(_appAuth.Secret + storeAuth.StoreAuthToken), xDoc, "PUT");
return new ShopifyResponse<ShopifyProduct>(productResponse);
}