All Downloads are FREE. Search and download functionalities are using the official Maven repository.

travel.wink.sdk.affiliate.inventory.api.SupplierLinksApi 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.CreateSupplierUrlSyndicationEntryRequestAffiliate;
import travel.wink.sdk.affiliate.inventory.model.GenericErrorMessage;
import travel.wink.sdk.affiliate.inventory.model.RemoveEntryResponseAffiliate;
import travel.wink.sdk.affiliate.inventory.model.ShowSupplierUrl400Response;
import travel.wink.sdk.affiliate.inventory.model.SupplierUrlViewAffiliate;
import travel.wink.sdk.affiliate.inventory.model.UpsertSupplierUrlRequestAffiliate;

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 SupplierLinksApi {
    private ApiClient apiClient;

    public SupplierLinksApi() {
        this(new ApiClient());
    }

    @Autowired
    public SupplierLinksApi(ApiClient apiClient) {
        this.apiClient = apiClient;
    }

    public ApiClient getApiClient() {
        return apiClient;
    }

    public void setApiClient(ApiClient apiClient) {
        this.apiClient = apiClient;
    }

    /**
     * Create Link
     * Create a new shareable link
     * 

500 - Internal Server Error *

403 - Forbidden *

401 - Unauthorized *

400 - Bad Request *

201 - Created * @param companyIdentifier Create link owned by this owner identifier. * @param upsertSupplierUrlRequestAffiliate The upsertSupplierUrlRequestAffiliate parameter * @param winkVersion The winkVersion parameter * @return SupplierUrlViewAffiliate * @throws WebClientResponseException if an error occurs while attempting to invoke the API */ private ResponseSpec createSupplierUrlRequestCreation(String companyIdentifier, UpsertSupplierUrlRequestAffiliate upsertSupplierUrlRequestAffiliate, String winkVersion) throws WebClientResponseException { Object postBody = upsertSupplierUrlRequestAffiliate; // verify the required parameter 'companyIdentifier' is set if (companyIdentifier == null) { throw new WebClientResponseException("Missing the required parameter 'companyIdentifier' when calling createSupplierUrl", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null); } // verify the required parameter 'upsertSupplierUrlRequestAffiliate' is set if (upsertSupplierUrlRequestAffiliate == null) { throw new WebClientResponseException("Missing the required parameter 'upsertSupplierUrlRequestAffiliate' when calling createSupplierUrl", 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}/shareable-link/supplier", HttpMethod.POST, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } /** * Create Link * Create a new shareable link *

500 - Internal Server Error *

403 - Forbidden *

401 - Unauthorized *

400 - Bad Request *

201 - Created * @param companyIdentifier Create link owned by this owner identifier. * @param upsertSupplierUrlRequestAffiliate The upsertSupplierUrlRequestAffiliate parameter * @param winkVersion The winkVersion parameter * @return SupplierUrlViewAffiliate * @throws WebClientResponseException if an error occurs while attempting to invoke the API */ public Mono createSupplierUrl(String companyIdentifier, UpsertSupplierUrlRequestAffiliate upsertSupplierUrlRequestAffiliate, String winkVersion) throws WebClientResponseException { ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {}; return createSupplierUrlRequestCreation(companyIdentifier, upsertSupplierUrlRequestAffiliate, winkVersion).bodyToMono(localVarReturnType); } /** * Create Link * Create a new shareable link *

500 - Internal Server Error *

403 - Forbidden *

401 - Unauthorized *

400 - Bad Request *

201 - Created * @param companyIdentifier Create link owned by this owner identifier. * @param upsertSupplierUrlRequestAffiliate The upsertSupplierUrlRequestAffiliate parameter * @param winkVersion The winkVersion parameter * @return ResponseEntity<SupplierUrlViewAffiliate> * @throws WebClientResponseException if an error occurs while attempting to invoke the API */ public Mono> createSupplierUrlWithHttpInfo(String companyIdentifier, UpsertSupplierUrlRequestAffiliate upsertSupplierUrlRequestAffiliate, String winkVersion) throws WebClientResponseException { ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {}; return createSupplierUrlRequestCreation(companyIdentifier, upsertSupplierUrlRequestAffiliate, winkVersion).toEntity(localVarReturnType); } /** * Create Link * Create a new shareable link *

500 - Internal Server Error *

403 - Forbidden *

401 - Unauthorized *

400 - Bad Request *

201 - Created * @param companyIdentifier Create link owned by this owner identifier. * @param upsertSupplierUrlRequestAffiliate The upsertSupplierUrlRequestAffiliate parameter * @param winkVersion The winkVersion parameter * @return ResponseSpec * @throws WebClientResponseException if an error occurs while attempting to invoke the API */ public ResponseSpec createSupplierUrlWithResponseSpec(String companyIdentifier, UpsertSupplierUrlRequestAffiliate upsertSupplierUrlRequestAffiliate, String winkVersion) throws WebClientResponseException { return createSupplierUrlRequestCreation(companyIdentifier, upsertSupplierUrlRequestAffiliate, winkVersion); } /** * Add to WinkLinks * Creates a new WinkLinks entry from the specified link ID. *

500 - Internal Server Error *

403 - Forbidden *

401 - Unauthorized *

400 - Bad Request *

201 - Created * @param companyIdentifier Company identifier to create item for * @param createSupplierUrlSyndicationEntryRequestAffiliate The createSupplierUrlSyndicationEntryRequestAffiliate parameter * @param winkVersion The winkVersion parameter * @return BooleanResponseAffiliate * @throws WebClientResponseException if an error occurs while attempting to invoke the API */ private ResponseSpec createSupplierUrlSyndicationEntryRequestCreation(String companyIdentifier, CreateSupplierUrlSyndicationEntryRequestAffiliate createSupplierUrlSyndicationEntryRequestAffiliate, String winkVersion) throws WebClientResponseException { Object postBody = createSupplierUrlSyndicationEntryRequestAffiliate; // verify the required parameter 'companyIdentifier' is set if (companyIdentifier == null) { throw new WebClientResponseException("Missing the required parameter 'companyIdentifier' when calling createSupplierUrlSyndicationEntry", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null); } // verify the required parameter 'createSupplierUrlSyndicationEntryRequestAffiliate' is set if (createSupplierUrlSyndicationEntryRequestAffiliate == null) { throw new WebClientResponseException("Missing the required parameter 'createSupplierUrlSyndicationEntryRequestAffiliate' when calling createSupplierUrlSyndicationEntry", 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}/shareable-link/supplier/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 link ID. *

500 - Internal Server Error *

403 - Forbidden *

401 - Unauthorized *

400 - Bad Request *

201 - Created * @param companyIdentifier Company identifier to create item for * @param createSupplierUrlSyndicationEntryRequestAffiliate The createSupplierUrlSyndicationEntryRequestAffiliate parameter * @param winkVersion The winkVersion parameter * @return BooleanResponseAffiliate * @throws WebClientResponseException if an error occurs while attempting to invoke the API */ public Mono createSupplierUrlSyndicationEntry(String companyIdentifier, CreateSupplierUrlSyndicationEntryRequestAffiliate createSupplierUrlSyndicationEntryRequestAffiliate, String winkVersion) throws WebClientResponseException { ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {}; return createSupplierUrlSyndicationEntryRequestCreation(companyIdentifier, createSupplierUrlSyndicationEntryRequestAffiliate, winkVersion).bodyToMono(localVarReturnType); } /** * Add to WinkLinks * Creates a new WinkLinks entry from the specified link ID. *

500 - Internal Server Error *

403 - Forbidden *

401 - Unauthorized *

400 - Bad Request *

201 - Created * @param companyIdentifier Company identifier to create item for * @param createSupplierUrlSyndicationEntryRequestAffiliate The createSupplierUrlSyndicationEntryRequestAffiliate parameter * @param winkVersion The winkVersion parameter * @return ResponseEntity<BooleanResponseAffiliate> * @throws WebClientResponseException if an error occurs while attempting to invoke the API */ public Mono> createSupplierUrlSyndicationEntryWithHttpInfo(String companyIdentifier, CreateSupplierUrlSyndicationEntryRequestAffiliate createSupplierUrlSyndicationEntryRequestAffiliate, String winkVersion) throws WebClientResponseException { ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {}; return createSupplierUrlSyndicationEntryRequestCreation(companyIdentifier, createSupplierUrlSyndicationEntryRequestAffiliate, winkVersion).toEntity(localVarReturnType); } /** * Add to WinkLinks * Creates a new WinkLinks entry from the specified link ID. *

500 - Internal Server Error *

403 - Forbidden *

401 - Unauthorized *

400 - Bad Request *

201 - Created * @param companyIdentifier Company identifier to create item for * @param createSupplierUrlSyndicationEntryRequestAffiliate The createSupplierUrlSyndicationEntryRequestAffiliate parameter * @param winkVersion The winkVersion parameter * @return ResponseSpec * @throws WebClientResponseException if an error occurs while attempting to invoke the API */ public ResponseSpec createSupplierUrlSyndicationEntryWithResponseSpec(String companyIdentifier, CreateSupplierUrlSyndicationEntryRequestAffiliate createSupplierUrlSyndicationEntryRequestAffiliate, String winkVersion) throws WebClientResponseException { return createSupplierUrlSyndicationEntryRequestCreation(companyIdentifier, createSupplierUrlSyndicationEntryRequestAffiliate, winkVersion); } /** * Delete Link * Delete a shareable link *

500 - Internal Server Error *

403 - Forbidden *

401 - Unauthorized *

400 - Bad Request *

200 - OK * @param companyIdentifier Remove link owned by this owner identifier. * @param supplierUrlIdentifier Remove url 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 removeSupplierUrlRequestCreation(String companyIdentifier, String supplierUrlIdentifier, 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 removeSupplierUrl", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null); } // verify the required parameter 'supplierUrlIdentifier' is set if (supplierUrlIdentifier == null) { throw new WebClientResponseException("Missing the required parameter 'supplierUrlIdentifier' when calling removeSupplierUrl", 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("supplierUrlIdentifier", supplierUrlIdentifier); 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}/shareable-link/supplier/{supplierUrlIdentifier}", HttpMethod.DELETE, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } /** * Delete Link * Delete a shareable link *

500 - Internal Server Error *

403 - Forbidden *

401 - Unauthorized *

400 - Bad Request *

200 - OK * @param companyIdentifier Remove link owned by this owner identifier. * @param supplierUrlIdentifier Remove url 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 removeSupplierUrl(String companyIdentifier, String supplierUrlIdentifier, String winkVersion, String accept) throws WebClientResponseException { ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {}; return removeSupplierUrlRequestCreation(companyIdentifier, supplierUrlIdentifier, winkVersion, accept).bodyToMono(localVarReturnType); } /** * Delete Link * Delete a shareable link *

500 - Internal Server Error *

403 - Forbidden *

401 - Unauthorized *

400 - Bad Request *

200 - OK * @param companyIdentifier Remove link owned by this owner identifier. * @param supplierUrlIdentifier Remove url 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> removeSupplierUrlWithHttpInfo(String companyIdentifier, String supplierUrlIdentifier, String winkVersion, String accept) throws WebClientResponseException { ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {}; return removeSupplierUrlRequestCreation(companyIdentifier, supplierUrlIdentifier, winkVersion, accept).toEntity(localVarReturnType); } /** * Delete Link * Delete a shareable link *

500 - Internal Server Error *

403 - Forbidden *

401 - Unauthorized *

400 - Bad Request *

200 - OK * @param companyIdentifier Remove link owned by this owner identifier. * @param supplierUrlIdentifier Remove url 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 removeSupplierUrlWithResponseSpec(String companyIdentifier, String supplierUrlIdentifier, String winkVersion, String accept) throws WebClientResponseException { return removeSupplierUrlRequestCreation(companyIdentifier, supplierUrlIdentifier, winkVersion, accept); } /** * Show Link * Retrieve a specific shareable url for this seller *

500 - Internal Server Error *

403 - Forbidden *

401 - Unauthorized *

400 - Bad Request *

200 - OK * @param companyIdentifier Show link owned by this owner identifier. * @param supplierUrlIdentifier Show link with this identifier. * @param winkVersion The winkVersion parameter * @param accept The accept parameter * @return SupplierUrlViewAffiliate * @throws WebClientResponseException if an error occurs while attempting to invoke the API */ private ResponseSpec showSupplierUrlRequestCreation(String companyIdentifier, String supplierUrlIdentifier, 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 showSupplierUrl", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null); } // verify the required parameter 'supplierUrlIdentifier' is set if (supplierUrlIdentifier == null) { throw new WebClientResponseException("Missing the required parameter 'supplierUrlIdentifier' when calling showSupplierUrl", 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("supplierUrlIdentifier", supplierUrlIdentifier); 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}/shareable-link/supplier/{supplierUrlIdentifier}", HttpMethod.GET, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } /** * Show Link * Retrieve a specific shareable url for this seller *

500 - Internal Server Error *

403 - Forbidden *

401 - Unauthorized *

400 - Bad Request *

200 - OK * @param companyIdentifier Show link owned by this owner identifier. * @param supplierUrlIdentifier Show link with this identifier. * @param winkVersion The winkVersion parameter * @param accept The accept parameter * @return SupplierUrlViewAffiliate * @throws WebClientResponseException if an error occurs while attempting to invoke the API */ public Mono showSupplierUrl(String companyIdentifier, String supplierUrlIdentifier, String winkVersion, String accept) throws WebClientResponseException { ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {}; return showSupplierUrlRequestCreation(companyIdentifier, supplierUrlIdentifier, winkVersion, accept).bodyToMono(localVarReturnType); } /** * Show Link * Retrieve a specific shareable url for this seller *

500 - Internal Server Error *

403 - Forbidden *

401 - Unauthorized *

400 - Bad Request *

200 - OK * @param companyIdentifier Show link owned by this owner identifier. * @param supplierUrlIdentifier Show link with this identifier. * @param winkVersion The winkVersion parameter * @param accept The accept parameter * @return ResponseEntity<SupplierUrlViewAffiliate> * @throws WebClientResponseException if an error occurs while attempting to invoke the API */ public Mono> showSupplierUrlWithHttpInfo(String companyIdentifier, String supplierUrlIdentifier, String winkVersion, String accept) throws WebClientResponseException { ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {}; return showSupplierUrlRequestCreation(companyIdentifier, supplierUrlIdentifier, winkVersion, accept).toEntity(localVarReturnType); } /** * Show Link * Retrieve a specific shareable url for this seller *

500 - Internal Server Error *

403 - Forbidden *

401 - Unauthorized *

400 - Bad Request *

200 - OK * @param companyIdentifier Show link owned by this owner identifier. * @param supplierUrlIdentifier Show link 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 showSupplierUrlWithResponseSpec(String companyIdentifier, String supplierUrlIdentifier, String winkVersion, String accept) throws WebClientResponseException { return showSupplierUrlRequestCreation(companyIdentifier, supplierUrlIdentifier, winkVersion, accept); } /** * Show Links * Retrieve list of shareable urls for this seller *

500 - Internal Server Error *

403 - Forbidden *

401 - Unauthorized *

400 - Bad Request *

200 - OK * @param companyIdentifier Show links list owned by this owner identifier. * @param winkVersion The winkVersion parameter * @param accept The accept parameter * @return List<SupplierUrlViewAffiliate> * @throws WebClientResponseException if an error occurs while attempting to invoke the API */ private ResponseSpec showSupplierUrlsRequestCreation(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 showSupplierUrls", 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}/shareable-link/supplier/list", HttpMethod.GET, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } /** * Show Links * Retrieve list of shareable urls for this seller *

500 - Internal Server Error *

403 - Forbidden *

401 - Unauthorized *

400 - Bad Request *

200 - OK * @param companyIdentifier Show links list owned by this owner identifier. * @param winkVersion The winkVersion parameter * @param accept The accept parameter * @return List<SupplierUrlViewAffiliate> * @throws WebClientResponseException if an error occurs while attempting to invoke the API */ public Flux showSupplierUrls(String companyIdentifier, String winkVersion, String accept) throws WebClientResponseException { ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {}; return showSupplierUrlsRequestCreation(companyIdentifier, winkVersion, accept).bodyToFlux(localVarReturnType); } /** * Show Links * Retrieve list of shareable urls for this seller *

500 - Internal Server Error *

403 - Forbidden *

401 - Unauthorized *

400 - Bad Request *

200 - OK * @param companyIdentifier Show links list owned by this owner identifier. * @param winkVersion The winkVersion parameter * @param accept The accept parameter * @return ResponseEntity<List<SupplierUrlViewAffiliate>> * @throws WebClientResponseException if an error occurs while attempting to invoke the API */ public Mono>> showSupplierUrlsWithHttpInfo(String companyIdentifier, String winkVersion, String accept) throws WebClientResponseException { ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {}; return showSupplierUrlsRequestCreation(companyIdentifier, winkVersion, accept).toEntityList(localVarReturnType); } /** * Show Links * Retrieve list of shareable urls for this seller *

500 - Internal Server Error *

403 - Forbidden *

401 - Unauthorized *

400 - Bad Request *

200 - OK * @param companyIdentifier Show links list owned by this owner 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 showSupplierUrlsWithResponseSpec(String companyIdentifier, String winkVersion, String accept) throws WebClientResponseException { return showSupplierUrlsRequestCreation(companyIdentifier, winkVersion, accept); } /** * Update link * Modify a shareable link *

500 - Internal Server Error *

403 - Forbidden *

401 - Unauthorized *

400 - Bad Request *

200 - OK * @param companyIdentifier Update link owned by this owner identifier. * @param supplierUrlIdentifier Update url with this identifier. * @param upsertSupplierUrlRequestAffiliate The upsertSupplierUrlRequestAffiliate parameter * @param winkVersion The winkVersion parameter * @return SupplierUrlViewAffiliate * @throws WebClientResponseException if an error occurs while attempting to invoke the API */ private ResponseSpec updateSupplierUrlRequestCreation(String companyIdentifier, String supplierUrlIdentifier, UpsertSupplierUrlRequestAffiliate upsertSupplierUrlRequestAffiliate, String winkVersion) throws WebClientResponseException { Object postBody = upsertSupplierUrlRequestAffiliate; // verify the required parameter 'companyIdentifier' is set if (companyIdentifier == null) { throw new WebClientResponseException("Missing the required parameter 'companyIdentifier' when calling updateSupplierUrl", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null); } // verify the required parameter 'supplierUrlIdentifier' is set if (supplierUrlIdentifier == null) { throw new WebClientResponseException("Missing the required parameter 'supplierUrlIdentifier' when calling updateSupplierUrl", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null); } // verify the required parameter 'upsertSupplierUrlRequestAffiliate' is set if (upsertSupplierUrlRequestAffiliate == null) { throw new WebClientResponseException("Missing the required parameter 'upsertSupplierUrlRequestAffiliate' when calling updateSupplierUrl", 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("supplierUrlIdentifier", supplierUrlIdentifier); 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}/shareable-link/supplier/{supplierUrlIdentifier}", HttpMethod.PUT, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } /** * Update link * Modify a shareable link *

500 - Internal Server Error *

403 - Forbidden *

401 - Unauthorized *

400 - Bad Request *

200 - OK * @param companyIdentifier Update link owned by this owner identifier. * @param supplierUrlIdentifier Update url with this identifier. * @param upsertSupplierUrlRequestAffiliate The upsertSupplierUrlRequestAffiliate parameter * @param winkVersion The winkVersion parameter * @return SupplierUrlViewAffiliate * @throws WebClientResponseException if an error occurs while attempting to invoke the API */ public Mono updateSupplierUrl(String companyIdentifier, String supplierUrlIdentifier, UpsertSupplierUrlRequestAffiliate upsertSupplierUrlRequestAffiliate, String winkVersion) throws WebClientResponseException { ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {}; return updateSupplierUrlRequestCreation(companyIdentifier, supplierUrlIdentifier, upsertSupplierUrlRequestAffiliate, winkVersion).bodyToMono(localVarReturnType); } /** * Update link * Modify a shareable link *

500 - Internal Server Error *

403 - Forbidden *

401 - Unauthorized *

400 - Bad Request *

200 - OK * @param companyIdentifier Update link owned by this owner identifier. * @param supplierUrlIdentifier Update url with this identifier. * @param upsertSupplierUrlRequestAffiliate The upsertSupplierUrlRequestAffiliate parameter * @param winkVersion The winkVersion parameter * @return ResponseEntity<SupplierUrlViewAffiliate> * @throws WebClientResponseException if an error occurs while attempting to invoke the API */ public Mono> updateSupplierUrlWithHttpInfo(String companyIdentifier, String supplierUrlIdentifier, UpsertSupplierUrlRequestAffiliate upsertSupplierUrlRequestAffiliate, String winkVersion) throws WebClientResponseException { ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {}; return updateSupplierUrlRequestCreation(companyIdentifier, supplierUrlIdentifier, upsertSupplierUrlRequestAffiliate, winkVersion).toEntity(localVarReturnType); } /** * Update link * Modify a shareable link *

500 - Internal Server Error *

403 - Forbidden *

401 - Unauthorized *

400 - Bad Request *

200 - OK * @param companyIdentifier Update link owned by this owner identifier. * @param supplierUrlIdentifier Update url with this identifier. * @param upsertSupplierUrlRequestAffiliate The upsertSupplierUrlRequestAffiliate parameter * @param winkVersion The winkVersion parameter * @return ResponseSpec * @throws WebClientResponseException if an error occurs while attempting to invoke the API */ public ResponseSpec updateSupplierUrlWithResponseSpec(String companyIdentifier, String supplierUrlIdentifier, UpsertSupplierUrlRequestAffiliate upsertSupplierUrlRequestAffiliate, String winkVersion) throws WebClientResponseException { return updateSupplierUrlRequestCreation(companyIdentifier, supplierUrlIdentifier, upsertSupplierUrlRequestAffiliate, winkVersion); } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy