travel.wink.sdk.extranet.api.InvoiceApi Maven / Gradle / Ivy
Show all versions of extranet-sdk-java Show documentation
package travel.wink.sdk.extranet.api;
import travel.wink.sdk.extranet.invoker.ApiClient;
import travel.wink.sdk.extranet.model.GenericErrorMessage;
import travel.wink.sdk.extranet.model.InvoiceCollectionSupplier;
import travel.wink.sdk.extranet.model.ShowPropertyPolicy400Response;
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-06-04T22:29:13.908295668+07:00[Asia/Bangkok]")
public class InvoiceApi {
private ApiClient apiClient;
public InvoiceApi() {
this(new ApiClient());
}
@Autowired
public InvoiceApi(ApiClient apiClient) {
this.apiClient = apiClient;
}
public ApiClient getApiClient() {
return apiClient;
}
public void setApiClient(ApiClient apiClient) {
this.apiClient = apiClient;
}
/**
* Show Customer Invoices
* Retrieve invoices for a particular customer.
* 503 - Service Unavailable
*
400 - Bad Request
*
405 - Method Not Allowed
*
415 - Unsupported Media Type
*
500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
200 - OK
* @param hotelIdentifier The hotelIdentifier parameter
* @param customerIdentifier The customerIdentifier parameter
* @param winkVersion The winkVersion parameter
* @return InvoiceCollectionSupplier
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
private ResponseSpec showInvoicesForCustomerRequestCreation(String hotelIdentifier, String customerIdentifier, String winkVersion) throws WebClientResponseException {
Object postBody = null;
// verify the required parameter 'hotelIdentifier' is set
if (hotelIdentifier == null) {
throw new WebClientResponseException("Missing the required parameter 'hotelIdentifier' when calling showInvoicesForCustomer", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null);
}
// verify the required parameter 'customerIdentifier' is set
if (customerIdentifier == null) {
throw new WebClientResponseException("Missing the required parameter 'customerIdentifier' when calling showInvoicesForCustomer", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null);
}
// create path and map variables
final Map pathParams = new HashMap();
pathParams.put("hotelIdentifier", hotelIdentifier);
pathParams.put("customerIdentifier", customerIdentifier);
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/hotel/{hotelIdentifier}/marketplace/customer/{customerIdentifier}/invoice/list", HttpMethod.GET, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* Show Customer Invoices
* Retrieve invoices for a particular customer.
* 503 - Service Unavailable
*
400 - Bad Request
*
405 - Method Not Allowed
*
415 - Unsupported Media Type
*
500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
200 - OK
* @param hotelIdentifier The hotelIdentifier parameter
* @param customerIdentifier The customerIdentifier parameter
* @param winkVersion The winkVersion parameter
* @return InvoiceCollectionSupplier
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Mono showInvoicesForCustomer(String hotelIdentifier, String customerIdentifier, String winkVersion) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return showInvoicesForCustomerRequestCreation(hotelIdentifier, customerIdentifier, winkVersion).bodyToMono(localVarReturnType);
}
/**
* Show Customer Invoices
* Retrieve invoices for a particular customer.
* 503 - Service Unavailable
*
400 - Bad Request
*
405 - Method Not Allowed
*
415 - Unsupported Media Type
*
500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
200 - OK
* @param hotelIdentifier The hotelIdentifier parameter
* @param customerIdentifier The customerIdentifier parameter
* @param winkVersion The winkVersion parameter
* @return ResponseEntity<InvoiceCollectionSupplier>
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Mono> showInvoicesForCustomerWithHttpInfo(String hotelIdentifier, String customerIdentifier, String winkVersion) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return showInvoicesForCustomerRequestCreation(hotelIdentifier, customerIdentifier, winkVersion).toEntity(localVarReturnType);
}
/**
* Show Customer Invoices
* Retrieve invoices for a particular customer.
* 503 - Service Unavailable
*
400 - Bad Request
*
405 - Method Not Allowed
*
415 - Unsupported Media Type
*
500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
200 - OK
* @param hotelIdentifier The hotelIdentifier parameter
* @param customerIdentifier The customerIdentifier parameter
* @param winkVersion The winkVersion parameter
* @return ResponseSpec
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public ResponseSpec showInvoicesForCustomerWithResponseSpec(String hotelIdentifier, String customerIdentifier, String winkVersion) throws WebClientResponseException {
return showInvoicesForCustomerRequestCreation(hotelIdentifier, customerIdentifier, winkVersion);
}
/**
* Show Subscription Invoices
* Retrieve all all subscription invoices for property.
*
503 - Service Unavailable
*
400 - Bad Request
*
405 - Method Not Allowed
*
415 - Unsupported Media Type
*
500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
200 - OK
* @param hotelIdentifier The hotelIdentifier parameter
* @param winkVersion The winkVersion parameter
* @return List<InvoiceCollectionSupplier>
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
private ResponseSpec showInvoicesForHotelRequestCreation(String hotelIdentifier, String winkVersion) throws WebClientResponseException {
Object postBody = null;
// verify the required parameter 'hotelIdentifier' is set
if (hotelIdentifier == null) {
throw new WebClientResponseException("Missing the required parameter 'hotelIdentifier' when calling showInvoicesForHotel", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null);
}
// create path and map variables
final Map pathParams = new HashMap();
pathParams.put("hotelIdentifier", hotelIdentifier);
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/hotel/{hotelIdentifier}/marketplace/subscription/invoice/list", HttpMethod.GET, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* Show Subscription Invoices
* Retrieve all all subscription invoices for property.
* 503 - Service Unavailable
*
400 - Bad Request
*
405 - Method Not Allowed
*
415 - Unsupported Media Type
*
500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
200 - OK
* @param hotelIdentifier The hotelIdentifier parameter
* @param winkVersion The winkVersion parameter
* @return List<InvoiceCollectionSupplier>
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Flux showInvoicesForHotel(String hotelIdentifier, String winkVersion) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return showInvoicesForHotelRequestCreation(hotelIdentifier, winkVersion).bodyToFlux(localVarReturnType);
}
/**
* Show Subscription Invoices
* Retrieve all all subscription invoices for property.
* 503 - Service Unavailable
*
400 - Bad Request
*
405 - Method Not Allowed
*
415 - Unsupported Media Type
*
500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
200 - OK
* @param hotelIdentifier The hotelIdentifier parameter
* @param winkVersion The winkVersion parameter
* @return ResponseEntity<List<InvoiceCollectionSupplier>>
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Mono>> showInvoicesForHotelWithHttpInfo(String hotelIdentifier, String winkVersion) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return showInvoicesForHotelRequestCreation(hotelIdentifier, winkVersion).toEntityList(localVarReturnType);
}
/**
* Show Subscription Invoices
* Retrieve all all subscription invoices for property.
* 503 - Service Unavailable
*
400 - Bad Request
*
405 - Method Not Allowed
*
415 - Unsupported Media Type
*
500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
200 - OK
* @param hotelIdentifier The hotelIdentifier parameter
* @param winkVersion The winkVersion parameter
* @return ResponseSpec
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public ResponseSpec showInvoicesForHotelWithResponseSpec(String hotelIdentifier, String winkVersion) throws WebClientResponseException {
return showInvoicesForHotelRequestCreation(hotelIdentifier, winkVersion);
}
/**
* Show Property Invoices
* Retrieve all invoices for property.
*
503 - Service Unavailable
*
400 - Bad Request
*
405 - Method Not Allowed
*
415 - Unsupported Media Type
*
500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
200 - OK
* @param hotelIdentifier The hotelIdentifier parameter
* @param winkVersion The winkVersion parameter
* @return InvoiceCollectionSupplier
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
private ResponseSpec showInvoicesForHotelCustomerRequestCreation(String hotelIdentifier, String winkVersion) throws WebClientResponseException {
Object postBody = null;
// verify the required parameter 'hotelIdentifier' is set
if (hotelIdentifier == null) {
throw new WebClientResponseException("Missing the required parameter 'hotelIdentifier' when calling showInvoicesForHotelCustomer", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null);
}
// create path and map variables
final Map pathParams = new HashMap();
pathParams.put("hotelIdentifier", hotelIdentifier);
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/hotel/{hotelIdentifier}/marketplace/customer/invoice/list", HttpMethod.GET, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* Show Property Invoices
* Retrieve all invoices for property.
* 503 - Service Unavailable
*
400 - Bad Request
*
405 - Method Not Allowed
*
415 - Unsupported Media Type
*
500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
200 - OK
* @param hotelIdentifier The hotelIdentifier parameter
* @param winkVersion The winkVersion parameter
* @return InvoiceCollectionSupplier
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Mono showInvoicesForHotelCustomer(String hotelIdentifier, String winkVersion) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return showInvoicesForHotelCustomerRequestCreation(hotelIdentifier, winkVersion).bodyToMono(localVarReturnType);
}
/**
* Show Property Invoices
* Retrieve all invoices for property.
* 503 - Service Unavailable
*
400 - Bad Request
*
405 - Method Not Allowed
*
415 - Unsupported Media Type
*
500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
200 - OK
* @param hotelIdentifier The hotelIdentifier parameter
* @param winkVersion The winkVersion parameter
* @return ResponseEntity<InvoiceCollectionSupplier>
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Mono> showInvoicesForHotelCustomerWithHttpInfo(String hotelIdentifier, String winkVersion) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return showInvoicesForHotelCustomerRequestCreation(hotelIdentifier, winkVersion).toEntity(localVarReturnType);
}
/**
* Show Property Invoices
* Retrieve all invoices for property.
* 503 - Service Unavailable
*
400 - Bad Request
*
405 - Method Not Allowed
*
415 - Unsupported Media Type
*
500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
200 - OK
* @param hotelIdentifier The hotelIdentifier parameter
* @param winkVersion The winkVersion parameter
* @return ResponseSpec
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public ResponseSpec showInvoicesForHotelCustomerWithResponseSpec(String hotelIdentifier, String winkVersion) throws WebClientResponseException {
return showInvoicesForHotelCustomerRequestCreation(hotelIdentifier, winkVersion);
}
/**
* Show Invoices
* Retrieve all invoices for a specific subscription
*
503 - Service Unavailable
*
400 - Bad Request
*
405 - Method Not Allowed
*
415 - Unsupported Media Type
*
500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
200 - OK
* @param hotelIdentifier The hotelIdentifier parameter
* @param subscriptionIdentifier The subscriptionIdentifier parameter
* @param winkVersion The winkVersion parameter
* @return InvoiceCollectionSupplier
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
private ResponseSpec showInvoicesForSubscriptionRequestCreation(String hotelIdentifier, String subscriptionIdentifier, String winkVersion) throws WebClientResponseException {
Object postBody = null;
// verify the required parameter 'hotelIdentifier' is set
if (hotelIdentifier == null) {
throw new WebClientResponseException("Missing the required parameter 'hotelIdentifier' when calling showInvoicesForSubscription", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null);
}
// verify the required parameter 'subscriptionIdentifier' is set
if (subscriptionIdentifier == null) {
throw new WebClientResponseException("Missing the required parameter 'subscriptionIdentifier' when calling showInvoicesForSubscription", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null);
}
// create path and map variables
final Map pathParams = new HashMap();
pathParams.put("hotelIdentifier", hotelIdentifier);
pathParams.put("subscriptionIdentifier", subscriptionIdentifier);
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/hotel/{hotelIdentifier}/marketplace/subscription/{subscriptionIdentifier}/invoice/list", HttpMethod.GET, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* Show Invoices
* Retrieve all invoices for a specific subscription
* 503 - Service Unavailable
*
400 - Bad Request
*
405 - Method Not Allowed
*
415 - Unsupported Media Type
*
500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
200 - OK
* @param hotelIdentifier The hotelIdentifier parameter
* @param subscriptionIdentifier The subscriptionIdentifier parameter
* @param winkVersion The winkVersion parameter
* @return InvoiceCollectionSupplier
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Mono showInvoicesForSubscription(String hotelIdentifier, String subscriptionIdentifier, String winkVersion) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return showInvoicesForSubscriptionRequestCreation(hotelIdentifier, subscriptionIdentifier, winkVersion).bodyToMono(localVarReturnType);
}
/**
* Show Invoices
* Retrieve all invoices for a specific subscription
* 503 - Service Unavailable
*
400 - Bad Request
*
405 - Method Not Allowed
*
415 - Unsupported Media Type
*
500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
200 - OK
* @param hotelIdentifier The hotelIdentifier parameter
* @param subscriptionIdentifier The subscriptionIdentifier parameter
* @param winkVersion The winkVersion parameter
* @return ResponseEntity<InvoiceCollectionSupplier>
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Mono> showInvoicesForSubscriptionWithHttpInfo(String hotelIdentifier, String subscriptionIdentifier, String winkVersion) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return showInvoicesForSubscriptionRequestCreation(hotelIdentifier, subscriptionIdentifier, winkVersion).toEntity(localVarReturnType);
}
/**
* Show Invoices
* Retrieve all invoices for a specific subscription
* 503 - Service Unavailable
*
400 - Bad Request
*
405 - Method Not Allowed
*
415 - Unsupported Media Type
*
500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
200 - OK
* @param hotelIdentifier The hotelIdentifier parameter
* @param subscriptionIdentifier The subscriptionIdentifier parameter
* @param winkVersion The winkVersion parameter
* @return ResponseSpec
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public ResponseSpec showInvoicesForSubscriptionWithResponseSpec(String hotelIdentifier, String subscriptionIdentifier, String winkVersion) throws WebClientResponseException {
return showInvoicesForSubscriptionRequestCreation(hotelIdentifier, subscriptionIdentifier, winkVersion);
}
}