travel.wink.sdk.affiliate.api.BookingsApi Maven / Gradle / Ivy
Show all versions of affiliate-sdk-java Show documentation
package travel.wink.sdk.affiliate.api;
import travel.wink.sdk.affiliate.invoker.ApiClient;
import travel.wink.sdk.affiliate.model.BookingViewAffiliate;
import travel.wink.sdk.affiliate.model.GenericErrorMessage;
import travel.wink.sdk.affiliate.model.KeyValuePairAffiliate;
import travel.wink.sdk.affiliate.model.PageBookingViewAffiliate;
import travel.wink.sdk.affiliate.model.ShowSellerUrl400Response;
import travel.wink.sdk.affiliate.model.StateAffiliate;
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 BookingsApi {
private ApiClient apiClient;
public BookingsApi() {
this(new ApiClient());
}
@Autowired
public BookingsApi(ApiClient apiClient) {
this.apiClient = apiClient;
}
public ApiClient getApiClient() {
return apiClient;
}
public void setApiClient(ApiClient apiClient) {
this.apiClient = apiClient;
}
/**
* Show Booking
* Show a booking record by its identifier.
* 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 booking for company identifier
* @param bookingIdentifier Show booking with booking identifier
* @param winkVersion The winkVersion parameter
* @return BookingViewAffiliate
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
private ResponseSpec showBookingForEngineRequestCreation(String companyIdentifier, String bookingIdentifier, 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 showBookingForEngine", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null);
}
// verify the required parameter 'bookingIdentifier' is set
if (bookingIdentifier == null) {
throw new WebClientResponseException("Missing the required parameter 'bookingIdentifier' when calling showBookingForEngine", 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("bookingIdentifier", bookingIdentifier);
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}/booking/{bookingIdentifier}", HttpMethod.GET, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* Show Booking
* Show a booking record by its identifier.
* 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 booking for company identifier
* @param bookingIdentifier Show booking with booking identifier
* @param winkVersion The winkVersion parameter
* @return BookingViewAffiliate
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Mono showBookingForEngine(String companyIdentifier, String bookingIdentifier, String winkVersion) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return showBookingForEngineRequestCreation(companyIdentifier, bookingIdentifier, winkVersion).bodyToMono(localVarReturnType);
}
public Mono> showBookingForEngineWithHttpInfo(String companyIdentifier, String bookingIdentifier, String winkVersion) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return showBookingForEngineRequestCreation(companyIdentifier, bookingIdentifier, winkVersion).toEntity(localVarReturnType);
}
/**
* Show Bookings
* Show bookings for the affiliate company that helped create those booking.
* 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 bookings for company identifier
* @param stateAffiliate The stateAffiliate parameter
* @param winkVersion The winkVersion parameter
* @return PageBookingViewAffiliate
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
private ResponseSpec showBookingsForCompanyRequestCreation(String companyIdentifier, StateAffiliate stateAffiliate, String winkVersion) throws WebClientResponseException {
Object postBody = stateAffiliate;
// verify the required parameter 'companyIdentifier' is set
if (companyIdentifier == null) {
throw new WebClientResponseException("Missing the required parameter 'companyIdentifier' when calling showBookingsForCompany", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null);
}
// verify the required parameter 'stateAffiliate' is set
if (stateAffiliate == null) {
throw new WebClientResponseException("Missing the required parameter 'stateAffiliate' when calling showBookingsForCompany", 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}/booking/grid", HttpMethod.POST, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* Show Bookings
* Show bookings for the affiliate company that helped create those booking.
* 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 bookings for company identifier
* @param stateAffiliate The stateAffiliate parameter
* @param winkVersion The winkVersion parameter
* @return PageBookingViewAffiliate
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Mono showBookingsForCompany(String companyIdentifier, StateAffiliate stateAffiliate, String winkVersion) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return showBookingsForCompanyRequestCreation(companyIdentifier, stateAffiliate, winkVersion).bodyToMono(localVarReturnType);
}
public Mono> showBookingsForCompanyWithHttpInfo(String companyIdentifier, StateAffiliate stateAffiliate, String winkVersion) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return showBookingsForCompanyRequestCreation(companyIdentifier, stateAffiliate, winkVersion).toEntity(localVarReturnType);
}
/**
* Show Booked Applications
* Show a list of unique applications that were responsible for creating bookings through this affiliate sales channel.
* 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 unique applications for booking made with the help of company identifier
* @param winkVersion The winkVersion parameter
* @return List<KeyValuePairAffiliate>
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
private ResponseSpec showUniqueApplicationsRequestCreation(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 showUniqueApplications", 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}/booking/engine/list", HttpMethod.GET, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* Show Booked Applications
* Show a list of unique applications that were responsible for creating bookings through this affiliate sales channel.
* 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 unique applications for booking made with the help of company identifier
* @param winkVersion The winkVersion parameter
* @return List<KeyValuePairAffiliate>
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Flux showUniqueApplications(String companyIdentifier, String winkVersion) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return showUniqueApplicationsRequestCreation(companyIdentifier, winkVersion).bodyToFlux(localVarReturnType);
}
public Mono>> showUniqueApplicationsWithHttpInfo(String companyIdentifier, String winkVersion) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return showUniqueApplicationsRequestCreation(companyIdentifier, winkVersion).toEntityList(localVarReturnType);
}
/**
* Show Booked Customizations
* Show a list of unique customizations that were responsible for creating bookings through this affiliate sales channel.
* 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 unique customizations for booking made with the help of company identifier
* @param winkVersion The winkVersion parameter
* @return List<KeyValuePairAffiliate>
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
private ResponseSpec showUniqueEngineConfigurationsRequestCreation(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 showUniqueEngineConfigurations", 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}/booking/engine/configuration/list", HttpMethod.GET, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* Show Booked Customizations
* Show a list of unique customizations that were responsible for creating bookings through this affiliate sales channel.
* 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 unique customizations for booking made with the help of company identifier
* @param winkVersion The winkVersion parameter
* @return List<KeyValuePairAffiliate>
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Flux showUniqueEngineConfigurations(String companyIdentifier, String winkVersion) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return showUniqueEngineConfigurationsRequestCreation(companyIdentifier, winkVersion).bodyToFlux(localVarReturnType);
}
public Mono>> showUniqueEngineConfigurationsWithHttpInfo(String companyIdentifier, String winkVersion) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return showUniqueEngineConfigurationsRequestCreation(companyIdentifier, winkVersion).toEntityList(localVarReturnType);
}
/**
* Show Booked Hotels
* Show a list of unique hotels that were responsible for creating bookings through this affiliate sales channel.
* 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 unique hotels for booking made with the help of company identifier
* @param winkVersion The winkVersion parameter
* @return List<KeyValuePairAffiliate>
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
private ResponseSpec showUniqueHotelsRequestCreation(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 showUniqueHotels", 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}/booking/hotel/list", HttpMethod.GET, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* Show Booked Hotels
* Show a list of unique hotels that were responsible for creating bookings through this affiliate sales channel.
* 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 unique hotels for booking made with the help of company identifier
* @param winkVersion The winkVersion parameter
* @return List<KeyValuePairAffiliate>
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Flux showUniqueHotels(String companyIdentifier, String winkVersion) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return showUniqueHotelsRequestCreation(companyIdentifier, winkVersion).bodyToFlux(localVarReturnType);
}
public Mono>> showUniqueHotelsWithHttpInfo(String companyIdentifier, String winkVersion) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return showUniqueHotelsRequestCreation(companyIdentifier, winkVersion).toEntityList(localVarReturnType);
}
/**
* Show Booked Master Rates
* Show a list of unique master rates that created a booking.
* 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 unique master rates for booking made with the help of company identifier
* @param winkVersion The winkVersion parameter
* @return List<KeyValuePairAffiliate>
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
private ResponseSpec showUniqueMasterRatesRequestCreation(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 showUniqueMasterRates", 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}/booking/roomrate/list", HttpMethod.GET, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* Show Booked Master Rates
* Show a list of unique master rates that created a booking.
* 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 unique master rates for booking made with the help of company identifier
* @param winkVersion The winkVersion parameter
* @return List<KeyValuePairAffiliate>
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Flux showUniqueMasterRates(String companyIdentifier, String winkVersion) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return showUniqueMasterRatesRequestCreation(companyIdentifier, winkVersion).bodyToFlux(localVarReturnType);
}
public Mono>> showUniqueMasterRatesWithHttpInfo(String companyIdentifier, String winkVersion) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return showUniqueMasterRatesRequestCreation(companyIdentifier, winkVersion).toEntityList(localVarReturnType);
}
}