/// <summary>
        /// Requests creation of driver metadata on older submissions to HWDC
        /// </summary>
        /// <returns>Dev Center response with either an error or ok if metadata was created successfully</returns>
        public async Task <DevCenterResponse <bool> > CreateMetaData(string productId, string submissionId)
        {
            string createMetaDataUrl = GetDevCenterBaseUrl() +
                                       string.Format(DevCenterCreateMetaDataUrl, Uri.EscapeDataString(productId), Uri.EscapeDataString(submissionId));
            DevCenterErrorDetails error = await InvokeHdcService(HttpMethod.Post, createMetaDataUrl, null, null);

            DevCenterResponse <bool> ret = new DevCenterResponse <bool>()
            {
                Error       = error,
                ReturnValue = new List <bool>()
                {
                    error == null
                }
            };

            return(ret);
        }
        /// <summary>
        /// Requests cancellation of a shipping label
        /// </summary>
        /// <returns>Dev Center Response with Boolean value indicating a successful call to cancel a the shipping label</returns>
        public async Task <DevCenterResponse <bool> > CancelShippingLabel(string productId, string submissionId, string shippingLabelId)
        {
            string cancelShippingLabelUrl = GetDevCenterBaseUrl() +
                                            string.Format(DevCenterCancelShippingLabelUrl, productId, submissionId, shippingLabelId);

            DevCenterErrorDetails error = await InvokeHdcService(HttpMethod.Put, cancelShippingLabelUrl, null, null);

            DevCenterResponse <bool> ret = new DevCenterResponse <bool>()
            {
                Error       = error,
                ReturnValue = new List <bool>()
                {
                    error == null
                }
            };

            return(ret);
        }
        /// <summary>
        /// Commits a Submission in HWDC
        /// </summary>
        /// <param name="productId">Specifiy the Product ID for the Submission to commit</param>
        /// <param name="submissionId">Specifiy the Submission ID for the Submission to commit</param>
        /// <returns>Dev Center response with either an error or a true if comitted successfully</returns>
        public async Task <DevCenterResponse <bool> > CommitSubmission(string productId, string submissionId)
        {
            string commitProductSubmissionUrl = GetDevCenterBaseUrl() +
                                                string.Format(DevCenterProductSubmissionCommitUrl, Uri.EscapeDataString(productId), Uri.EscapeDataString(submissionId));
            DevCenterErrorDetails error = await InvokeHdcService(HttpMethod.Post, commitProductSubmissionUrl, null, null);

            DevCenterResponse <bool> ret = new DevCenterResponse <bool>()
            {
                Error       = error,
                ReturnValue = new List <bool>()
                {
                    error == null
                }
            };

            if (error != null)
            {
                if ((error.HttpErrorCode.HasValue) &&
                    (error.HttpErrorCode.Value == (int)System.Net.HttpStatusCode.BadGateway) &&
                    (string.Compare(error.Code, "requestInvalidForCurrentState", true) == 0)
                    )
                {
                    //  Communication issue likely caused the submission to already be done.  Check.
                    DevCenterResponse <Submission> SubmissionStatus = await GetSubmission(productId, submissionId);

                    if (SubmissionStatus.Error == null)
                    {
                        Submission s = SubmissionStatus.ReturnValue[0];
                        if (string.Compare(s.CommitStatus, "commitComplete", true) == 0)
                        {
                            //Actually did commit
                            ret.Error       = null;
                            ret.ReturnValue = new List <bool>()
                            {
                                true
                            };
                        }
                    }
                }
            }

            return(ret);
        }