travel.wink.sdk.affiliate.api.AffiliateApi Maven / Gradle / Ivy
Show all versions of affiliate-sdk-java Show documentation
package travel.wink.sdk.affiliate.api;
import travel.wink.sdk.affiliate.invoker.ApiClient;
import travel.wink.sdk.affiliate.model.BookingAnalyticsSupplier;
import travel.wink.sdk.affiliate.model.BookingOverviewRequestSupplier;
import travel.wink.sdk.affiliate.model.CompanyViewAffiliate;
import travel.wink.sdk.affiliate.model.CreateCompany400Response;
import travel.wink.sdk.affiliate.model.CreateCompanyRequestAffiliate;
import travel.wink.sdk.affiliate.model.GenericErrorMessage;
import travel.wink.sdk.affiliate.model.GroupedBookingSalesMetricsSupplierDetails;
import travel.wink.sdk.affiliate.model.KeyValuePairAffiliate;
import travel.wink.sdk.affiliate.model.PageCompanyViewSupplier;
import travel.wink.sdk.affiliate.model.StateSupplier;
import travel.wink.sdk.affiliate.model.UniqueRequestAffiliate;
import travel.wink.sdk.affiliate.model.UniqueResultAffiliate;
import travel.wink.sdk.affiliate.model.UpsertAddressRequestAffiliate;
import travel.wink.sdk.affiliate.model.UpsertCompanyLogoRequestAffiliate;
import travel.wink.sdk.affiliate.model.UpsertCompanyRequestAffiliate;
import travel.wink.sdk.affiliate.model.UpsertCompanyStatusRequestAffiliate;
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 = "2025-01-02T16:41:01.157053550+07:00[Asia/Bangkok]")
public class AffiliateApi {
private ApiClient apiClient;
public AffiliateApi() {
this(new ApiClient());
}
@Autowired
public AffiliateApi(ApiClient apiClient) {
this.apiClient = apiClient;
}
public ApiClient getApiClient() {
return apiClient;
}
public void setApiClient(ApiClient apiClient) {
this.apiClient = apiClient;
}
/**
* Create Affiliate
* Create a new affiliate
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
201 - Created
* @param createCompanyRequestAffiliate The createCompanyRequestAffiliate parameter
* @param winkVersion The winkVersion parameter
* @return CompanyViewAffiliate
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
private ResponseSpec createCompanyRequestCreation(CreateCompanyRequestAffiliate createCompanyRequestAffiliate, String winkVersion) throws WebClientResponseException {
Object postBody = createCompanyRequestAffiliate;
// verify the required parameter 'createCompanyRequestAffiliate' is set
if (createCompanyRequestAffiliate == null) {
throw new WebClientResponseException("Missing the required parameter 'createCompanyRequestAffiliate' when calling createCompany", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null);
}
// create path and map variables
final Map pathParams = new HashMap();
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/affiliate", HttpMethod.POST, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* Create Affiliate
* Create a new affiliate
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
201 - Created
* @param createCompanyRequestAffiliate The createCompanyRequestAffiliate parameter
* @param winkVersion The winkVersion parameter
* @return CompanyViewAffiliate
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Mono createCompany(CreateCompanyRequestAffiliate createCompanyRequestAffiliate, String winkVersion) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return createCompanyRequestCreation(createCompanyRequestAffiliate, winkVersion).bodyToMono(localVarReturnType);
}
/**
* Create Affiliate
* Create a new affiliate
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
201 - Created
* @param createCompanyRequestAffiliate The createCompanyRequestAffiliate parameter
* @param winkVersion The winkVersion parameter
* @return ResponseEntity<CompanyViewAffiliate>
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Mono> createCompanyWithHttpInfo(CreateCompanyRequestAffiliate createCompanyRequestAffiliate, String winkVersion) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return createCompanyRequestCreation(createCompanyRequestAffiliate, winkVersion).toEntity(localVarReturnType);
}
/**
* Create Affiliate
* Create a new affiliate
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
201 - Created
* @param createCompanyRequestAffiliate The createCompanyRequestAffiliate parameter
* @param winkVersion The winkVersion parameter
* @return ResponseSpec
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public ResponseSpec createCompanyWithResponseSpec(CreateCompanyRequestAffiliate createCompanyRequestAffiliate, String winkVersion) throws WebClientResponseException {
return createCompanyRequestCreation(createCompanyRequestAffiliate, winkVersion);
}
/**
* Verify Affiliate Name
* Check if company name is unique
*
500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param uniqueRequestAffiliate The uniqueRequestAffiliate parameter
* @param winkVersion The winkVersion parameter
* @return UniqueResultAffiliate
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
private ResponseSpec isCompanyNameUniqueRequestCreation(UniqueRequestAffiliate uniqueRequestAffiliate, String winkVersion) throws WebClientResponseException {
Object postBody = uniqueRequestAffiliate;
// verify the required parameter 'uniqueRequestAffiliate' is set
if (uniqueRequestAffiliate == null) {
throw new WebClientResponseException("Missing the required parameter 'uniqueRequestAffiliate' when calling isCompanyNameUnique", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null);
}
// create path and map variables
final Map pathParams = new HashMap();
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/affiliate/unique", HttpMethod.POST, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* Verify Affiliate Name
* Check if company name is unique
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param uniqueRequestAffiliate The uniqueRequestAffiliate parameter
* @param winkVersion The winkVersion parameter
* @return UniqueResultAffiliate
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Mono isCompanyNameUnique(UniqueRequestAffiliate uniqueRequestAffiliate, String winkVersion) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return isCompanyNameUniqueRequestCreation(uniqueRequestAffiliate, winkVersion).bodyToMono(localVarReturnType);
}
/**
* Verify Affiliate Name
* Check if company name is unique
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param uniqueRequestAffiliate The uniqueRequestAffiliate parameter
* @param winkVersion The winkVersion parameter
* @return ResponseEntity<UniqueResultAffiliate>
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Mono> isCompanyNameUniqueWithHttpInfo(UniqueRequestAffiliate uniqueRequestAffiliate, String winkVersion) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return isCompanyNameUniqueRequestCreation(uniqueRequestAffiliate, winkVersion).toEntity(localVarReturnType);
}
/**
* Verify Affiliate Name
* Check if company name is unique
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param uniqueRequestAffiliate The uniqueRequestAffiliate parameter
* @param winkVersion The winkVersion parameter
* @return ResponseSpec
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public ResponseSpec isCompanyNameUniqueWithResponseSpec(UniqueRequestAffiliate uniqueRequestAffiliate, String winkVersion) throws WebClientResponseException {
return isCompanyNameUniqueRequestCreation(uniqueRequestAffiliate, winkVersion);
}
/**
* Delete Affiliate
* Delete a company by identifier
*
500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param companyIdentifier Delete company with given identifier
* @param winkVersion The winkVersion parameter
* @param accept The accept parameter
* @return CompanyViewAffiliate
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
private ResponseSpec removeCompanyRequestCreation(String companyIdentifier, String winkVersion, String accept) throws WebClientResponseException {
Object postBody = null;
// verify the required parameter 'companyIdentifier' is set
if (companyIdentifier == null) {
throw new WebClientResponseException("Missing the required parameter 'companyIdentifier' when calling removeCompany", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null);
}
// create path and map variables
final Map pathParams = new HashMap();
pathParams.put("companyIdentifier", companyIdentifier);
final MultiValueMap queryParams = new LinkedMultiValueMap();
final HttpHeaders headerParams = new HttpHeaders();
final MultiValueMap cookieParams = new LinkedMultiValueMap();
final MultiValueMap formParams = new LinkedMultiValueMap();
if (winkVersion != null)
headerParams.add("Wink-Version", apiClient.parameterToString(winkVersion));
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/affiliate/{companyIdentifier}", HttpMethod.DELETE, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* Delete Affiliate
* Delete a company by identifier
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param companyIdentifier Delete company with given identifier
* @param winkVersion The winkVersion parameter
* @param accept The accept parameter
* @return CompanyViewAffiliate
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Mono removeCompany(String companyIdentifier, String winkVersion, String accept) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return removeCompanyRequestCreation(companyIdentifier, winkVersion, accept).bodyToMono(localVarReturnType);
}
/**
* Delete Affiliate
* Delete a company by identifier
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param companyIdentifier Delete company with given identifier
* @param winkVersion The winkVersion parameter
* @param accept The accept parameter
* @return ResponseEntity<CompanyViewAffiliate>
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Mono> removeCompanyWithHttpInfo(String companyIdentifier, String winkVersion, String accept) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return removeCompanyRequestCreation(companyIdentifier, winkVersion, accept).toEntity(localVarReturnType);
}
/**
* Delete Affiliate
* Delete a company by identifier
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param companyIdentifier Delete company with given 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 removeCompanyWithResponseSpec(String companyIdentifier, String winkVersion, String accept) throws WebClientResponseException {
return removeCompanyRequestCreation(companyIdentifier, winkVersion, accept);
}
/**
* Affiliate Search
* Retrieve a paginated list of affiliates that you manage.
*
500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param stateSupplier Filter grid by state request body
* @param winkVersion The winkVersion parameter
* @return PageCompanyViewSupplier
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
private ResponseSpec searchAffiliatesRequestCreation(StateSupplier stateSupplier, String winkVersion) throws WebClientResponseException {
Object postBody = stateSupplier;
// verify the required parameter 'stateSupplier' is set
if (stateSupplier == null) {
throw new WebClientResponseException("Missing the required parameter 'stateSupplier' when calling searchAffiliates", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null);
}
// create path and map variables
final Map pathParams = new HashMap();
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/affiliate/grid", HttpMethod.POST, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* Affiliate Search
* Retrieve a paginated list of affiliates that you manage.
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param stateSupplier Filter grid by state request body
* @param winkVersion The winkVersion parameter
* @return PageCompanyViewSupplier
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Mono searchAffiliates(StateSupplier stateSupplier, String winkVersion) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return searchAffiliatesRequestCreation(stateSupplier, winkVersion).bodyToMono(localVarReturnType);
}
/**
* Affiliate Search
* Retrieve a paginated list of affiliates that you manage.
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param stateSupplier Filter grid by state request body
* @param winkVersion The winkVersion parameter
* @return ResponseEntity<PageCompanyViewSupplier>
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Mono> searchAffiliatesWithHttpInfo(StateSupplier stateSupplier, String winkVersion) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return searchAffiliatesRequestCreation(stateSupplier, winkVersion).toEntity(localVarReturnType);
}
/**
* Affiliate Search
* Retrieve a paginated list of affiliates that you manage.
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param stateSupplier Filter grid by state request body
* @param winkVersion The winkVersion parameter
* @return ResponseSpec
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public ResponseSpec searchAffiliatesWithResponseSpec(StateSupplier stateSupplier, String winkVersion) throws WebClientResponseException {
return searchAffiliatesRequestCreation(stateSupplier, winkVersion);
}
/**
* Affiliate Booking Analytics
* Retrieve the number of upcoming bookings that arrive today for the specific company.
*
500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param companyIdentifier Show active booking count for company with this identifier
* @param bookingOverviewRequestSupplier Overview request body
* @param winkVersion The winkVersion parameter
* @return BookingAnalyticsSupplier
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
private ResponseSpec showBookingAnalyticsRequestCreation(String companyIdentifier, BookingOverviewRequestSupplier bookingOverviewRequestSupplier, String winkVersion) throws WebClientResponseException {
Object postBody = bookingOverviewRequestSupplier;
// verify the required parameter 'companyIdentifier' is set
if (companyIdentifier == null) {
throw new WebClientResponseException("Missing the required parameter 'companyIdentifier' when calling showBookingAnalytics", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null);
}
// verify the required parameter 'bookingOverviewRequestSupplier' is set
if (bookingOverviewRequestSupplier == null) {
throw new WebClientResponseException("Missing the required parameter 'bookingOverviewRequestSupplier' when calling showBookingAnalytics", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null);
}
// create path and map variables
final Map pathParams = new HashMap();
pathParams.put("companyIdentifier", companyIdentifier);
final MultiValueMap queryParams = new LinkedMultiValueMap();
final HttpHeaders headerParams = new HttpHeaders();
final MultiValueMap cookieParams = new LinkedMultiValueMap();
final MultiValueMap formParams = new LinkedMultiValueMap();
if (winkVersion != null)
headerParams.add("Wink-Version", apiClient.parameterToString(winkVersion));
final String[] localVarAccepts = {
"application/json", "application/xml", "text/xml", "text/plain", "*/*"
};
final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
"application/json"
};
final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "oauth2ClientCredentials" };
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return apiClient.invokeAPI("/api/affiliate/{companyIdentifier}/booking/analytics", HttpMethod.POST, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* Affiliate Booking Analytics
* Retrieve the number of upcoming bookings that arrive today for the specific company.
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param companyIdentifier Show active booking count for company with this identifier
* @param bookingOverviewRequestSupplier Overview request body
* @param winkVersion The winkVersion parameter
* @return BookingAnalyticsSupplier
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Mono showBookingAnalytics(String companyIdentifier, BookingOverviewRequestSupplier bookingOverviewRequestSupplier, String winkVersion) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return showBookingAnalyticsRequestCreation(companyIdentifier, bookingOverviewRequestSupplier, winkVersion).bodyToMono(localVarReturnType);
}
/**
* Affiliate Booking Analytics
* Retrieve the number of upcoming bookings that arrive today for the specific company.
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param companyIdentifier Show active booking count for company with this identifier
* @param bookingOverviewRequestSupplier Overview request body
* @param winkVersion The winkVersion parameter
* @return ResponseEntity<BookingAnalyticsSupplier>
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Mono> showBookingAnalyticsWithHttpInfo(String companyIdentifier, BookingOverviewRequestSupplier bookingOverviewRequestSupplier, String winkVersion) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return showBookingAnalyticsRequestCreation(companyIdentifier, bookingOverviewRequestSupplier, winkVersion).toEntity(localVarReturnType);
}
/**
* Affiliate Booking Analytics
* Retrieve the number of upcoming bookings that arrive today for the specific company.
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param companyIdentifier Show active booking count for company with this identifier
* @param bookingOverviewRequestSupplier Overview request body
* @param winkVersion The winkVersion parameter
* @return ResponseSpec
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public ResponseSpec showBookingAnalyticsWithResponseSpec(String companyIdentifier, BookingOverviewRequestSupplier bookingOverviewRequestSupplier, String winkVersion) throws WebClientResponseException {
return showBookingAnalyticsRequestCreation(companyIdentifier, bookingOverviewRequestSupplier, winkVersion);
}
/**
* Affiliate Booking Overview
* Basic booking overview data
*
500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param companyIdentifier Show booking owned by this company
* @param winkVersion The winkVersion parameter
* @param accept The accept parameter
* @return GroupedBookingSalesMetricsSupplierDetails
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
private ResponseSpec showBookingOverviewRequestCreation(String companyIdentifier, String winkVersion, String accept) throws WebClientResponseException {
Object postBody = null;
// verify the required parameter 'companyIdentifier' is set
if (companyIdentifier == null) {
throw new WebClientResponseException("Missing the required parameter 'companyIdentifier' when calling showBookingOverview", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null);
}
// create path and map variables
final Map pathParams = new HashMap();
pathParams.put("companyIdentifier", companyIdentifier);
final MultiValueMap queryParams = new LinkedMultiValueMap();
final HttpHeaders headerParams = new HttpHeaders();
final MultiValueMap cookieParams = new LinkedMultiValueMap();
final MultiValueMap formParams = new LinkedMultiValueMap();
if (winkVersion != null)
headerParams.add("Wink-Version", apiClient.parameterToString(winkVersion));
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/affiliate/{companyIdentifier}/booking/overview", HttpMethod.GET, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* Affiliate Booking Overview
* Basic booking overview data
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param companyIdentifier Show booking owned by this company
* @param winkVersion The winkVersion parameter
* @param accept The accept parameter
* @return GroupedBookingSalesMetricsSupplierDetails
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Mono showBookingOverview(String companyIdentifier, String winkVersion, String accept) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return showBookingOverviewRequestCreation(companyIdentifier, winkVersion, accept).bodyToMono(localVarReturnType);
}
/**
* Affiliate Booking Overview
* Basic booking overview data
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param companyIdentifier Show booking owned by this company
* @param winkVersion The winkVersion parameter
* @param accept The accept parameter
* @return ResponseEntity<GroupedBookingSalesMetricsSupplierDetails>
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Mono> showBookingOverviewWithHttpInfo(String companyIdentifier, String winkVersion, String accept) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return showBookingOverviewRequestCreation(companyIdentifier, winkVersion, accept).toEntity(localVarReturnType);
}
/**
* Affiliate Booking Overview
* Basic booking overview data
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param companyIdentifier Show booking owned by this company
* @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 showBookingOverviewWithResponseSpec(String companyIdentifier, String winkVersion, String accept) throws WebClientResponseException {
return showBookingOverviewRequestCreation(companyIdentifier, winkVersion, accept);
}
/**
* Show Affiliates
* List all companies owned by caller.
*
500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param type Filter on companies of a specific type
* @param winkVersion The winkVersion parameter
* @param accept The accept parameter
* @return List<CompanyViewAffiliate>
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
private ResponseSpec showCompaniesRequestCreation(String type, String winkVersion, String accept) throws WebClientResponseException {
Object postBody = null;
// create path and map variables
final Map pathParams = new HashMap();
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, "type", type));
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/affiliate/list", HttpMethod.GET, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* Show Affiliates
* List all companies owned by caller.
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param type Filter on companies of a specific type
* @param winkVersion The winkVersion parameter
* @param accept The accept parameter
* @return List<CompanyViewAffiliate>
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Flux showCompanies(String type, String winkVersion, String accept) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return showCompaniesRequestCreation(type, winkVersion, accept).bodyToFlux(localVarReturnType);
}
/**
* Show Affiliates
* List all companies owned by caller.
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param type Filter on companies of a specific type
* @param winkVersion The winkVersion parameter
* @param accept The accept parameter
* @return ResponseEntity<List<CompanyViewAffiliate>>
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Mono>> showCompaniesWithHttpInfo(String type, String winkVersion, String accept) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return showCompaniesRequestCreation(type, winkVersion, accept).toEntityList(localVarReturnType);
}
/**
* Show Affiliates
* List all companies owned by caller.
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param type Filter on companies of a specific type
* @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 showCompaniesWithResponseSpec(String type, String winkVersion, String accept) throws WebClientResponseException {
return showCompaniesRequestCreation(type, winkVersion, accept);
}
/**
* Show Affiliate
* Retrieve company by identifier
*
500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param companyIdentifier Select company with given identifier
* @param winkVersion The winkVersion parameter
* @param accept The accept parameter
* @return CompanyViewAffiliate
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
private ResponseSpec showCompanyRequestCreation(String companyIdentifier, String winkVersion, String accept) throws WebClientResponseException {
Object postBody = null;
// verify the required parameter 'companyIdentifier' is set
if (companyIdentifier == null) {
throw new WebClientResponseException("Missing the required parameter 'companyIdentifier' when calling showCompany", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null);
}
// create path and map variables
final Map pathParams = new HashMap();
pathParams.put("companyIdentifier", companyIdentifier);
final MultiValueMap queryParams = new LinkedMultiValueMap();
final HttpHeaders headerParams = new HttpHeaders();
final MultiValueMap cookieParams = new LinkedMultiValueMap();
final MultiValueMap formParams = new LinkedMultiValueMap();
if (winkVersion != null)
headerParams.add("Wink-Version", apiClient.parameterToString(winkVersion));
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/affiliate/{companyIdentifier}", HttpMethod.GET, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* Show Affiliate
* Retrieve company by identifier
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param companyIdentifier Select company with given identifier
* @param winkVersion The winkVersion parameter
* @param accept The accept parameter
* @return CompanyViewAffiliate
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Mono showCompany(String companyIdentifier, String winkVersion, String accept) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return showCompanyRequestCreation(companyIdentifier, winkVersion, accept).bodyToMono(localVarReturnType);
}
/**
* Show Affiliate
* Retrieve company by identifier
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param companyIdentifier Select company with given identifier
* @param winkVersion The winkVersion parameter
* @param accept The accept parameter
* @return ResponseEntity<CompanyViewAffiliate>
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Mono> showCompanyWithHttpInfo(String companyIdentifier, String winkVersion, String accept) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return showCompanyRequestCreation(companyIdentifier, winkVersion, accept).toEntity(localVarReturnType);
}
/**
* Show Affiliate
* Retrieve company by identifier
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param companyIdentifier Select company with given 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 showCompanyWithResponseSpec(String companyIdentifier, String winkVersion, String accept) throws WebClientResponseException {
return showCompanyRequestCreation(companyIdentifier, winkVersion, accept);
}
/**
* Sales Channel Search
* Search for sales channels by name
*
500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param name Search for sales channel with name
* @param winkVersion The winkVersion parameter
* @param accept The accept parameter
* @return List<KeyValuePairAffiliate>
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
private ResponseSpec showSalesChannelsRequestCreation(String name, String winkVersion, String accept) throws WebClientResponseException {
Object postBody = null;
// verify the required parameter 'name' is set
if (name == null) {
throw new WebClientResponseException("Missing the required parameter 'name' when calling showSalesChannels", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null);
}
// create path and map variables
final Map pathParams = new HashMap();
pathParams.put("name", name);
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/sales-channel/search/{name}", HttpMethod.GET, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* Sales Channel Search
* Search for sales channels by name
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param name Search for sales channel with name
* @param winkVersion The winkVersion parameter
* @param accept The accept parameter
* @return List<KeyValuePairAffiliate>
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Flux showSalesChannels(String name, String winkVersion, String accept) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return showSalesChannelsRequestCreation(name, winkVersion, accept).bodyToFlux(localVarReturnType);
}
/**
* Sales Channel Search
* Search for sales channels by name
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param name Search for sales channel with name
* @param winkVersion The winkVersion parameter
* @param accept The accept parameter
* @return ResponseEntity<List<KeyValuePairAffiliate>>
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Mono>> showSalesChannelsWithHttpInfo(String name, String winkVersion, String accept) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return showSalesChannelsRequestCreation(name, winkVersion, accept).toEntityList(localVarReturnType);
}
/**
* Sales Channel Search
* Search for sales channels by name
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param name Search for sales channel with name
* @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 showSalesChannelsWithResponseSpec(String name, String winkVersion, String accept) throws WebClientResponseException {
return showSalesChannelsRequestCreation(name, winkVersion, accept);
}
/**
* Update Affiliate
* Update an existing company
*
500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param companyIdentifier Update company with given identifier
* @param upsertCompanyRequestAffiliate The upsertCompanyRequestAffiliate parameter
* @param winkVersion The winkVersion parameter
* @return CompanyViewAffiliate
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
private ResponseSpec updateCompanyRequestCreation(String companyIdentifier, UpsertCompanyRequestAffiliate upsertCompanyRequestAffiliate, String winkVersion) throws WebClientResponseException {
Object postBody = upsertCompanyRequestAffiliate;
// verify the required parameter 'companyIdentifier' is set
if (companyIdentifier == null) {
throw new WebClientResponseException("Missing the required parameter 'companyIdentifier' when calling updateCompany", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null);
}
// verify the required parameter 'upsertCompanyRequestAffiliate' is set
if (upsertCompanyRequestAffiliate == null) {
throw new WebClientResponseException("Missing the required parameter 'upsertCompanyRequestAffiliate' when calling updateCompany", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null);
}
// create path and map variables
final Map pathParams = new HashMap();
pathParams.put("companyIdentifier", companyIdentifier);
final MultiValueMap queryParams = new LinkedMultiValueMap();
final HttpHeaders headerParams = new HttpHeaders();
final MultiValueMap cookieParams = new LinkedMultiValueMap();
final MultiValueMap formParams = new LinkedMultiValueMap();
if (winkVersion != null)
headerParams.add("Wink-Version", apiClient.parameterToString(winkVersion));
final String[] localVarAccepts = {
"application/json", "application/xml", "text/xml", "text/plain", "*/*"
};
final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
"application/json"
};
final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "oauth2ClientCredentials" };
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return apiClient.invokeAPI("/api/affiliate/{companyIdentifier}", HttpMethod.PATCH, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* Update Affiliate
* Update an existing company
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param companyIdentifier Update company with given identifier
* @param upsertCompanyRequestAffiliate The upsertCompanyRequestAffiliate parameter
* @param winkVersion The winkVersion parameter
* @return CompanyViewAffiliate
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Mono updateCompany(String companyIdentifier, UpsertCompanyRequestAffiliate upsertCompanyRequestAffiliate, String winkVersion) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return updateCompanyRequestCreation(companyIdentifier, upsertCompanyRequestAffiliate, winkVersion).bodyToMono(localVarReturnType);
}
/**
* Update Affiliate
* Update an existing company
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param companyIdentifier Update company with given identifier
* @param upsertCompanyRequestAffiliate The upsertCompanyRequestAffiliate parameter
* @param winkVersion The winkVersion parameter
* @return ResponseEntity<CompanyViewAffiliate>
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Mono> updateCompanyWithHttpInfo(String companyIdentifier, UpsertCompanyRequestAffiliate upsertCompanyRequestAffiliate, String winkVersion) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return updateCompanyRequestCreation(companyIdentifier, upsertCompanyRequestAffiliate, winkVersion).toEntity(localVarReturnType);
}
/**
* Update Affiliate
* Update an existing company
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param companyIdentifier Update company with given identifier
* @param upsertCompanyRequestAffiliate The upsertCompanyRequestAffiliate parameter
* @param winkVersion The winkVersion parameter
* @return ResponseSpec
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public ResponseSpec updateCompanyWithResponseSpec(String companyIdentifier, UpsertCompanyRequestAffiliate upsertCompanyRequestAffiliate, String winkVersion) throws WebClientResponseException {
return updateCompanyRequestCreation(companyIdentifier, upsertCompanyRequestAffiliate, winkVersion);
}
/**
* Toggle Affiliate Status
* Update company status
*
500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param companyIdentifier Update status of company with given identifier
* @param upsertCompanyStatusRequestAffiliate The upsertCompanyStatusRequestAffiliate parameter
* @param winkVersion The winkVersion parameter
* @return CompanyViewAffiliate
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
private ResponseSpec updateCompany1RequestCreation(String companyIdentifier, UpsertCompanyStatusRequestAffiliate upsertCompanyStatusRequestAffiliate, String winkVersion) throws WebClientResponseException {
Object postBody = upsertCompanyStatusRequestAffiliate;
// verify the required parameter 'companyIdentifier' is set
if (companyIdentifier == null) {
throw new WebClientResponseException("Missing the required parameter 'companyIdentifier' when calling updateCompany1", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null);
}
// verify the required parameter 'upsertCompanyStatusRequestAffiliate' is set
if (upsertCompanyStatusRequestAffiliate == null) {
throw new WebClientResponseException("Missing the required parameter 'upsertCompanyStatusRequestAffiliate' when calling updateCompany1", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null);
}
// create path and map variables
final Map pathParams = new HashMap();
pathParams.put("companyIdentifier", companyIdentifier);
final MultiValueMap queryParams = new LinkedMultiValueMap();
final HttpHeaders headerParams = new HttpHeaders();
final MultiValueMap cookieParams = new LinkedMultiValueMap();
final MultiValueMap formParams = new LinkedMultiValueMap();
if (winkVersion != null)
headerParams.add("Wink-Version", apiClient.parameterToString(winkVersion));
final String[] localVarAccepts = {
"application/json", "application/xml", "text/xml", "text/plain", "*/*"
};
final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
"application/json"
};
final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "oauth2ClientCredentials" };
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return apiClient.invokeAPI("/api/affiliate/{companyIdentifier}/status", HttpMethod.PATCH, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* Toggle Affiliate Status
* Update company status
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param companyIdentifier Update status of company with given identifier
* @param upsertCompanyStatusRequestAffiliate The upsertCompanyStatusRequestAffiliate parameter
* @param winkVersion The winkVersion parameter
* @return CompanyViewAffiliate
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Mono updateCompany1(String companyIdentifier, UpsertCompanyStatusRequestAffiliate upsertCompanyStatusRequestAffiliate, String winkVersion) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return updateCompany1RequestCreation(companyIdentifier, upsertCompanyStatusRequestAffiliate, winkVersion).bodyToMono(localVarReturnType);
}
/**
* Toggle Affiliate Status
* Update company status
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param companyIdentifier Update status of company with given identifier
* @param upsertCompanyStatusRequestAffiliate The upsertCompanyStatusRequestAffiliate parameter
* @param winkVersion The winkVersion parameter
* @return ResponseEntity<CompanyViewAffiliate>
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Mono> updateCompany1WithHttpInfo(String companyIdentifier, UpsertCompanyStatusRequestAffiliate upsertCompanyStatusRequestAffiliate, String winkVersion) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return updateCompany1RequestCreation(companyIdentifier, upsertCompanyStatusRequestAffiliate, winkVersion).toEntity(localVarReturnType);
}
/**
* Toggle Affiliate Status
* Update company status
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param companyIdentifier Update status of company with given identifier
* @param upsertCompanyStatusRequestAffiliate The upsertCompanyStatusRequestAffiliate parameter
* @param winkVersion The winkVersion parameter
* @return ResponseSpec
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public ResponseSpec updateCompany1WithResponseSpec(String companyIdentifier, UpsertCompanyStatusRequestAffiliate upsertCompanyStatusRequestAffiliate, String winkVersion) throws WebClientResponseException {
return updateCompany1RequestCreation(companyIdentifier, upsertCompanyStatusRequestAffiliate, winkVersion);
}
/**
* Update Affiliate Address
* Updates company address.
*
500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param companyIdentifier Update address of company with given identifier
* @param upsertAddressRequestAffiliate The upsertAddressRequestAffiliate parameter
* @param winkVersion The winkVersion parameter
* @return CompanyViewAffiliate
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
private ResponseSpec updateCompanyAddressRequestCreation(String companyIdentifier, UpsertAddressRequestAffiliate upsertAddressRequestAffiliate, String winkVersion) throws WebClientResponseException {
Object postBody = upsertAddressRequestAffiliate;
// verify the required parameter 'companyIdentifier' is set
if (companyIdentifier == null) {
throw new WebClientResponseException("Missing the required parameter 'companyIdentifier' when calling updateCompanyAddress", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null);
}
// verify the required parameter 'upsertAddressRequestAffiliate' is set
if (upsertAddressRequestAffiliate == null) {
throw new WebClientResponseException("Missing the required parameter 'upsertAddressRequestAffiliate' when calling updateCompanyAddress", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null);
}
// create path and map variables
final Map pathParams = new HashMap();
pathParams.put("companyIdentifier", companyIdentifier);
final MultiValueMap queryParams = new LinkedMultiValueMap();
final HttpHeaders headerParams = new HttpHeaders();
final MultiValueMap cookieParams = new LinkedMultiValueMap();
final MultiValueMap formParams = new LinkedMultiValueMap();
if (winkVersion != null)
headerParams.add("Wink-Version", apiClient.parameterToString(winkVersion));
final String[] localVarAccepts = {
"application/json", "application/xml", "text/xml", "text/plain", "*/*"
};
final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
"application/json"
};
final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "oauth2ClientCredentials" };
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return apiClient.invokeAPI("/api/affiliate/{companyIdentifier}/address", HttpMethod.PATCH, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* Update Affiliate Address
* Updates company address.
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param companyIdentifier Update address of company with given identifier
* @param upsertAddressRequestAffiliate The upsertAddressRequestAffiliate parameter
* @param winkVersion The winkVersion parameter
* @return CompanyViewAffiliate
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Mono updateCompanyAddress(String companyIdentifier, UpsertAddressRequestAffiliate upsertAddressRequestAffiliate, String winkVersion) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return updateCompanyAddressRequestCreation(companyIdentifier, upsertAddressRequestAffiliate, winkVersion).bodyToMono(localVarReturnType);
}
/**
* Update Affiliate Address
* Updates company address.
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param companyIdentifier Update address of company with given identifier
* @param upsertAddressRequestAffiliate The upsertAddressRequestAffiliate parameter
* @param winkVersion The winkVersion parameter
* @return ResponseEntity<CompanyViewAffiliate>
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Mono> updateCompanyAddressWithHttpInfo(String companyIdentifier, UpsertAddressRequestAffiliate upsertAddressRequestAffiliate, String winkVersion) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return updateCompanyAddressRequestCreation(companyIdentifier, upsertAddressRequestAffiliate, winkVersion).toEntity(localVarReturnType);
}
/**
* Update Affiliate Address
* Updates company address.
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param companyIdentifier Update address of company with given identifier
* @param upsertAddressRequestAffiliate The upsertAddressRequestAffiliate parameter
* @param winkVersion The winkVersion parameter
* @return ResponseSpec
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public ResponseSpec updateCompanyAddressWithResponseSpec(String companyIdentifier, UpsertAddressRequestAffiliate upsertAddressRequestAffiliate, String winkVersion) throws WebClientResponseException {
return updateCompanyAddressRequestCreation(companyIdentifier, upsertAddressRequestAffiliate, winkVersion);
}
/**
* Update Affiliate Logo
* Updates company logo.
*
500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param companyIdentifier Update logo of company with given identifier
* @param upsertCompanyLogoRequestAffiliate The upsertCompanyLogoRequestAffiliate parameter
* @param winkVersion The winkVersion parameter
* @return CompanyViewAffiliate
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
private ResponseSpec updateCompanyPhotoRequestCreation(String companyIdentifier, UpsertCompanyLogoRequestAffiliate upsertCompanyLogoRequestAffiliate, String winkVersion) throws WebClientResponseException {
Object postBody = upsertCompanyLogoRequestAffiliate;
// verify the required parameter 'companyIdentifier' is set
if (companyIdentifier == null) {
throw new WebClientResponseException("Missing the required parameter 'companyIdentifier' when calling updateCompanyPhoto", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null);
}
// verify the required parameter 'upsertCompanyLogoRequestAffiliate' is set
if (upsertCompanyLogoRequestAffiliate == null) {
throw new WebClientResponseException("Missing the required parameter 'upsertCompanyLogoRequestAffiliate' when calling updateCompanyPhoto", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null);
}
// create path and map variables
final Map pathParams = new HashMap();
pathParams.put("companyIdentifier", companyIdentifier);
final MultiValueMap queryParams = new LinkedMultiValueMap();
final HttpHeaders headerParams = new HttpHeaders();
final MultiValueMap cookieParams = new LinkedMultiValueMap();
final MultiValueMap formParams = new LinkedMultiValueMap();
if (winkVersion != null)
headerParams.add("Wink-Version", apiClient.parameterToString(winkVersion));
final String[] localVarAccepts = {
"application/json", "application/xml", "text/xml", "text/plain", "*/*"
};
final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
"application/json"
};
final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "oauth2ClientCredentials" };
ParameterizedTypeReference