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

app.cybrid.cybrid_api_id.client.api.BankApplicationsIdpApi Maven / Gradle / Ivy

There is a newer version: v0.119.126
Show newest version
package app.cybrid.cybrid_api_id.client.api;

import app.cybrid.cybrid_api_id.client.ApiClient;

import app.cybrid.cybrid_api_id.client.model.ApplicationListIdpModel;
import app.cybrid.cybrid_api_id.client.model.ApplicationWithSecretIdpModel;
import app.cybrid.cybrid_api_id.client.model.ErrorResponseIdpModel;
import app.cybrid.cybrid_api_id.client.model.PostBankApplicationIdpModel;

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 = "2024-09-21T22:21:18.012560Z[Etc/UTC]")
public class BankApplicationsIdpApi {
    private ApiClient apiClient;

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

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

    public ApiClient getApiClient() {
        return apiClient;
    }

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

    /**
     * Create bank application
     * Creates a bank OAuth2 application.  Required scope: **bank_applications:execute**
     * 

201 - bank application created * @param postBankApplicationIdpModel The postBankApplicationIdpModel parameter * @return ApplicationWithSecretIdpModel * @throws WebClientResponseException if an error occurs while attempting to invoke the API */ private ResponseSpec createBankApplicationRequestCreation(PostBankApplicationIdpModel postBankApplicationIdpModel) throws WebClientResponseException { Object postBody = postBankApplicationIdpModel; // verify the required parameter 'postBankApplicationIdpModel' is set if (postBankApplicationIdpModel == null) { throw new WebClientResponseException("Missing the required parameter 'postBankApplicationIdpModel' when calling createBankApplication", 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(); final String[] localVarAccepts = { "application/json" }; final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); final String[] localVarContentTypes = { "application/json" }; final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); String[] localVarAuthNames = new String[] { "BearerAuth", "oauth2" }; ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {}; return apiClient.invokeAPI("/api/bank_applications", HttpMethod.POST, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } /** * Create bank application * Creates a bank OAuth2 application. Required scope: **bank_applications:execute** *

201 - bank application created * @param postBankApplicationIdpModel The postBankApplicationIdpModel parameter * @return ApplicationWithSecretIdpModel * @throws WebClientResponseException if an error occurs while attempting to invoke the API */ public Mono createBankApplication(PostBankApplicationIdpModel postBankApplicationIdpModel) throws WebClientResponseException { ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {}; return createBankApplicationRequestCreation(postBankApplicationIdpModel).bodyToMono(localVarReturnType); } public Mono> createBankApplicationWithHttpInfo(PostBankApplicationIdpModel postBankApplicationIdpModel) throws WebClientResponseException { ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {}; return createBankApplicationRequestCreation(postBankApplicationIdpModel).toEntity(localVarReturnType); } /** * Delete bank application * Deletes an application.Required scope: **bank_applications:execute** *

204 - Application discarded *

403 - Invalid scope *

404 - application not found *

401 - Unauthorized - Authentication failed, * @param clientId Identifier for the application. * @throws WebClientResponseException if an error occurs while attempting to invoke the API */ private ResponseSpec deleteBankApplicationRequestCreation(String clientId) throws WebClientResponseException { Object postBody = null; // verify the required parameter 'clientId' is set if (clientId == null) { throw new WebClientResponseException("Missing the required parameter 'clientId' when calling deleteBankApplication", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null); } // create path and map variables final Map pathParams = new HashMap(); pathParams.put("client_id", clientId); final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); final MultiValueMap cookieParams = new LinkedMultiValueMap(); final MultiValueMap formParams = new LinkedMultiValueMap(); final String[] localVarAccepts = { "application/json" }; final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); final String[] localVarContentTypes = { }; final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); String[] localVarAuthNames = new String[] { "BearerAuth", "oauth2" }; ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {}; return apiClient.invokeAPI("/api/bank_applications/{client_id}", HttpMethod.DELETE, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } /** * Delete bank application * Deletes an application.Required scope: **bank_applications:execute** *

204 - Application discarded *

403 - Invalid scope *

404 - application not found *

401 - Unauthorized - Authentication failed, * @param clientId Identifier for the application. * @throws WebClientResponseException if an error occurs while attempting to invoke the API */ public Mono deleteBankApplication(String clientId) throws WebClientResponseException { ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {}; return deleteBankApplicationRequestCreation(clientId).bodyToMono(localVarReturnType); } public Mono> deleteBankApplicationWithHttpInfo(String clientId) throws WebClientResponseException { ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {}; return deleteBankApplicationRequestCreation(clientId).toEntity(localVarReturnType); } /** * List bank applications * Retrieve a list of bank OAuth2 applications. Required scope: **banks:read** *

200 - list bank applications * @param page The page index to retrieve. * @param perPage The number of entities per page to return. * @param bankGuid Bank guid to list applications for. * @return ApplicationListIdpModel * @throws WebClientResponseException if an error occurs while attempting to invoke the API */ private ResponseSpec listBankApplicationsRequestCreation(java.math.BigInteger page, java.math.BigInteger perPage, String bankGuid) 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(); queryParams.putAll(apiClient.parameterToMultiValueMap(null, "page", page)); queryParams.putAll(apiClient.parameterToMultiValueMap(null, "per_page", perPage)); queryParams.putAll(apiClient.parameterToMultiValueMap(null, "bank_guid", bankGuid)); final String[] localVarAccepts = { "application/json" }; final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); final String[] localVarContentTypes = { }; final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); String[] localVarAuthNames = new String[] { "BearerAuth", "oauth2" }; ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {}; return apiClient.invokeAPI("/api/bank_applications", HttpMethod.GET, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } /** * List bank applications * Retrieve a list of bank OAuth2 applications. Required scope: **banks:read** *

200 - list bank applications * @param page The page index to retrieve. * @param perPage The number of entities per page to return. * @param bankGuid Bank guid to list applications for. * @return ApplicationListIdpModel * @throws WebClientResponseException if an error occurs while attempting to invoke the API */ public Mono listBankApplications(java.math.BigInteger page, java.math.BigInteger perPage, String bankGuid) throws WebClientResponseException { ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {}; return listBankApplicationsRequestCreation(page, perPage, bankGuid).bodyToMono(localVarReturnType); } public Mono> listBankApplicationsWithHttpInfo(java.math.BigInteger page, java.math.BigInteger perPage, String bankGuid) throws WebClientResponseException { ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {}; return listBankApplicationsRequestCreation(page, perPage, bankGuid).toEntity(localVarReturnType); } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy