travel.wink.sdk.affiliate.inventory.api.ItemsApi Maven / Gradle / Ivy
package travel.wink.sdk.affiliate.inventory.api;
import travel.wink.sdk.affiliate.inventory.invoker.ApiClient;
import travel.wink.sdk.affiliate.inventory.model.BooleanResponseAffiliate;
import travel.wink.sdk.affiliate.inventory.model.CreateSellerInventoryItemSyndicationEntryRequestAffiliate;
import travel.wink.sdk.affiliate.inventory.model.GenericErrorMessage;
import travel.wink.sdk.affiliate.inventory.model.RemoveEntryResponseAffiliate;
import travel.wink.sdk.affiliate.inventory.model.SellerInventoryItemViewAffiliate;
import travel.wink.sdk.affiliate.inventory.model.ShowSupplierUrl400Response;
import travel.wink.sdk.affiliate.inventory.model.SimpleMultimediaAffiliate;
import travel.wink.sdk.affiliate.inventory.model.UpsertSellerInventoryItemRequestAffiliate;
import travel.wink.sdk.affiliate.inventory.model.UpsertSupplierSellerInventoryItemRequestAffiliate;
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:56:03.487909257+07:00[Asia/Bangkok]")
public class ItemsApi {
private ApiClient apiClient;
public ItemsApi() {
this(new ApiClient());
}
@Autowired
public ItemsApi(ApiClient apiClient) {
this.apiClient = apiClient;
}
public ApiClient getApiClient() {
return apiClient;
}
public void setApiClient(ApiClient apiClient) {
this.apiClient = apiClient;
}
/**
* Create Item
* Create a new inventory card
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
201 - Created
* @param companyIdentifier Company identifier to create item for
* @param upsertSellerInventoryItemRequestAffiliate The upsertSellerInventoryItemRequestAffiliate parameter
* @param winkVersion The winkVersion parameter
* @return SellerInventoryItemViewAffiliate
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
private ResponseSpec createSellerInventoryItemRequestCreation(String companyIdentifier, UpsertSellerInventoryItemRequestAffiliate upsertSellerInventoryItemRequestAffiliate, String winkVersion) throws WebClientResponseException {
Object postBody = upsertSellerInventoryItemRequestAffiliate;
// verify the required parameter 'companyIdentifier' is set
if (companyIdentifier == null) {
throw new WebClientResponseException("Missing the required parameter 'companyIdentifier' when calling createSellerInventoryItem", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null);
}
// verify the required parameter 'upsertSellerInventoryItemRequestAffiliate' is set
if (upsertSellerInventoryItemRequestAffiliate == null) {
throw new WebClientResponseException("Missing the required parameter 'upsertSellerInventoryItemRequestAffiliate' when calling createSellerInventoryItem", 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}/items", HttpMethod.POST, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* Create Item
* Create a new inventory card
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
201 - Created
* @param companyIdentifier Company identifier to create item for
* @param upsertSellerInventoryItemRequestAffiliate The upsertSellerInventoryItemRequestAffiliate parameter
* @param winkVersion The winkVersion parameter
* @return SellerInventoryItemViewAffiliate
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Mono createSellerInventoryItem(String companyIdentifier, UpsertSellerInventoryItemRequestAffiliate upsertSellerInventoryItemRequestAffiliate, String winkVersion) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return createSellerInventoryItemRequestCreation(companyIdentifier, upsertSellerInventoryItemRequestAffiliate, winkVersion).bodyToMono(localVarReturnType);
}
/**
* Create Item
* Create a new inventory card
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
201 - Created
* @param companyIdentifier Company identifier to create item for
* @param upsertSellerInventoryItemRequestAffiliate The upsertSellerInventoryItemRequestAffiliate parameter
* @param winkVersion The winkVersion parameter
* @return ResponseEntity<SellerInventoryItemViewAffiliate>
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Mono> createSellerInventoryItemWithHttpInfo(String companyIdentifier, UpsertSellerInventoryItemRequestAffiliate upsertSellerInventoryItemRequestAffiliate, String winkVersion) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return createSellerInventoryItemRequestCreation(companyIdentifier, upsertSellerInventoryItemRequestAffiliate, winkVersion).toEntity(localVarReturnType);
}
/**
* Create Item
* Create a new inventory card
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
201 - Created
* @param companyIdentifier Company identifier to create item for
* @param upsertSellerInventoryItemRequestAffiliate The upsertSellerInventoryItemRequestAffiliate parameter
* @param winkVersion The winkVersion parameter
* @return ResponseSpec
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public ResponseSpec createSellerInventoryItemWithResponseSpec(String companyIdentifier, UpsertSellerInventoryItemRequestAffiliate upsertSellerInventoryItemRequestAffiliate, String winkVersion) throws WebClientResponseException {
return createSellerInventoryItemRequestCreation(companyIdentifier, upsertSellerInventoryItemRequestAffiliate, winkVersion);
}
/**
* Add to WinkLinks
* Creates a new WinkLinks entry from the specified item ID.
*
500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
201 - Created
* @param companyIdentifier Company identifier to create item for
* @param createSellerInventoryItemSyndicationEntryRequestAffiliate The createSellerInventoryItemSyndicationEntryRequestAffiliate parameter
* @param winkVersion The winkVersion parameter
* @return BooleanResponseAffiliate
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
private ResponseSpec createSellerInventoryItemSyndicationEntryRequestCreation(String companyIdentifier, CreateSellerInventoryItemSyndicationEntryRequestAffiliate createSellerInventoryItemSyndicationEntryRequestAffiliate, String winkVersion) throws WebClientResponseException {
Object postBody = createSellerInventoryItemSyndicationEntryRequestAffiliate;
// verify the required parameter 'companyIdentifier' is set
if (companyIdentifier == null) {
throw new WebClientResponseException("Missing the required parameter 'companyIdentifier' when calling createSellerInventoryItemSyndicationEntry", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null);
}
// verify the required parameter 'createSellerInventoryItemSyndicationEntryRequestAffiliate' is set
if (createSellerInventoryItemSyndicationEntryRequestAffiliate == null) {
throw new WebClientResponseException("Missing the required parameter 'createSellerInventoryItemSyndicationEntryRequestAffiliate' when calling createSellerInventoryItemSyndicationEntry", 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}/items/syndication/entry", HttpMethod.POST, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* Add to WinkLinks
* Creates a new WinkLinks entry from the specified item ID.
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
201 - Created
* @param companyIdentifier Company identifier to create item for
* @param createSellerInventoryItemSyndicationEntryRequestAffiliate The createSellerInventoryItemSyndicationEntryRequestAffiliate parameter
* @param winkVersion The winkVersion parameter
* @return BooleanResponseAffiliate
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Mono createSellerInventoryItemSyndicationEntry(String companyIdentifier, CreateSellerInventoryItemSyndicationEntryRequestAffiliate createSellerInventoryItemSyndicationEntryRequestAffiliate, String winkVersion) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return createSellerInventoryItemSyndicationEntryRequestCreation(companyIdentifier, createSellerInventoryItemSyndicationEntryRequestAffiliate, winkVersion).bodyToMono(localVarReturnType);
}
/**
* Add to WinkLinks
* Creates a new WinkLinks entry from the specified item ID.
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
201 - Created
* @param companyIdentifier Company identifier to create item for
* @param createSellerInventoryItemSyndicationEntryRequestAffiliate The createSellerInventoryItemSyndicationEntryRequestAffiliate parameter
* @param winkVersion The winkVersion parameter
* @return ResponseEntity<BooleanResponseAffiliate>
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Mono> createSellerInventoryItemSyndicationEntryWithHttpInfo(String companyIdentifier, CreateSellerInventoryItemSyndicationEntryRequestAffiliate createSellerInventoryItemSyndicationEntryRequestAffiliate, String winkVersion) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return createSellerInventoryItemSyndicationEntryRequestCreation(companyIdentifier, createSellerInventoryItemSyndicationEntryRequestAffiliate, winkVersion).toEntity(localVarReturnType);
}
/**
* Add to WinkLinks
* Creates a new WinkLinks entry from the specified item ID.
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
201 - Created
* @param companyIdentifier Company identifier to create item for
* @param createSellerInventoryItemSyndicationEntryRequestAffiliate The createSellerInventoryItemSyndicationEntryRequestAffiliate parameter
* @param winkVersion The winkVersion parameter
* @return ResponseSpec
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public ResponseSpec createSellerInventoryItemSyndicationEntryWithResponseSpec(String companyIdentifier, CreateSellerInventoryItemSyndicationEntryRequestAffiliate createSellerInventoryItemSyndicationEntryRequestAffiliate, String winkVersion) throws WebClientResponseException {
return createSellerInventoryItemSyndicationEntryRequestCreation(companyIdentifier, createSellerInventoryItemSyndicationEntryRequestAffiliate, winkVersion);
}
/**
* Create Supplier Item
* Creates a new inventory card for a supplier showing the best priced room.
*
500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
201 - Created
* @param companyIdentifier Company identifier to create item for
* @param upsertSupplierSellerInventoryItemRequestAffiliate The upsertSupplierSellerInventoryItemRequestAffiliate parameter
* @param winkVersion The winkVersion parameter
* @return SellerInventoryItemViewAffiliate
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
private ResponseSpec createSupplierSellerInventoryItemRequestCreation(String companyIdentifier, UpsertSupplierSellerInventoryItemRequestAffiliate upsertSupplierSellerInventoryItemRequestAffiliate, String winkVersion) throws WebClientResponseException {
Object postBody = upsertSupplierSellerInventoryItemRequestAffiliate;
// verify the required parameter 'companyIdentifier' is set
if (companyIdentifier == null) {
throw new WebClientResponseException("Missing the required parameter 'companyIdentifier' when calling createSupplierSellerInventoryItem", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null);
}
// verify the required parameter 'upsertSupplierSellerInventoryItemRequestAffiliate' is set
if (upsertSupplierSellerInventoryItemRequestAffiliate == null) {
throw new WebClientResponseException("Missing the required parameter 'upsertSupplierSellerInventoryItemRequestAffiliate' when calling createSupplierSellerInventoryItem", 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}/items/supplier", HttpMethod.POST, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* Create Supplier Item
* Creates a new inventory card for a supplier showing the best priced room.
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
201 - Created
* @param companyIdentifier Company identifier to create item for
* @param upsertSupplierSellerInventoryItemRequestAffiliate The upsertSupplierSellerInventoryItemRequestAffiliate parameter
* @param winkVersion The winkVersion parameter
* @return SellerInventoryItemViewAffiliate
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Mono createSupplierSellerInventoryItem(String companyIdentifier, UpsertSupplierSellerInventoryItemRequestAffiliate upsertSupplierSellerInventoryItemRequestAffiliate, String winkVersion) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return createSupplierSellerInventoryItemRequestCreation(companyIdentifier, upsertSupplierSellerInventoryItemRequestAffiliate, winkVersion).bodyToMono(localVarReturnType);
}
/**
* Create Supplier Item
* Creates a new inventory card for a supplier showing the best priced room.
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
201 - Created
* @param companyIdentifier Company identifier to create item for
* @param upsertSupplierSellerInventoryItemRequestAffiliate The upsertSupplierSellerInventoryItemRequestAffiliate parameter
* @param winkVersion The winkVersion parameter
* @return ResponseEntity<SellerInventoryItemViewAffiliate>
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Mono> createSupplierSellerInventoryItemWithHttpInfo(String companyIdentifier, UpsertSupplierSellerInventoryItemRequestAffiliate upsertSupplierSellerInventoryItemRequestAffiliate, String winkVersion) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return createSupplierSellerInventoryItemRequestCreation(companyIdentifier, upsertSupplierSellerInventoryItemRequestAffiliate, winkVersion).toEntity(localVarReturnType);
}
/**
* Create Supplier Item
* Creates a new inventory card for a supplier showing the best priced room.
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
201 - Created
* @param companyIdentifier Company identifier to create item for
* @param upsertSupplierSellerInventoryItemRequestAffiliate The upsertSupplierSellerInventoryItemRequestAffiliate parameter
* @param winkVersion The winkVersion parameter
* @return ResponseSpec
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public ResponseSpec createSupplierSellerInventoryItemWithResponseSpec(String companyIdentifier, UpsertSupplierSellerInventoryItemRequestAffiliate upsertSupplierSellerInventoryItemRequestAffiliate, String winkVersion) throws WebClientResponseException {
return createSupplierSellerInventoryItemRequestCreation(companyIdentifier, upsertSupplierSellerInventoryItemRequestAffiliate, winkVersion);
}
/**
* Delete Item
* Remove a unique inventory item
*
500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param companyIdentifier Company identifier to delete item from
* @param inventoryIdentifier Delete inventory with this identifier.
* @param winkVersion The winkVersion parameter
* @param accept The accept parameter
* @return RemoveEntryResponseAffiliate
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
private ResponseSpec removeSellerInventoryItemRequestCreation(String companyIdentifier, String inventoryIdentifier, 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 removeSellerInventoryItem", 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 removeSellerInventoryItem", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null);
}
// create path and map variables
final Map pathParams = new HashMap();
pathParams.put("companyIdentifier", companyIdentifier);
pathParams.put("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));
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}/items/{inventoryIdentifier}", HttpMethod.DELETE, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* Delete Item
* Remove a unique inventory item
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param companyIdentifier Company identifier to delete item from
* @param inventoryIdentifier Delete inventory with this identifier.
* @param winkVersion The winkVersion parameter
* @param accept The accept parameter
* @return RemoveEntryResponseAffiliate
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Mono removeSellerInventoryItem(String companyIdentifier, String inventoryIdentifier, String winkVersion, String accept) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return removeSellerInventoryItemRequestCreation(companyIdentifier, inventoryIdentifier, winkVersion, accept).bodyToMono(localVarReturnType);
}
/**
* Delete Item
* Remove a unique inventory item
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param companyIdentifier Company identifier to delete item from
* @param inventoryIdentifier Delete inventory with this identifier.
* @param winkVersion The winkVersion parameter
* @param accept The accept parameter
* @return ResponseEntity<RemoveEntryResponseAffiliate>
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Mono> removeSellerInventoryItemWithHttpInfo(String companyIdentifier, String inventoryIdentifier, String winkVersion, String accept) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return removeSellerInventoryItemRequestCreation(companyIdentifier, inventoryIdentifier, winkVersion, accept).toEntity(localVarReturnType);
}
/**
* Delete Item
* Remove a unique inventory item
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param companyIdentifier Company identifier to delete item from
* @param inventoryIdentifier Delete inventory 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 removeSellerInventoryItemWithResponseSpec(String companyIdentifier, String inventoryIdentifier, String winkVersion, String accept) throws WebClientResponseException {
return removeSellerInventoryItemRequestCreation(companyIdentifier, inventoryIdentifier, winkVersion, accept);
}
/**
* Show Item Media
* Retrieve list of all media associated with this channel inventory identifier.
*
500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param companyIdentifier Company identifier to retrieve items for
* @param channelInventoryIdentifier Retrieve media for this channel inventory identifier.
* @param winkVersion The winkVersion parameter
* @param accept The accept parameter
* @return List<SimpleMultimediaAffiliate>
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
private ResponseSpec showInventoryMedia1RequestCreation(String companyIdentifier, String channelInventoryIdentifier, 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 showInventoryMedia1", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null);
}
// verify the required parameter 'channelInventoryIdentifier' is set
if (channelInventoryIdentifier == null) {
throw new WebClientResponseException("Missing the required parameter 'channelInventoryIdentifier' when calling showInventoryMedia1", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null);
}
// create path and map variables
final Map pathParams = new HashMap();
pathParams.put("companyIdentifier", companyIdentifier);
pathParams.put("channelInventoryIdentifier", channelInventoryIdentifier);
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}/items/inventory/{channelInventoryIdentifier}/media/list", HttpMethod.GET, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* Show Item Media
* Retrieve list of all media associated with this channel inventory identifier.
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param companyIdentifier Company identifier to retrieve items for
* @param channelInventoryIdentifier Retrieve media for this channel inventory identifier.
* @param winkVersion The winkVersion parameter
* @param accept The accept parameter
* @return List<SimpleMultimediaAffiliate>
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Flux showInventoryMedia1(String companyIdentifier, String channelInventoryIdentifier, String winkVersion, String accept) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return showInventoryMedia1RequestCreation(companyIdentifier, channelInventoryIdentifier, winkVersion, accept).bodyToFlux(localVarReturnType);
}
/**
* Show Item Media
* Retrieve list of all media associated with this channel inventory identifier.
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param companyIdentifier Company identifier to retrieve items for
* @param channelInventoryIdentifier Retrieve media for this channel inventory identifier.
* @param winkVersion The winkVersion parameter
* @param accept The accept parameter
* @return ResponseEntity<List<SimpleMultimediaAffiliate>>
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Mono>> showInventoryMedia1WithHttpInfo(String companyIdentifier, String channelInventoryIdentifier, String winkVersion, String accept) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return showInventoryMedia1RequestCreation(companyIdentifier, channelInventoryIdentifier, winkVersion, accept).toEntityList(localVarReturnType);
}
/**
* Show Item Media
* Retrieve list of all media associated with this channel inventory identifier.
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param companyIdentifier Company identifier to retrieve items for
* @param channelInventoryIdentifier Retrieve media for this channel inventory 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 showInventoryMedia1WithResponseSpec(String companyIdentifier, String channelInventoryIdentifier, String winkVersion, String accept) throws WebClientResponseException {
return showInventoryMedia1RequestCreation(companyIdentifier, channelInventoryIdentifier, winkVersion, accept);
}
/**
* Show Item
* Retrieve a single inventory card.
*
500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param companyIdentifier Company identifier to retrieve item for
* @param inventoryIdentifier Retrieve inventory with this identifier.
* @param winkVersion The winkVersion parameter
* @param accept The accept parameter
* @return SellerInventoryItemViewAffiliate
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
private ResponseSpec showSellerInventoryItemRequestCreation(String companyIdentifier, String inventoryIdentifier, 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 showSellerInventoryItem", 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 showSellerInventoryItem", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null);
}
// create path and map variables
final Map pathParams = new HashMap();
pathParams.put("companyIdentifier", companyIdentifier);
pathParams.put("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));
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}/items/{inventoryIdentifier}", HttpMethod.GET, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* Show Item
* Retrieve a single inventory card.
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param companyIdentifier Company identifier to retrieve item for
* @param inventoryIdentifier Retrieve inventory with this identifier.
* @param winkVersion The winkVersion parameter
* @param accept The accept parameter
* @return SellerInventoryItemViewAffiliate
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Mono showSellerInventoryItem(String companyIdentifier, String inventoryIdentifier, String winkVersion, String accept) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return showSellerInventoryItemRequestCreation(companyIdentifier, inventoryIdentifier, winkVersion, accept).bodyToMono(localVarReturnType);
}
/**
* Show Item
* Retrieve a single inventory card.
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param companyIdentifier Company identifier to retrieve item for
* @param inventoryIdentifier Retrieve inventory with this identifier.
* @param winkVersion The winkVersion parameter
* @param accept The accept parameter
* @return ResponseEntity<SellerInventoryItemViewAffiliate>
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Mono> showSellerInventoryItemWithHttpInfo(String companyIdentifier, String inventoryIdentifier, String winkVersion, String accept) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return showSellerInventoryItemRequestCreation(companyIdentifier, inventoryIdentifier, winkVersion, accept).toEntity(localVarReturnType);
}
/**
* Show Item
* Retrieve a single inventory card.
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param companyIdentifier Company identifier to retrieve item for
* @param inventoryIdentifier Retrieve inventory 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 showSellerInventoryItemWithResponseSpec(String companyIdentifier, String inventoryIdentifier, String winkVersion, String accept) throws WebClientResponseException {
return showSellerInventoryItemRequestCreation(companyIdentifier, inventoryIdentifier, winkVersion, accept);
}
/**
* Show Items
* Retrieve a list of all saved inventories for company.
*
500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param companyIdentifier Company identifier to retrieve items for
* @param winkVersion The winkVersion parameter
* @param accept The accept parameter
* @return List<SellerInventoryItemViewAffiliate>
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
private ResponseSpec showSellerInventoryItemsForCompanyRequestCreation(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 showSellerInventoryItemsForCompany", 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}/items/list", HttpMethod.GET, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* Show Items
* Retrieve a list of all saved inventories for company.
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param companyIdentifier Company identifier to retrieve items for
* @param winkVersion The winkVersion parameter
* @param accept The accept parameter
* @return List<SellerInventoryItemViewAffiliate>
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Flux showSellerInventoryItemsForCompany(String companyIdentifier, String winkVersion, String accept) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return showSellerInventoryItemsForCompanyRequestCreation(companyIdentifier, winkVersion, accept).bodyToFlux(localVarReturnType);
}
/**
* Show Items
* Retrieve a list of all saved inventories for company.
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param companyIdentifier Company identifier to retrieve items for
* @param winkVersion The winkVersion parameter
* @param accept The accept parameter
* @return ResponseEntity<List<SellerInventoryItemViewAffiliate>>
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Mono>> showSellerInventoryItemsForCompanyWithHttpInfo(String companyIdentifier, String winkVersion, String accept) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return showSellerInventoryItemsForCompanyRequestCreation(companyIdentifier, winkVersion, accept).toEntityList(localVarReturnType);
}
/**
* Show Items
* Retrieve a list of all saved inventories for company.
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param companyIdentifier Company identifier to retrieve items for
* @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 showSellerInventoryItemsForCompanyWithResponseSpec(String companyIdentifier, String winkVersion, String accept) throws WebClientResponseException {
return showSellerInventoryItemsForCompanyRequestCreation(companyIdentifier, winkVersion, accept);
}
/**
* Update Item
* Update an existing card
*
500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param companyIdentifier Company identifier to update item for
* @param inventoryIdentifier Update inventory with this identifier.
* @param upsertSellerInventoryItemRequestAffiliate The upsertSellerInventoryItemRequestAffiliate parameter
* @param winkVersion The winkVersion parameter
* @return SellerInventoryItemViewAffiliate
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
private ResponseSpec updateSellerInventoryItemRequestCreation(String companyIdentifier, String inventoryIdentifier, UpsertSellerInventoryItemRequestAffiliate upsertSellerInventoryItemRequestAffiliate, String winkVersion) throws WebClientResponseException {
Object postBody = upsertSellerInventoryItemRequestAffiliate;
// verify the required parameter 'companyIdentifier' is set
if (companyIdentifier == null) {
throw new WebClientResponseException("Missing the required parameter 'companyIdentifier' when calling updateSellerInventoryItem", 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 updateSellerInventoryItem", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null);
}
// verify the required parameter 'upsertSellerInventoryItemRequestAffiliate' is set
if (upsertSellerInventoryItemRequestAffiliate == null) {
throw new WebClientResponseException("Missing the required parameter 'upsertSellerInventoryItemRequestAffiliate' when calling updateSellerInventoryItem", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null);
}
// create path and map variables
final Map pathParams = new HashMap();
pathParams.put("companyIdentifier", companyIdentifier);
pathParams.put("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/affiliate/{companyIdentifier}/items/{inventoryIdentifier}", HttpMethod.PUT, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* Update Item
* Update an existing card
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param companyIdentifier Company identifier to update item for
* @param inventoryIdentifier Update inventory with this identifier.
* @param upsertSellerInventoryItemRequestAffiliate The upsertSellerInventoryItemRequestAffiliate parameter
* @param winkVersion The winkVersion parameter
* @return SellerInventoryItemViewAffiliate
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Mono updateSellerInventoryItem(String companyIdentifier, String inventoryIdentifier, UpsertSellerInventoryItemRequestAffiliate upsertSellerInventoryItemRequestAffiliate, String winkVersion) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return updateSellerInventoryItemRequestCreation(companyIdentifier, inventoryIdentifier, upsertSellerInventoryItemRequestAffiliate, winkVersion).bodyToMono(localVarReturnType);
}
/**
* Update Item
* Update an existing card
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param companyIdentifier Company identifier to update item for
* @param inventoryIdentifier Update inventory with this identifier.
* @param upsertSellerInventoryItemRequestAffiliate The upsertSellerInventoryItemRequestAffiliate parameter
* @param winkVersion The winkVersion parameter
* @return ResponseEntity<SellerInventoryItemViewAffiliate>
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Mono> updateSellerInventoryItemWithHttpInfo(String companyIdentifier, String inventoryIdentifier, UpsertSellerInventoryItemRequestAffiliate upsertSellerInventoryItemRequestAffiliate, String winkVersion) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return updateSellerInventoryItemRequestCreation(companyIdentifier, inventoryIdentifier, upsertSellerInventoryItemRequestAffiliate, winkVersion).toEntity(localVarReturnType);
}
/**
* Update Item
* Update an existing card
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param companyIdentifier Company identifier to update item for
* @param inventoryIdentifier Update inventory with this identifier.
* @param upsertSellerInventoryItemRequestAffiliate The upsertSellerInventoryItemRequestAffiliate parameter
* @param winkVersion The winkVersion parameter
* @return ResponseSpec
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public ResponseSpec updateSellerInventoryItemWithResponseSpec(String companyIdentifier, String inventoryIdentifier, UpsertSellerInventoryItemRequestAffiliate upsertSellerInventoryItemRequestAffiliate, String winkVersion) throws WebClientResponseException {
return updateSellerInventoryItemRequestCreation(companyIdentifier, inventoryIdentifier, upsertSellerInventoryItemRequestAffiliate, winkVersion);
}
}