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

io.trippay.sdk.payment.api.ExternalEventApi 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 io.trippay.sdk.payment.model.ExternalEvent;
import io.trippay.sdk.payment.model.PageExternalEvent;
import io.trippay.sdk.payment.model.State;

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-10-04T20:14:22.496066564+07:00[Asia/Bangkok]")
public class ExternalEventApi {
    private ApiClient apiClient;

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

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

    public ApiClient getApiClient() {
        return apiClient;
    }

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

    /**
     * Show External Event
     * Displays external event for specified event ID.
     * 

200 - OK * @param eventIdentifier ID of event to retrieve * @param winkVersion The winkVersion parameter * @param accept The accept parameter * @return ExternalEvent * @throws WebClientResponseException if an error occurs while attempting to invoke the API */ private ResponseSpec showExternalEventRequestCreation(String eventIdentifier, String winkVersion, String accept) throws WebClientResponseException { Object postBody = null; // verify the required parameter 'eventIdentifier' is set if (eventIdentifier == null) { throw new WebClientResponseException("Missing the required parameter 'eventIdentifier' when calling showExternalEvent", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null); } // create path and map variables final Map pathParams = new HashMap(); pathParams.put("eventIdentifier", eventIdentifier); 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" }; 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/administration/external-event/{eventIdentifier}", HttpMethod.GET, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } /** * Show External Event * Displays external event for specified event ID. *

200 - OK * @param eventIdentifier ID of event to retrieve * @param winkVersion The winkVersion parameter * @param accept The accept parameter * @return ExternalEvent * @throws WebClientResponseException if an error occurs while attempting to invoke the API */ public Mono showExternalEvent(String eventIdentifier, String winkVersion, String accept) throws WebClientResponseException { ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {}; return showExternalEventRequestCreation(eventIdentifier, winkVersion, accept).bodyToMono(localVarReturnType); } /** * Show External Event * Displays external event for specified event ID. *

200 - OK * @param eventIdentifier ID of event to retrieve * @param winkVersion The winkVersion parameter * @param accept The accept parameter * @return ResponseEntity<ExternalEvent> * @throws WebClientResponseException if an error occurs while attempting to invoke the API */ public Mono> showExternalEventWithHttpInfo(String eventIdentifier, String winkVersion, String accept) throws WebClientResponseException { ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {}; return showExternalEventRequestCreation(eventIdentifier, winkVersion, accept).toEntity(localVarReturnType); } /** * Show External Event * Displays external event for specified event ID. *

200 - OK * @param eventIdentifier ID of event to retrieve * @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 showExternalEventWithResponseSpec(String eventIdentifier, String winkVersion, String accept) throws WebClientResponseException { return showExternalEventRequestCreation(eventIdentifier, winkVersion, accept); } /** * Show External Event Grid * Displays external events for specified entity ID. *

200 - OK * @param state The state parameter * @param winkVersion The winkVersion parameter * @return PageExternalEvent * @throws WebClientResponseException if an error occurs while attempting to invoke the API */ private ResponseSpec showExternalEventGridRequestCreation(State state, String winkVersion) throws WebClientResponseException { Object postBody = state; // verify the required parameter 'state' is set if (state == null) { throw new WebClientResponseException("Missing the required parameter 'state' when calling showExternalEventGrid", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, 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)); final String[] localVarAccepts = { "application/json" }; final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); final String[] localVarContentTypes = { "application/json" }; final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); String[] localVarAuthNames = new String[] { "oauth2ClientCredentials" }; ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {}; return apiClient.invokeAPI("/api/administration/external-event/grid", HttpMethod.POST, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } /** * Show External Event Grid * Displays external events for specified entity ID. *

200 - OK * @param state The state parameter * @param winkVersion The winkVersion parameter * @return PageExternalEvent * @throws WebClientResponseException if an error occurs while attempting to invoke the API */ public Mono showExternalEventGrid(State state, String winkVersion) throws WebClientResponseException { ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {}; return showExternalEventGridRequestCreation(state, winkVersion).bodyToMono(localVarReturnType); } /** * Show External Event Grid * Displays external events for specified entity ID. *

200 - OK * @param state The state parameter * @param winkVersion The winkVersion parameter * @return ResponseEntity<PageExternalEvent> * @throws WebClientResponseException if an error occurs while attempting to invoke the API */ public Mono> showExternalEventGridWithHttpInfo(State state, String winkVersion) throws WebClientResponseException { ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {}; return showExternalEventGridRequestCreation(state, winkVersion).toEntity(localVarReturnType); } /** * Show External Event Grid * Displays external events for specified entity ID. *

200 - OK * @param state The state parameter * @param winkVersion The winkVersion parameter * @return ResponseSpec * @throws WebClientResponseException if an error occurs while attempting to invoke the API */ public ResponseSpec showExternalEventGridWithResponseSpec(State state, String winkVersion) throws WebClientResponseException { return showExternalEventGridRequestCreation(state, winkVersion); } /** * Show External Events * Displays external events for specified entity ID. *

200 - OK * @param entityIdentifier ID of entity to retrieve stream for * @param winkVersion The winkVersion parameter * @param accept The accept parameter * @return List<ExternalEvent> * @throws WebClientResponseException if an error occurs while attempting to invoke the API */ private ResponseSpec showExternalEventListRequestCreation(String entityIdentifier, String winkVersion, String accept) throws WebClientResponseException { Object postBody = null; // verify the required parameter 'entityIdentifier' is set if (entityIdentifier == null) { throw new WebClientResponseException("Missing the required parameter 'entityIdentifier' when calling showExternalEventList", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null); } // create path and map variables final Map pathParams = new HashMap(); pathParams.put("entityIdentifier", entityIdentifier); 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" }; 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/administration/external-event/{entityIdentifier}/list", HttpMethod.GET, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } /** * Show External Events * Displays external events for specified entity ID. *

200 - OK * @param entityIdentifier ID of entity to retrieve stream for * @param winkVersion The winkVersion parameter * @param accept The accept parameter * @return List<ExternalEvent> * @throws WebClientResponseException if an error occurs while attempting to invoke the API */ public Flux showExternalEventList(String entityIdentifier, String winkVersion, String accept) throws WebClientResponseException { ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {}; return showExternalEventListRequestCreation(entityIdentifier, winkVersion, accept).bodyToFlux(localVarReturnType); } /** * Show External Events * Displays external events for specified entity ID. *

200 - OK * @param entityIdentifier ID of entity to retrieve stream for * @param winkVersion The winkVersion parameter * @param accept The accept parameter * @return ResponseEntity<List<ExternalEvent>> * @throws WebClientResponseException if an error occurs while attempting to invoke the API */ public Mono>> showExternalEventListWithHttpInfo(String entityIdentifier, String winkVersion, String accept) throws WebClientResponseException { ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {}; return showExternalEventListRequestCreation(entityIdentifier, winkVersion, accept).toEntityList(localVarReturnType); } /** * Show External Events * Displays external events for specified entity ID. *

200 - OK * @param entityIdentifier ID of entity to retrieve stream for * @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 showExternalEventListWithResponseSpec(String entityIdentifier, String winkVersion, String accept) throws WebClientResponseException { return showExternalEventListRequestCreation(entityIdentifier, winkVersion, accept); } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy