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

travel.wink.sdk.affiliate.api.CompanyApi Maven / Gradle / Ivy

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

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

import travel.wink.sdk.affiliate.model.AddManagerRequestAffiliate;
import travel.wink.sdk.affiliate.model.CompanyViewAffiliate;
import travel.wink.sdk.affiliate.model.GenericErrorMessage;
import travel.wink.sdk.affiliate.model.RemoveEntryResponseAffiliate;
import travel.wink.sdk.affiliate.model.ShowSellerUrl400Response;
import travel.wink.sdk.affiliate.model.UniqueRequestAffiliate;
import travel.wink.sdk.affiliate.model.UniqueResultAffiliate;
import travel.wink.sdk.affiliate.model.UpsertCompanyRequestAffiliate;
import travel.wink.sdk.affiliate.model.UpsertCompanyStatusRequestAffiliate;

import java.util.HashMap;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.stream.Collectors;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.LinkedMultiValueMap;
import org.springframework.util.MultiValueMap;
import org.springframework.core.ParameterizedTypeReference;
import org.springframework.web.reactive.function.client.WebClient.ResponseSpec;
import org.springframework.web.reactive.function.client.WebClientResponseException;
import org.springframework.core.io.FileSystemResource;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpMethod;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import reactor.core.publisher.Mono;
import reactor.core.publisher.Flux;

@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-03-06T16:56:30.815925180+07:00[Asia/Bangkok]")
public class CompanyApi {
    private ApiClient apiClient;

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

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

    public ApiClient getApiClient() {
        return apiClient;
    }

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

    /**
     * Add Manager
     * Associate an existing payment user with this 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 The companyIdentifier parameter * @param addManagerRequestAffiliate The addManagerRequestAffiliate parameter * @param winkVersion The winkVersion parameter * @return CompanyViewAffiliate * @throws WebClientResponseException if an error occurs while attempting to invoke the API */ private ResponseSpec addCompanyUserRequestCreation(String companyIdentifier, AddManagerRequestAffiliate addManagerRequestAffiliate, String winkVersion) throws WebClientResponseException { Object postBody = addManagerRequestAffiliate; // verify the required parameter 'companyIdentifier' is set if (companyIdentifier == null) { throw new WebClientResponseException("Missing the required parameter 'companyIdentifier' when calling addCompanyUser", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null); } // verify the required parameter 'addManagerRequestAffiliate' is set if (addManagerRequestAffiliate == null) { throw new WebClientResponseException("Missing the required parameter 'addManagerRequestAffiliate' when calling addCompanyUser", 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}/manager", HttpMethod.PATCH, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } /** * Add Manager * Associate an existing payment user with this 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 The companyIdentifier parameter * @param addManagerRequestAffiliate The addManagerRequestAffiliate parameter * @param winkVersion The winkVersion parameter * @return CompanyViewAffiliate * @throws WebClientResponseException if an error occurs while attempting to invoke the API */ public Mono addCompanyUser(String companyIdentifier, AddManagerRequestAffiliate addManagerRequestAffiliate, String winkVersion) throws WebClientResponseException { ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {}; return addCompanyUserRequestCreation(companyIdentifier, addManagerRequestAffiliate, winkVersion).bodyToMono(localVarReturnType); } public Mono> addCompanyUserWithHttpInfo(String companyIdentifier, AddManagerRequestAffiliate addManagerRequestAffiliate, String winkVersion) throws WebClientResponseException { ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {}; return addCompanyUserRequestCreation(companyIdentifier, addManagerRequestAffiliate, winkVersion).toEntity(localVarReturnType); } /** * Create company * Create a new 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 *

201 - Created * @param upsertCompanyRequestAffiliate The upsertCompanyRequestAffiliate parameter * @param winkVersion The winkVersion parameter * @return CompanyViewAffiliate * @throws WebClientResponseException if an error occurs while attempting to invoke the API */ private ResponseSpec createCompanyRequestCreation(UpsertCompanyRequestAffiliate upsertCompanyRequestAffiliate, String winkVersion) throws WebClientResponseException { Object postBody = upsertCompanyRequestAffiliate; // verify the required parameter 'upsertCompanyRequestAffiliate' is set if (upsertCompanyRequestAffiliate == null) { throw new WebClientResponseException("Missing the required parameter 'upsertCompanyRequestAffiliate' when calling createCompany", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null); } // create path and map variables final Map pathParams = new HashMap(); final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); final MultiValueMap cookieParams = new LinkedMultiValueMap(); final MultiValueMap formParams = new LinkedMultiValueMap(); if (winkVersion != null) headerParams.add("Wink-Version", apiClient.parameterToString(winkVersion)); final String[] localVarAccepts = { "*/*", "application/json", "application/xml", "text/xml", "text/plain" }; final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); final String[] localVarContentTypes = { "application/json" }; final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); String[] localVarAuthNames = new String[] { "oauth2ClientCredentials" }; ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {}; return apiClient.invokeAPI("/api/company", HttpMethod.POST, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } /** * Create company * Create a new 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 *

201 - Created * @param upsertCompanyRequestAffiliate The upsertCompanyRequestAffiliate parameter * @param winkVersion The winkVersion parameter * @return CompanyViewAffiliate * @throws WebClientResponseException if an error occurs while attempting to invoke the API */ public Mono createCompany(UpsertCompanyRequestAffiliate upsertCompanyRequestAffiliate, String winkVersion) throws WebClientResponseException { ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {}; return createCompanyRequestCreation(upsertCompanyRequestAffiliate, winkVersion).bodyToMono(localVarReturnType); } public Mono> createCompanyWithHttpInfo(UpsertCompanyRequestAffiliate upsertCompanyRequestAffiliate, String winkVersion) throws WebClientResponseException { ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {}; return createCompanyRequestCreation(upsertCompanyRequestAffiliate, winkVersion).toEntity(localVarReturnType); } /** * Verify company name * Check if company name is unique *

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 uniqueRequestAffiliate The uniqueRequestAffiliate parameter * @param winkVersion The winkVersion parameter * @return UniqueResultAffiliate * @throws WebClientResponseException if an error occurs while attempting to invoke the API */ private ResponseSpec isCompanyNameUniqueRequestCreation(UniqueRequestAffiliate uniqueRequestAffiliate, String winkVersion) throws WebClientResponseException { Object postBody = uniqueRequestAffiliate; // verify the required parameter 'uniqueRequestAffiliate' is set if (uniqueRequestAffiliate == null) { throw new WebClientResponseException("Missing the required parameter 'uniqueRequestAffiliate' when calling isCompanyNameUnique", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null); } // create path and map variables final Map pathParams = new HashMap(); final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); final MultiValueMap cookieParams = new LinkedMultiValueMap(); final MultiValueMap formParams = new LinkedMultiValueMap(); if (winkVersion != null) headerParams.add("Wink-Version", apiClient.parameterToString(winkVersion)); final String[] localVarAccepts = { "*/*", "application/json", "application/xml", "text/xml", "text/plain" }; final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); final String[] localVarContentTypes = { "application/json" }; final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); String[] localVarAuthNames = new String[] { "oauth2ClientCredentials" }; ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {}; return apiClient.invokeAPI("/api/company/unique", HttpMethod.POST, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } /** * Verify company name * Check if company name is unique *

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 uniqueRequestAffiliate The uniqueRequestAffiliate parameter * @param winkVersion The winkVersion parameter * @return UniqueResultAffiliate * @throws WebClientResponseException if an error occurs while attempting to invoke the API */ public Mono isCompanyNameUnique(UniqueRequestAffiliate uniqueRequestAffiliate, String winkVersion) throws WebClientResponseException { ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {}; return isCompanyNameUniqueRequestCreation(uniqueRequestAffiliate, winkVersion).bodyToMono(localVarReturnType); } public Mono> isCompanyNameUniqueWithHttpInfo(UniqueRequestAffiliate uniqueRequestAffiliate, String winkVersion) throws WebClientResponseException { ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {}; return isCompanyNameUniqueRequestCreation(uniqueRequestAffiliate, winkVersion).toEntity(localVarReturnType); } /** * Delete Company * Delete a company by 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 *

202 - Accepted * @param companyIdentifier The companyIdentifier parameter * @param winkVersion The winkVersion parameter * @return RemoveEntryResponseAffiliate * @throws WebClientResponseException if an error occurs while attempting to invoke the API */ private ResponseSpec removeCompanyRequestCreation(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 removeCompany", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null); } // create path and map variables final Map pathParams = new HashMap(); pathParams.put("companyIdentifier", companyIdentifier); final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); final MultiValueMap cookieParams = new LinkedMultiValueMap(); final MultiValueMap formParams = new LinkedMultiValueMap(); if (winkVersion != null) headerParams.add("Wink-Version", apiClient.parameterToString(winkVersion)); 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}", HttpMethod.DELETE, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } /** * Delete Company * Delete a company by 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 *

202 - Accepted * @param companyIdentifier The companyIdentifier parameter * @param winkVersion The winkVersion parameter * @return RemoveEntryResponseAffiliate * @throws WebClientResponseException if an error occurs while attempting to invoke the API */ public Mono removeCompany(String companyIdentifier, String winkVersion) throws WebClientResponseException { ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {}; return removeCompanyRequestCreation(companyIdentifier, winkVersion).bodyToMono(localVarReturnType); } public Mono> removeCompanyWithHttpInfo(String companyIdentifier, String winkVersion) throws WebClientResponseException { ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {}; return removeCompanyRequestCreation(companyIdentifier, winkVersion).toEntity(localVarReturnType); } /** * Remove Manager * Disassociate user from this 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 The companyIdentifier parameter * @param userIdentifier The userIdentifier parameter * @param winkVersion The winkVersion parameter * @return CompanyViewAffiliate * @throws WebClientResponseException if an error occurs while attempting to invoke the API */ private ResponseSpec removeCompanyUserRequestCreation(String companyIdentifier, String userIdentifier, 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 removeCompanyUser", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null); } // verify the required parameter 'userIdentifier' is set if (userIdentifier == null) { throw new WebClientResponseException("Missing the required parameter 'userIdentifier' when calling removeCompanyUser", 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("userIdentifier", userIdentifier); 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}/manager/{userIdentifier}", HttpMethod.DELETE, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } /** * Remove Manager * Disassociate user from this 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 The companyIdentifier parameter * @param userIdentifier The userIdentifier parameter * @param winkVersion The winkVersion parameter * @return CompanyViewAffiliate * @throws WebClientResponseException if an error occurs while attempting to invoke the API */ public Mono removeCompanyUser(String companyIdentifier, String userIdentifier, String winkVersion) throws WebClientResponseException { ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {}; return removeCompanyUserRequestCreation(companyIdentifier, userIdentifier, winkVersion).bodyToMono(localVarReturnType); } public Mono> removeCompanyUserWithHttpInfo(String companyIdentifier, String userIdentifier, String winkVersion) throws WebClientResponseException { ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {}; return removeCompanyUserRequestCreation(companyIdentifier, userIdentifier, winkVersion).toEntity(localVarReturnType); } /** * Show Companies * List all companies owned by caller *

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 winkVersion The winkVersion parameter * @return List<CompanyViewAffiliate> * @throws WebClientResponseException if an error occurs while attempting to invoke the API */ private ResponseSpec showCompaniesRequestCreation(String winkVersion) throws WebClientResponseException { Object postBody = null; // create path and map variables final Map pathParams = new HashMap(); final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); final MultiValueMap cookieParams = new LinkedMultiValueMap(); final MultiValueMap formParams = new LinkedMultiValueMap(); 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/list", HttpMethod.GET, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } /** * Show Companies * List all companies owned by caller *

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 winkVersion The winkVersion parameter * @return List<CompanyViewAffiliate> * @throws WebClientResponseException if an error occurs while attempting to invoke the API */ public Flux showCompanies(String winkVersion) throws WebClientResponseException { ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {}; return showCompaniesRequestCreation(winkVersion).bodyToFlux(localVarReturnType); } public Mono>> showCompaniesWithHttpInfo(String winkVersion) throws WebClientResponseException { ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {}; return showCompaniesRequestCreation(winkVersion).toEntityList(localVarReturnType); } /** * Show Company * Retrieve company by 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 The companyIdentifier parameter * @param winkVersion The winkVersion parameter * @return CompanyViewAffiliate * @throws WebClientResponseException if an error occurs while attempting to invoke the API */ private ResponseSpec showCompanyRequestCreation(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 showCompany", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null); } // create path and map variables final Map pathParams = new HashMap(); pathParams.put("companyIdentifier", companyIdentifier); final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); final MultiValueMap cookieParams = new LinkedMultiValueMap(); final MultiValueMap formParams = new LinkedMultiValueMap(); if (winkVersion != null) headerParams.add("Wink-Version", apiClient.parameterToString(winkVersion)); 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}", HttpMethod.GET, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } /** * Show Company * Retrieve company by 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 The companyIdentifier parameter * @param winkVersion The winkVersion parameter * @return CompanyViewAffiliate * @throws WebClientResponseException if an error occurs while attempting to invoke the API */ public Mono showCompany(String companyIdentifier, String winkVersion) throws WebClientResponseException { ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {}; return showCompanyRequestCreation(companyIdentifier, winkVersion).bodyToMono(localVarReturnType); } public Mono> showCompanyWithHttpInfo(String companyIdentifier, String winkVersion) throws WebClientResponseException { ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {}; return showCompanyRequestCreation(companyIdentifier, winkVersion).toEntity(localVarReturnType); } /** * Update Company * Update an existing 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 The companyIdentifier parameter * @param upsertCompanyRequestAffiliate The upsertCompanyRequestAffiliate parameter * @param winkVersion The winkVersion parameter * @return CompanyViewAffiliate * @throws WebClientResponseException if an error occurs while attempting to invoke the API */ private ResponseSpec updateCompanyRequestCreation(String companyIdentifier, UpsertCompanyRequestAffiliate upsertCompanyRequestAffiliate, String winkVersion) throws WebClientResponseException { Object postBody = upsertCompanyRequestAffiliate; // verify the required parameter 'companyIdentifier' is set if (companyIdentifier == null) { throw new WebClientResponseException("Missing the required parameter 'companyIdentifier' when calling updateCompany", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null); } // verify the required parameter 'upsertCompanyRequestAffiliate' is set if (upsertCompanyRequestAffiliate == null) { throw new WebClientResponseException("Missing the required parameter 'upsertCompanyRequestAffiliate' when calling updateCompany", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null); } // create path and map variables final Map pathParams = new HashMap(); pathParams.put("companyIdentifier", companyIdentifier); final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); final MultiValueMap cookieParams = new LinkedMultiValueMap(); final MultiValueMap formParams = new LinkedMultiValueMap(); if (winkVersion != null) headerParams.add("Wink-Version", apiClient.parameterToString(winkVersion)); final String[] localVarAccepts = { "*/*", "application/json", "application/xml", "text/xml", "text/plain" }; final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); final String[] localVarContentTypes = { "application/json" }; final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); String[] localVarAuthNames = new String[] { "oauth2ClientCredentials" }; ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {}; return apiClient.invokeAPI("/api/company/{companyIdentifier}", HttpMethod.PATCH, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } /** * Update Company * Update an existing 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 The companyIdentifier parameter * @param upsertCompanyRequestAffiliate The upsertCompanyRequestAffiliate parameter * @param winkVersion The winkVersion parameter * @return CompanyViewAffiliate * @throws WebClientResponseException if an error occurs while attempting to invoke the API */ public Mono updateCompany(String companyIdentifier, UpsertCompanyRequestAffiliate upsertCompanyRequestAffiliate, String winkVersion) throws WebClientResponseException { ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {}; return updateCompanyRequestCreation(companyIdentifier, upsertCompanyRequestAffiliate, winkVersion).bodyToMono(localVarReturnType); } public Mono> updateCompanyWithHttpInfo(String companyIdentifier, UpsertCompanyRequestAffiliate upsertCompanyRequestAffiliate, String winkVersion) throws WebClientResponseException { ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {}; return updateCompanyRequestCreation(companyIdentifier, upsertCompanyRequestAffiliate, winkVersion).toEntity(localVarReturnType); } /** * Toggle Company Status * Update company status *

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 The companyIdentifier parameter * @param upsertCompanyStatusRequestAffiliate The upsertCompanyStatusRequestAffiliate parameter * @param winkVersion The winkVersion parameter * @return CompanyViewAffiliate * @throws WebClientResponseException if an error occurs while attempting to invoke the API */ private ResponseSpec updateCompany1RequestCreation(String companyIdentifier, UpsertCompanyStatusRequestAffiliate upsertCompanyStatusRequestAffiliate, String winkVersion) throws WebClientResponseException { Object postBody = upsertCompanyStatusRequestAffiliate; // verify the required parameter 'companyIdentifier' is set if (companyIdentifier == null) { throw new WebClientResponseException("Missing the required parameter 'companyIdentifier' when calling updateCompany1", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null); } // verify the required parameter 'upsertCompanyStatusRequestAffiliate' is set if (upsertCompanyStatusRequestAffiliate == null) { throw new WebClientResponseException("Missing the required parameter 'upsertCompanyStatusRequestAffiliate' when calling updateCompany1", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null); } // create path and map variables final Map pathParams = new HashMap(); pathParams.put("companyIdentifier", companyIdentifier); final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); final MultiValueMap cookieParams = new LinkedMultiValueMap(); final MultiValueMap formParams = new LinkedMultiValueMap(); if (winkVersion != null) headerParams.add("Wink-Version", apiClient.parameterToString(winkVersion)); final String[] localVarAccepts = { "*/*", "application/json", "application/xml", "text/xml", "text/plain" }; final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); final String[] localVarContentTypes = { "application/json" }; final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); String[] localVarAuthNames = new String[] { "oauth2ClientCredentials" }; ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {}; return apiClient.invokeAPI("/api/company/{companyIdentifier}/status", HttpMethod.PATCH, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } /** * Toggle Company Status * Update company status *

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 The companyIdentifier parameter * @param upsertCompanyStatusRequestAffiliate The upsertCompanyStatusRequestAffiliate parameter * @param winkVersion The winkVersion parameter * @return CompanyViewAffiliate * @throws WebClientResponseException if an error occurs while attempting to invoke the API */ public Mono updateCompany1(String companyIdentifier, UpsertCompanyStatusRequestAffiliate upsertCompanyStatusRequestAffiliate, String winkVersion) throws WebClientResponseException { ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {}; return updateCompany1RequestCreation(companyIdentifier, upsertCompanyStatusRequestAffiliate, winkVersion).bodyToMono(localVarReturnType); } public Mono> updateCompany1WithHttpInfo(String companyIdentifier, UpsertCompanyStatusRequestAffiliate upsertCompanyStatusRequestAffiliate, String winkVersion) throws WebClientResponseException { ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {}; return updateCompany1RequestCreation(companyIdentifier, upsertCompanyStatusRequestAffiliate, winkVersion).toEntity(localVarReturnType); } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy