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

com.finbourne.horizon.api.InstrumentApi Maven / Gradle / Ivy

There is a newer version: 2.0.603
Show newest version
/*
 * FINBOURNE Horizon API
 *
 * Contact: [email protected]
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */

package com.finbourne.horizon.api;

import com.finbourne.horizon.ApiCallback;
import com.finbourne.horizon.ApiClient;
import com.finbourne.horizon.ApiException;
import com.finbourne.horizon.ApiResponse;
import com.finbourne.horizon.Configuration;
import com.finbourne.horizon.Pair;
import com.finbourne.horizon.ProgressRequestBody;
import com.finbourne.horizon.ProgressResponseBody;

import com.google.gson.reflect.TypeToken;

import java.io.IOException;


import com.finbourne.horizon.model.AllowedParameterValue;
import com.finbourne.horizon.model.LusidProblemDetails;
import com.finbourne.horizon.model.LusidValidationProblemDetails;
import com.finbourne.horizon.model.OnboardInstrumentRequest;
import com.finbourne.horizon.model.OnboardInstrumentResponse;
import com.finbourne.horizon.model.OpenFigiParameterOptionName;
import com.finbourne.horizon.model.OpenFigiSearchResult;
import com.finbourne.horizon.model.PermIdData;
import com.finbourne.horizon.model.VendorProduct;

