Ejemplo n.º 1
0
        /// <summary>
        ///
        /// </summary>
        /// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
        /// <returns>ApiResponse of List&lt;Campaign&gt;</returns>
        public Org.OpenAPITools.Client.ApiResponse <List <Campaign> > ApiCampaignGetWithHttpInfo()
        {
            Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions();

            String[] _contentTypes = new String[] {
            };

            // to determine the Accept header
            String[] _accepts = new String[] {
                "application/json"
            };

            var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes);

            if (localVarContentType != null)
            {
                localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType);
            }

            var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts);

            if (localVarAccept != null)
            {
                localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);
            }


            // authentication (Bearer) required
            if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("Authorization")))
            {
                localVarRequestOptions.HeaderParameters.Add("Authorization", this.Configuration.GetApiKeyWithPrefix("Authorization"));
            }

            // make the HTTP request
            var localVarResponse = this.Client.Get <List <Campaign> >("/api/campaign", localVarRequestOptions, this.Configuration);

            if (this.ExceptionFactory != null)
            {
                Exception _exception = this.ExceptionFactory("ApiCampaignGet", localVarResponse);
                if (_exception != null)
                {
                    throw _exception;
                }
            }

            return(localVarResponse);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Get store template from a specific category View all templates from the public [Template Store](https://store.salestim.com) or publish your own templates to the [Template Manifests Repository](https://github.com/SalesTim/template-manifests)
        /// </summary>
        /// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="id">The category ID</param>
        /// <returns>Task of ApiResponse (List&lt;Object&gt;)</returns>
        public async System.Threading.Tasks.Task <Org.OpenAPITools.Client.ApiResponse <List <Object> > > GetStoreTemplatesByCategoryAsyncWithHttpInfo(string id)
        {
            // verify the required parameter 'id' is set
            if (id == null)
            {
                throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'id' when calling StoreApi->GetStoreTemplatesByCategory");
            }


            Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions();

            String[] _contentTypes = new String[] {
            };

            // to determine the Accept header
            String[] _accepts = new String[] {
                "application/json"
            };

            foreach (var _contentType in _contentTypes)
            {
                localVarRequestOptions.HeaderParameters.Add("Content-Type", _contentType);
            }

            foreach (var _accept in _accepts)
            {
                localVarRequestOptions.HeaderParameters.Add("Accept", _accept);
            }

            localVarRequestOptions.PathParameters.Add("id", Org.OpenAPITools.Client.ClientUtils.ParameterToString(id)); // path parameter


            // make the HTTP request

            var localVarResponse = await this.AsynchronousClient.GetAsync <List <Object> >("/store/templates/byCategory/{id}", localVarRequestOptions, this.Configuration);

            if (this.ExceptionFactory != null)
            {
                Exception _exception = this.ExceptionFactory("GetStoreTemplatesByCategory", localVarResponse);
                if (_exception != null)
                {
                    throw _exception;
                }
            }

            return(localVarResponse);
        }
Ejemplo n.º 3
0
        /// <summary>
        ///
        /// </summary>
        /// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="accessKeys"></param>
        /// <returns>ApiResponse of Object(void)</returns>
        public Org.OpenAPITools.Client.ApiResponse <Object> ValidateWithHttpInfo(AccessKeys accessKeys)
        {
            // verify the required parameter 'accessKeys' is set
            if (accessKeys == null)
            {
                throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'accessKeys' when calling DefaultApi->Validate");
            }

            Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions();

            String[] @contentTypes = new String[] {
                "application/json"
            };

            // to determine the Accept header
            String[] @accepts = new String[] {
                "application/json"
            };

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

            foreach (var accept in @accepts)
            {
                requestOptions.HeaderParameters.Add("Accept", accept);
            }

            requestOptions.Data = accessKeys;


            // make the HTTP request

            var response = this.Client.Post <Object>("/validate", requestOptions, this.Configuration);

            if (this.ExceptionFactory != null)
            {
                Exception exception = this.ExceptionFactory("Validate", response);
                if (exception != null)
                {
                    throw exception;
                }
            }

            return(response);
        }
Ejemplo n.º 4
0
        /// <summary>
        /// Find purchase order by ID For valid response try integer IDs with value &lt;&#x3D; 5 or &gt; 10. Other values will generated exceptions
        /// </summary>
        /// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="orderId">ID of pet that needs to be fetched</param>
        /// <param name="operationIndex">Index associated with the operation.</param>
        /// <returns>ApiResponse of Order</returns>
        public Org.OpenAPITools.Client.ApiResponse <Order> GetOrderByIdWithHttpInfo(long orderId, int operationIndex = 0)
        {
            Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions();

            string[] _contentTypes = new string[] {
            };

            // to determine the Accept header
            string[] _accepts = new string[] {
                "application/xml",
                "application/json"
            };

            var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes);

            if (localVarContentType != null)
            {
                localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType);
            }

            var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts);

            if (localVarAccept != null)
            {
                localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);
            }

            localVarRequestOptions.PathParameters.Add("orderId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(orderId)); // path parameter

            localVarRequestOptions.Operation      = "StoreApi.GetOrderById";
            localVarRequestOptions.OperationIndex = operationIndex;


            // make the HTTP request
            var localVarResponse = this.Client.Get <Order>("/store/order/{orderId}", localVarRequestOptions, this.Configuration);

            if (this.ExceptionFactory != null)
            {
                Exception _exception = this.ExceptionFactory("GetOrderById", localVarResponse);
                if (_exception != null)
                {
                    throw _exception;
                }
            }

            return(localVarResponse);
        }
Ejemplo n.º 5
0
        /// <summary>
        /// Delete purchase order by ID For valid response try integer IDs with value &lt; 1000. Anything above 1000 or nonintegers will generate API errors
        /// </summary>
        /// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="orderId">ID of the order that needs to be deleted</param>
        /// <returns>Task of ApiResponse</returns>
        public async System.Threading.Tasks.Task <Org.OpenAPITools.Client.ApiResponse <Object> > DeleteOrderAsyncWithHttpInfo(string orderId)
        {
            // verify the required parameter 'orderId' is set
            if (orderId == null)
            {
                throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'orderId' when calling StoreApi->DeleteOrder");
            }


            Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions();

            String[] _contentTypes = new String[] {
            };

            // to determine the Accept header
            String[] _accepts = new String[] {
            };

            foreach (var _contentType in _contentTypes)
            {
                localVarRequestOptions.HeaderParameters.Add("Content-Type", _contentType);
            }

            foreach (var _accept in _accepts)
            {
                localVarRequestOptions.HeaderParameters.Add("Accept", _accept);
            }

            if (orderId != null)
            {
                localVarRequestOptions.PathParameters.Add("order_id", Org.OpenAPITools.Client.ClientUtils.ParameterToString(orderId)); // path parameter
            }
            // make the HTTP request

            var localVarResponse = await this.AsynchronousClient.DeleteAsync <Object>("/store/order/{order_id}", localVarRequestOptions, this.Configuration);

            if (this.ExceptionFactory != null)
            {
                Exception _exception = this.ExceptionFactory("DeleteOrder", localVarResponse);
                if (_exception != null)
                {
                    throw _exception;
                }
            }

            return(localVarResponse);
        }
Ejemplo n.º 6
0
        /// <summary>
        ///
        /// </summary>
        /// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="usernamePassword"></param>
        /// <returns>Task of ApiResponse</returns>
        public async System.Threading.Tasks.Task <Org.OpenAPITools.Client.ApiResponse <Object> > SiginoutAsyncWithHttpInfo(UsernamePassword usernamePassword)
        {
            // verify the required parameter 'usernamePassword' is set
            if (usernamePassword == null)
            {
                throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'usernamePassword' when calling DefaultApi->Siginout");
            }

            Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions();

            String[] @contentTypes = new String[] {
                "application/json"
            };

            // to determine the Accept header
            String[] @accepts = new String[] {
                "application/json"
            };

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

            foreach (var accept in @accepts)
            {
                requestOptions.HeaderParameters.Add("Accept", accept);
            }

            requestOptions.Data = usernamePassword;


            // make the HTTP request

            var response = await this.AsynchronousClient.PostAsync <Object>("/signout", requestOptions, this.Configuration);

            if (this.ExceptionFactory != null)
            {
                Exception exception = this.ExceptionFactory("Siginout", response);
                if (exception != null)
                {
                    throw exception;
                }
            }

            return(response);
        }
Ejemplo n.º 7
0
        /// <summary>
        /// Returns pet inventories by status Returns a map of status codes to quantities
        /// </summary>
        /// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
        /// <returns>ApiResponse of Dictionary&lt;string, int&gt;</returns>
        public Org.OpenAPITools.Client.ApiResponse <Dictionary <string, int> > GetInventoryWithHttpInfo()
        {
            Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions();

            String[] _contentTypes = new String[] {
            };

            // to determine the Accept header
            String[] _accepts = new String[] {
                "application/json"
            };

            var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes);

            if (localVarContentType != null)
            {
                localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType);
            }

            var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts);

            if (localVarAccept != null)
            {
                localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);
            }


            // authentication (api_key) required
            if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api_key")))
            {
                localVarRequestOptions.HeaderParameters.Add("api_key", this.Configuration.GetApiKeyWithPrefix("api_key"));
            }

            // make the HTTP request
            var localVarResponse = this.Client.Get <Dictionary <string, int> >("/store/inventory", localVarRequestOptions, this.Configuration);

            if (this.ExceptionFactory != null)
            {
                Exception _exception = this.ExceptionFactory("GetInventory", localVarResponse);
                if (_exception != null)
                {
                    throw _exception;
                }
            }

            return(localVarResponse);
        }
Ejemplo n.º 8
0
        /// <summary>
        /// Place an order for a pet
        /// </summary>
        /// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="order">order placed for purchasing the pet</param>
        /// <returns>Task of ApiResponse (Order)</returns>
        public async System.Threading.Tasks.Task <Org.OpenAPITools.Client.ApiResponse <Order> > PlaceOrderAsyncWithHttpInfo(Order order)
        {
            // verify the required parameter 'order' is set
            if (order == null)
            {
                throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'order' when calling StoreApi->PlaceOrder");
            }

            Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions();

            String[] @contentTypes = new String[] {
            };

            // to determine the Accept header
            String[] @accepts = new String[] {
                "application/xml",
                "application/json"
            };

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

            foreach (var accept in @accepts)
            {
                requestOptions.HeaderParameters.Add("Accept", accept);
            }

            requestOptions.Data = order;


            // make the HTTP request

            var response = await this.AsynchronousClient.PostAsync <Order>("/store/order", requestOptions, this.Configuration);

            if (this.ExceptionFactory != null)
            {
                Exception exception = this.ExceptionFactory("PlaceOrder", response);
                if (exception != null)
                {
                    throw exception;
                }
            }

            return(response);
        }
Ejemplo n.º 9
0
        /// <summary>
        /// To test special tags To test special tags and operation ID starting with number
        /// </summary>
        /// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="modelClient">client model</param>
        /// <returns>ApiResponse of ModelClient</returns>
        public Org.OpenAPITools.Client.ApiResponse <ModelClient> Call123TestSpecialTagsWithHttpInfo(ModelClient modelClient)
        {
            // verify the required parameter 'modelClient' is set
            if (modelClient == null)
            {
                throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'modelClient' when calling AnotherFakeApi->Call123TestSpecialTags");
            }

            Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions();

            String[] @contentTypes = new String[] {
                "application/json"
            };

            // to determine the Accept header
            String[] @accepts = new String[] {
                "application/json"
            };

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

            foreach (var accept in @accepts)
            {
                requestOptions.HeaderParameters.Add("Accept", accept);
            }

            requestOptions.Data = modelClient;


            // make the HTTP request

            var response = this.Client.Patch <ModelClient>("/another-fake/dummy", requestOptions, this.Configuration);

            if (this.ExceptionFactory != null)
            {
                Exception exception = this.ExceptionFactory("Call123TestSpecialTags", response);
                if (exception != null)
                {
                    throw exception;
                }
            }

            return(response);
        }
Ejemplo n.º 10
0
        /// <summary>
        /// Raadpleeg personen met gewijzigde gegevens Vraag een lijst op met burgerservicenummers van personen met gewijzigde gegevens.
        /// </summary>
        /// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="vanaf">Alleen personen waarbij gegevens zijn gewijzigd op of na deze datum worden geleverd. (optional)</param>
        /// <returns>ApiResponse of GewijzigdePersonenHalCollectie</returns>
        public Org.OpenAPITools.Client.ApiResponse <GewijzigdePersonenHalCollectie> GetGewijzigdePersonenWithHttpInfo(DateTime?vanaf = default(DateTime?))
        {
            Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions();

            String[] _contentTypes = new String[] {
            };

            // to determine the Accept header
            String[] _accepts = new String[] {
                "application/hal+json",
                "application/problem+json"
            };

            var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes);

            if (localVarContentType != null)
            {
                localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType);
            }

            var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts);

            if (localVarAccept != null)
            {
                localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);
            }

            if (vanaf != null)
            {
                localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "vanaf", vanaf));
            }


            // make the HTTP request
            var localVarResponse = this.Client.Get <GewijzigdePersonenHalCollectie>("/wijzigingen", localVarRequestOptions, this.Configuration);

            if (this.ExceptionFactory != null)
            {
                Exception _exception = this.ExceptionFactory("GetGewijzigdePersonen", localVarResponse);
                if (_exception != null)
                {
                    throw _exception;
                }
            }

            return(localVarResponse);
        }
