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

dev.vality.swag.payments.api.ShopsApi Maven / Gradle / Ivy

There is a newer version: 1.650-5dc6d9f-server
Show newest version
package dev.vality.swag.payments.api;

import dev.vality.swag.payments.ApiClient;

import dev.vality.swag.payments.model.DefaultLogicError;
import dev.vality.swag.payments.model.GeneralError;
import dev.vality.swag.payments.model.Shop;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.util.LinkedMultiValueMap;
import org.springframework.util.MultiValueMap;
import org.springframework.web.client.RestClientException;
import org.springframework.web.client.HttpClientErrorException;
import org.springframework.web.util.UriComponentsBuilder;
import org.springframework.core.ParameterizedTypeReference;
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;

@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2022-08-22T08:18:24.176Z")
@Component("dev.vality.swag.payments.api.ShopsApi")
public class ShopsApi {
    private ApiClient apiClient;

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

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

    public ApiClient getApiClient() {
        return apiClient;
    }

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

    /**
     * 
     * Activate shop
     * 

204 - Shop activated *

400 - Неверные данные *

401 - Ошибка авторизации *

404 - Заданный ресурс не найден * @param xRequestID Уникальный идентификатор запроса к системе * @param shopID Идентификатор магазина * @param xRequestDeadline Максимальное время обработки запроса * @throws RestClientException if an error occurs while attempting to invoke the API */ public void activateShop(String xRequestID, String shopID, String xRequestDeadline) throws RestClientException { Object postBody = null; // verify the required parameter 'xRequestID' is set if (xRequestID == null) { throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'xRequestID' when calling activateShop"); } // verify the required parameter 'shopID' is set if (shopID == null) { throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'shopID' when calling activateShop"); } // create path and map variables final Map uriVariables = new HashMap(); uriVariables.put("shopID", shopID); String path = UriComponentsBuilder.fromPath("/processing/shops/{shopID}/activate").buildAndExpand(uriVariables).toUriString(); final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); final MultiValueMap formParams = new LinkedMultiValueMap(); if (xRequestID != null) headerParams.add("X-Request-ID", apiClient.parameterToString(xRequestID)); if (xRequestDeadline != null) headerParams.add("X-Request-Deadline", apiClient.parameterToString(xRequestDeadline)); final String[] accepts = { "application/json; charset=utf-8" }; final List accept = apiClient.selectHeaderAccept(accepts); final String[] contentTypes = { "application/json; charset=utf-8" }; final MediaType contentType = apiClient.selectHeaderContentType(contentTypes); String[] authNames = new String[] { "bearer" }; ParameterizedTypeReference returnType = new ParameterizedTypeReference() {}; apiClient.invokeAPI(path, HttpMethod.PUT, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); } /** * * Activate shop *

204 - Shop activated *

400 - Неверные данные *

401 - Ошибка авторизации *

404 - Заданный ресурс не найден * @param xRequestID Уникальный идентификатор запроса к системе * @param shopID Идентификатор магазина * @param partyID Уникальный в рамках системы идентификатор участника. * @param xRequestDeadline Максимальное время обработки запроса * @throws RestClientException if an error occurs while attempting to invoke the API */ public void activateShopForParty(String xRequestID, String shopID, String partyID, String xRequestDeadline) throws RestClientException { Object postBody = null; // verify the required parameter 'xRequestID' is set if (xRequestID == null) { throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'xRequestID' when calling activateShopForParty"); } // verify the required parameter 'shopID' is set if (shopID == null) { throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'shopID' when calling activateShopForParty"); } // verify the required parameter 'partyID' is set if (partyID == null) { throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'partyID' when calling activateShopForParty"); } // create path and map variables final Map uriVariables = new HashMap(); uriVariables.put("shopID", shopID); uriVariables.put("partyID", partyID); String path = UriComponentsBuilder.fromPath("/processing/parties/{partyID}/shops/{shopID}/activate").buildAndExpand(uriVariables).toUriString(); final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); final MultiValueMap formParams = new LinkedMultiValueMap(); if (xRequestID != null) headerParams.add("X-Request-ID", apiClient.parameterToString(xRequestID)); if (xRequestDeadline != null) headerParams.add("X-Request-Deadline", apiClient.parameterToString(xRequestDeadline)); final String[] accepts = { "application/json; charset=utf-8" }; final List accept = apiClient.selectHeaderAccept(accepts); final String[] contentTypes = { "application/json; charset=utf-8" }; final MediaType contentType = apiClient.selectHeaderContentType(contentTypes); String[] authNames = new String[] { "bearer" }; ParameterizedTypeReference returnType = new ParameterizedTypeReference() {}; apiClient.invokeAPI(path, HttpMethod.PUT, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); } /** * * Get shop by id *

200 - Shop found *

400 - Неверные данные *

401 - Ошибка авторизации *

404 - Заданный ресурс не найден * @param xRequestID Уникальный идентификатор запроса к системе * @param shopID Идентификатор магазина * @param xRequestDeadline Максимальное время обработки запроса * @return Shop * @throws RestClientException if an error occurs while attempting to invoke the API */ public Shop getShopByID(String xRequestID, String shopID, String xRequestDeadline) throws RestClientException { Object postBody = null; // verify the required parameter 'xRequestID' is set if (xRequestID == null) { throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'xRequestID' when calling getShopByID"); } // verify the required parameter 'shopID' is set if (shopID == null) { throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'shopID' when calling getShopByID"); } // create path and map variables final Map uriVariables = new HashMap(); uriVariables.put("shopID", shopID); String path = UriComponentsBuilder.fromPath("/processing/shops/{shopID}").buildAndExpand(uriVariables).toUriString(); final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); final MultiValueMap formParams = new LinkedMultiValueMap(); if (xRequestID != null) headerParams.add("X-Request-ID", apiClient.parameterToString(xRequestID)); if (xRequestDeadline != null) headerParams.add("X-Request-Deadline", apiClient.parameterToString(xRequestDeadline)); final String[] accepts = { "application/json; charset=utf-8" }; final List accept = apiClient.selectHeaderAccept(accepts); final String[] contentTypes = { "application/json; charset=utf-8" }; final MediaType contentType = apiClient.selectHeaderContentType(contentTypes); String[] authNames = new String[] { "bearer" }; ParameterizedTypeReference returnType = new ParameterizedTypeReference() {}; return apiClient.invokeAPI(path, HttpMethod.GET, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); } /** * * Get shop by id *

200 - Shop found *

400 - Неверные данные *

401 - Ошибка авторизации *

404 - Заданный ресурс не найден * @param xRequestID Уникальный идентификатор запроса к системе * @param shopID Идентификатор магазина * @param partyID Уникальный в рамках системы идентификатор участника. * @param xRequestDeadline Максимальное время обработки запроса * @return Shop * @throws RestClientException if an error occurs while attempting to invoke the API */ public Shop getShopByIDForParty(String xRequestID, String shopID, String partyID, String xRequestDeadline) throws RestClientException { Object postBody = null; // verify the required parameter 'xRequestID' is set if (xRequestID == null) { throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'xRequestID' when calling getShopByIDForParty"); } // verify the required parameter 'shopID' is set if (shopID == null) { throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'shopID' when calling getShopByIDForParty"); } // verify the required parameter 'partyID' is set if (partyID == null) { throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'partyID' when calling getShopByIDForParty"); } // create path and map variables final Map uriVariables = new HashMap(); uriVariables.put("shopID", shopID); uriVariables.put("partyID", partyID); String path = UriComponentsBuilder.fromPath("/processing/parties/{partyID}/shops/{shopID}").buildAndExpand(uriVariables).toUriString(); final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); final MultiValueMap formParams = new LinkedMultiValueMap(); if (xRequestID != null) headerParams.add("X-Request-ID", apiClient.parameterToString(xRequestID)); if (xRequestDeadline != null) headerParams.add("X-Request-Deadline", apiClient.parameterToString(xRequestDeadline)); final String[] accepts = { "application/json; charset=utf-8" }; final List accept = apiClient.selectHeaderAccept(accepts); final String[] contentTypes = { "application/json; charset=utf-8" }; final MediaType contentType = apiClient.selectHeaderContentType(contentTypes); String[] authNames = new String[] { "bearer" }; ParameterizedTypeReference returnType = new ParameterizedTypeReference() {}; return apiClient.invokeAPI(path, HttpMethod.GET, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); } /** * * Get all shops *

200 - List of shops *

400 - Неверные данные *

401 - Ошибка авторизации * @param xRequestID Уникальный идентификатор запроса к системе * @param xRequestDeadline Максимальное время обработки запроса * @return List<Shop> * @throws RestClientException if an error occurs while attempting to invoke the API */ public List getShops(String xRequestID, String xRequestDeadline) throws RestClientException { Object postBody = null; // verify the required parameter 'xRequestID' is set if (xRequestID == null) { throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'xRequestID' when calling getShops"); } String path = UriComponentsBuilder.fromPath("/processing/shops").build().toUriString(); final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); final MultiValueMap formParams = new LinkedMultiValueMap(); if (xRequestID != null) headerParams.add("X-Request-ID", apiClient.parameterToString(xRequestID)); if (xRequestDeadline != null) headerParams.add("X-Request-Deadline", apiClient.parameterToString(xRequestDeadline)); final String[] accepts = { "application/json; charset=utf-8" }; final List accept = apiClient.selectHeaderAccept(accepts); final String[] contentTypes = { "application/json; charset=utf-8" }; final MediaType contentType = apiClient.selectHeaderContentType(contentTypes); String[] authNames = new String[] { "bearer" }; ParameterizedTypeReference> returnType = new ParameterizedTypeReference>() {}; return apiClient.invokeAPI(path, HttpMethod.GET, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); } /** * * Get all shops *

200 - List of shops *

400 - Неверные данные *

401 - Ошибка авторизации *

404 - Заданный ресурс не найден * @param xRequestID Уникальный идентификатор запроса к системе * @param partyID Уникальный в рамках системы идентификатор участника. * @param xRequestDeadline Максимальное время обработки запроса * @return List<Shop> * @throws RestClientException if an error occurs while attempting to invoke the API */ public List getShopsForParty(String xRequestID, String partyID, String xRequestDeadline) throws RestClientException { Object postBody = null; // verify the required parameter 'xRequestID' is set if (xRequestID == null) { throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'xRequestID' when calling getShopsForParty"); } // verify the required parameter 'partyID' is set if (partyID == null) { throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'partyID' when calling getShopsForParty"); } // create path and map variables final Map uriVariables = new HashMap(); uriVariables.put("partyID", partyID); String path = UriComponentsBuilder.fromPath("/processing/parties/{partyID}/shops").buildAndExpand(uriVariables).toUriString(); final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); final MultiValueMap formParams = new LinkedMultiValueMap(); if (xRequestID != null) headerParams.add("X-Request-ID", apiClient.parameterToString(xRequestID)); if (xRequestDeadline != null) headerParams.add("X-Request-Deadline", apiClient.parameterToString(xRequestDeadline)); final String[] accepts = { "application/json; charset=utf-8" }; final List accept = apiClient.selectHeaderAccept(accepts); final String[] contentTypes = { "application/json; charset=utf-8" }; final MediaType contentType = apiClient.selectHeaderContentType(contentTypes); String[] authNames = new String[] { "bearer" }; ParameterizedTypeReference> returnType = new ParameterizedTypeReference>() {}; return apiClient.invokeAPI(path, HttpMethod.GET, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); } /** * * Приостановить действие магазина. Этот тип заявок обрабатывается платформой автоматически и исполняется сразу же после отправки. *

204 - Shop suspended *

400 - Неверные данные *

401 - Ошибка авторизации *

404 - Заданный ресурс не найден * @param xRequestID Уникальный идентификатор запроса к системе * @param shopID Идентификатор магазина * @param xRequestDeadline Максимальное время обработки запроса * @throws RestClientException if an error occurs while attempting to invoke the API */ public void suspendShop(String xRequestID, String shopID, String xRequestDeadline) throws RestClientException { Object postBody = null; // verify the required parameter 'xRequestID' is set if (xRequestID == null) { throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'xRequestID' when calling suspendShop"); } // verify the required parameter 'shopID' is set if (shopID == null) { throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'shopID' when calling suspendShop"); } // create path and map variables final Map uriVariables = new HashMap(); uriVariables.put("shopID", shopID); String path = UriComponentsBuilder.fromPath("/processing/shops/{shopID}/suspend").buildAndExpand(uriVariables).toUriString(); final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); final MultiValueMap formParams = new LinkedMultiValueMap(); if (xRequestID != null) headerParams.add("X-Request-ID", apiClient.parameterToString(xRequestID)); if (xRequestDeadline != null) headerParams.add("X-Request-Deadline", apiClient.parameterToString(xRequestDeadline)); final String[] accepts = { "application/json; charset=utf-8" }; final List accept = apiClient.selectHeaderAccept(accepts); final String[] contentTypes = { "application/json; charset=utf-8" }; final MediaType contentType = apiClient.selectHeaderContentType(contentTypes); String[] authNames = new String[] { "bearer" }; ParameterizedTypeReference returnType = new ParameterizedTypeReference() {}; apiClient.invokeAPI(path, HttpMethod.PUT, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); } /** * * Приостановить действие магазина. Этот тип заявок обрабатывается платформой автоматически и исполняется сразу же после отправки. *

204 - Shop suspended *

400 - Неверные данные *

401 - Ошибка авторизации *

404 - Заданный ресурс не найден * @param xRequestID Уникальный идентификатор запроса к системе * @param shopID Идентификатор магазина * @param partyID Уникальный в рамках системы идентификатор участника. * @param xRequestDeadline Максимальное время обработки запроса * @throws RestClientException if an error occurs while attempting to invoke the API */ public void suspendShopForParty(String xRequestID, String shopID, String partyID, String xRequestDeadline) throws RestClientException { Object postBody = null; // verify the required parameter 'xRequestID' is set if (xRequestID == null) { throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'xRequestID' when calling suspendShopForParty"); } // verify the required parameter 'shopID' is set if (shopID == null) { throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'shopID' when calling suspendShopForParty"); } // verify the required parameter 'partyID' is set if (partyID == null) { throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'partyID' when calling suspendShopForParty"); } // create path and map variables final Map uriVariables = new HashMap(); uriVariables.put("shopID", shopID); uriVariables.put("partyID", partyID); String path = UriComponentsBuilder.fromPath("/processing/parties/{partyID}/shops/{shopID}/suspend").buildAndExpand(uriVariables).toUriString(); final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); final MultiValueMap formParams = new LinkedMultiValueMap(); if (xRequestID != null) headerParams.add("X-Request-ID", apiClient.parameterToString(xRequestID)); if (xRequestDeadline != null) headerParams.add("X-Request-Deadline", apiClient.parameterToString(xRequestDeadline)); final String[] accepts = { "application/json; charset=utf-8" }; final List accept = apiClient.selectHeaderAccept(accepts); final String[] contentTypes = { "application/json; charset=utf-8" }; final MediaType contentType = apiClient.selectHeaderContentType(contentTypes); String[] authNames = new String[] { "bearer" }; ParameterizedTypeReference returnType = new ParameterizedTypeReference() {}; apiClient.invokeAPI(path, HttpMethod.PUT, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy