Connectster.Shopify.ShopifyCommunicator.DeleteProduct C# (CSharp) Method

DeleteProduct() public method

public DeleteProduct ( ShopifyStoreAuth storeAuth, int productId ) : bool
storeAuth ShopifyStoreAuth
productId int
return bool
        public bool DeleteProduct(ShopifyStoreAuth storeAuth, int? productId)
        {
            if (productId == null)
            {
                Logger.WarnFormat("ShopifyCommunicator::DeleteProduct(): Argument productId is null.");
                return true;
            }

            XmlDocument errorDocument =
                ShopifyDelete(
                    _protocol + storeAuth.StoreSubDomain + _domain + "/admin/products/" + productId + ".xml",
                    HashString(_appAuth.Secret + storeAuth.StoreAuthToken));
            if (errorDocument == null) // null == No Errors
            {
                return true;
            }

            ApiLogger.ErrorFormat("ShopifyCommunicator::DeleteProduct(): Shopify returned errors: {0}",
                                  errorDocument.InnerText);
            return false;
        }