public void CreateCorrectViewTest()
        {
            try
            {
                // Create Envelope
                CreateEnvelopeTest();
                Assert.IsNotNull(TestConfig.EnvelopeId);

                // Start the embedded sending session
                ReturnUrlRequest urlRequest = new ReturnUrlRequest();
                urlRequest.ReturnUrl = TestConfig.DefaultReturnUrl;

                // Adding the envelopeId start sthe console with the envelope open
                CorrectViewRequest correctViewRequest = new CorrectViewRequest();
                correctViewRequest.ReturnUrl = TestConfig.DefaultReturnUrl;

                EnvelopesApi envelopesApi = new EnvelopesApi();
                ViewUrl      viewUrl      = envelopesApi.CreateCorrectView(TestConfig.AccountId, TestConfig.EnvelopeId, correctViewRequest);

                // Start the embedded signing session.
                System.Diagnostics.Process.Start(viewUrl.Url);
            }
            catch (DocuSign.eSign.Client.ApiException apiEx)
            {
                Assert.IsNotNull(apiEx.ErrorCode);
                Assert.IsTrue(!string.IsNullOrWhiteSpace(apiEx.Message));
                Assert.IsTrue(false, "Failed with ErrorCode: " + apiEx.ErrorCode + ", Message: " + apiEx.Message);
            }
        }
示例#2
0
        /// <summary>
        /// Returns a URL to the envelope correction UI. Returns a URL that allows you to embed the envelope correction view of the DocuSign UI in your applications.\n\nImportant: iFrames should not be used for embedded operations on mobile devices due to screen space issues. For iOS devices DocuSign recommends using a WebView.
        /// </summary>
 	    ///<param name="accountId">The external account number (int) or account ID Guid.</param><param name="envelopeId">The envelopeId Guid of the envelope being accessed.</param> <param name="correctViewRequest">TBD Description</param>
		/// <returns>7Task of ViewUrl</returns>
        public async System.Threading.Tasks.Task<ViewUrl> CreateCorrectViewAsync (string accountId, string envelopeId, CorrectViewRequest correctViewRequest)
        {
             ApiResponse<ViewUrl> response = await CreateCorrectViewAsyncWithHttpInfo(accountId, envelopeId, correctViewRequest);
             return response.Data;

        }
示例#3
0
        /// <summary>
        /// Returns a URL to the envelope correction UI. Returns a URL that allows you to embed the envelope correction view of the DocuSign UI in your applications.\n\nImportant: iFrames should not be used for embedded operations on mobile devices due to screen space issues. For iOS devices DocuSign recommends using a WebView.
        /// </summary>
	    ///<param name="accountId">The external account number (int) or account ID Guid.</param><param name="envelopeId">The envelopeId Guid of the envelope being accessed.</param> <param name="correctViewRequest">TBD Description</param>
		/// <returns>8Task of ApiResponse (ViewUrl)</returns>
        public async System.Threading.Tasks.Task<ApiResponse<ViewUrl>> CreateCorrectViewAsyncWithHttpInfo (string accountId, string envelopeId, CorrectViewRequest correctViewRequest)
        {
            // verify the required parameter 'accountId' is set
            if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling CreateCorrectView");
            // verify the required parameter 'envelopeId' is set
            if (envelopeId == null) throw new ApiException(400, "Missing required parameter 'envelopeId' when calling CreateCorrectView");
            
    
            var path_ = "/v2/accounts/{accountId}/envelopes/{envelopeId}/views/correct";
    
            var pathParams = new Dictionary<String, String>();
            var queryParams = new Dictionary<String, String>();
            var headerParams = new Dictionary<String, String>(Configuration.DefaultHeader);
            var formParams = new Dictionary<String, String>();
            var fileParams = new Dictionary<String, FileParameter>();
            String postBody = null;

            // to determine the Accept header
            String[] http_header_accepts = new String[] {
                "application/json"
            };
            String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts);
            if (http_header_accept != null)
                headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts));

            // set "format" to json by default
            // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json
            pathParams.Add("format", "json");
            if (accountId != null) pathParams.Add("accountId", Configuration.ApiClient.ParameterToString(accountId)); // path parameter
            if (envelopeId != null) pathParams.Add("envelopeId", Configuration.ApiClient.ParameterToString(envelopeId)); // path parameter
            

						
			
			

            
            
            postBody = Configuration.ApiClient.Serialize(correctViewRequest); // http body (model) parameter
            

            

            // make the HTTP request
            IRestResponse response = (IRestResponse) await Configuration.ApiClient.CallApiAsync(path_, Method.POST, queryParams, postBody, headerParams, formParams, fileParams, pathParams);

            int statusCode = (int) response.StatusCode;
 
            if (statusCode >= 400)
                throw new ApiException (statusCode, "Error calling CreateCorrectView: " + response.Content, response.Content);
            else if (statusCode == 0)
                throw new ApiException (statusCode, "Error calling CreateCorrectView: " + response.ErrorMessage, response.ErrorMessage);

            return new ApiResponse<ViewUrl>(statusCode,
                response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
                (ViewUrl) Configuration.ApiClient.Deserialize(response, typeof(ViewUrl)));
            
        }
示例#4
0
        /// <summary>
        /// Returns a URL to the envelope correction UI. Returns a URL that allows you to embed the envelope correction view of the DocuSign UI in your applications.\n\nImportant: iFrames should not be used for embedded operations on mobile devices due to screen space issues. For iOS devices DocuSign recommends using a WebView.
        /// </summary>
 	    ///<param name="accountId">The external account number (int) or account ID Guid.</param><param name="envelopeId">The envelopeId Guid of the envelope being accessed.</param> <param name="correctViewRequest">TBD Description</param>
		/// <returns>5ViewUrl</returns>
        public ViewUrl CreateCorrectView (string accountId, string envelopeId, CorrectViewRequest correctViewRequest)
        {
             ApiResponse<ViewUrl> response = CreateCorrectViewWithHttpInfo(accountId, envelopeId, correctViewRequest);
             return response.Data;
        }