travel.wink.sdk.extranet.distribution.api.DailyRateApi Maven / Gradle / Ivy
package travel.wink.sdk.extranet.distribution.api;
import travel.wink.sdk.extranet.distribution.invoker.ApiClient;
import travel.wink.sdk.extranet.distribution.model.BookingTestRequestSupplierDetails;
import travel.wink.sdk.extranet.distribution.model.BookingViewSupplierDetails;
import travel.wink.sdk.extranet.distribution.model.ChannelNameSupplier;
import travel.wink.sdk.extranet.distribution.model.DateRangeSupplier;
import travel.wink.sdk.extranet.distribution.model.DescriptiveRoomSupplierDetails;
import travel.wink.sdk.extranet.distribution.model.GenericErrorMessage;
import travel.wink.sdk.extranet.distribution.model.PageRateSupplier;
import travel.wink.sdk.extranet.distribution.model.RateSupplier;
import travel.wink.sdk.extranet.distribution.model.ShowInventory400Response;
import travel.wink.sdk.extranet.distribution.model.StateSupplier;
import travel.wink.sdk.extranet.distribution.model.UpsertBulkRateRequestSupplier;
import travel.wink.sdk.extranet.distribution.model.UpsertIndividualRateRequestWrapperSupplier;
import travel.wink.sdk.extranet.distribution.model.VerifyRatesRequestSupplierDetails;
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-15T11:58:01.003340498+07:00[Asia/Bangkok]")
public class DailyRateApi {
private ApiClient apiClient;
public DailyRateApi() {
this(new ApiClient());
}
@Autowired
public DailyRateApi(ApiClient apiClient) {
this.apiClient = apiClient;
}
public ApiClient getApiClient() {
return apiClient;
}
public void setApiClient(ApiClient apiClient) {
this.apiClient = apiClient;
}
/**
* Update Daily Rates by Range
* Bulk update daily rates by date range
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param propertyIdentifier Update daily rates by date range owned by this property identifier.
* @param masterRateIdentifier Update daily rates by date range owned by this master rate.
* @param upsertBulkRateRequestSupplier The upsertBulkRateRequestSupplier parameter
* @param winkVersion The winkVersion parameter
* @return List<RateSupplier>
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
private ResponseSpec bulkUpdateRateRequestCreation(String propertyIdentifier, String masterRateIdentifier, UpsertBulkRateRequestSupplier upsertBulkRateRequestSupplier, String winkVersion) throws WebClientResponseException {
Object postBody = upsertBulkRateRequestSupplier;
// verify the required parameter 'propertyIdentifier' is set
if (propertyIdentifier == null) {
throw new WebClientResponseException("Missing the required parameter 'propertyIdentifier' when calling bulkUpdateRate", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null);
}
// verify the required parameter 'masterRateIdentifier' is set
if (masterRateIdentifier == null) {
throw new WebClientResponseException("Missing the required parameter 'masterRateIdentifier' when calling bulkUpdateRate", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null);
}
// verify the required parameter 'upsertBulkRateRequestSupplier' is set
if (upsertBulkRateRequestSupplier == null) {
throw new WebClientResponseException("Missing the required parameter 'upsertBulkRateRequestSupplier' when calling bulkUpdateRate", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null);
}
// create path and map variables
final Map pathParams = new HashMap();
pathParams.put("propertyIdentifier", propertyIdentifier);
pathParams.put("masterRateIdentifier", masterRateIdentifier);
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/property/{propertyIdentifier}/master-rate/{masterRateIdentifier}/rate/bulk", HttpMethod.PUT, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* Update Daily Rates by Range
* Bulk update daily rates by date range
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param propertyIdentifier Update daily rates by date range owned by this property identifier.
* @param masterRateIdentifier Update daily rates by date range owned by this master rate.
* @param upsertBulkRateRequestSupplier The upsertBulkRateRequestSupplier parameter
* @param winkVersion The winkVersion parameter
* @return List<RateSupplier>
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Flux bulkUpdateRate(String propertyIdentifier, String masterRateIdentifier, UpsertBulkRateRequestSupplier upsertBulkRateRequestSupplier, String winkVersion) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return bulkUpdateRateRequestCreation(propertyIdentifier, masterRateIdentifier, upsertBulkRateRequestSupplier, winkVersion).bodyToFlux(localVarReturnType);
}
/**
* Update Daily Rates by Range
* Bulk update daily rates by date range
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param propertyIdentifier Update daily rates by date range owned by this property identifier.
* @param masterRateIdentifier Update daily rates by date range owned by this master rate.
* @param upsertBulkRateRequestSupplier The upsertBulkRateRequestSupplier parameter
* @param winkVersion The winkVersion parameter
* @return ResponseEntity<List<RateSupplier>>
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Mono>> bulkUpdateRateWithHttpInfo(String propertyIdentifier, String masterRateIdentifier, UpsertBulkRateRequestSupplier upsertBulkRateRequestSupplier, String winkVersion) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return bulkUpdateRateRequestCreation(propertyIdentifier, masterRateIdentifier, upsertBulkRateRequestSupplier, winkVersion).toEntityList(localVarReturnType);
}
/**
* Update Daily Rates by Range
* Bulk update daily rates by date range
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param propertyIdentifier Update daily rates by date range owned by this property identifier.
* @param masterRateIdentifier Update daily rates by date range owned by this master rate.
* @param upsertBulkRateRequestSupplier The upsertBulkRateRequestSupplier parameter
* @param winkVersion The winkVersion parameter
* @return ResponseSpec
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public ResponseSpec bulkUpdateRateWithResponseSpec(String propertyIdentifier, String masterRateIdentifier, UpsertBulkRateRequestSupplier upsertBulkRateRequestSupplier, String winkVersion) throws WebClientResponseException {
return bulkUpdateRateRequestCreation(propertyIdentifier, masterRateIdentifier, upsertBulkRateRequestSupplier, winkVersion);
}
/**
* Test Rate / Availability
* Test whether the rates and availability for a sales channel is coming backing the way the property wants
*
500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
201 - Created
* @param propertyIdentifier Create test booking for property ID
* @param bookingTestRequestSupplierDetails The bookingTestRequestSupplierDetails parameter
* @param winkVersion The winkVersion parameter
* @return BookingViewSupplierDetails
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
private ResponseSpec createTestBookingRequestCreation(String propertyIdentifier, BookingTestRequestSupplierDetails bookingTestRequestSupplierDetails, String winkVersion) throws WebClientResponseException {
Object postBody = bookingTestRequestSupplierDetails;
// verify the required parameter 'propertyIdentifier' is set
if (propertyIdentifier == null) {
throw new WebClientResponseException("Missing the required parameter 'propertyIdentifier' when calling createTestBooking", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null);
}
// verify the required parameter 'bookingTestRequestSupplierDetails' is set
if (bookingTestRequestSupplierDetails == null) {
throw new WebClientResponseException("Missing the required parameter 'bookingTestRequestSupplierDetails' when calling createTestBooking", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null);
}
// create path and map variables
final Map pathParams = new HashMap();
pathParams.put("propertyIdentifier", propertyIdentifier);
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/property/{propertyIdentifier}/sandbox/booking", HttpMethod.POST, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* Test Rate / Availability
* Test whether the rates and availability for a sales channel is coming backing the way the property wants
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
201 - Created
* @param propertyIdentifier Create test booking for property ID
* @param bookingTestRequestSupplierDetails The bookingTestRequestSupplierDetails parameter
* @param winkVersion The winkVersion parameter
* @return BookingViewSupplierDetails
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Mono createTestBooking(String propertyIdentifier, BookingTestRequestSupplierDetails bookingTestRequestSupplierDetails, String winkVersion) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return createTestBookingRequestCreation(propertyIdentifier, bookingTestRequestSupplierDetails, winkVersion).bodyToMono(localVarReturnType);
}
/**
* Test Rate / Availability
* Test whether the rates and availability for a sales channel is coming backing the way the property wants
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
201 - Created
* @param propertyIdentifier Create test booking for property ID
* @param bookingTestRequestSupplierDetails The bookingTestRequestSupplierDetails parameter
* @param winkVersion The winkVersion parameter
* @return ResponseEntity<BookingViewSupplierDetails>
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Mono> createTestBookingWithHttpInfo(String propertyIdentifier, BookingTestRequestSupplierDetails bookingTestRequestSupplierDetails, String winkVersion) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return createTestBookingRequestCreation(propertyIdentifier, bookingTestRequestSupplierDetails, winkVersion).toEntity(localVarReturnType);
}
/**
* Test Rate / Availability
* Test whether the rates and availability for a sales channel is coming backing the way the property wants
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
201 - Created
* @param propertyIdentifier Create test booking for property ID
* @param bookingTestRequestSupplierDetails The bookingTestRequestSupplierDetails parameter
* @param winkVersion The winkVersion parameter
* @return ResponseSpec
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public ResponseSpec createTestBookingWithResponseSpec(String propertyIdentifier, BookingTestRequestSupplierDetails bookingTestRequestSupplierDetails, String winkVersion) throws WebClientResponseException {
return createTestBookingRequestCreation(propertyIdentifier, bookingTestRequestSupplierDetails, winkVersion);
}
/**
* Daily Rates by Hotel
* Retrieve daily rates for all master rates by date range
*
500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param propertyIdentifier Show daily rate list owned by this property identifier.
* @param dateRangeSupplier The dateRangeSupplier parameter
* @param winkVersion The winkVersion parameter
* @return List<RateSupplier>
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
private ResponseSpec showAllHotelRatesRequestCreation(String propertyIdentifier, DateRangeSupplier dateRangeSupplier, String winkVersion) throws WebClientResponseException {
Object postBody = dateRangeSupplier;
// verify the required parameter 'propertyIdentifier' is set
if (propertyIdentifier == null) {
throw new WebClientResponseException("Missing the required parameter 'propertyIdentifier' when calling showAllHotelRates", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null);
}
// verify the required parameter 'dateRangeSupplier' is set
if (dateRangeSupplier == null) {
throw new WebClientResponseException("Missing the required parameter 'dateRangeSupplier' when calling showAllHotelRates", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null);
}
// create path and map variables
final Map pathParams = new HashMap();
pathParams.put("propertyIdentifier", propertyIdentifier);
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/property/{propertyIdentifier}/master-rate/rates/dates", HttpMethod.POST, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* Daily Rates by Hotel
* Retrieve daily rates for all master rates by date range
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param propertyIdentifier Show daily rate list owned by this property identifier.
* @param dateRangeSupplier The dateRangeSupplier parameter
* @param winkVersion The winkVersion parameter
* @return List<RateSupplier>
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Flux showAllHotelRates(String propertyIdentifier, DateRangeSupplier dateRangeSupplier, String winkVersion) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return showAllHotelRatesRequestCreation(propertyIdentifier, dateRangeSupplier, winkVersion).bodyToFlux(localVarReturnType);
}
/**
* Daily Rates by Hotel
* Retrieve daily rates for all master rates by date range
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param propertyIdentifier Show daily rate list owned by this property identifier.
* @param dateRangeSupplier The dateRangeSupplier parameter
* @param winkVersion The winkVersion parameter
* @return ResponseEntity<List<RateSupplier>>
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Mono>> showAllHotelRatesWithHttpInfo(String propertyIdentifier, DateRangeSupplier dateRangeSupplier, String winkVersion) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return showAllHotelRatesRequestCreation(propertyIdentifier, dateRangeSupplier, winkVersion).toEntityList(localVarReturnType);
}
/**
* Daily Rates by Hotel
* Retrieve daily rates for all master rates by date range
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param propertyIdentifier Show daily rate list owned by this property identifier.
* @param dateRangeSupplier The dateRangeSupplier parameter
* @param winkVersion The winkVersion parameter
* @return ResponseSpec
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public ResponseSpec showAllHotelRatesWithResponseSpec(String propertyIdentifier, DateRangeSupplier dateRangeSupplier, String winkVersion) throws WebClientResponseException {
return showAllHotelRatesRequestCreation(propertyIdentifier, dateRangeSupplier, winkVersion);
}
/**
* Daily Rates by Master Rate
* Retrieve daily rates for a master rate for date range
*
500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param propertyIdentifier Show daily rate list owned by this property identifier.
* @param masterRateIdentifier Show daily rate list owned by this master rate.
* @param dateRangeSupplier The dateRangeSupplier parameter
* @param winkVersion The winkVersion parameter
* @return List<RateSupplier>
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
private ResponseSpec showAllMasterRatesRatesRequestCreation(String propertyIdentifier, String masterRateIdentifier, DateRangeSupplier dateRangeSupplier, String winkVersion) throws WebClientResponseException {
Object postBody = dateRangeSupplier;
// verify the required parameter 'propertyIdentifier' is set
if (propertyIdentifier == null) {
throw new WebClientResponseException("Missing the required parameter 'propertyIdentifier' when calling showAllMasterRatesRates", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null);
}
// verify the required parameter 'masterRateIdentifier' is set
if (masterRateIdentifier == null) {
throw new WebClientResponseException("Missing the required parameter 'masterRateIdentifier' when calling showAllMasterRatesRates", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null);
}
// verify the required parameter 'dateRangeSupplier' is set
if (dateRangeSupplier == null) {
throw new WebClientResponseException("Missing the required parameter 'dateRangeSupplier' when calling showAllMasterRatesRates", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null);
}
// create path and map variables
final Map pathParams = new HashMap();
pathParams.put("propertyIdentifier", propertyIdentifier);
pathParams.put("masterRateIdentifier", masterRateIdentifier);
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/property/{propertyIdentifier}/master-rate/{masterRateIdentifier}/rates/dates", HttpMethod.POST, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* Daily Rates by Master Rate
* Retrieve daily rates for a master rate for date range
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param propertyIdentifier Show daily rate list owned by this property identifier.
* @param masterRateIdentifier Show daily rate list owned by this master rate.
* @param dateRangeSupplier The dateRangeSupplier parameter
* @param winkVersion The winkVersion parameter
* @return List<RateSupplier>
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Flux showAllMasterRatesRates(String propertyIdentifier, String masterRateIdentifier, DateRangeSupplier dateRangeSupplier, String winkVersion) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return showAllMasterRatesRatesRequestCreation(propertyIdentifier, masterRateIdentifier, dateRangeSupplier, winkVersion).bodyToFlux(localVarReturnType);
}
/**
* Daily Rates by Master Rate
* Retrieve daily rates for a master rate for date range
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param propertyIdentifier Show daily rate list owned by this property identifier.
* @param masterRateIdentifier Show daily rate list owned by this master rate.
* @param dateRangeSupplier The dateRangeSupplier parameter
* @param winkVersion The winkVersion parameter
* @return ResponseEntity<List<RateSupplier>>
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Mono>> showAllMasterRatesRatesWithHttpInfo(String propertyIdentifier, String masterRateIdentifier, DateRangeSupplier dateRangeSupplier, String winkVersion) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return showAllMasterRatesRatesRequestCreation(propertyIdentifier, masterRateIdentifier, dateRangeSupplier, winkVersion).toEntityList(localVarReturnType);
}
/**
* Daily Rates by Master Rate
* Retrieve daily rates for a master rate for date range
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param propertyIdentifier Show daily rate list owned by this property identifier.
* @param masterRateIdentifier Show daily rate list owned by this master rate.
* @param dateRangeSupplier The dateRangeSupplier parameter
* @param winkVersion The winkVersion parameter
* @return ResponseSpec
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public ResponseSpec showAllMasterRatesRatesWithResponseSpec(String propertyIdentifier, String masterRateIdentifier, DateRangeSupplier dateRangeSupplier, String winkVersion) throws WebClientResponseException {
return showAllMasterRatesRatesRequestCreation(propertyIdentifier, masterRateIdentifier, dateRangeSupplier, winkVersion);
}
/**
* List Sales Channels
* List sales channels for property
*
500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param propertyIdentifier Display existing sales channels for property ID
* @param winkVersion The winkVersion parameter
* @param accept The accept parameter
* @return List<ChannelNameSupplier>
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
private ResponseSpec showChannelsRequestCreation(String propertyIdentifier, String winkVersion, String accept) throws WebClientResponseException {
Object postBody = null;
// verify the required parameter 'propertyIdentifier' is set
if (propertyIdentifier == null) {
throw new WebClientResponseException("Missing the required parameter 'propertyIdentifier' when calling showChannels", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null);
}
// create path and map variables
final Map pathParams = new HashMap();
pathParams.put("propertyIdentifier", propertyIdentifier);
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("/api/property/{propertyIdentifier}/sandbox/channel/list", HttpMethod.GET, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* List Sales Channels
* List sales channels for property
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param propertyIdentifier Display existing sales channels for property ID
* @param winkVersion The winkVersion parameter
* @param accept The accept parameter
* @return List<ChannelNameSupplier>
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Flux showChannels(String propertyIdentifier, String winkVersion, String accept) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return showChannelsRequestCreation(propertyIdentifier, winkVersion, accept).bodyToFlux(localVarReturnType);
}
/**
* List Sales Channels
* List sales channels for property
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param propertyIdentifier Display existing sales channels for property ID
* @param winkVersion The winkVersion parameter
* @param accept The accept parameter
* @return ResponseEntity<List<ChannelNameSupplier>>
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Mono>> showChannelsWithHttpInfo(String propertyIdentifier, String winkVersion, String accept) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return showChannelsRequestCreation(propertyIdentifier, winkVersion, accept).toEntityList(localVarReturnType);
}
/**
* List Sales Channels
* List sales channels for property
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param propertyIdentifier Display existing sales channels for property ID
* @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 showChannelsWithResponseSpec(String propertyIdentifier, String winkVersion, String accept) throws WebClientResponseException {
return showChannelsRequestCreation(propertyIdentifier, winkVersion, accept);
}
/**
* Show Daily Rate Page
* Retrieve daily rates for a master rate within a certain date range.
*
500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param propertyIdentifier Show daily rate page owned by this property identifier.
* @param masterRateIdentifier Show daily rate page owned by this master rate.
* @param stateSupplier The stateSupplier parameter
* @param winkVersion The winkVersion parameter
* @return PageRateSupplier
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
private ResponseSpec showDailyRatesPageRequestCreation(String propertyIdentifier, String masterRateIdentifier, StateSupplier stateSupplier, String winkVersion) throws WebClientResponseException {
Object postBody = stateSupplier;
// verify the required parameter 'propertyIdentifier' is set
if (propertyIdentifier == null) {
throw new WebClientResponseException("Missing the required parameter 'propertyIdentifier' when calling showDailyRatesPage", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null);
}
// verify the required parameter 'masterRateIdentifier' is set
if (masterRateIdentifier == null) {
throw new WebClientResponseException("Missing the required parameter 'masterRateIdentifier' when calling showDailyRatesPage", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null);
}
// verify the required parameter 'stateSupplier' is set
if (stateSupplier == null) {
throw new WebClientResponseException("Missing the required parameter 'stateSupplier' when calling showDailyRatesPage", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null);
}
// create path and map variables
final Map pathParams = new HashMap();
pathParams.put("propertyIdentifier", propertyIdentifier);
pathParams.put("masterRateIdentifier", masterRateIdentifier);
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/property/{propertyIdentifier}/master-rate/{masterRateIdentifier}/rate/grid", HttpMethod.POST, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* Show Daily Rate Page
* Retrieve daily rates for a master rate within a certain date range.
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param propertyIdentifier Show daily rate page owned by this property identifier.
* @param masterRateIdentifier Show daily rate page owned by this master rate.
* @param stateSupplier The stateSupplier parameter
* @param winkVersion The winkVersion parameter
* @return PageRateSupplier
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Mono showDailyRatesPage(String propertyIdentifier, String masterRateIdentifier, StateSupplier stateSupplier, String winkVersion) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return showDailyRatesPageRequestCreation(propertyIdentifier, masterRateIdentifier, stateSupplier, winkVersion).bodyToMono(localVarReturnType);
}
/**
* Show Daily Rate Page
* Retrieve daily rates for a master rate within a certain date range.
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param propertyIdentifier Show daily rate page owned by this property identifier.
* @param masterRateIdentifier Show daily rate page owned by this master rate.
* @param stateSupplier The stateSupplier parameter
* @param winkVersion The winkVersion parameter
* @return ResponseEntity<PageRateSupplier>
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Mono> showDailyRatesPageWithHttpInfo(String propertyIdentifier, String masterRateIdentifier, StateSupplier stateSupplier, String winkVersion) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return showDailyRatesPageRequestCreation(propertyIdentifier, masterRateIdentifier, stateSupplier, winkVersion).toEntity(localVarReturnType);
}
/**
* Show Daily Rate Page
* Retrieve daily rates for a master rate within a certain date range.
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param propertyIdentifier Show daily rate page owned by this property identifier.
* @param masterRateIdentifier Show daily rate page owned by this master rate.
* @param stateSupplier The stateSupplier parameter
* @param winkVersion The winkVersion parameter
* @return ResponseSpec
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public ResponseSpec showDailyRatesPageWithResponseSpec(String propertyIdentifier, String masterRateIdentifier, StateSupplier stateSupplier, String winkVersion) throws WebClientResponseException {
return showDailyRatesPageRequestCreation(propertyIdentifier, masterRateIdentifier, stateSupplier, winkVersion);
}
/**
* Test Rate / Availability
* Test whether the rates and availability for a sales channel is coming backing the way the property wants
*
500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param propertyIdentifier Display available room for property ID
* @param verifyRatesRequestSupplierDetails The verifyRatesRequestSupplierDetails parameter
* @param winkVersion The winkVersion parameter
* @return List<DescriptiveRoomSupplierDetails>
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
private ResponseSpec showDescriptiveInventoryRequestCreation(String propertyIdentifier, VerifyRatesRequestSupplierDetails verifyRatesRequestSupplierDetails, String winkVersion) throws WebClientResponseException {
Object postBody = verifyRatesRequestSupplierDetails;
// verify the required parameter 'propertyIdentifier' is set
if (propertyIdentifier == null) {
throw new WebClientResponseException("Missing the required parameter 'propertyIdentifier' when calling showDescriptiveInventory", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null);
}
// verify the required parameter 'verifyRatesRequestSupplierDetails' is set
if (verifyRatesRequestSupplierDetails == null) {
throw new WebClientResponseException("Missing the required parameter 'verifyRatesRequestSupplierDetails' when calling showDescriptiveInventory", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null);
}
// create path and map variables
final Map pathParams = new HashMap();
pathParams.put("propertyIdentifier", propertyIdentifier);
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/property/{propertyIdentifier}/sandbox/room/list", HttpMethod.POST, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* Test Rate / Availability
* Test whether the rates and availability for a sales channel is coming backing the way the property wants
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param propertyIdentifier Display available room for property ID
* @param verifyRatesRequestSupplierDetails The verifyRatesRequestSupplierDetails parameter
* @param winkVersion The winkVersion parameter
* @return List<DescriptiveRoomSupplierDetails>
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Flux showDescriptiveInventory(String propertyIdentifier, VerifyRatesRequestSupplierDetails verifyRatesRequestSupplierDetails, String winkVersion) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return showDescriptiveInventoryRequestCreation(propertyIdentifier, verifyRatesRequestSupplierDetails, winkVersion).bodyToFlux(localVarReturnType);
}
/**
* Test Rate / Availability
* Test whether the rates and availability for a sales channel is coming backing the way the property wants
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param propertyIdentifier Display available room for property ID
* @param verifyRatesRequestSupplierDetails The verifyRatesRequestSupplierDetails parameter
* @param winkVersion The winkVersion parameter
* @return ResponseEntity<List<DescriptiveRoomSupplierDetails>>
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Mono>> showDescriptiveInventoryWithHttpInfo(String propertyIdentifier, VerifyRatesRequestSupplierDetails verifyRatesRequestSupplierDetails, String winkVersion) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return showDescriptiveInventoryRequestCreation(propertyIdentifier, verifyRatesRequestSupplierDetails, winkVersion).toEntityList(localVarReturnType);
}
/**
* Test Rate / Availability
* Test whether the rates and availability for a sales channel is coming backing the way the property wants
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param propertyIdentifier Display available room for property ID
* @param verifyRatesRequestSupplierDetails The verifyRatesRequestSupplierDetails parameter
* @param winkVersion The winkVersion parameter
* @return ResponseSpec
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public ResponseSpec showDescriptiveInventoryWithResponseSpec(String propertyIdentifier, VerifyRatesRequestSupplierDetails verifyRatesRequestSupplierDetails, String winkVersion) throws WebClientResponseException {
return showDescriptiveInventoryRequestCreation(propertyIdentifier, verifyRatesRequestSupplierDetails, winkVersion);
}
/**
* Update Daily Rates by List
* Update daily rates with list of daily rate records.
*
500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param propertyIdentifier Update daily rates list owned by this property identifier.
* @param upsertIndividualRateRequestWrapperSupplier The upsertIndividualRateRequestWrapperSupplier parameter
* @param winkVersion The winkVersion parameter
* @return List<RateSupplier>
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
private ResponseSpec updateRateListRequestCreation(String propertyIdentifier, List upsertIndividualRateRequestWrapperSupplier, String winkVersion) throws WebClientResponseException {
Object postBody = upsertIndividualRateRequestWrapperSupplier;
// verify the required parameter 'propertyIdentifier' is set
if (propertyIdentifier == null) {
throw new WebClientResponseException("Missing the required parameter 'propertyIdentifier' when calling updateRateList", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null);
}
// verify the required parameter 'upsertIndividualRateRequestWrapperSupplier' is set
if (upsertIndividualRateRequestWrapperSupplier == null) {
throw new WebClientResponseException("Missing the required parameter 'upsertIndividualRateRequestWrapperSupplier' when calling updateRateList", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null);
}
// create path and map variables
final Map pathParams = new HashMap();
pathParams.put("propertyIdentifier", propertyIdentifier);
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/property/{propertyIdentifier}/rate/update", HttpMethod.PUT, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* Update Daily Rates by List
* Update daily rates with list of daily rate records.
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param propertyIdentifier Update daily rates list owned by this property identifier.
* @param upsertIndividualRateRequestWrapperSupplier The upsertIndividualRateRequestWrapperSupplier parameter
* @param winkVersion The winkVersion parameter
* @return List<RateSupplier>
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Flux updateRateList(String propertyIdentifier, List upsertIndividualRateRequestWrapperSupplier, String winkVersion) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return updateRateListRequestCreation(propertyIdentifier, upsertIndividualRateRequestWrapperSupplier, winkVersion).bodyToFlux(localVarReturnType);
}
/**
* Update Daily Rates by List
* Update daily rates with list of daily rate records.
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param propertyIdentifier Update daily rates list owned by this property identifier.
* @param upsertIndividualRateRequestWrapperSupplier The upsertIndividualRateRequestWrapperSupplier parameter
* @param winkVersion The winkVersion parameter
* @return ResponseEntity<List<RateSupplier>>
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Mono>> updateRateListWithHttpInfo(String propertyIdentifier, List upsertIndividualRateRequestWrapperSupplier, String winkVersion) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return updateRateListRequestCreation(propertyIdentifier, upsertIndividualRateRequestWrapperSupplier, winkVersion).toEntityList(localVarReturnType);
}
/**
* Update Daily Rates by List
* Update daily rates with list of daily rate records.
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param propertyIdentifier Update daily rates list owned by this property identifier.
* @param upsertIndividualRateRequestWrapperSupplier The upsertIndividualRateRequestWrapperSupplier parameter
* @param winkVersion The winkVersion parameter
* @return ResponseSpec
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public ResponseSpec updateRateListWithResponseSpec(String propertyIdentifier, List upsertIndividualRateRequestWrapperSupplier, String winkVersion) throws WebClientResponseException {
return updateRateListRequestCreation(propertyIdentifier, upsertIndividualRateRequestWrapperSupplier, winkVersion);
}
}