All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.trippay.sdk.payment.api.PingApi Maven / Gradle / Ivy

There is a newer version: 30.5.16
Show newest version
package io.trippay.sdk.payment.api;

import io.trippay.sdk.payment.invoker.ApiClient;


import java.util.HashMap;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.stream.Collectors;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.LinkedMultiValueMap;
import org.springframework.util.MultiValueMap;
import org.springframework.core.ParameterizedTypeReference;
import org.springframework.web.reactive.function.client.WebClient.ResponseSpec;
import org.springframework.web.reactive.function.client.WebClientResponseException;
import org.springframework.core.io.FileSystemResource;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpMethod;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import reactor.core.publisher.Mono;
import reactor.core.publisher.Flux;

@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-07-30T17:54:54.161486528+07:00[Asia/Bangkok]")
public class PingApi {
    private ApiClient apiClient;

    public PingApi() {
        this(new ApiClient());
    }

    @Autowired
    public PingApi(ApiClient apiClient) {
        this.apiClient = apiClient;
    }

    public ApiClient getApiClient() {
        return apiClient;
    }

    public void setApiClient(ApiClient apiClient) {
        this.apiClient = apiClient;
    }

    /**
     * Hello World
     * Test the connection.
     * 

200 - OK * @param accept The accept parameter * @return String * @throws WebClientResponseException if an error occurs while attempting to invoke the API */ private ResponseSpec pingRequestCreation(String accept) throws WebClientResponseException { Object postBody = null; // create path and map variables final Map pathParams = new HashMap(); final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); final MultiValueMap cookieParams = new LinkedMultiValueMap(); final MultiValueMap formParams = new LinkedMultiValueMap(); if (accept != null) headerParams.add("Accept", apiClient.parameterToString(accept)); final String[] localVarAccepts = { "application/json" }; final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); final String[] localVarContentTypes = { }; final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); String[] localVarAuthNames = new String[] { "oauth2ClientCredentials" }; ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {}; return apiClient.invokeAPI("/api/hello", HttpMethod.GET, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } /** * Hello World * Test the connection. *

200 - OK * @param accept The accept parameter * @return String * @throws WebClientResponseException if an error occurs while attempting to invoke the API */ public Mono ping(String accept) throws WebClientResponseException { ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {}; return pingRequestCreation(accept).bodyToMono(localVarReturnType); } /** * Hello World * Test the connection. *

200 - OK * @param accept The accept parameter * @return ResponseEntity<String> * @throws WebClientResponseException if an error occurs while attempting to invoke the API */ public Mono> pingWithHttpInfo(String accept) throws WebClientResponseException { ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {}; return pingRequestCreation(accept).toEntity(localVarReturnType); } /** * Hello World * Test the connection. *

200 - OK * @param accept The accept parameter * @return ResponseSpec * @throws WebClientResponseException if an error occurs while attempting to invoke the API */ public ResponseSpec pingWithResponseSpec(String accept) throws WebClientResponseException { return pingRequestCreation(accept); } /** * Hello World Error * Test the connection by sending an error message in return. *

200 - OK * @param accept The accept parameter * @return String * @throws WebClientResponseException if an error occurs while attempting to invoke the API */ private ResponseSpec pingErrorRequestCreation(String accept) throws WebClientResponseException { Object postBody = null; // create path and map variables final Map pathParams = new HashMap(); final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); final MultiValueMap cookieParams = new LinkedMultiValueMap(); final MultiValueMap formParams = new LinkedMultiValueMap(); if (accept != null) headerParams.add("Accept", apiClient.parameterToString(accept)); final String[] localVarAccepts = { "application/json" }; final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); final String[] localVarContentTypes = { }; final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); String[] localVarAuthNames = new String[] { "oauth2ClientCredentials" }; ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {}; return apiClient.invokeAPI("/api/hello/error", HttpMethod.GET, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } /** * Hello World Error * Test the connection by sending an error message in return. *

200 - OK * @param accept The accept parameter * @return String * @throws WebClientResponseException if an error occurs while attempting to invoke the API */ public Mono pingError(String accept) throws WebClientResponseException { ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {}; return pingErrorRequestCreation(accept).bodyToMono(localVarReturnType); } /** * Hello World Error * Test the connection by sending an error message in return. *

200 - OK * @param accept The accept parameter * @return ResponseEntity<String> * @throws WebClientResponseException if an error occurs while attempting to invoke the API */ public Mono> pingErrorWithHttpInfo(String accept) throws WebClientResponseException { ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {}; return pingErrorRequestCreation(accept).toEntity(localVarReturnType); } /** * Hello World Error * Test the connection by sending an error message in return. *

200 - OK * @param accept The accept parameter * @return ResponseSpec * @throws WebClientResponseException if an error occurs while attempting to invoke the API */ public ResponseSpec pingErrorWithResponseSpec(String accept) throws WebClientResponseException { return pingErrorRequestCreation(accept); } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy