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

dev.vality.swag.payments.api.PayoutsApi 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.InlineResponse40013;
import dev.vality.swag.payments.model.Payout;
import dev.vality.swag.payments.model.PayoutParams;
import dev.vality.swag.payments.model.PayoutTool;
import dev.vality.swag.payments.model.Schedule;

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.PayoutsApi")
public class PayoutsApi {
    private ApiClient apiClient;

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

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

    public ApiClient getApiClient() {
        return apiClient;
    }

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

    /**
     * 
     * Создать новую выплату и отправить её на премодерацию. 
     * 

201 - Выплата создана *

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

401 - Ошибка авторизации * @param xRequestID Уникальный идентификатор запроса к системе * @param payoutParams The payoutParams parameter * @param xRequestDeadline Максимальное время обработки запроса * @return Payout * @throws RestClientException if an error occurs while attempting to invoke the API */ public Payout createPayout(String xRequestID, PayoutParams payoutParams, String xRequestDeadline) throws RestClientException { Object postBody = payoutParams; // verify the required parameter 'xRequestID' is set if (xRequestID == null) { throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'xRequestID' when calling createPayout"); } // verify the required parameter 'payoutParams' is set if (payoutParams == null) { throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'payoutParams' when calling createPayout"); } String path = UriComponentsBuilder.fromPath("/processing/payouts").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.POST, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); } /** * * Получение данных по выплате *

200 - Найдена выплата *

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

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

404 - Заданный ресурс не найден * @param xRequestID Уникальный идентификатор запроса к системе * @param payoutID Идентификатор вывода * @param xRequestDeadline Максимальное время обработки запроса * @return Payout * @throws RestClientException if an error occurs while attempting to invoke the API */ public Payout getPayout(String xRequestID, String payoutID, 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 getPayout"); } // verify the required parameter 'payoutID' is set if (payoutID == null) { throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'payoutID' when calling getPayout"); } // create path and map variables final Map uriVariables = new HashMap(); uriVariables.put("payoutID", payoutID); String path = UriComponentsBuilder.fromPath("/processing/payouts/{payoutID}").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); } /** * * Получить данные средства вывода по его идентификатору *

200 - Данные средства вывода *

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

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

404 - Заданный ресурс не найден * @param xRequestID Уникальный идентификатор запроса к системе * @param contractID Идентификатор договора * @param payoutToolID Идентификатор средства вывода * @param xRequestDeadline Максимальное время обработки запроса * @return PayoutTool * @throws RestClientException if an error occurs while attempting to invoke the API */ public PayoutTool getPayoutToolByID(String xRequestID, String contractID, String payoutToolID, 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 getPayoutToolByID"); } // verify the required parameter 'contractID' is set if (contractID == null) { throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'contractID' when calling getPayoutToolByID"); } // verify the required parameter 'payoutToolID' is set if (payoutToolID == null) { throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'payoutToolID' when calling getPayoutToolByID"); } // create path and map variables final Map uriVariables = new HashMap(); uriVariables.put("contractID", contractID); uriVariables.put("payoutToolID", payoutToolID); String path = UriComponentsBuilder.fromPath("/processing/contracts/{contractID}/payout_tools/{payoutToolID}").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); } /** * * Получить данные средства вывода по его идентификатору *

200 - Данные средства вывода *

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

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

404 - Заданный ресурс не найден * @param xRequestID Уникальный идентификатор запроса к системе * @param contractID Идентификатор договора * @param payoutToolID Идентификатор средства вывода * @param partyID Уникальный в рамках системы идентификатор участника. * @param xRequestDeadline Максимальное время обработки запроса * @return PayoutTool * @throws RestClientException if an error occurs while attempting to invoke the API */ public PayoutTool getPayoutToolByIDForParty(String xRequestID, String contractID, String payoutToolID, 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 getPayoutToolByIDForParty"); } // verify the required parameter 'contractID' is set if (contractID == null) { throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'contractID' when calling getPayoutToolByIDForParty"); } // verify the required parameter 'payoutToolID' is set if (payoutToolID == null) { throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'payoutToolID' when calling getPayoutToolByIDForParty"); } // verify the required parameter 'partyID' is set if (partyID == null) { throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'partyID' when calling getPayoutToolByIDForParty"); } // create path and map variables final Map uriVariables = new HashMap(); uriVariables.put("contractID", contractID); uriVariables.put("payoutToolID", payoutToolID); uriVariables.put("partyID", partyID); String path = UriComponentsBuilder.fromPath("/processing/parties/{partyID}/contracts/{contractID}/payout_tools/{payoutToolID}").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); } /** * * Получить данные всех средств вывода *

200 - Набор средств вывода *

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

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

404 - Заданный ресурс не найден * @param xRequestID Уникальный идентификатор запроса к системе * @param contractID Идентификатор договора * @param xRequestDeadline Максимальное время обработки запроса * @return List<PayoutTool> * @throws RestClientException if an error occurs while attempting to invoke the API */ public List getPayoutTools(String xRequestID, String contractID, 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 getPayoutTools"); } // verify the required parameter 'contractID' is set if (contractID == null) { throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'contractID' when calling getPayoutTools"); } // create path and map variables final Map uriVariables = new HashMap(); uriVariables.put("contractID", contractID); String path = UriComponentsBuilder.fromPath("/processing/contracts/{contractID}/payout_tools").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); } /** * * Получить данные всех средств вывода *

200 - Набор средств вывода *

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

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

404 - Заданный ресурс не найден * @param xRequestID Уникальный идентификатор запроса к системе * @param contractID Идентификатор договора * @param partyID Уникальный в рамках системы идентификатор участника. * @param xRequestDeadline Максимальное время обработки запроса * @return List<PayoutTool> * @throws RestClientException if an error occurs while attempting to invoke the API */ public List getPayoutToolsForParty(String xRequestID, String contractID, 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 getPayoutToolsForParty"); } // verify the required parameter 'contractID' is set if (contractID == null) { throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'contractID' when calling getPayoutToolsForParty"); } // verify the required parameter 'partyID' is set if (partyID == null) { throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'partyID' when calling getPayoutToolsForParty"); } // create path and map variables final Map uriVariables = new HashMap(); uriVariables.put("contractID", contractID); uriVariables.put("partyID", partyID); String path = UriComponentsBuilder.fromPath("/processing/parties/{partyID}/contracts/{contractID}/payout_tools").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); } /** * * Получить данные расписания выводов по ее ID *

200 - Schedule found *

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

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

404 - Заданный ресурс не найден * @param xRequestID Уникальный идентификатор запроса к системе * @param scheduleID Schedule reference * @param xRequestDeadline Максимальное время обработки запроса * @return Schedule * @throws RestClientException if an error occurs while attempting to invoke the API */ public Schedule getScheduleByRef(String xRequestID, Integer scheduleID, 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 getScheduleByRef"); } // verify the required parameter 'scheduleID' is set if (scheduleID == null) { throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'scheduleID' when calling getScheduleByRef"); } // create path and map variables final Map uriVariables = new HashMap(); uriVariables.put("scheduleID", scheduleID); String path = UriComponentsBuilder.fromPath("/processing/schedules/{scheduleID}").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); } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy