travel.wink.sdk.affiliate.api.InventoryCardsApi 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.GenericErrorMessage;
import travel.wink.sdk.affiliate.model.RemoveEntryResponseAffiliate;
import travel.wink.sdk.affiliate.model.SellerInventoryItemViewAffiliate;
import travel.wink.sdk.affiliate.model.ShowSellerUrl400Response;
import travel.wink.sdk.affiliate.model.SimpleMultimediaAffiliate;
import travel.wink.sdk.affiliate.model.UpsertSellerInventoryItemAffiliate;
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;
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-03-06T16:56:30.815925180+07:00[Asia/Bangkok]")
public class InventoryCardsApi {
private ApiClient apiClient;
public InventoryCardsApi() {
this(new ApiClient());
}
@Autowired
public InventoryCardsApi(ApiClient apiClient) {
this.apiClient = apiClient;
}
public ApiClient getApiClient() {
return apiClient;
}
public void setApiClient(ApiClient apiClient) {
this.apiClient = apiClient;
}
/**
* Create Card
* Create a new inventory card
* 503 - Service Unavailable
*
400 - Bad Request
*
405 - Method Not Allowed
*
415 - Unsupported Media Type
*
500 - Internal Server Error
*
404 - Not Found
*
403 - Forbidden
*
401 - Unauthorized
*
201 - Created
* @param companyIdentifier Company identifier to create item for
* @param upsertSellerInventoryItemAffiliate The upsertSellerInventoryItemAffiliate 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, UpsertSellerInventoryItemAffiliate upsertSellerInventoryItemAffiliate, String winkVersion) throws WebClientResponseException {
Object postBody = upsertSellerInventoryItemAffiliate;
// 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 'upsertSellerInventoryItemAffiliate' is set
if (upsertSellerInventoryItemAffiliate == null) {
throw new WebClientResponseException("Missing the required parameter 'upsertSellerInventoryItemAffiliate' 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/company/{companyIdentifier}/inventory/item", HttpMethod.POST, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* Create Card
* Create a new inventory card
* 503 - Service Unavailable
*
400 - Bad Request
*
405 - Method Not Allowed
*
415 - Unsupported Media Type
*
500 - Internal Server Error
*
404 - Not Found
*
403 - Forbidden
*
401 - Unauthorized
*
201 - Created
* @param companyIdentifier Company identifier to create item for
* @param upsertSellerInventoryItemAffiliate The upsertSellerInventoryItemAffiliate 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, UpsertSellerInventoryItemAffiliate upsertSellerInventoryItemAffiliate, String winkVersion) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return createSellerInventoryItemRequestCreation(companyIdentifier, upsertSellerInventoryItemAffiliate, winkVersion).bodyToMono(localVarReturnType);
}
public Mono> createSellerInventoryItemWithHttpInfo(String companyIdentifier, UpsertSellerInventoryItemAffiliate upsertSellerInventoryItemAffiliate, String winkVersion) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return createSellerInventoryItemRequestCreation(companyIdentifier, upsertSellerInventoryItemAffiliate, winkVersion).toEntity(localVarReturnType);
}
/**
* Delete Card
* Remove a unique inventory item
* 503 - Service Unavailable
*
400 - Bad Request
*
405 - Method Not Allowed
*
415 - Unsupported Media Type
*
500 - Internal Server Error
*
404 - Not Found
*
403 - Forbidden
*
401 - Unauthorized
*
202 - Accepted
* @param companyIdentifier Company identifier to delete item from
* @param inventoryIdentifier Delete inventory with this identifier.
* @param winkVersion The winkVersion parameter
* @return RemoveEntryResponseAffiliate
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
private ResponseSpec removeSellerInventoryItemRequestCreation(String companyIdentifier, String inventoryIdentifier, String winkVersion) 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));
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/company/{companyIdentifier}/inventory/item/{inventoryIdentifier}", HttpMethod.DELETE, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* Delete Card
* Remove a unique inventory item
* 503 - Service Unavailable
*
400 - Bad Request
*
405 - Method Not Allowed
*
415 - Unsupported Media Type
*
500 - Internal Server Error
*
404 - Not Found
*
403 - Forbidden
*
401 - Unauthorized
*
202 - Accepted
* @param companyIdentifier Company identifier to delete item from
* @param inventoryIdentifier Delete inventory with this identifier.
* @param winkVersion The winkVersion parameter
* @return RemoveEntryResponseAffiliate
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Mono removeSellerInventoryItem(String companyIdentifier, String inventoryIdentifier, String winkVersion) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return removeSellerInventoryItemRequestCreation(companyIdentifier, inventoryIdentifier, winkVersion).bodyToMono(localVarReturnType);
}
public Mono> removeSellerInventoryItemWithHttpInfo(String companyIdentifier, String inventoryIdentifier, String winkVersion) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return removeSellerInventoryItemRequestCreation(companyIdentifier, inventoryIdentifier, winkVersion).toEntity(localVarReturnType);
}
/**
* Show Card Media
* Retrieve list of all media associated with this channel inventory identifier.
* 503 - Service Unavailable
*
400 - Bad Request
*
405 - Method Not Allowed
*
415 - Unsupported Media Type
*
500 - Internal Server Error
*
404 - Not Found
*
403 - Forbidden
*
401 - Unauthorized
*
200 - OK
* @param companyIdentifier Company identifier to retrieve items for
* @param channelInventoryIdentifier Retrieve media for this channel inventory identifier.
* @param winkVersion The winkVersion 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) 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));
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/company/{companyIdentifier}/inventory/item/inventory/{channelInventoryIdentifier}/media/list", HttpMethod.GET, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* Show Card Media
* Retrieve list of all media associated with this channel inventory identifier.
* 503 - Service Unavailable
*
400 - Bad Request
*
405 - Method Not Allowed
*
415 - Unsupported Media Type
*
500 - Internal Server Error
*
404 - Not Found
*
403 - Forbidden
*
401 - Unauthorized
*
200 - OK
* @param companyIdentifier Company identifier to retrieve items for
* @param channelInventoryIdentifier Retrieve media for this channel inventory identifier.
* @param winkVersion The winkVersion 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) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return showInventoryMedia1RequestCreation(companyIdentifier, channelInventoryIdentifier, winkVersion).bodyToFlux(localVarReturnType);
}
public Mono>> showInventoryMedia1WithHttpInfo(String companyIdentifier, String channelInventoryIdentifier, String winkVersion) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return showInventoryMedia1RequestCreation(companyIdentifier, channelInventoryIdentifier, winkVersion).toEntityList(localVarReturnType);
}
/**
* Show Card
* Retrieve a single inventory card.
* 503 - Service Unavailable
*
400 - Bad Request
*
405 - Method Not Allowed
*
415 - Unsupported Media Type
*
500 - Internal Server Error
*
404 - Not Found
*
403 - Forbidden
*
401 - Unauthorized
*
200 - OK
* @param companyIdentifier Company identifier to retrieve item for
* @param inventoryIdentifier Retrieve inventory with this identifier.
* @param winkVersion The winkVersion parameter
* @return SellerInventoryItemViewAffiliate
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
private ResponseSpec showSellerInventoryItemRequestCreation(String companyIdentifier, String inventoryIdentifier, String winkVersion) 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));
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/company/{companyIdentifier}/inventory/item/{inventoryIdentifier}", HttpMethod.GET, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* Show Card
* Retrieve a single inventory card.
* 503 - Service Unavailable
*
400 - Bad Request
*
405 - Method Not Allowed
*
415 - Unsupported Media Type
*
500 - Internal Server Error
*
404 - Not Found
*
403 - Forbidden
*
401 - Unauthorized
*
200 - OK
* @param companyIdentifier Company identifier to retrieve item for
* @param inventoryIdentifier Retrieve inventory with this identifier.
* @param winkVersion The winkVersion parameter
* @return SellerInventoryItemViewAffiliate
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Mono showSellerInventoryItem(String companyIdentifier, String inventoryIdentifier, String winkVersion) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return showSellerInventoryItemRequestCreation(companyIdentifier, inventoryIdentifier, winkVersion).bodyToMono(localVarReturnType);
}
public Mono> showSellerInventoryItemWithHttpInfo(String companyIdentifier, String inventoryIdentifier, String winkVersion) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return showSellerInventoryItemRequestCreation(companyIdentifier, inventoryIdentifier, winkVersion).toEntity(localVarReturnType);
}
/**
* Show Inventory Cards
* Retrieve a list of all inventory cards for company.
* 503 - Service Unavailable
*
400 - Bad Request
*
405 - Method Not Allowed
*
415 - Unsupported Media Type
*
500 - Internal Server Error
*
404 - Not Found
*
403 - Forbidden
*
401 - Unauthorized
*
200 - OK
* @param companyIdentifier Company identifier to retrieve items for
* @param winkVersion The winkVersion parameter
* @return List<SellerInventoryItemViewAffiliate>
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
private ResponseSpec showSellerInventoryItemsForCompanyRequestCreation(String companyIdentifier, String winkVersion) 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));
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/company/{companyIdentifier}/inventory/item/list", HttpMethod.GET, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* Show Inventory Cards
* Retrieve a list of all inventory cards for company.
* 503 - Service Unavailable
*
400 - Bad Request
*
405 - Method Not Allowed
*
415 - Unsupported Media Type
*
500 - Internal Server Error
*
404 - Not Found
*
403 - Forbidden
*
401 - Unauthorized
*
200 - OK
* @param companyIdentifier Company identifier to retrieve items for
* @param winkVersion The winkVersion parameter
* @return List<SellerInventoryItemViewAffiliate>
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Flux showSellerInventoryItemsForCompany(String companyIdentifier, String winkVersion) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return showSellerInventoryItemsForCompanyRequestCreation(companyIdentifier, winkVersion).bodyToFlux(localVarReturnType);
}
public Mono>> showSellerInventoryItemsForCompanyWithHttpInfo(String companyIdentifier, String winkVersion) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return showSellerInventoryItemsForCompanyRequestCreation(companyIdentifier, winkVersion).toEntityList(localVarReturnType);
}
/**
* Update Card
* Update an existing card
* 503 - Service Unavailable
*
400 - Bad Request
*
405 - Method Not Allowed
*
415 - Unsupported Media Type
*
500 - Internal Server Error
*
404 - Not Found
*
403 - Forbidden
*
401 - Unauthorized
*
200 - OK
* @param companyIdentifier Company identifier to update item for
* @param inventoryIdentifier Update inventory with this identifier.
* @param upsertSellerInventoryItemAffiliate The upsertSellerInventoryItemAffiliate 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, UpsertSellerInventoryItemAffiliate upsertSellerInventoryItemAffiliate, String winkVersion) throws WebClientResponseException {
Object postBody = upsertSellerInventoryItemAffiliate;
// 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 'upsertSellerInventoryItemAffiliate' is set
if (upsertSellerInventoryItemAffiliate == null) {
throw new WebClientResponseException("Missing the required parameter 'upsertSellerInventoryItemAffiliate' 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/company/{companyIdentifier}/inventory/item/{inventoryIdentifier}", HttpMethod.PUT, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* Update Card
* Update an existing card
* 503 - Service Unavailable
*
400 - Bad Request
*
405 - Method Not Allowed
*
415 - Unsupported Media Type
*
500 - Internal Server Error
*
404 - Not Found
*
403 - Forbidden
*
401 - Unauthorized
*
200 - OK
* @param companyIdentifier Company identifier to update item for
* @param inventoryIdentifier Update inventory with this identifier.
* @param upsertSellerInventoryItemAffiliate The upsertSellerInventoryItemAffiliate 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, UpsertSellerInventoryItemAffiliate upsertSellerInventoryItemAffiliate, String winkVersion) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return updateSellerInventoryItemRequestCreation(companyIdentifier, inventoryIdentifier, upsertSellerInventoryItemAffiliate, winkVersion).bodyToMono(localVarReturnType);
}
public Mono> updateSellerInventoryItemWithHttpInfo(String companyIdentifier, String inventoryIdentifier, UpsertSellerInventoryItemAffiliate upsertSellerInventoryItemAffiliate, String winkVersion) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return updateSellerInventoryItemRequestCreation(companyIdentifier, inventoryIdentifier, upsertSellerInventoryItemAffiliate, winkVersion).toEntity(localVarReturnType);
}
}