/// <summary> /// Update watermark information. /// </summary> /// <exception cref="DocuSign.Core.Client.ApiException">Thrown when fails to make API call</exception> /// <param name="accountId">The external account number (int) or account ID Guid.</param> /// <param name="accountWatermarks"> (optional)</param> /// <returns>Task of AccountWatermarks</returns> public async System.Threading.Tasks.Task <AccountWatermarks> WatermarkPutWatermarkAsync(string accountId, AccountWatermarks accountWatermarks = null) { ApiResponse <AccountWatermarks> localVarResponse = await WatermarkPutWatermarkAsyncWithHttpInfo(accountId, accountWatermarks); return(localVarResponse.Data); }
/// <summary> /// Update watermark information. /// </summary> /// <exception cref="DocuSign.Core.Client.ApiException">Thrown when fails to make API call</exception> /// <param name="accountId">The external account number (int) or account ID Guid.</param> /// <param name="accountWatermarks"> (optional)</param> /// <returns>Task of ApiResponse (AccountWatermarks)</returns> public async System.Threading.Tasks.Task <ApiResponse <AccountWatermarks> > WatermarkPutWatermarkAsyncWithHttpInfo(string accountId, AccountWatermarks accountWatermarks = null) { // verify the required parameter 'accountId' is set if (accountId == null) { throw new ApiException(400, "Missing required parameter 'accountId' when calling AccountWatermarksApi->WatermarkPutWatermark"); } var localVarPath = "/v2/accounts/{accountId}/watermark"; var localVarPathParams = new Dictionary <String, String>(); var localVarQueryParams = new Dictionary <String, String>(); var localVarHeaderParams = new Dictionary <String, String>(Configuration.DefaultHeader); var localVarFormParams = new Dictionary <String, String>(); var localVarFileParams = new Dictionary <String, FileParameter>(); Object localVarPostBody = null; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) { localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); } // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (accountId != null) { localVarPathParams.Add("accountId", Configuration.ApiClient.ParameterToString(accountId)); // path parameter } if (accountWatermarks != null && accountWatermarks.GetType() != typeof(byte[])) { localVarPostBody = Configuration.ApiClient.Serialize(accountWatermarks); // http body (model) parameter } else { localVarPostBody = accountWatermarks; // byte array } // make the HTTP request IRestResponse localVarResponse = (IRestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("WatermarkPutWatermark", localVarResponse); if (exception != null) { throw exception; } } return(new ApiResponse <AccountWatermarks>(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), (AccountWatermarks)Configuration.ApiClient.Deserialize(localVarResponse, typeof(AccountWatermarks)))); }
/// <summary> /// Update watermark information. /// </summary> /// <exception cref="DocuSign.Core.Client.ApiException">Thrown when fails to make API call</exception> /// <param name="accountId">The external account number (int) or account ID Guid.</param> /// <param name="accountWatermarks"> (optional)</param> /// <returns>AccountWatermarks</returns> public AccountWatermarks WatermarkPutWatermark(string accountId, AccountWatermarks accountWatermarks = null) { ApiResponse <AccountWatermarks> localVarResponse = WatermarkPutWatermarkWithHttpInfo(accountId, accountWatermarks); return(localVarResponse.Data); }