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

travel.wink.sdk.affiliate.api.HotelRelationshipRequestsApi Maven / Gradle / Ivy

There is a newer version: 30.5.15
Show newest version
package travel.wink.sdk.affiliate.api;

import travel.wink.sdk.affiliate.invoker.ApiClient;

import travel.wink.sdk.affiliate.model.GenericErrorMessage;
import travel.wink.sdk.affiliate.model.RemoveEntryResponse;
import travel.wink.sdk.affiliate.model.SalesChannelRelationshipRequestView;
import travel.wink.sdk.affiliate.model.SalesChannelRelationshipRequestViewAffiliate;
import travel.wink.sdk.affiliate.model.ShowSellerUrl400Response;
import travel.wink.sdk.affiliate.model.UpsertSalesChannelRelationshipRequestRequest;

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;

@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-03-06T16:56:30.815925180+07:00[Asia/Bangkok]")
public class HotelRelationshipRequestsApi {
    private ApiClient apiClient;

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

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

    public ApiClient getApiClient() {
        return apiClient;
    }

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

    /**
     * Create hotel request
     * Create a new hotel request.
     * 

503 - Service Unavailable *

400 - Bad Request *

405 - Method Not Allowed *

415 - Unsupported Media Type *

500 - Internal Server Error *

404 - Not Found *

403 - Forbidden *

401 - Unauthorized *

201 - Created * @param companyIdentifier Create hotel request and associate it with this company identifier * @param upsertSalesChannelRelationshipRequestRequest The upsertSalesChannelRelationshipRequestRequest parameter * @param winkVersion The winkVersion parameter * @return SalesChannelRelationshipRequestView * @throws WebClientResponseException if an error occurs while attempting to invoke the API */ private ResponseSpec createPropertyRequestRequestCreation(String companyIdentifier, UpsertSalesChannelRelationshipRequestRequest upsertSalesChannelRelationshipRequestRequest, String winkVersion) throws WebClientResponseException { Object postBody = upsertSalesChannelRelationshipRequestRequest; // verify the required parameter 'companyIdentifier' is set if (companyIdentifier == null) { throw new WebClientResponseException("Missing the required parameter 'companyIdentifier' when calling createPropertyRequest", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null); } // verify the required parameter 'upsertSalesChannelRelationshipRequestRequest' is set if (upsertSalesChannelRelationshipRequestRequest == null) { throw new WebClientResponseException("Missing the required parameter 'upsertSalesChannelRelationshipRequestRequest' when calling createPropertyRequest", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null); } // create path and map variables final Map pathParams = new HashMap(); pathParams.put("companyIdentifier", companyIdentifier); 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", "application/xml", "text/xml", "text/plain" }; 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/company/{companyIdentifier}/sales/request", HttpMethod.POST, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } /** * Create hotel request * Create a new hotel request. *

503 - Service Unavailable *

400 - Bad Request *

405 - Method Not Allowed *

415 - Unsupported Media Type *

500 - Internal Server Error *

404 - Not Found *

403 - Forbidden *

401 - Unauthorized *

201 - Created * @param companyIdentifier Create hotel request and associate it with this company identifier * @param upsertSalesChannelRelationshipRequestRequest The upsertSalesChannelRelationshipRequestRequest parameter * @param winkVersion The winkVersion parameter * @return SalesChannelRelationshipRequestView * @throws WebClientResponseException if an error occurs while attempting to invoke the API */ public Mono createPropertyRequest(String companyIdentifier, UpsertSalesChannelRelationshipRequestRequest upsertSalesChannelRelationshipRequestRequest, String winkVersion) throws WebClientResponseException { ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {}; return createPropertyRequestRequestCreation(companyIdentifier, upsertSalesChannelRelationshipRequestRequest, winkVersion).bodyToMono(localVarReturnType); } public Mono> createPropertyRequestWithHttpInfo(String companyIdentifier, UpsertSalesChannelRelationshipRequestRequest upsertSalesChannelRelationshipRequestRequest, String winkVersion) throws WebClientResponseException { ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {}; return createPropertyRequestRequestCreation(companyIdentifier, upsertSalesChannelRelationshipRequestRequest, winkVersion).toEntity(localVarReturnType); } /** * Reject hotel request * Delete a hotel request *

503 - Service Unavailable *

400 - Bad Request *

405 - Method Not Allowed *

415 - Unsupported Media Type *

500 - Internal Server Error *

404 - Not Found *

403 - Forbidden *

401 - Unauthorized *

202 - Accepted * @param companyIdentifier Remove hotel request owned by this company identifier * @param salesChannelRequestIdentifier Remove hotel request with this identifier * @param winkVersion The winkVersion parameter * @return RemoveEntryResponse * @throws WebClientResponseException if an error occurs while attempting to invoke the API */ private ResponseSpec removePropertyRequestRequestCreation(String companyIdentifier, String salesChannelRequestIdentifier, String winkVersion) throws WebClientResponseException { Object postBody = null; // verify the required parameter 'companyIdentifier' is set if (companyIdentifier == null) { throw new WebClientResponseException("Missing the required parameter 'companyIdentifier' when calling removePropertyRequest", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null); } // verify the required parameter 'salesChannelRequestIdentifier' is set if (salesChannelRequestIdentifier == null) { throw new WebClientResponseException("Missing the required parameter 'salesChannelRequestIdentifier' when calling removePropertyRequest", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null); } // create path and map variables final Map pathParams = new HashMap(); pathParams.put("companyIdentifier", companyIdentifier); pathParams.put("salesChannelRequestIdentifier", salesChannelRequestIdentifier); 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", "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("/api/company/{companyIdentifier}/sales/request/{salesChannelRequestIdentifier}", HttpMethod.DELETE, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } /** * Reject hotel request * Delete a hotel request *

503 - Service Unavailable *

400 - Bad Request *

405 - Method Not Allowed *

415 - Unsupported Media Type *

500 - Internal Server Error *

404 - Not Found *

403 - Forbidden *

401 - Unauthorized *

202 - Accepted * @param companyIdentifier Remove hotel request owned by this company identifier * @param salesChannelRequestIdentifier Remove hotel request with this identifier * @param winkVersion The winkVersion parameter * @return RemoveEntryResponse * @throws WebClientResponseException if an error occurs while attempting to invoke the API */ public Mono removePropertyRequest(String companyIdentifier, String salesChannelRequestIdentifier, String winkVersion) throws WebClientResponseException { ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {}; return removePropertyRequestRequestCreation(companyIdentifier, salesChannelRequestIdentifier, winkVersion).bodyToMono(localVarReturnType); } public Mono> removePropertyRequestWithHttpInfo(String companyIdentifier, String salesChannelRequestIdentifier, String winkVersion) throws WebClientResponseException { ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {}; return removePropertyRequestRequestCreation(companyIdentifier, salesChannelRequestIdentifier, winkVersion).toEntity(localVarReturnType); } /** * Show hotel request * Retrieve a specific hotel request based on a companyId and a supplierId. *

503 - Service Unavailable *

400 - Bad Request *

405 - Method Not Allowed *

415 - Unsupported Media Type *

500 - Internal Server Error *

404 - Not Found *

403 - Forbidden *

401 - Unauthorized *

200 - OK * @param companyIdentifier Show hotel request for this company identifier * @param supplierIdentifier Show hotel request for this supplier identifier * @param winkVersion The winkVersion parameter * @return SalesChannelRelationshipRequestView * @throws WebClientResponseException if an error occurs while attempting to invoke the API */ private ResponseSpec showPropertyRequestRequestCreation(String companyIdentifier, String supplierIdentifier, String winkVersion) throws WebClientResponseException { Object postBody = null; // verify the required parameter 'companyIdentifier' is set if (companyIdentifier == null) { throw new WebClientResponseException("Missing the required parameter 'companyIdentifier' when calling showPropertyRequest", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null); } // verify the required parameter 'supplierIdentifier' is set if (supplierIdentifier == null) { throw new WebClientResponseException("Missing the required parameter 'supplierIdentifier' when calling showPropertyRequest", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null); } // create path and map variables final Map pathParams = new HashMap(); pathParams.put("companyIdentifier", companyIdentifier); pathParams.put("supplierIdentifier", supplierIdentifier); 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", "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("/api/company/{companyIdentifier}/sales/request/supplier/{supplierIdentifier}", HttpMethod.GET, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } /** * Show hotel request * Retrieve a specific hotel request based on a companyId and a supplierId. *

503 - Service Unavailable *

400 - Bad Request *

405 - Method Not Allowed *

415 - Unsupported Media Type *

500 - Internal Server Error *

404 - Not Found *

403 - Forbidden *

401 - Unauthorized *

200 - OK * @param companyIdentifier Show hotel request for this company identifier * @param supplierIdentifier Show hotel request for this supplier identifier * @param winkVersion The winkVersion parameter * @return SalesChannelRelationshipRequestView * @throws WebClientResponseException if an error occurs while attempting to invoke the API */ public Mono showPropertyRequest(String companyIdentifier, String supplierIdentifier, String winkVersion) throws WebClientResponseException { ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {}; return showPropertyRequestRequestCreation(companyIdentifier, supplierIdentifier, winkVersion).bodyToMono(localVarReturnType); } public Mono> showPropertyRequestWithHttpInfo(String companyIdentifier, String supplierIdentifier, String winkVersion) throws WebClientResponseException { ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {}; return showPropertyRequestRequestCreation(companyIdentifier, supplierIdentifier, winkVersion).toEntity(localVarReturnType); } /** * Show hotel requests * Retrieve list of all hotel requests for this company. *

503 - Service Unavailable *

400 - Bad Request *

405 - Method Not Allowed *

415 - Unsupported Media Type *

500 - Internal Server Error *

404 - Not Found *

403 - Forbidden *

401 - Unauthorized *

200 - OK * @param companyIdentifier Show all hotel requests for this company identifier * @param winkVersion The winkVersion parameter * @return List<SalesChannelRelationshipRequestViewAffiliate> * @throws WebClientResponseException if an error occurs while attempting to invoke the API */ private ResponseSpec showPropertyRequestsRequestCreation(String companyIdentifier, String winkVersion) throws WebClientResponseException { Object postBody = null; // verify the required parameter 'companyIdentifier' is set if (companyIdentifier == null) { throw new WebClientResponseException("Missing the required parameter 'companyIdentifier' when calling showPropertyRequests", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null); } // create path and map variables final Map pathParams = new HashMap(); pathParams.put("companyIdentifier", companyIdentifier); 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", "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("/api/company/{companyIdentifier}/sales/request/list", HttpMethod.GET, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } /** * Show hotel requests * Retrieve list of all hotel requests for this company. *

503 - Service Unavailable *

400 - Bad Request *

405 - Method Not Allowed *

415 - Unsupported Media Type *

500 - Internal Server Error *

404 - Not Found *

403 - Forbidden *

401 - Unauthorized *

200 - OK * @param companyIdentifier Show all hotel requests for this company identifier * @param winkVersion The winkVersion parameter * @return List<SalesChannelRelationshipRequestViewAffiliate> * @throws WebClientResponseException if an error occurs while attempting to invoke the API */ public Flux showPropertyRequests(String companyIdentifier, String winkVersion) throws WebClientResponseException { ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {}; return showPropertyRequestsRequestCreation(companyIdentifier, winkVersion).bodyToFlux(localVarReturnType); } public Mono>> showPropertyRequestsWithHttpInfo(String companyIdentifier, String winkVersion) throws WebClientResponseException { ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {}; return showPropertyRequestsRequestCreation(companyIdentifier, winkVersion).toEntityList(localVarReturnType); } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy