예제 #1
0
        /// <summary>
        ///
        /// </summary>
        /// <exception cref="ApiException">Thrown when fails to make API call</exception>
        /// <param name="passportId"></param>
        /// <returns>IRestResponse of PassportPDFPassport</returns>
        public PassportPDFPassport PassportManagerGetPassportInfo(string passportId)
        {
            // verify the required parameter 'passportId' is set
            if (passportId == null)
            {
                throw new ArgumentNullException("Missing required parameter 'passportId' when calling PassportManagerApi->PassportManagerGetPassportInfo");
            }

            RequestOptions requestOptions = new RequestOptions();

            string[] contentTypes = new string[] {  };
            string[] accepts      = new string[] { "text/plain", "application/json", "text/json" };

            var localVarContentType = ClientUtils.SelectHeaderContentType(contentTypes);

            if (localVarContentType != null)
            {
                requestOptions.AddHeaderParameter("Content-Type", localVarContentType);
            }

            var localVarAccept = ClientUtils.SelectHeaderAccept(accepts);

            if (localVarAccept != null)
            {
                requestOptions.AddHeaderParameter("Accept", localVarAccept);
            }

            if (passportId != null)
            {
                foreach (var kvp in ClientUtils.ParameterToMultiMap("", "passportId", passportId))
                {
                    foreach (var value in kvp.Value)
                    {
                        requestOptions.AddQueryParameter(kvp.Key, value);
                    }
                }
            }
            IRestResponse response = ApiClient.CallApi(Method.GET,
                                                       !string.IsNullOrEmpty(BasePath) ? BasePath : GlobalConfiguration.BasePath,
                                                       "/api/passportmanager/PassportManagerGetPassportInfo",
                                                       !string.IsNullOrEmpty(ApiKey) ? ApiKey : GlobalConfiguration.ApiKey,
                                                       requestOptions);

            if (!response.IsSuccessful)
            {
                throw new ApiException(response.StatusCode, string.Format("API call to /api/passportmanager/PassportManagerGetPassportInfo failed: {0}", response.ErrorMessage, response.ErrorException));
            }

            return((PassportPDFPassport)ApiClient.DeserializeResponse(response, typeof(PassportPDFPassport)));
        }
예제 #2
0
        /// <summary>
        /// Gets the maximum number of threads to be used simultaneously by a client application.
        /// </summary>
        /// <exception cref="ApiException">Thrown when fails to make API call</exception>
        /// <param name="applicationId"></param>
        /// <returns>Task of IRestResponse (IntegerResponse)</returns>
        public async Task <IntegerResponse> PassportPDFApplicationManagerGetMaxClientThreadsAsync(string applicationId)
        {
            // verify the required parameter 'applicationId' is set
            if (applicationId == null)
            {
                throw new ArgumentNullException("Missing required parameter 'applicationId' when calling PassportPDFApplicationManagerApi->PassportPDFApplicationManagerGetMaxClientThreads");
            }

            RequestOptions requestOptions = new RequestOptions();

            string[] contentTypes = new string[] {  };
            string[] accepts      = new string[] { "text/plain", "application/json", "text/json" };

            foreach (var contentType in contentTypes)
            {
                requestOptions.AddHeaderParameter("Content-Type", contentType);
            }

            foreach (var accept in accepts)
            {
                requestOptions.AddHeaderParameter("Accept", accept);
            }

            if (applicationId != null)
            {
                foreach (var kvp in ClientUtils.ParameterToMultiMap("", "applicationId", applicationId))
                {
                    foreach (var value in kvp.Value)
                    {
                        requestOptions.AddQueryParameter(kvp.Key, value);
                    }
                }
            }

            IRestResponse response = await ApiClient.CallApiAsync(Method.GET,
                                                                  !string.IsNullOrEmpty(BasePath)?BasePath : GlobalConfiguration.BasePath,
                                                                  "/api/passportpdfapplicationmanager/PassportPDFApplicationManagerGetMaxClientThreads",
                                                                  !string.IsNullOrEmpty(ApiKey)?ApiKey : GlobalConfiguration.ApiKey,
                                                                  requestOptions);

            if (!response.IsSuccessful)
            {
                throw new ApiException(response.StatusCode, string.Format("API call to /api/passportpdfapplicationmanager/PassportPDFApplicationManagerGetMaxClientThreads failed: {0}", response.ErrorMessage, response.ErrorException));
            }

            return((IntegerResponse)ApiClient.DeserializeResponse(response, typeof(IntegerResponse)));
        }