Ejemplo n.º 11
0
        /// <summary>
        /// Find purchase order by ID For valid response try integer IDs with value &lt;&#x3D; 5 or &gt; 10. Other values will generated exceptions
        /// </summary>
        /// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="orderId">ID of pet that needs to be fetched</param>
        /// <param name="operationIndex">Index associated with the operation.</param>
        /// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
        /// <returns>Task of ApiResponse (Order)</returns>
        public async System.Threading.Tasks.Task <Org.OpenAPITools.Client.ApiResponse <Order> > GetOrderByIdWithHttpInfoAsync(long orderId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
        {
            Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions();

            string[] _contentTypes = new string[] {
            };

            // to determine the Accept header
            string[] _accepts = new string[] {
                "application/xml",
                "application/json"
            };

            var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes);

            if (localVarContentType != null)
            {
                localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType);
            }

            var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts);

            if (localVarAccept != null)
            {
                localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);
            }

            localVarRequestOptions.PathParameters.Add("orderId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(orderId)); // path parameter

            localVarRequestOptions.Operation      = "StoreApi.GetOrderById";
            localVarRequestOptions.OperationIndex = operationIndex;


            // make the HTTP request
            var localVarResponse = await this.AsynchronousClient.GetAsync <Order>("/store/order/{orderId}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false);

            if (this.ExceptionFactory != null)
            {
                Exception _exception = this.ExceptionFactory("GetOrderById", localVarResponse);
                if (_exception != null)
                {
                    throw _exception;
                }
            }

            return(localVarResponse);
        }
Ejemplo n.º 12
0
        /// <summary>
        /// Delete purchase order by ID For valid response try integer IDs with value &lt; 1000. Anything above 1000 or nonintegers will generate API errors
        /// </summary>
        /// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="orderId">ID of the order that needs to be deleted</param>
        /// <returns>ApiResponse of Object(void)</returns>
        public Org.OpenAPITools.Client.ApiResponse <Object> DeleteOrderWithHttpInfo(string orderId)
        {
            // verify the required parameter 'orderId' is set
            if (orderId == null)
            {
                throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'orderId' when calling StoreApi->DeleteOrder");
            }

            Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions();

            String[] @contentTypes = new String[] {
            };

            // to determine the Accept header
            String[] @accepts = new String[] {
            };

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

            foreach (var accept in @accepts)
            {
                requestOptions.HeaderParameters.Add("Accept", accept);
            }

            if (orderId != null)
            {
                requestOptions.PathParameters.Add("order_id", Org.OpenAPITools.Client.ClientUtils.ParameterToString(orderId)); // path parameter
            }
            // make the HTTP request

            var response = this.Client.Delete <Object>("/store/order/{order_id}", requestOptions, this.Configuration);

            if (this.ExceptionFactory != null)
            {
                Exception exception = this.ExceptionFactory("DeleteOrder", response);
                if (exception != null)
                {
                    throw exception;
                }
            }

            return(response);
        }
Ejemplo n.º 13
0
        /// <summary>
        ///
        /// </summary>
        /// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="commentId"> (optional)</param>
        /// <param name="agree"> (optional)</param>
        /// <returns>Task of ApiResponse</returns>
        public async System.Threading.Tasks.Task <Org.OpenAPITools.Client.ApiResponse <Object> > ExpressAttitudeAsyncWithHttpInfo(string commentId = default(string), bool?agree = default(bool?))
        {
            Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions();

            String[] _contentTypes = new String[] {
            };

            // to determine the Accept header
            String[] _accepts = new String[] {
            };

            foreach (var _contentType in _contentTypes)
            {
                localVarRequestOptions.HeaderParameters.Add("Content-Type", _contentType);
            }

            foreach (var _accept in _accepts)
            {
                localVarRequestOptions.HeaderParameters.Add("Accept", _accept);
            }

            if (commentId != null)
            {
                localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "commentId", commentId));
            }
            if (agree != null)
            {
                localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "agree", agree));
            }


            // make the HTTP request

            var localVarResponse = await this.AsynchronousClient.PostAsync <Object>("/api/comments/express-attitude", localVarRequestOptions, this.Configuration);

            if (this.ExceptionFactory != null)
            {
                Exception _exception = this.ExceptionFactory("ExpressAttitude", localVarResponse);
                if (_exception != null)
                {
                    throw _exception;
                }
            }

            return(localVarResponse);
        }
Ejemplo n.º 14
0
        /// <summary>
        ///
        /// </summary>
        /// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="loginModel"> (optional)</param>
        /// <returns>ApiResponse of LoginResponse</returns>
        public Org.OpenAPITools.Client.ApiResponse <LoginResponse> LoginWithHttpInfo(LoginModel loginModel = default(LoginModel))
        {
            Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions();

            String[] _contentTypes = new String[] {
                "application/json"
            };

            // to determine the Accept header
            String[] _accepts = new String[] {
                "text/plain",
                "application/json",
                "text/json"
            };

            var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes);

            if (localVarContentType != null)
            {
                localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType);
            }

            var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts);

            if (localVarAccept != null)
            {
                localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);
            }

            localVarRequestOptions.Data = loginModel;


            // make the HTTP request
            var localVarResponse = this.Client.Post <LoginResponse>("/api/access/login", localVarRequestOptions, this.Configuration);

            if (this.ExceptionFactory != null)
            {
                Exception _exception = this.ExceptionFactory("Login", localVarResponse);
                if (_exception != null)
                {
                    throw _exception;
                }
            }

            return(localVarResponse);
        }
Ejemplo n.º 15
0
        /// <summary>
        /// Find purchase order by ID For valid response try integer IDs with value &lt;&#x3D; 5 or &gt; 10. Other values will generated exceptions
        /// </summary>
        /// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="orderId">ID of pet that needs to be fetched</param>
        /// <returns>Task of ApiResponse (Order)</returns>
        public async System.Threading.Tasks.Task <Org.OpenAPITools.Client.ApiResponse <Order> > GetOrderByIdAsyncWithHttpInfo(long orderId)
        {
            Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions();

            String[] _contentTypes = new String[] {
            };

            // to determine the Accept header
            String[] _accepts = new String[] {
                "application/xml",
                "application/json"
            };


            var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes);

            if (localVarContentType != null)
            {
                localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType);
            }

            var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts);

            if (localVarAccept != null)
            {
                localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);
            }

            localVarRequestOptions.PathParameters.Add("order_id", Org.OpenAPITools.Client.ClientUtils.ParameterToString(orderId)); // path parameter


            // make the HTTP request

            var localVarResponse = await this.AsynchronousClient.GetAsync <Order>("/store/order/{order_id}", localVarRequestOptions, this.Configuration);

            if (this.ExceptionFactory != null)
            {
                Exception _exception = this.ExceptionFactory("GetOrderById", localVarResponse);
                if (_exception != null)
                {
                    throw _exception;
                }
            }

            return(localVarResponse);
        }
Ejemplo n.º 16
0
        /// <summary>
        ///  Single MultipartFile test
        /// </summary>
        /// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="file">One file (optional)</param>
        /// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
        /// <returns>Task of ApiResponse</returns>
        public async System.Threading.Tasks.Task <Org.OpenAPITools.Client.ApiResponse <Object> > MultipartSingleWithHttpInfoAsync(System.IO.Stream file = default(System.IO.Stream), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
        {
            Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions();

            string[] _contentTypes = new string[] {
                "multipart/form-data"
            };

            // to determine the Accept header
            string[] _accepts = new string[] {
            };

            var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes);

            if (localVarContentType != null)
            {
                localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType);
            }

            var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts);

            if (localVarAccept != null)
            {
                localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);
            }

            if (file != null)
            {
                localVarRequestOptions.FileParameters.Add("file", file);
            }


            // make the HTTP request
            var localVarResponse = await this.AsynchronousClient.PostAsync <Object>("/multipart-single", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false);

            if (this.ExceptionFactory != null)
            {
                Exception _exception = this.ExceptionFactory("MultipartSingle", localVarResponse);
                if (_exception != null)
                {
                    throw _exception;
                }
            }

            return(localVarResponse);
        }
        /// <summary>
        /// Raadpleeg actieve volgindicaties Vraag de actieve volgindicaties op van een abonnee. Levert geen volgindicaties met einddatum vandaag of in het verleden.
        /// </summary>
        /// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
        /// <returns>Task of ApiResponse (VolgindicatieCollectie)</returns>
        public async System.Threading.Tasks.Task <Org.OpenAPITools.Client.ApiResponse <VolgindicatieCollectie> > GetVolgindicatiesWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
        {
            Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions();

            String[] _contentTypes = new String[] {
            };

            // to determine the Accept header
            String[] _accepts = new String[] {
                "application/json",
                "application/problem+json"
            };


            var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes);

            if (localVarContentType != null)
            {
                localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType);
            }

            var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts);

            if (localVarAccept != null)
            {
                localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);
            }



            // make the HTTP request

            var localVarResponse = await this.AsynchronousClient.GetAsync <VolgindicatieCollectie>("/volgindicaties", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false);

            if (this.ExceptionFactory != null)
            {
                Exception _exception = this.ExceptionFactory("GetVolgindicaties", localVarResponse);
                if (_exception != null)
                {
                    throw _exception;
                }
            }

            return(localVarResponse);
        }
Ejemplo n.º 18
0
        /// <summary>
        ///
        /// </summary>
        /// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="id"> (optional)</param>
        /// <returns>Task of ApiResponse (QComment)</returns>
        public async System.Threading.Tasks.Task <Org.OpenAPITools.Client.ApiResponse <QComment> > GetByIdAsyncWithHttpInfo(string id = default(string))
        {
            Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions();

            String[] _contentTypes = new String[] {
            };

            // to determine the Accept header
            String[] _accepts = new String[] {
                "text/plain",
                "application/json",
                "text/json"
            };

            foreach (var _contentType in _contentTypes)
            {
                localVarRequestOptions.HeaderParameters.Add("Content-Type", _contentType);
            }

            foreach (var _accept in _accepts)
            {
                localVarRequestOptions.HeaderParameters.Add("Accept", _accept);
            }

            if (id != null)
            {
                localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "id", id));
            }


            // make the HTTP request

            var localVarResponse = await this.AsynchronousClient.GetAsync <QComment>("/api/comments/get-by-id", localVarRequestOptions, this.Configuration);

            if (this.ExceptionFactory != null)
            {
                Exception _exception = this.ExceptionFactory("GetById", localVarResponse);
                if (_exception != null)
                {
                    throw _exception;
                }
            }

            return(localVarResponse);
        }
Ejemplo n.º 19
0
        /// <summary>
        ///
        /// </summary>
        /// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="operationIndex">Index associated with the operation.</param>
        /// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
        /// <returns>Task of ApiResponse (InlineResponseDefault)</returns>
        public async System.Threading.Tasks.Task <Org.OpenAPITools.Client.ApiResponse <InlineResponseDefault> > FooGetWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
        {
            Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions();

            string[] _contentTypes = new string[] {
            };

            // to determine the Accept header
            string[] _accepts = new string[] {
                "application/json"
            };

            var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes);

            if (localVarContentType != null)
            {
                localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType);
            }

            var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts);

            if (localVarAccept != null)
            {
                localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);
            }


            localVarRequestOptions.Operation      = "DefaultApi.FooGet";
            localVarRequestOptions.OperationIndex = operationIndex;


            // make the HTTP request
            var localVarResponse = await this.AsynchronousClient.GetAsync <InlineResponseDefault>("/foo", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false);

            if (this.ExceptionFactory != null)
            {
                Exception _exception = this.ExceptionFactory("FooGet", localVarResponse);
                if (_exception != null)
                {
                    throw _exception;
                }
            }

            return(localVarResponse);
        }
        /// <summary>
        /// Check if security questions are needed
        /// </summary>
        /// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
        /// <returns>ApiResponse of Object(void)</returns>
        public Org.OpenAPITools.Client.ApiResponse <Object> CheckSecurityStatusWithHttpInfo()
        {
            Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions();

            String[] @contentTypes = new String[] {
            };

            // to determine the Accept header
            String[] @accepts = new String[] {
                "application/json"
            };

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

            foreach (var accept in @accepts)
            {
                requestOptions.HeaderParameters.Add("Accept", accept);
            }


            // authentication (PlayerAccessToken) required
            // http basic authentication required
            if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password))
            {
                requestOptions.HeaderParameters.Add("Authorization", "Basic " + Org.OpenAPITools.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password));
            }

            // make the HTTP request

            var response = this.Client.Get <Object>("/user/security/location", requestOptions, this.Configuration);

            if (this.ExceptionFactory != null)
            {
                Exception exception = this.ExceptionFactory("CheckSecurityStatus", response);
                if (exception != null)
                {
                    throw exception;
                }
            }

            return(response);
        }
Ejemplo n.º 21
0
        /// <summary>
        /// Get all virtual apps in a tenant Get all virtual apps in a tenant
        /// </summary>
        /// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
        /// <returns>Task of ApiResponse (List&lt;App&gt;)</returns>
        public async System.Threading.Tasks.Task <Org.OpenAPITools.Client.ApiResponse <List <App> > > GetAppsAsyncWithHttpInfo()
        {
            Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions();

            String[] _contentTypes = new String[] {
            };

            // to determine the Accept header
            String[] _accepts = new String[] {
                "application/json"
            };

            foreach (var _contentType in _contentTypes)
            {
                localVarRequestOptions.HeaderParameters.Add("Content-Type", _contentType);
            }

            foreach (var _accept in _accepts)
            {
                localVarRequestOptions.HeaderParameters.Add("Accept", _accept);
            }


            // authentication (bearerAuth) required
            // bearer authentication required
            if (!String.IsNullOrEmpty(this.Configuration.AccessToken))
            {
                localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken);
            }

            // make the HTTP request

            var localVarResponse = await this.AsynchronousClient.GetAsync <List <App> >("/apps", localVarRequestOptions, this.Configuration);

            if (this.ExceptionFactory != null)
            {
                Exception _exception = this.ExceptionFactory("GetApps", localVarResponse);
                if (_exception != null)
                {
                    throw _exception;
                }
            }

            return(localVarResponse);
        }
        /// <summary>
        /// Get list of questions
        /// </summary>
        /// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
        /// <returns>Task of ApiResponse (List&lt;SecurityChallenge&gt;)</returns>
        public async System.Threading.Tasks.Task <Org.OpenAPITools.Client.ApiResponse <List <SecurityChallenge> > > ListPendingSecurityQuestionsAsyncWithHttpInfo()
        {
            Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions();

            String[] @contentTypes = new String[] {
            };

            // to determine the Accept header
            String[] @accepts = new String[] {
                "application/json"
            };

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

            foreach (var accept in @accepts)
            {
                requestOptions.HeaderParameters.Add("Accept", accept);
            }


            // authentication (PlayerAccessToken) required
            // http basic authentication required
            if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password))
            {
                requestOptions.HeaderParameters.Add("Authorization", "Basic " + Org.OpenAPITools.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password));
            }

            // make the HTTP request

            var response = await this.AsynchronousClient.GetAsync <List <SecurityChallenge> >("/user/security/challenges", requestOptions, this.Configuration);

            if (this.ExceptionFactory != null)
            {
                Exception exception = this.ExceptionFactory("ListPendingSecurityQuestions", response);
                if (exception != null)
                {
                    throw exception;
                }
            }

            return(response);
        }
Ejemplo n.º 23
0
        /// <summary>
        ///
        /// </summary>
        /// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="operationIndex">Index associated with the operation.</param>
        /// <returns>ApiResponse of InlineResponseDefault</returns>
        public Org.OpenAPITools.Client.ApiResponse <InlineResponseDefault> FooGetWithHttpInfo(int operationIndex = 0)
        {
            Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions();

            string[] _contentTypes = new string[] {
            };

            // to determine the Accept header
            string[] _accepts = new string[] {
                "application/json"
            };

            var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes);

            if (localVarContentType != null)
            {
                localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType);
            }

            var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts);

            if (localVarAccept != null)
            {
                localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);
            }


            localVarRequestOptions.Operation      = "DefaultApi.FooGet";
            localVarRequestOptions.OperationIndex = operationIndex;


            // make the HTTP request
            var localVarResponse = this.Client.Get <InlineResponseDefault>("/foo", localVarRequestOptions, this.Configuration);

            if (this.ExceptionFactory != null)
            {
                Exception _exception = this.ExceptionFactory("FooGet", localVarResponse);
                if (_exception != null)
                {
                    throw _exception;
                }
            }

            return(localVarResponse);
        }
Ejemplo n.º 24
0
        /// <summary>
        /// Returns pet inventories by status Returns a map of status codes to quantities
        /// </summary>
        /// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
        /// <returns>ApiResponse of Dictionary&lt;string, int?&gt;</returns>
        public Org.OpenAPITools.Client.ApiResponse <Dictionary <string, int?> > GetInventoryWithHttpInfo()
        {
            Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions();

            String[] @contentTypes = new String[] {
            };

            // to determine the Accept header
            String[] @accepts = new String[] {
                "application/json"
            };

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

            foreach (var accept in @accepts)
            {
                requestOptions.HeaderParameters.Add("Accept", accept);
            }


            // authentication (api_key) required
            if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api_key")))
            {
                requestOptions.HeaderParameters.Add("api_key", this.Configuration.GetApiKeyWithPrefix("api_key"));
            }

            // make the HTTP request

            var response = this.Client.Get <Dictionary <string, int?> >("/store/inventory", requestOptions, this.Configuration);

            if (this.ExceptionFactory != null)
            {
                Exception exception = this.ExceptionFactory("GetInventory", response);
                if (exception != null)
                {
                    throw exception;
                }
            }

            return(response);
        }
Ejemplo n.º 25
0
        /// <summary>
        /// Returns pet inventories by status Returns a map of status codes to quantities
        /// </summary>
        /// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
        /// <returns>Task of ApiResponse (Dictionary&lt;string, int&gt;)</returns>
        public async System.Threading.Tasks.Task <Org.OpenAPITools.Client.ApiResponse <Dictionary <string, int> > > GetInventoryAsyncWithHttpInfo()
        {
            Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions();

            String[] _contentTypes = new String[] {
            };

            // to determine the Accept header
            String[] _accepts = new String[] {
                "application/json"
            };

            foreach (var _contentType in _contentTypes)
            {
                localVarRequestOptions.HeaderParameters.Add("Content-Type", _contentType);
            }

            foreach (var _accept in _accepts)
            {
                localVarRequestOptions.HeaderParameters.Add("Accept", _accept);
            }


            // authentication (api_key) required
            if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api_key")))
            {
                localVarRequestOptions.HeaderParameters.Add("api_key", this.Configuration.GetApiKeyWithPrefix("api_key"));
            }

            // make the HTTP request

            var localVarResponse = await this.AsynchronousClient.GetAsync <Dictionary <string, int> >("/store/inventory", localVarRequestOptions, this.Configuration);

            if (this.ExceptionFactory != null)
            {
                Exception _exception = this.ExceptionFactory("GetInventory", localVarResponse);
                if (_exception != null)
                {
                    throw _exception;
                }
            }

            return(localVarResponse);
        }
Ejemplo n.º 26
0
        /// <summary>
        ///
        /// </summary>
        /// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="handleRequestModel"> (optional)</param>
        /// <returns>ApiResponse of Object(void)</returns>
        public Org.OpenAPITools.Client.ApiResponse <Object> HandleRequestWithHttpInfo(HandleRequestModel handleRequestModel = default(HandleRequestModel))
        {
            Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions();

            String[] _contentTypes = new String[] {
                "application/json"
            };

            // to determine the Accept header
            String[] _accepts = new String[] {
            };

            var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes);

            if (localVarContentType != null)
            {
                localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType);
            }

            var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts);

            if (localVarAccept != null)
            {
                localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);
            }

            localVarRequestOptions.Data = handleRequestModel;


            // make the HTTP request
            var localVarResponse = this.Client.Post <Object>("/api/group-management/handle-request", localVarRequestOptions, this.Configuration);

            if (this.ExceptionFactory != null)
            {
                Exception _exception = this.ExceptionFactory("HandleRequest", localVarResponse);
                if (_exception != null)
                {
                    throw _exception;
                }
            }

            return(localVarResponse);
        }
        /// <summary>
        /// Raadpleeg actieve volgindicaties Vraag de actieve volgindicaties op van een abonnee. Levert geen volgindicaties met einddatum vandaag of in het verleden.
        /// </summary>
        /// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
        /// <returns>ApiResponse of VolgindicatieCollectie</returns>
        public Org.OpenAPITools.Client.ApiResponse <VolgindicatieCollectie> GetVolgindicatiesWithHttpInfo()
        {
            Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions();

            String[] _contentTypes = new String[] {
            };

            // to determine the Accept header
            String[] _accepts = new String[] {
                "application/json",
                "application/problem+json"
            };

            var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes);

            if (localVarContentType != null)
            {
                localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType);
            }

            var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts);

            if (localVarAccept != null)
            {
                localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);
            }



            // make the HTTP request
            var localVarResponse = this.Client.Get <VolgindicatieCollectie>("/volgindicaties", localVarRequestOptions, this.Configuration);

            if (this.ExceptionFactory != null)
            {
                Exception _exception = this.ExceptionFactory("GetVolgindicaties", localVarResponse);
                if (_exception != null)
                {
                    throw _exception;
                }
            }

            return(localVarResponse);
        }
Ejemplo n.º 28
0
        /// <summary>
        ///  Get a book by an id
        /// </summary>
        /// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="id">ID of book to return</param>
        /// <returns>ApiResponse of Book</returns>
        public Org.OpenAPITools.Client.ApiResponse <Book> BookIdGetWithHttpInfo(long id)
        {
            Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions();

            String[] _contentTypes = new String[] {
            };

            // to determine the Accept header
            String[] _accepts = new String[] {
                "application/json"
            };

            var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes);

            if (localVarContentType != null)
            {
                localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType);
            }

            var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts);

            if (localVarAccept != null)
            {
                localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);
            }

            localVarRequestOptions.PathParameters.Add("id", Org.OpenAPITools.Client.ClientUtils.ParameterToString(id)); // path parameter


            // make the HTTP request
            var localVarResponse = this.Client.Get <Book>("/book/{id}", localVarRequestOptions, this.Configuration);

            if (this.ExceptionFactory != null)
            {
                Exception _exception = this.ExceptionFactory("BookIdGet", localVarResponse);
                if (_exception != null)
                {
                    throw _exception;
                }
            }

            return(localVarResponse);
        }
Ejemplo n.º 29
0
        /// <summary>
        ///
        /// </summary>
        /// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="loginModel"> (optional)</param>
        /// <returns>Task of ApiResponse (LoginResponse)</returns>
        public async System.Threading.Tasks.Task <Org.OpenAPITools.Client.ApiResponse <LoginResponse> > LoginAsyncWithHttpInfo(LoginModel loginModel = default(LoginModel))
        {
            Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions();

            String[] _contentTypes = new String[] {
                "application/json"
            };

            // to determine the Accept header
            String[] _accepts = new String[] {
                "text/plain",
                "application/json",
                "text/json"
            };

            foreach (var _contentType in _contentTypes)
            {
                localVarRequestOptions.HeaderParameters.Add("Content-Type", _contentType);
            }

            foreach (var _accept in _accepts)
            {
                localVarRequestOptions.HeaderParameters.Add("Accept", _accept);
            }

            localVarRequestOptions.Data = loginModel;


            // make the HTTP request

            var localVarResponse = await this.AsynchronousClient.PostAsync <LoginResponse>("/api/access/login", localVarRequestOptions, this.Configuration);

            if (this.ExceptionFactory != null)
            {
                Exception _exception = this.ExceptionFactory("Login", localVarResponse);
                if (_exception != null)
                {
                    throw _exception;
                }
            }

            return(localVarResponse);
        }
        /// <summary>
        ///
        /// </summary>
        /// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
        /// <returns>ApiResponse of ComBluetrainsoftwareAddProps2</returns>
        public Org.OpenAPITools.Client.ApiResponse <ComBluetrainsoftwareAddProps2> HelloOp2WithHttpInfo()
        {
            Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions();

            String[] _contentTypes = new String[] {
            };

            // to determine the Accept header
            String[] _accepts = new String[] {
                "application/json"
            };

            var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes);

            if (localVarContentType != null)
            {
                localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType);
            }

            var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts);

            if (localVarAccept != null)
            {
                localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);
            }



            // make the HTTP request
            var localVarResponse = this.Client.Get <ComBluetrainsoftwareAddProps2>("/hello2", localVarRequestOptions, this.Configuration);

            if (this.ExceptionFactory != null)
            {
                Exception _exception = this.ExceptionFactory("HelloOp2", localVarResponse);
                if (_exception != null)
                {
                    throw _exception;
                }
            }

            return(localVarResponse);
        }