travel.wink.sdk.extranet.distribution.api.SchedulerApi 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.CreateScheduleItemRequestSupplier;
import travel.wink.sdk.extranet.distribution.model.GenericErrorMessage;
import java.time.OffsetDateTime;
import travel.wink.sdk.extranet.distribution.model.RemoveEntryResponseSupplier;
import travel.wink.sdk.extranet.distribution.model.ScheduleItemViewSupplier;
import travel.wink.sdk.extranet.distribution.model.ShowInventory400Response;
import travel.wink.sdk.extranet.distribution.model.UpdateScheduleItemRequestSupplier;
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 SchedulerApi {
private ApiClient apiClient;
public SchedulerApi() {
this(new ApiClient());
}
@Autowired
public SchedulerApi(ApiClient apiClient) {
this.apiClient = apiClient;
}
public ApiClient getApiClient() {
return apiClient;
}
public void setApiClient(ApiClient apiClient) {
this.apiClient = apiClient;
}
/**
* Create Scheduler Item
* Create a calendar item for any travel inventory such as meeting room, restaurant, spa, activity, attraction or place.
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
201 - Created
* @param propertyIdentifier Create a calendar item for travel inventory owned by this property identifier
* @param inventoryIdentifier Create a calendar item for travel inventory with this identifier
* @param createScheduleItemRequestSupplier The createScheduleItemRequestSupplier parameter
* @param winkVersion The winkVersion parameter
* @return ScheduleItemViewSupplier
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
private ResponseSpec createScheduleItemRequestCreation(String propertyIdentifier, String inventoryIdentifier, CreateScheduleItemRequestSupplier createScheduleItemRequestSupplier, String winkVersion) throws WebClientResponseException {
Object postBody = createScheduleItemRequestSupplier;
// verify the required parameter 'propertyIdentifier' is set
if (propertyIdentifier == null) {
throw new WebClientResponseException("Missing the required parameter 'propertyIdentifier' when calling createScheduleItem", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null);
}
// verify the required parameter 'inventoryIdentifier' is set
if (inventoryIdentifier == null) {
throw new WebClientResponseException("Missing the required parameter 'inventoryIdentifier' when calling createScheduleItem", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null);
}
// verify the required parameter 'createScheduleItemRequestSupplier' is set
if (createScheduleItemRequestSupplier == null) {
throw new WebClientResponseException("Missing the required parameter 'createScheduleItemRequestSupplier' when calling createScheduleItem", 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("inventoryIdentifier", inventoryIdentifier);
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}/schedule/{inventoryIdentifier}", HttpMethod.POST, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* Create Scheduler Item
* Create a calendar item for any travel inventory such as meeting room, restaurant, spa, activity, attraction or place.
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
201 - Created
* @param propertyIdentifier Create a calendar item for travel inventory owned by this property identifier
* @param inventoryIdentifier Create a calendar item for travel inventory with this identifier
* @param createScheduleItemRequestSupplier The createScheduleItemRequestSupplier parameter
* @param winkVersion The winkVersion parameter
* @return ScheduleItemViewSupplier
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Mono createScheduleItem(String propertyIdentifier, String inventoryIdentifier, CreateScheduleItemRequestSupplier createScheduleItemRequestSupplier, String winkVersion) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return createScheduleItemRequestCreation(propertyIdentifier, inventoryIdentifier, createScheduleItemRequestSupplier, winkVersion).bodyToMono(localVarReturnType);
}
/**
* Create Scheduler Item
* Create a calendar item for any travel inventory such as meeting room, restaurant, spa, activity, attraction or place.
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
201 - Created
* @param propertyIdentifier Create a calendar item for travel inventory owned by this property identifier
* @param inventoryIdentifier Create a calendar item for travel inventory with this identifier
* @param createScheduleItemRequestSupplier The createScheduleItemRequestSupplier parameter
* @param winkVersion The winkVersion parameter
* @return ResponseEntity<ScheduleItemViewSupplier>
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Mono> createScheduleItemWithHttpInfo(String propertyIdentifier, String inventoryIdentifier, CreateScheduleItemRequestSupplier createScheduleItemRequestSupplier, String winkVersion) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return createScheduleItemRequestCreation(propertyIdentifier, inventoryIdentifier, createScheduleItemRequestSupplier, winkVersion).toEntity(localVarReturnType);
}
/**
* Create Scheduler Item
* Create a calendar item for any travel inventory such as meeting room, restaurant, spa, activity, attraction or place.
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
201 - Created
* @param propertyIdentifier Create a calendar item for travel inventory owned by this property identifier
* @param inventoryIdentifier Create a calendar item for travel inventory with this identifier
* @param createScheduleItemRequestSupplier The createScheduleItemRequestSupplier parameter
* @param winkVersion The winkVersion parameter
* @return ResponseSpec
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public ResponseSpec createScheduleItemWithResponseSpec(String propertyIdentifier, String inventoryIdentifier, CreateScheduleItemRequestSupplier createScheduleItemRequestSupplier, String winkVersion) throws WebClientResponseException {
return createScheduleItemRequestCreation(propertyIdentifier, inventoryIdentifier, createScheduleItemRequestSupplier, winkVersion);
}
/**
* Delete Scheduler Item
* Delete a calendar item for any travel inventory such as meeting room, restaurant, spa, activity, attraction or place.
*
500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param propertyIdentifier Remove a calendar item for travel inventory owned by this property identifier
* @param inventoryIdentifier Remove a calendar item for travel inventory with this identifier
* @param identifier Remove a calendar item with this identifier
* @param winkVersion The winkVersion parameter
* @param accept The accept parameter
* @return RemoveEntryResponseSupplier
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
private ResponseSpec removeScheduleItemRequestCreation(String propertyIdentifier, String inventoryIdentifier, String identifier, 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 removeScheduleItem", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null);
}
// verify the required parameter 'inventoryIdentifier' is set
if (inventoryIdentifier == null) {
throw new WebClientResponseException("Missing the required parameter 'inventoryIdentifier' when calling removeScheduleItem", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null);
}
// verify the required parameter 'identifier' is set
if (identifier == null) {
throw new WebClientResponseException("Missing the required parameter 'identifier' when calling removeScheduleItem", 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("inventoryIdentifier", inventoryIdentifier);
pathParams.put("identifier", identifier);
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}/schedule/{inventoryIdentifier}/item/{identifier}", HttpMethod.DELETE, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* Delete Scheduler Item
* Delete a calendar item for any travel inventory such as meeting room, restaurant, spa, activity, attraction or place.
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param propertyIdentifier Remove a calendar item for travel inventory owned by this property identifier
* @param inventoryIdentifier Remove a calendar item for travel inventory with this identifier
* @param identifier Remove a calendar item with this identifier
* @param winkVersion The winkVersion parameter
* @param accept The accept parameter
* @return RemoveEntryResponseSupplier
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Mono removeScheduleItem(String propertyIdentifier, String inventoryIdentifier, String identifier, String winkVersion, String accept) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return removeScheduleItemRequestCreation(propertyIdentifier, inventoryIdentifier, identifier, winkVersion, accept).bodyToMono(localVarReturnType);
}
/**
* Delete Scheduler Item
* Delete a calendar item for any travel inventory such as meeting room, restaurant, spa, activity, attraction or place.
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param propertyIdentifier Remove a calendar item for travel inventory owned by this property identifier
* @param inventoryIdentifier Remove a calendar item for travel inventory with this identifier
* @param identifier Remove a calendar item with this identifier
* @param winkVersion The winkVersion parameter
* @param accept The accept parameter
* @return ResponseEntity<RemoveEntryResponseSupplier>
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Mono> removeScheduleItemWithHttpInfo(String propertyIdentifier, String inventoryIdentifier, String identifier, String winkVersion, String accept) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return removeScheduleItemRequestCreation(propertyIdentifier, inventoryIdentifier, identifier, winkVersion, accept).toEntity(localVarReturnType);
}
/**
* Delete Scheduler Item
* Delete a calendar item for any travel inventory such as meeting room, restaurant, spa, activity, attraction or place.
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param propertyIdentifier Remove a calendar item for travel inventory owned by this property identifier
* @param inventoryIdentifier Remove a calendar item for travel inventory with this identifier
* @param identifier Remove a calendar item with this identifier
* @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 removeScheduleItemWithResponseSpec(String propertyIdentifier, String inventoryIdentifier, String identifier, String winkVersion, String accept) throws WebClientResponseException {
return removeScheduleItemRequestCreation(propertyIdentifier, inventoryIdentifier, identifier, winkVersion, accept);
}
/**
* Show Scheduler Items
* Retrieve list of calendar items for a meeting room, restaurant, spa, activity, attraction or place.
*
500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param propertyIdentifier Show calendar items for travel inventory owned by this property identifier
* @param inventoryIdentifier Show calendar items for travel inventory with this identifier
* @param start Specify start date range
* @param end Specify end date range
* @param winkVersion The winkVersion parameter
* @param accept The accept parameter
* @return List<ScheduleItemViewSupplier>
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
private ResponseSpec showScheduleItemsRequestCreation(String propertyIdentifier, String inventoryIdentifier, java.time.LocalDateTime start, java.time.LocalDateTime end, 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 showScheduleItems", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null);
}
// verify the required parameter 'inventoryIdentifier' is set
if (inventoryIdentifier == null) {
throw new WebClientResponseException("Missing the required parameter 'inventoryIdentifier' when calling showScheduleItems", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null);
}
// verify the required parameter 'start' is set
if (start == null) {
throw new WebClientResponseException("Missing the required parameter 'start' when calling showScheduleItems", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null);
}
// verify the required parameter 'end' is set
if (end == null) {
throw new WebClientResponseException("Missing the required parameter 'end' when calling showScheduleItems", 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("inventoryIdentifier", inventoryIdentifier);
final MultiValueMap queryParams = new LinkedMultiValueMap();
final HttpHeaders headerParams = new HttpHeaders();
final MultiValueMap cookieParams = new LinkedMultiValueMap();
final MultiValueMap formParams = new LinkedMultiValueMap();
queryParams.putAll(apiClient.parameterToMultiValueMap(null, "start", start));
queryParams.putAll(apiClient.parameterToMultiValueMap(null, "end", end));
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}/schedule/{inventoryIdentifier}/list", HttpMethod.GET, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* Show Scheduler Items
* Retrieve list of calendar items for a meeting room, restaurant, spa, activity, attraction or place.
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param propertyIdentifier Show calendar items for travel inventory owned by this property identifier
* @param inventoryIdentifier Show calendar items for travel inventory with this identifier
* @param start Specify start date range
* @param end Specify end date range
* @param winkVersion The winkVersion parameter
* @param accept The accept parameter
* @return List<ScheduleItemViewSupplier>
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Flux showScheduleItems(String propertyIdentifier, String inventoryIdentifier, java.time.LocalDateTime start, java.time.LocalDateTime end, String winkVersion, String accept) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return showScheduleItemsRequestCreation(propertyIdentifier, inventoryIdentifier, start, end, winkVersion, accept).bodyToFlux(localVarReturnType);
}
/**
* Show Scheduler Items
* Retrieve list of calendar items for a meeting room, restaurant, spa, activity, attraction or place.
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param propertyIdentifier Show calendar items for travel inventory owned by this property identifier
* @param inventoryIdentifier Show calendar items for travel inventory with this identifier
* @param start Specify start date range
* @param end Specify end date range
* @param winkVersion The winkVersion parameter
* @param accept The accept parameter
* @return ResponseEntity<List<ScheduleItemViewSupplier>>
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Mono>> showScheduleItemsWithHttpInfo(String propertyIdentifier, String inventoryIdentifier, java.time.LocalDateTime start, java.time.LocalDateTime end, String winkVersion, String accept) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return showScheduleItemsRequestCreation(propertyIdentifier, inventoryIdentifier, start, end, winkVersion, accept).toEntityList(localVarReturnType);
}
/**
* Show Scheduler Items
* Retrieve list of calendar items for a meeting room, restaurant, spa, activity, attraction or place.
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param propertyIdentifier Show calendar items for travel inventory owned by this property identifier
* @param inventoryIdentifier Show calendar items for travel inventory with this identifier
* @param start Specify start date range
* @param end Specify end date range
* @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 showScheduleItemsWithResponseSpec(String propertyIdentifier, String inventoryIdentifier, java.time.LocalDateTime start, java.time.LocalDateTime end, String winkVersion, String accept) throws WebClientResponseException {
return showScheduleItemsRequestCreation(propertyIdentifier, inventoryIdentifier, start, end, winkVersion, accept);
}
/**
* Update Scheduler Item
* Update an existing calendar item for any travel inventory such as meeting room, restaurant, spa, activity, attraction or place.
*
500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param propertyIdentifier Update a calendar item for travel inventory owned by this property identifier
* @param inventoryIdentifier Update a calendar item for travel inventory with this identifier
* @param identifier Update a calendar item with this identifier
* @param updateScheduleItemRequestSupplier The updateScheduleItemRequestSupplier parameter
* @param winkVersion The winkVersion parameter
* @return ScheduleItemViewSupplier
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
private ResponseSpec updateScheduleItemRequestCreation(String propertyIdentifier, String inventoryIdentifier, String identifier, UpdateScheduleItemRequestSupplier updateScheduleItemRequestSupplier, String winkVersion) throws WebClientResponseException {
Object postBody = updateScheduleItemRequestSupplier;
// verify the required parameter 'propertyIdentifier' is set
if (propertyIdentifier == null) {
throw new WebClientResponseException("Missing the required parameter 'propertyIdentifier' when calling updateScheduleItem", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null);
}
// verify the required parameter 'inventoryIdentifier' is set
if (inventoryIdentifier == null) {
throw new WebClientResponseException("Missing the required parameter 'inventoryIdentifier' when calling updateScheduleItem", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null);
}
// verify the required parameter 'identifier' is set
if (identifier == null) {
throw new WebClientResponseException("Missing the required parameter 'identifier' when calling updateScheduleItem", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null);
}
// verify the required parameter 'updateScheduleItemRequestSupplier' is set
if (updateScheduleItemRequestSupplier == null) {
throw new WebClientResponseException("Missing the required parameter 'updateScheduleItemRequestSupplier' when calling updateScheduleItem", 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("inventoryIdentifier", inventoryIdentifier);
pathParams.put("identifier", identifier);
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}/schedule/{inventoryIdentifier}/item/{identifier}", HttpMethod.PUT, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* Update Scheduler Item
* Update an existing calendar item for any travel inventory such as meeting room, restaurant, spa, activity, attraction or place.
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param propertyIdentifier Update a calendar item for travel inventory owned by this property identifier
* @param inventoryIdentifier Update a calendar item for travel inventory with this identifier
* @param identifier Update a calendar item with this identifier
* @param updateScheduleItemRequestSupplier The updateScheduleItemRequestSupplier parameter
* @param winkVersion The winkVersion parameter
* @return ScheduleItemViewSupplier
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Mono updateScheduleItem(String propertyIdentifier, String inventoryIdentifier, String identifier, UpdateScheduleItemRequestSupplier updateScheduleItemRequestSupplier, String winkVersion) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return updateScheduleItemRequestCreation(propertyIdentifier, inventoryIdentifier, identifier, updateScheduleItemRequestSupplier, winkVersion).bodyToMono(localVarReturnType);
}
/**
* Update Scheduler Item
* Update an existing calendar item for any travel inventory such as meeting room, restaurant, spa, activity, attraction or place.
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param propertyIdentifier Update a calendar item for travel inventory owned by this property identifier
* @param inventoryIdentifier Update a calendar item for travel inventory with this identifier
* @param identifier Update a calendar item with this identifier
* @param updateScheduleItemRequestSupplier The updateScheduleItemRequestSupplier parameter
* @param winkVersion The winkVersion parameter
* @return ResponseEntity<ScheduleItemViewSupplier>
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Mono> updateScheduleItemWithHttpInfo(String propertyIdentifier, String inventoryIdentifier, String identifier, UpdateScheduleItemRequestSupplier updateScheduleItemRequestSupplier, String winkVersion) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return updateScheduleItemRequestCreation(propertyIdentifier, inventoryIdentifier, identifier, updateScheduleItemRequestSupplier, winkVersion).toEntity(localVarReturnType);
}
/**
* Update Scheduler Item
* Update an existing calendar item for any travel inventory such as meeting room, restaurant, spa, activity, attraction or place.
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param propertyIdentifier Update a calendar item for travel inventory owned by this property identifier
* @param inventoryIdentifier Update a calendar item for travel inventory with this identifier
* @param identifier Update a calendar item with this identifier
* @param updateScheduleItemRequestSupplier The updateScheduleItemRequestSupplier parameter
* @param winkVersion The winkVersion parameter
* @return ResponseSpec
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public ResponseSpec updateScheduleItemWithResponseSpec(String propertyIdentifier, String inventoryIdentifier, String identifier, UpdateScheduleItemRequestSupplier updateScheduleItemRequestSupplier, String winkVersion) throws WebClientResponseException {
return updateScheduleItemRequestCreation(propertyIdentifier, inventoryIdentifier, identifier, updateScheduleItemRequestSupplier, winkVersion);
}
}