import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class InstrumentApi {
    private ApiClient localVarApiClient;
    private int localHostIndex;
    private String localCustomBaseUrl;

    public InstrumentApi() {
        this(Configuration.getDefaultApiClient());
    }

    public InstrumentApi(ApiClient apiClient) {
        this.localVarApiClient = apiClient;
    }

    public ApiClient getApiClient() {
        return localVarApiClient;
    }

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

    public int getHostIndex() {
        return localHostIndex;
    }

    public void setHostIndex(int hostIndex) {
        this.localHostIndex = hostIndex;
    }

    public String getCustomBaseUrl() {
        return localCustomBaseUrl;
    }

    public void setCustomBaseUrl(String customBaseUrl) {
        this.localCustomBaseUrl = customBaseUrl;
    }

    private okhttp3.Call createInstrumentCall(OnboardInstrumentRequest onboardInstrumentRequest, final ApiCallback _callback) throws ApiException {
        String basePath = null;
        // Operation Servers
        String[] localBasePaths = new String[] {  };

        // Determine Base Path to Use
        if (localCustomBaseUrl != null){
            basePath = localCustomBaseUrl;
        } else if ( localBasePaths.length > 0 ) {
            basePath = localBasePaths[localHostIndex];
        } else {
            basePath = null;
        }

        Object localVarPostBody = onboardInstrumentRequest;

        // create path and map variables
        String localVarPath = "/api/instrument/onboarding/create";

        List localVarQueryParams = new ArrayList();
        List localVarCollectionQueryParams = new ArrayList();
        Map localVarHeaderParams = new HashMap();
        Map localVarCookieParams = new HashMap();
        Map localVarFormParams = new HashMap();

        final String[] localVarAccepts = {
            "application/json"
        };
        final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
        if (localVarAccept != null) {
            localVarHeaderParams.put("Accept", localVarAccept);
        }

        final String[] localVarContentTypes = {
            "application/json-patch+json",
            "application/json",
            "text/json",
            "application/*+json"
        };
        final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
        if (localVarContentType != null) {
            localVarHeaderParams.put("Content-Type", localVarContentType);
        }

        String[] localVarAuthNames = new String[] { "oauth2" };
        return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
    }

    @SuppressWarnings("rawtypes")
    private okhttp3.Call createInstrumentValidateBeforeCall(OnboardInstrumentRequest onboardInstrumentRequest, final ApiCallback _callback) throws ApiException {
        // verify the required parameter 'onboardInstrumentRequest' is set
        if (onboardInstrumentRequest == null) {
            throw new ApiException("Missing the required parameter 'onboardInstrumentRequest' when calling createInstrument(Async)");
        }

        return createInstrumentCall(onboardInstrumentRequest, _callback);

    }


    private ApiResponse createInstrumentWithHttpInfo(OnboardInstrumentRequest onboardInstrumentRequest) throws ApiException {
        okhttp3.Call localVarCall = createInstrumentValidateBeforeCall(onboardInstrumentRequest, null);
        Type localVarReturnType = new TypeToken(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    private okhttp3.Call createInstrumentAsync(OnboardInstrumentRequest onboardInstrumentRequest, final ApiCallback _callback) throws ApiException {

        okhttp3.Call localVarCall = createInstrumentValidateBeforeCall(onboardInstrumentRequest, _callback);
        Type localVarReturnType = new TypeToken(){}.getType();
        localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
        return localVarCall;
    }

    public class APIcreateInstrumentRequest {
        private final OnboardInstrumentRequest onboardInstrumentRequest;

        private APIcreateInstrumentRequest(OnboardInstrumentRequest onboardInstrumentRequest) {
            this.onboardInstrumentRequest = onboardInstrumentRequest;
        }

        /**
         * Build call for createInstrument
         * @param _callback ApiCallback API callback
         * @return Call to execute
         * @throws ApiException If fail to serialize the request body object
         * @http.response.details
         
Status Code Description Response Headers
200 Success -
400 Bad Request -
0 Error response -
*/ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { return createInstrumentCall(onboardInstrumentRequest, _callback); } /** * Execute createInstrument request * @return OnboardInstrumentResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 Success -
400 Bad Request -
0 Error response -
*/ public OnboardInstrumentResponse execute() throws ApiException { ApiResponse localVarResp = createInstrumentWithHttpInfo(onboardInstrumentRequest); return localVarResp.getData(); } /** * Execute createInstrument request with HTTP info returned * @return ApiResponse<OnboardInstrumentResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 Success -
400 Bad Request -
0 Error response -
*/ public ApiResponse executeWithHttpInfo() throws ApiException { return createInstrumentWithHttpInfo(onboardInstrumentRequest); } /** * Execute createInstrument request (asynchronously) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details
Status Code Description Response Headers
200 Success -
400 Bad Request -
0 Error response -
*/ public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { return createInstrumentAsync(onboardInstrumentRequest, _callback); } } /** * [EARLY ACCESS] CreateInstrument: Creates and masters instruments with third party vendors. * * @param onboardInstrumentRequest (required) * @return APIcreateInstrumentRequest * @http.response.details
Status Code Description Response Headers
200 Success -
400 Bad Request -
0 Error response -
*/ public APIcreateInstrumentRequest createInstrument(OnboardInstrumentRequest onboardInstrumentRequest) { return new APIcreateInstrumentRequest(onboardInstrumentRequest); } private okhttp3.Call getOpenFigiParameterOptionCall(OpenFigiParameterOptionName parameterName, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = null; // create path and map variables String localVarPath = "/api/instrument/onboarding/search/openfigi/parameterOptions"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (parameterName != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("parameterName", parameterName)); } final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } String[] localVarAuthNames = new String[] { "oauth2" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call getOpenFigiParameterOptionValidateBeforeCall(OpenFigiParameterOptionName parameterName, final ApiCallback _callback) throws ApiException { // verify the required parameter 'parameterName' is set if (parameterName == null) { throw new ApiException("Missing the required parameter 'parameterName' when calling getOpenFigiParameterOption(Async)"); } return getOpenFigiParameterOptionCall(parameterName, _callback); } private ApiResponse> getOpenFigiParameterOptionWithHttpInfo(OpenFigiParameterOptionName parameterName) throws ApiException { okhttp3.Call localVarCall = getOpenFigiParameterOptionValidateBeforeCall(parameterName, null); Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call getOpenFigiParameterOptionAsync(OpenFigiParameterOptionName parameterName, final ApiCallback> _callback) throws ApiException { okhttp3.Call localVarCall = getOpenFigiParameterOptionValidateBeforeCall(parameterName, _callback); Type localVarReturnType = new TypeToken>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class APIgetOpenFigiParameterOptionRequest { private final OpenFigiParameterOptionName parameterName; private APIgetOpenFigiParameterOptionRequest(OpenFigiParameterOptionName parameterName) { this.parameterName = parameterName; } /** * Build call for getOpenFigiParameterOption * @param _callback ApiCallback API callback * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details
Status Code Description Response Headers
200 Success -
0 Error response -
*/ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { return getOpenFigiParameterOptionCall(parameterName, _callback); } /** * Execute getOpenFigiParameterOption request * @return List<AllowedParameterValue> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 Success -
0 Error response -
*/ public List execute() throws ApiException { ApiResponse> localVarResp = getOpenFigiParameterOptionWithHttpInfo(parameterName); return localVarResp.getData(); } /** * Execute getOpenFigiParameterOption request with HTTP info returned * @return ApiResponse<List<AllowedParameterValue>> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 Success -
0 Error response -
*/ public ApiResponse> executeWithHttpInfo() throws ApiException { return getOpenFigiParameterOptionWithHttpInfo(parameterName); } /** * Execute getOpenFigiParameterOption request (asynchronously) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details
Status Code Description Response Headers
200 Success -
0 Error response -
*/ public okhttp3.Call executeAsync(final ApiCallback> _callback) throws ApiException { return getOpenFigiParameterOptionAsync(parameterName, _callback); } } /** * [EARLY ACCESS] GetOpenFigiParameterOption: Get all supported market sector values for OpenFigi search * * @param parameterName (required) * @return APIgetOpenFigiParameterOptionRequest * @http.response.details
Status Code Description Response Headers
200 Success -
0 Error response -
*/ public APIgetOpenFigiParameterOptionRequest getOpenFigiParameterOption(OpenFigiParameterOptionName parameterName) { return new APIgetOpenFigiParameterOptionRequest(parameterName); } private okhttp3.Call retrievePermIdResultCall(String id, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = null; // create path and map variables String localVarPath = "/api/instrument/onboarding/search/permid/{id}" .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } String[] localVarAuthNames = new String[] { "oauth2" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call retrievePermIdResultValidateBeforeCall(String id, final ApiCallback _callback) throws ApiException { // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling retrievePermIdResult(Async)"); } return retrievePermIdResultCall(id, _callback); } private ApiResponse> retrievePermIdResultWithHttpInfo(String id) throws ApiException { okhttp3.Call localVarCall = retrievePermIdResultValidateBeforeCall(id, null); Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call retrievePermIdResultAsync(String id, final ApiCallback> _callback) throws ApiException { okhttp3.Call localVarCall = retrievePermIdResultValidateBeforeCall(id, _callback); Type localVarReturnType = new TypeToken>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class APIretrievePermIdResultRequest { private final String id; private APIretrievePermIdResultRequest(String id) { this.id = id; } /** * Build call for retrievePermIdResult * @param _callback ApiCallback API callback * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details
Status Code Description Response Headers
200 Success -
0 Error response -
*/ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { return retrievePermIdResultCall(id, _callback); } /** * Execute retrievePermIdResult request * @return List<PermIdData> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 Success -
0 Error response -
*/ public List execute() throws ApiException { ApiResponse> localVarResp = retrievePermIdResultWithHttpInfo(id); return localVarResp.getData(); } /** * Execute retrievePermIdResult request with HTTP info returned * @return ApiResponse<List<PermIdData>> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 Success -
0 Error response -
*/ public ApiResponse> executeWithHttpInfo() throws ApiException { return retrievePermIdResultWithHttpInfo(id); } /** * Execute retrievePermIdResult request (asynchronously) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details
Status Code Description Response Headers
200 Success -
0 Error response -
*/ public okhttp3.Call executeAsync(final ApiCallback> _callback) throws ApiException { return retrievePermIdResultAsync(id, _callback); } } /** * [EARLY ACCESS] RetrievePermIdResult: Retrieve PermId results from a previous query. * * @param id The execution ID returned by a previous query (required) * @return APIretrievePermIdResultRequest * @http.response.details
Status Code Description Response Headers
200 Success -
0 Error response -
*/ public APIretrievePermIdResultRequest retrievePermIdResult(String id) { return new APIretrievePermIdResultRequest(id); } private okhttp3.Call searchOpenFigiCall(String query, Boolean usePermId, Integer limit, String marketSector, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = null; // create path and map variables String localVarPath = "/api/instrument/onboarding/search/openfigi"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (query != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("query", query)); } if (usePermId != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("usePermId", usePermId)); } if (limit != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("limit", limit)); } if (marketSector != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("marketSector", marketSector)); } final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } String[] localVarAuthNames = new String[] { "oauth2" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call searchOpenFigiValidateBeforeCall(String query, Boolean usePermId, Integer limit, String marketSector, final ApiCallback _callback) throws ApiException { // verify the required parameter 'query' is set if (query == null) { throw new ApiException("Missing the required parameter 'query' when calling searchOpenFigi(Async)"); } // verify the required parameter 'usePermId' is set if (usePermId == null) { throw new ApiException("Missing the required parameter 'usePermId' when calling searchOpenFigi(Async)"); } return searchOpenFigiCall(query, usePermId, limit, marketSector, _callback); } private ApiResponse searchOpenFigiWithHttpInfo(String query, Boolean usePermId, Integer limit, String marketSector) throws ApiException { okhttp3.Call localVarCall = searchOpenFigiValidateBeforeCall(query, usePermId, limit, marketSector, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call searchOpenFigiAsync(String query, Boolean usePermId, Integer limit, String marketSector, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = searchOpenFigiValidateBeforeCall(query, usePermId, limit, marketSector, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class APIsearchOpenFigiRequest { private final String query; private final Boolean usePermId; private Integer limit; private String marketSector; private APIsearchOpenFigiRequest(String query, Boolean usePermId) { this.query = query; this.usePermId = usePermId; } /** * Set limit * @param limit Only affects results rom OpenFigi general text search (optional, default to 25) * @return APIsearchOpenFigiRequest */ public APIsearchOpenFigiRequest limit(Integer limit) { this.limit = limit; return this; } /** * Set marketSector * @param marketSector The market sector to search, defaults to `All`. (optional, default to All) * @return APIsearchOpenFigiRequest */ public APIsearchOpenFigiRequest marketSector(String marketSector) { this.marketSector = marketSector; return this; } /** * Build call for searchOpenFigi * @param _callback ApiCallback API callback * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details
Status Code Description Response Headers
200 Success -
0 Error response -
*/ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { return searchOpenFigiCall(query, usePermId, limit, marketSector, _callback); } /** * Execute searchOpenFigi request * @return OpenFigiSearchResult * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 Success -
0 Error response -
*/ public OpenFigiSearchResult execute() throws ApiException { ApiResponse localVarResp = searchOpenFigiWithHttpInfo(query, usePermId, limit, marketSector); return localVarResp.getData(); } /** * Execute searchOpenFigi request with HTTP info returned * @return ApiResponse<OpenFigiSearchResult> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 Success -
0 Error response -
*/ public ApiResponse executeWithHttpInfo() throws ApiException { return searchOpenFigiWithHttpInfo(query, usePermId, limit, marketSector); } /** * Execute searchOpenFigi request (asynchronously) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details
Status Code Description Response Headers
200 Success -
0 Error response -
*/ public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { return searchOpenFigiAsync(query, usePermId, limit, marketSector, _callback); } } /** * [EARLY ACCESS] SearchOpenFigi: Search OpenFigi for instruments that match the specified terms. * * @param query (required) * @param usePermId Should also search PermId for additional information, defaults to `false`. (required) * @return APIsearchOpenFigiRequest * @http.response.details
Status Code Description Response Headers
200 Success -
0 Error response -
*/ public APIsearchOpenFigiRequest searchOpenFigi(String query, Boolean usePermId) { return new APIsearchOpenFigiRequest(query, usePermId); } private okhttp3.Call vendorsCall(String marketSector, String securityType, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = null; // create path and map variables String localVarPath = "/api/instrument/onboarding/vendors"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (marketSector != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("marketSector", marketSector)); } if (securityType != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("securityType", securityType)); } final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } String[] localVarAuthNames = new String[] { "oauth2" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call vendorsValidateBeforeCall(String marketSector, String securityType, final ApiCallback _callback) throws ApiException { // verify the required parameter 'marketSector' is set if (marketSector == null) { throw new ApiException("Missing the required parameter 'marketSector' when calling vendors(Async)"); } // verify the required parameter 'securityType' is set if (securityType == null) { throw new ApiException("Missing the required parameter 'securityType' when calling vendors(Async)"); } return vendorsCall(marketSector, securityType, _callback); } private ApiResponse> vendorsWithHttpInfo(String marketSector, String securityType) throws ApiException { okhttp3.Call localVarCall = vendorsValidateBeforeCall(marketSector, securityType, null); Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call vendorsAsync(String marketSector, String securityType, final ApiCallback> _callback) throws ApiException { okhttp3.Call localVarCall = vendorsValidateBeforeCall(marketSector, securityType, _callback); Type localVarReturnType = new TypeToken>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class APIvendorsRequest { private final String marketSector; private final String securityType; private APIvendorsRequest(String marketSector, String securityType) { this.marketSector = marketSector; this.securityType = securityType; } /** * Build call for vendors * @param _callback ApiCallback API callback * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details
Status Code Description Response Headers
200 Success -
400 Bad Request -
0 Error response -
*/ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { return vendorsCall(marketSector, securityType, _callback); } /** * Execute vendors request * @return List<VendorProduct> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 Success -
400 Bad Request -
0 Error response -
*/ public List execute() throws ApiException { ApiResponse> localVarResp = vendorsWithHttpInfo(marketSector, securityType); return localVarResp.getData(); } /** * Execute vendors request with HTTP info returned * @return ApiResponse<List<VendorProduct>> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 Success -
400 Bad Request -
0 Error response -
*/ public ApiResponse> executeWithHttpInfo() throws ApiException { return vendorsWithHttpInfo(marketSector, securityType); } /** * Execute vendors request (asynchronously) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details
Status Code Description Response Headers
200 Success -
400 Bad Request -
0 Error response -
*/ public okhttp3.Call executeAsync(final ApiCallback> _callback) throws ApiException { return vendorsAsync(marketSector, securityType, _callback); } } /** * [EARLY ACCESS] Vendors: Gets the VendorProducts of any supported and licenced integrations for a given market sector and security type. * * @param marketSector (required) * @param securityType (required) * @return APIvendorsRequest * @http.response.details
Status Code Description Response Headers
200 Success -
400 Bad Request -
0 Error response -
*/ public APIvendorsRequest vendors(String marketSector, String securityType) { return new APIvendorsRequest(marketSector, securityType); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy