
travel.wink.sdk.reference.api.RateProviderApi Maven / Gradle / Ivy
package travel.wink.sdk.reference.api;
import travel.wink.sdk.reference.invoker.ApiClient;
import travel.wink.sdk.reference.model.GenericErrorMessage;
import travel.wink.sdk.reference.model.KeyValuePairAdministrator;
import travel.wink.sdk.reference.model.ShowSocialNetworks400Response;
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-09-15T12:00:30.414406407+07:00[Asia/Bangkok]")
public class RateProviderApi {
private ApiClient apiClient;
public RateProviderApi() {
this(new ApiClient());
}
@Autowired
public RateProviderApi(ApiClient apiClient) {
this.apiClient = apiClient;
}
public ApiClient getApiClient() {
return apiClient;
}
public void setApiClient(ApiClient apiClient) {
this.apiClient = apiClient;
}
/**
* Show Channel Managers
* Returns all available channel managers.
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param winkVersion The winkVersion parameter
* @param accept The accept parameter
* @return List<KeyValuePairAdministrator>
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
private ResponseSpec showChannelManagersRequestCreation(String winkVersion, 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 (winkVersion != null)
headerParams.add("Wink-Version", apiClient.parameterToString(winkVersion));
if (accept != null)
headerParams.add("Accept", apiClient.parameterToString(accept));
final String[] localVarAccepts = {
"application/json", "application/xml", "text/xml", "text/plain", "*/*"
};
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("/reference-data/channel-manager/list", HttpMethod.GET, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* Show Channel Managers
* Returns all available channel managers.
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param winkVersion The winkVersion parameter
* @param accept The accept parameter
* @return List<KeyValuePairAdministrator>
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Flux showChannelManagers(String winkVersion, String accept) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return showChannelManagersRequestCreation(winkVersion, accept).bodyToFlux(localVarReturnType);
}
/**
* Show Channel Managers
* Returns all available channel managers.
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param winkVersion The winkVersion parameter
* @param accept The accept parameter
* @return ResponseEntity<List<KeyValuePairAdministrator>>
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Mono>> showChannelManagersWithHttpInfo(String winkVersion, String accept) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return showChannelManagersRequestCreation(winkVersion, accept).toEntityList(localVarReturnType);
}
/**
* Show Channel Managers
* Returns all available channel managers.
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param winkVersion The winkVersion parameter
* @param accept The accept parameter
* @return ResponseSpec
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public ResponseSpec showChannelManagersWithResponseSpec(String winkVersion, String accept) throws WebClientResponseException {
return showChannelManagersRequestCreation(winkVersion, accept);
}
}