Beispiel #1
0
        /// <summary>
        /// sign-service-signature-id-perform-identity-id post
        /// </summary>
        /// <exception cref="SigningToday.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="signatureId"></param>
        /// <param name="identityId"></param>
        /// <param name="inlineObject8"> (optional)</param>
        /// <returns>Task of Object</returns>
        public async System.Threading.Tasks.Task <Object> SignatureIdPerformIdPostAsync(string signatureId, string identityId, InlineObject8 inlineObject8 = default(InlineObject8))
        {
            ApiResponse <Object> localVarResponse = await SignatureIdPerformIdPostAsyncWithHttpInfo(signatureId, identityId, inlineObject8);

            return(localVarResponse.Data);
        }
Beispiel #2
0
        /// <summary>
        /// sign-service-signature-id-perform-identity-id post
        /// </summary>
        /// <exception cref="SigningToday.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="signatureId"></param>
        /// <param name="identityId"></param>
        /// <param name="inlineObject8"> (optional)</param>
        /// <returns>Task of ApiResponse (Object)</returns>
        public async System.Threading.Tasks.Task <ApiResponse <Object> > SignatureIdPerformIdPostAsyncWithHttpInfo(string signatureId, string identityId, InlineObject8 inlineObject8 = default(InlineObject8))
        {
            // verify the required parameter 'signatureId' is set
            if (signatureId == null)
            {
                throw new ApiException(400, "Missing required parameter 'signatureId' when calling SigningServicesApi->SignatureIdPerformIdPost");
            }
            // verify the required parameter 'identityId' is set
            if (identityId == null)
            {
                throw new ApiException(400, "Missing required parameter 'identityId' when calling SigningServicesApi->SignatureIdPerformIdPost");
            }

            var    localVarPath         = "/sign-service/{signature-id}/perform/{identity-id}";
            var    localVarPathParams   = new Dictionary <String, String>();
            var    localVarQueryParams  = new List <KeyValuePair <String, String> >();
            var    localVarHeaderParams = new Dictionary <String, String>(this.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[] {
                "application/json"
            };
            String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);

            // to determine the Accept header
            String[] localVarHttpHeaderAccepts = new String[] {
                "application/json"
            };
            String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);

            if (localVarHttpHeaderAccept != null)
            {
                localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
            }

            if (signatureId != null)
            {
                localVarPathParams.Add("signature-id", this.Configuration.ApiClient.ParameterToString(signatureId));                      // path parameter
            }
            if (identityId != null)
            {
                localVarPathParams.Add("identity-id", this.Configuration.ApiClient.ParameterToString(identityId));                     // path parameter
            }
            if (inlineObject8 != null && inlineObject8.GetType() != typeof(byte[]))
            {
                localVarPostBody = this.Configuration.ApiClient.Serialize(inlineObject8); // http body (model) parameter
            }
            else
            {
                localVarPostBody = inlineObject8; // byte array
            }

            // authentication (OAuth2) required
            // oauth required
            if (!String.IsNullOrEmpty(this.Configuration.AccessToken))
            {
                localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken;
            }

            // make the HTTP request
            IRestResponse localVarResponse = (IRestResponse)await this.Configuration.ApiClient.CallApiAsync(localVarPath,
                                                                                                            Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
                                                                                                            localVarPathParams, localVarHttpContentType);

            int localVarStatusCode = (int)localVarResponse.StatusCode;

            if (ExceptionFactory != null)
            {
                Exception exception = ExceptionFactory("SignatureIdPerformIdPost", localVarResponse);
                if (exception != null)
                {
                    throw exception;
                }
            }

            return(new ApiResponse <Object>(localVarStatusCode,
                                            localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)),
                                            (Object)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Object))));
        }
Beispiel #3
0
        /// <summary>
        /// sign-service-signature-id-perform-identity-id post
        /// </summary>
        /// <exception cref="SigningToday.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="signatureId"></param>
        /// <param name="identityId"></param>
        /// <param name="inlineObject8"> (optional)</param>
        /// <returns>Object</returns>
        public Object SignatureIdPerformIdPost(string signatureId, string identityId, InlineObject8 inlineObject8 = default(InlineObject8))
        {
            ApiResponse <Object> localVarResponse = SignatureIdPerformIdPostWithHttpInfo(signatureId, identityId, inlineObject8);

            return(localVarResponse.Data);
        }