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

travel.wink.sdk.affiliate.sales.channel.api.SalesChannelApi Maven / Gradle / Ivy

There is a newer version: 30.5.15
Show newest version
package travel.wink.sdk.affiliate.sales.channel.api;

import travel.wink.sdk.affiliate.sales.channel.invoker.ApiClient;

import travel.wink.sdk.affiliate.sales.channel.model.BrowseSuppliers400Response;
import travel.wink.sdk.affiliate.sales.channel.model.GenericErrorMessage;
import travel.wink.sdk.affiliate.sales.channel.model.PageSalesChannelViewAffiliate;
import travel.wink.sdk.affiliate.sales.channel.model.SalesChannelViewAffiliate;
import travel.wink.sdk.affiliate.sales.channel.model.StateAffiliate;

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-10-04T20:20:44.711838495+07:00[Asia/Bangkok]")
public class SalesChannelApi {
    private ApiClient apiClient;

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

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

    public ApiClient getApiClient() {
        return apiClient;
    }

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

    /**
     * Sales Channel Search
     * Retrieve page of existing sales channels based on criteria.
     * 

500 - Internal Server Error *

403 - Forbidden *

401 - Unauthorized *

400 - Bad Request *

200 - OK * @param companyIdentifier The companyIdentifier parameter * @param stateAffiliate The stateAffiliate parameter * @param winkVersion The winkVersion parameter * @return PageSalesChannelViewAffiliate * @throws WebClientResponseException if an error occurs while attempting to invoke the API */ private ResponseSpec browseSalesChannelsRequestCreation(String companyIdentifier, StateAffiliate stateAffiliate, String winkVersion) throws WebClientResponseException { Object postBody = stateAffiliate; // verify the required parameter 'companyIdentifier' is set if (companyIdentifier == null) { throw new WebClientResponseException("Missing the required parameter 'companyIdentifier' when calling browseSalesChannels", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null); } // verify the required parameter 'stateAffiliate' is set if (stateAffiliate == null) { throw new WebClientResponseException("Missing the required parameter 'stateAffiliate' when calling browseSalesChannels", 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}/sales-channel/grid", HttpMethod.POST, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } /** * Sales Channel Search * Retrieve page of existing sales channels based on criteria. *

500 - Internal Server Error *

403 - Forbidden *

401 - Unauthorized *

400 - Bad Request *

200 - OK * @param companyIdentifier The companyIdentifier parameter * @param stateAffiliate The stateAffiliate parameter * @param winkVersion The winkVersion parameter * @return PageSalesChannelViewAffiliate * @throws WebClientResponseException if an error occurs while attempting to invoke the API */ public Mono browseSalesChannels(String companyIdentifier, StateAffiliate stateAffiliate, String winkVersion) throws WebClientResponseException { ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {}; return browseSalesChannelsRequestCreation(companyIdentifier, stateAffiliate, winkVersion).bodyToMono(localVarReturnType); } /** * Sales Channel Search * Retrieve page of existing sales channels based on criteria. *

500 - Internal Server Error *

403 - Forbidden *

401 - Unauthorized *

400 - Bad Request *

200 - OK * @param companyIdentifier The companyIdentifier parameter * @param stateAffiliate The stateAffiliate parameter * @param winkVersion The winkVersion parameter * @return ResponseEntity<PageSalesChannelViewAffiliate> * @throws WebClientResponseException if an error occurs while attempting to invoke the API */ public Mono> browseSalesChannelsWithHttpInfo(String companyIdentifier, StateAffiliate stateAffiliate, String winkVersion) throws WebClientResponseException { ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {}; return browseSalesChannelsRequestCreation(companyIdentifier, stateAffiliate, winkVersion).toEntity(localVarReturnType); } /** * Sales Channel Search * Retrieve page of existing sales channels based on criteria. *

500 - Internal Server Error *

403 - Forbidden *

401 - Unauthorized *

400 - Bad Request *

200 - OK * @param companyIdentifier The companyIdentifier parameter * @param stateAffiliate The stateAffiliate parameter * @param winkVersion The winkVersion parameter * @return ResponseSpec * @throws WebClientResponseException if an error occurs while attempting to invoke the API */ public ResponseSpec browseSalesChannelsWithResponseSpec(String companyIdentifier, StateAffiliate stateAffiliate, String winkVersion) throws WebClientResponseException { return browseSalesChannelsRequestCreation(companyIdentifier, stateAffiliate, winkVersion); } /** * Show Sales Channel * Retrieve sales channel specified by the company ID and the supplier ID. *

500 - Internal Server Error *

403 - Forbidden *

401 - Unauthorized *

400 - Bad Request *

200 - OK * @param companyIdentifier The companyIdentifier parameter * @param supplierIdentifier The supplierIdentifier parameter * @param winkVersion The winkVersion parameter * @param accept The accept parameter * @return SalesChannelViewAffiliate * @throws WebClientResponseException if an error occurs while attempting to invoke the API */ private ResponseSpec showSalesChannelRequestCreation(String companyIdentifier, String supplierIdentifier, 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 showSalesChannel", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null); } // verify the required parameter 'supplierIdentifier' is set if (supplierIdentifier == null) { throw new WebClientResponseException("Missing the required parameter 'supplierIdentifier' when calling showSalesChannel", 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("supplierIdentifier", supplierIdentifier); 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}/sales-channel/supplier/{supplierIdentifier}", HttpMethod.GET, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } /** * Show Sales Channel * Retrieve sales channel specified by the company ID and the supplier ID. *

500 - Internal Server Error *

403 - Forbidden *

401 - Unauthorized *

400 - Bad Request *

200 - OK * @param companyIdentifier The companyIdentifier parameter * @param supplierIdentifier The supplierIdentifier parameter * @param winkVersion The winkVersion parameter * @param accept The accept parameter * @return SalesChannelViewAffiliate * @throws WebClientResponseException if an error occurs while attempting to invoke the API */ public Mono showSalesChannel(String companyIdentifier, String supplierIdentifier, String winkVersion, String accept) throws WebClientResponseException { ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {}; return showSalesChannelRequestCreation(companyIdentifier, supplierIdentifier, winkVersion, accept).bodyToMono(localVarReturnType); } /** * Show Sales Channel * Retrieve sales channel specified by the company ID and the supplier ID. *

500 - Internal Server Error *

403 - Forbidden *

401 - Unauthorized *

400 - Bad Request *

200 - OK * @param companyIdentifier The companyIdentifier parameter * @param supplierIdentifier The supplierIdentifier parameter * @param winkVersion The winkVersion parameter * @param accept The accept parameter * @return ResponseEntity<SalesChannelViewAffiliate> * @throws WebClientResponseException if an error occurs while attempting to invoke the API */ public Mono> showSalesChannelWithHttpInfo(String companyIdentifier, String supplierIdentifier, String winkVersion, String accept) throws WebClientResponseException { ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {}; return showSalesChannelRequestCreation(companyIdentifier, supplierIdentifier, winkVersion, accept).toEntity(localVarReturnType); } /** * Show Sales Channel * Retrieve sales channel specified by the company ID and the supplier ID. *

500 - Internal Server Error *

403 - Forbidden *

401 - Unauthorized *

400 - Bad Request *

200 - OK * @param companyIdentifier The companyIdentifier parameter * @param supplierIdentifier The supplierIdentifier parameter * @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 showSalesChannelWithResponseSpec(String companyIdentifier, String supplierIdentifier, String winkVersion, String accept) throws WebClientResponseException { return showSalesChannelRequestCreation(companyIdentifier, supplierIdentifier, winkVersion, accept); } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy