Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
/*
* FINBOURNE Notifications 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.notifications.api;
import com.finbourne.notifications.ApiCallback;
import com.finbourne.notifications.ApiClient;
import com.finbourne.notifications.ApiException;
import com.finbourne.notifications.ApiResponse;
import com.finbourne.notifications.Configuration;
import com.finbourne.notifications.Pair;
import com.finbourne.notifications.ProgressRequestBody;
import com.finbourne.notifications.ProgressResponseBody;
import com.finbourne.notifications.extensions.ConfigurationOptions;
import com.google.gson.reflect.TypeToken;
import java.io.IOException;
import com.finbourne.notifications.model.CreateSubscription;
import com.finbourne.notifications.model.LusidProblemDetails;
import com.finbourne.notifications.model.LusidValidationProblemDetails;
import com.finbourne.notifications.model.ResourceListOfSubscription;
import com.finbourne.notifications.model.Subscription;
import com.finbourne.notifications.model.UpdateSubscription;
import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class SubscriptionsApi {
private ApiClient localVarApiClient;
private int localHostIndex;
private String localCustomBaseUrl;
public SubscriptionsApi() {
this(Configuration.getDefaultApiClient());
}
public SubscriptionsApi(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 createSubscriptionCall(CreateSubscription createSubscription, final ApiCallback _callback) throws ApiException {
return createSubscriptionCall(createSubscription, _callback, new ConfigurationOptions());
}
private okhttp3.Call createSubscriptionCall(CreateSubscription createSubscription, final ApiCallback _callback, ConfigurationOptions opts) 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 = createSubscription;
// create path and map variables
String localVarPath = "/api/subscriptions";
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, opts);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call createSubscriptionValidateBeforeCall(CreateSubscription createSubscription, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException {
// verify the required parameter 'createSubscription' is set
if (createSubscription == null) {
throw new ApiException("Missing the required parameter 'createSubscription' when calling createSubscription(Async)");
}
return createSubscriptionCall(createSubscription, _callback, opts);
}
private ApiResponse createSubscriptionWithHttpInfo(CreateSubscription createSubscription) throws ApiException {
okhttp3.Call localVarCall = createSubscriptionValidateBeforeCall(createSubscription, null, new ConfigurationOptions());
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
private ApiResponse createSubscriptionWithHttpInfo(CreateSubscription createSubscription, ConfigurationOptions opts) throws ApiException {
okhttp3.Call localVarCall = createSubscriptionValidateBeforeCall(createSubscription, null, opts);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
private okhttp3.Call createSubscriptionAsync(CreateSubscription createSubscription, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = createSubscriptionValidateBeforeCall(createSubscription, _callback, new ConfigurationOptions());
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
private okhttp3.Call createSubscriptionAsync(CreateSubscription createSubscription, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException {
okhttp3.Call localVarCall = createSubscriptionValidateBeforeCall(createSubscription, _callback, opts);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
public class APIcreateSubscriptionRequest {
private final CreateSubscription createSubscription;
private APIcreateSubscriptionRequest(CreateSubscription createSubscription) {
this.createSubscription = createSubscription;
}
/**
* Build call for createSubscription
* @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
201
Created
-
400
The details of the input related failure
-
0
Error response
-
*/
public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException {
return createSubscriptionCall(createSubscription, _callback);
}
/**
* Execute createSubscription request
* @return Subscription
* @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
201
Created
-
400
The details of the input related failure
-
0
Error response
-
*/
public Subscription execute() throws ApiException {
ApiResponse localVarResp = createSubscriptionWithHttpInfo(createSubscription);
return localVarResp.getData();
}
/**
* Execute createSubscription request. Use any specified configuration options to override any other configuration for this request only.
* @return Subscription
* @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
201
Created
-
400
The details of the input related failure
-
0
Error response
-
*/
public Subscription execute(ConfigurationOptions opts) throws ApiException {
ApiResponse localVarResp = createSubscriptionWithHttpInfo(createSubscription, opts);
return localVarResp.getData();
}
/**
* Execute createSubscription request with HTTP info returned
* @return ApiResponse<Subscription>
* @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
201
Created
-
400
The details of the input related failure
-
0
Error response
-
*/
public ApiResponse executeWithHttpInfo() throws ApiException {
return createSubscriptionWithHttpInfo(createSubscription);
}
/**
* Execute createSubscription request with HTTP info returned. Use any specified configuration options to override any other configuration for this request only.
* @return ApiResponse<Subscription>
* @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
201
Created
-
400
The details of the input related failure
-
0
Error response
-
*/
public ApiResponse executeWithHttpInfo(ConfigurationOptions opts) throws ApiException {
return createSubscriptionWithHttpInfo(createSubscription, opts);
}
/**
* Execute createSubscription 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
201
Created
-
400
The details of the input related failure
-
0
Error response
-
*/
public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException {
return createSubscriptionAsync(createSubscription, _callback);
}
/**
* Execute createSubscription request (asynchronously). Use any specified configuration options to override any other configuration for this request only.
* @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
201
Created
-
400
The details of the input related failure
-
0
Error response
-
*/
public okhttp3.Call executeAsync(final ApiCallback _callback, ConfigurationOptions opts) throws ApiException {
return createSubscriptionAsync(createSubscription, _callback, opts);
}
}
/**
* [EXPERIMENTAL] CreateSubscription: Create a new subscription.
*
* @param createSubscription The data to create a subscription (required)
* @return APIcreateSubscriptionRequest
* @http.response.details
Status Code
Description
Response Headers
201
Created
-
400
The details of the input related failure
-
0
Error response
-
*/
public APIcreateSubscriptionRequest createSubscription(CreateSubscription createSubscription) {
return new APIcreateSubscriptionRequest(createSubscription);
}
private okhttp3.Call deleteSubscriptionCall(String scope, String code, final ApiCallback _callback) throws ApiException {
return deleteSubscriptionCall(scope, code, _callback, new ConfigurationOptions());
}
private okhttp3.Call deleteSubscriptionCall(String scope, String code, final ApiCallback _callback, ConfigurationOptions opts) 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/subscriptions/{scope}/{code}"
.replace("{" + "scope" + "}", localVarApiClient.escapeString(scope.toString()))
.replace("{" + "code" + "}", localVarApiClient.escapeString(code.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, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback, opts);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call deleteSubscriptionValidateBeforeCall(String scope, String code, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException {
// verify the required parameter 'scope' is set
if (scope == null) {
throw new ApiException("Missing the required parameter 'scope' when calling deleteSubscription(Async)");
}
// verify the required parameter 'code' is set
if (code == null) {
throw new ApiException("Missing the required parameter 'code' when calling deleteSubscription(Async)");
}
return deleteSubscriptionCall(scope, code, _callback, opts);
}
private ApiResponse deleteSubscriptionWithHttpInfo(String scope, String code) throws ApiException {
okhttp3.Call localVarCall = deleteSubscriptionValidateBeforeCall(scope, code, null, new ConfigurationOptions());
return localVarApiClient.execute(localVarCall);
}
private ApiResponse deleteSubscriptionWithHttpInfo(String scope, String code, ConfigurationOptions opts) throws ApiException {
okhttp3.Call localVarCall = deleteSubscriptionValidateBeforeCall(scope, code, null, opts);
return localVarApiClient.execute(localVarCall);
}
private okhttp3.Call deleteSubscriptionAsync(String scope, String code, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = deleteSubscriptionValidateBeforeCall(scope, code, _callback, new ConfigurationOptions());
localVarApiClient.executeAsync(localVarCall, _callback);
return localVarCall;
}
private okhttp3.Call deleteSubscriptionAsync(String scope, String code, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException {
okhttp3.Call localVarCall = deleteSubscriptionValidateBeforeCall(scope, code, _callback, opts);
localVarApiClient.executeAsync(localVarCall, _callback);
return localVarCall;
}
public class APIdeleteSubscriptionRequest {
private final String scope;
private final String code;
private APIdeleteSubscriptionRequest(String scope, String code) {
this.scope = scope;
this.code = code;
}
/**
* Build call for deleteSubscription
* @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
204
No Content
-
400
The details of the input related failure
-
404
No subscription exists in current scope
-
0
Error response
-
*/
public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException {
return deleteSubscriptionCall(scope, code, _callback);
}
/**
* Execute deleteSubscription request
* @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
204
No Content
-
400
The details of the input related failure
-
404
No subscription exists in current scope
-
0
Error response
-
*/
public void execute() throws ApiException {
deleteSubscriptionWithHttpInfo(scope, code);
}
/**
* Execute deleteSubscription request
* @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
204
No Content
-
400
The details of the input related failure
-
404
No subscription exists in current scope
-
0
Error response
-
*/
public void execute(ConfigurationOptions opts) throws ApiException {
deleteSubscriptionWithHttpInfo(scope, code, opts);
}
/**
* Execute deleteSubscription request with HTTP info returned
* @return ApiResponse<Void>
* @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
204
No Content
-
400
The details of the input related failure
-
404
No subscription exists in current scope
-
0
Error response
-
*/
public ApiResponse executeWithHttpInfo() throws ApiException {
return deleteSubscriptionWithHttpInfo(scope, code);
}
/**
* Execute deleteSubscription request with HTTP info returned. Use any specified configuration options to override any other configuration for this request only.
* @return ApiResponse<Void>
* @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
204
No Content
-
400
The details of the input related failure
-
404
No subscription exists in current scope
-
0
Error response
-
*/
public ApiResponse executeWithHttpInfo(ConfigurationOptions opts) throws ApiException {
return deleteSubscriptionWithHttpInfo(scope, code, opts);
}
/**
* Execute deleteSubscription 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
204
No Content
-
400
The details of the input related failure
-
404
No subscription exists in current scope
-
0
Error response
-
*/
public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException {
return deleteSubscriptionAsync(scope, code, _callback);
}
/**
* Execute deleteSubscription request (asynchronously). Use any specified configuration options to override any other configuration for this request only.
* @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
204
No Content
-
400
The details of the input related failure
-
404
No subscription exists in current scope
-
0
Error response
-
*/
public okhttp3.Call executeAsync(final ApiCallback _callback, ConfigurationOptions opts) throws ApiException {
return deleteSubscriptionAsync(scope, code, _callback, opts);
}
}
/**
* [EXPERIMENTAL] DeleteSubscription: Delete a subscription.
*
* @param scope The scope that identifies a subscription (required)
* @param code The code that identifies a subscription (required)
* @return APIdeleteSubscriptionRequest
* @http.response.details
Status Code
Description
Response Headers
204
No Content
-
400
The details of the input related failure
-
404
No subscription exists in current scope
-
0
Error response
-
*/
public APIdeleteSubscriptionRequest deleteSubscription(String scope, String code) {
return new APIdeleteSubscriptionRequest(scope, code);
}
private okhttp3.Call getSubscriptionCall(String scope, String code, final ApiCallback _callback) throws ApiException {
return getSubscriptionCall(scope, code, _callback, new ConfigurationOptions());
}
private okhttp3.Call getSubscriptionCall(String scope, String code, final ApiCallback _callback, ConfigurationOptions opts) 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/subscriptions/{scope}/{code}"
.replace("{" + "scope" + "}", localVarApiClient.escapeString(scope.toString()))
.replace("{" + "code" + "}", localVarApiClient.escapeString(code.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, opts);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call getSubscriptionValidateBeforeCall(String scope, String code, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException {
// verify the required parameter 'scope' is set
if (scope == null) {
throw new ApiException("Missing the required parameter 'scope' when calling getSubscription(Async)");
}
// verify the required parameter 'code' is set
if (code == null) {
throw new ApiException("Missing the required parameter 'code' when calling getSubscription(Async)");
}
return getSubscriptionCall(scope, code, _callback, opts);
}
private ApiResponse getSubscriptionWithHttpInfo(String scope, String code) throws ApiException {
okhttp3.Call localVarCall = getSubscriptionValidateBeforeCall(scope, code, null, new ConfigurationOptions());
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
private ApiResponse getSubscriptionWithHttpInfo(String scope, String code, ConfigurationOptions opts) throws ApiException {
okhttp3.Call localVarCall = getSubscriptionValidateBeforeCall(scope, code, null, opts);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
private okhttp3.Call getSubscriptionAsync(String scope, String code, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = getSubscriptionValidateBeforeCall(scope, code, _callback, new ConfigurationOptions());
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
private okhttp3.Call getSubscriptionAsync(String scope, String code, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException {
okhttp3.Call localVarCall = getSubscriptionValidateBeforeCall(scope, code, _callback, opts);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
public class APIgetSubscriptionRequest {
private final String scope;
private final String code;
private APIgetSubscriptionRequest(String scope, String code) {
this.scope = scope;
this.code = code;
}
/**
* Build call for getSubscription
* @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
The details of the input related failure
-
404
No subscription exists in current scope
-
0
Error response
-
*/
public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException {
return getSubscriptionCall(scope, code, _callback);
}
/**
* Execute getSubscription request
* @return Subscription
* @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
The details of the input related failure
-
404
No subscription exists in current scope
-
0
Error response
-
*/
public Subscription execute() throws ApiException {
ApiResponse localVarResp = getSubscriptionWithHttpInfo(scope, code);
return localVarResp.getData();
}
/**
* Execute getSubscription request. Use any specified configuration options to override any other configuration for this request only.
* @return Subscription
* @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
The details of the input related failure
-
404
No subscription exists in current scope
-
0
Error response
-
*/
public Subscription execute(ConfigurationOptions opts) throws ApiException {
ApiResponse localVarResp = getSubscriptionWithHttpInfo(scope, code, opts);
return localVarResp.getData();
}
/**
* Execute getSubscription request with HTTP info returned
* @return ApiResponse<Subscription>
* @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
The details of the input related failure
-
404
No subscription exists in current scope
-
0
Error response
-
*/
public ApiResponse executeWithHttpInfo() throws ApiException {
return getSubscriptionWithHttpInfo(scope, code);
}
/**
* Execute getSubscription request with HTTP info returned. Use any specified configuration options to override any other configuration for this request only.
* @return ApiResponse<Subscription>
* @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
The details of the input related failure
-
404
No subscription exists in current scope
-
0
Error response
-
*/
public ApiResponse executeWithHttpInfo(ConfigurationOptions opts) throws ApiException {
return getSubscriptionWithHttpInfo(scope, code, opts);
}
/**
* Execute getSubscription 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
The details of the input related failure
-
404
No subscription exists in current scope
-
0
Error response
-
*/
public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException {
return getSubscriptionAsync(scope, code, _callback);
}
/**
* Execute getSubscription request (asynchronously). Use any specified configuration options to override any other configuration for this request only.
* @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
The details of the input related failure
-
404
No subscription exists in current scope
-
0
Error response
-
*/
public okhttp3.Call executeAsync(final ApiCallback _callback, ConfigurationOptions opts) throws ApiException {
return getSubscriptionAsync(scope, code, _callback, opts);
}
}
/**
* [EXPERIMENTAL] GetSubscription: Get a subscription.
*
* @param scope The scope that identifies a subscription (required)
* @param code The code that identifies a subscription (required)
* @return APIgetSubscriptionRequest
* @http.response.details
Status Code
Description
Response Headers
200
Success
-
400
The details of the input related failure
-
404
No subscription exists in current scope
-
0
Error response
-
*/
public APIgetSubscriptionRequest getSubscription(String scope, String code) {
return new APIgetSubscriptionRequest(scope, code);
}
private okhttp3.Call listSubscriptionsCall(String filter, String sortBy, String page, Integer limit, final ApiCallback _callback) throws ApiException {
return listSubscriptionsCall(filter, sortBy, page, limit, _callback, new ConfigurationOptions());
}
private okhttp3.Call listSubscriptionsCall(String filter, String sortBy, String page, Integer limit, final ApiCallback _callback, ConfigurationOptions opts) 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/subscriptions";
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
if (filter != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("filter", filter));
}
if (sortBy != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("sortBy", sortBy));
}
if (page != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("page", page));
}
if (limit != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("limit", limit));
}
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, opts);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call listSubscriptionsValidateBeforeCall(String filter, String sortBy, String page, Integer limit, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException {
return listSubscriptionsCall(filter, sortBy, page, limit, _callback, opts);
}
private ApiResponse listSubscriptionsWithHttpInfo(String filter, String sortBy, String page, Integer limit) throws ApiException {
okhttp3.Call localVarCall = listSubscriptionsValidateBeforeCall(filter, sortBy, page, limit, null, new ConfigurationOptions());
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
private ApiResponse listSubscriptionsWithHttpInfo(String filter, String sortBy, String page, Integer limit, ConfigurationOptions opts) throws ApiException {
okhttp3.Call localVarCall = listSubscriptionsValidateBeforeCall(filter, sortBy, page, limit, null, opts);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
private okhttp3.Call listSubscriptionsAsync(String filter, String sortBy, String page, Integer limit, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = listSubscriptionsValidateBeforeCall(filter, sortBy, page, limit, _callback, new ConfigurationOptions());
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
private okhttp3.Call listSubscriptionsAsync(String filter, String sortBy, String page, Integer limit, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException {
okhttp3.Call localVarCall = listSubscriptionsValidateBeforeCall(filter, sortBy, page, limit, _callback, opts);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
public class APIlistSubscriptionsRequest {
private String filter;
private String sortBy;
private String page;
private Integer limit;
private APIlistSubscriptionsRequest() {
}
/**
* Set filter
* @param filter Expression to filter the result set. Read more about <a href=\"https://support.lusid.com/filtering-results-from-lusid\"> filtering results from LUSID</a>. (optional)
* @return APIlistSubscriptionsRequest
*/
public APIlistSubscriptionsRequest filter(String filter) {
this.filter = filter;
return this;
}
/**
* Set sortBy
* @param sortBy Fields to order the result set. Read more about <a href=\"https://support.lusid.com/filtering-results-from-lusid\"> filtering results from LUSID</a> (optional)
* @return APIlistSubscriptionsRequest
*/
public APIlistSubscriptionsRequest sortBy(String sortBy) {
this.sortBy = sortBy;
return this;
}
/**
* Set page
* @param page Encoded page string returned from a previous search result that will retrieve the next page of data. When this field is supplied the filter field should not be supplied. (optional)
* @return APIlistSubscriptionsRequest
*/
public APIlistSubscriptionsRequest page(String page) {
this.page = page;
return this;
}
/**
* Set limit
* @param limit The maximum number of subscriptions to retrieve. (optional)
* @return APIlistSubscriptionsRequest
*/
public APIlistSubscriptionsRequest limit(Integer limit) {
this.limit = limit;
return this;
}
/**
* Build call for listSubscriptions
* @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
The details of the input related failure
-
0
Error response
-
*/
public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException {
return listSubscriptionsCall(filter, sortBy, page, limit, _callback);
}
/**
* Execute listSubscriptions request
* @return ResourceListOfSubscription
* @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
The details of the input related failure
-
0
Error response
-
*/
public ResourceListOfSubscription execute() throws ApiException {
ApiResponse localVarResp = listSubscriptionsWithHttpInfo(filter, sortBy, page, limit);
return localVarResp.getData();
}
/**
* Execute listSubscriptions request. Use any specified configuration options to override any other configuration for this request only.
* @return ResourceListOfSubscription
* @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
The details of the input related failure
-
0
Error response
-
*/
public ResourceListOfSubscription execute(ConfigurationOptions opts) throws ApiException {
ApiResponse localVarResp = listSubscriptionsWithHttpInfo(filter, sortBy, page, limit, opts);
return localVarResp.getData();
}
/**
* Execute listSubscriptions request with HTTP info returned
* @return ApiResponse<ResourceListOfSubscription>
* @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
The details of the input related failure
-
0
Error response
-
*/
public ApiResponse executeWithHttpInfo() throws ApiException {
return listSubscriptionsWithHttpInfo(filter, sortBy, page, limit);
}
/**
* Execute listSubscriptions request with HTTP info returned. Use any specified configuration options to override any other configuration for this request only.
* @return ApiResponse<ResourceListOfSubscription>
* @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
The details of the input related failure
-
0
Error response
-
*/
public ApiResponse executeWithHttpInfo(ConfigurationOptions opts) throws ApiException {
return listSubscriptionsWithHttpInfo(filter, sortBy, page, limit, opts);
}
/**
* Execute listSubscriptions 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
The details of the input related failure
-
0
Error response
-
*/
public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException {
return listSubscriptionsAsync(filter, sortBy, page, limit, _callback);
}
/**
* Execute listSubscriptions request (asynchronously). Use any specified configuration options to override any other configuration for this request only.
* @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
*/
public APIlistSubscriptionsRequest listSubscriptions() {
return new APIlistSubscriptionsRequest();
}
private okhttp3.Call updateSubscriptionCall(String scope, String code, UpdateSubscription updateSubscription, final ApiCallback _callback) throws ApiException {
return updateSubscriptionCall(scope, code, updateSubscription, _callback, new ConfigurationOptions());
}
private okhttp3.Call updateSubscriptionCall(String scope, String code, UpdateSubscription updateSubscription, final ApiCallback _callback, ConfigurationOptions opts) 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 = updateSubscription;
// create path and map variables
String localVarPath = "/api/subscriptions/{scope}/{code}"
.replace("{" + "scope" + "}", localVarApiClient.escapeString(scope.toString()))
.replace("{" + "code" + "}", localVarApiClient.escapeString(code.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 = {
"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, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback, opts);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call updateSubscriptionValidateBeforeCall(String scope, String code, UpdateSubscription updateSubscription, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException {
// verify the required parameter 'scope' is set
if (scope == null) {
throw new ApiException("Missing the required parameter 'scope' when calling updateSubscription(Async)");
}
// verify the required parameter 'code' is set
if (code == null) {
throw new ApiException("Missing the required parameter 'code' when calling updateSubscription(Async)");
}
// verify the required parameter 'updateSubscription' is set
if (updateSubscription == null) {
throw new ApiException("Missing the required parameter 'updateSubscription' when calling updateSubscription(Async)");
}
return updateSubscriptionCall(scope, code, updateSubscription, _callback, opts);
}
private ApiResponse updateSubscriptionWithHttpInfo(String scope, String code, UpdateSubscription updateSubscription) throws ApiException {
okhttp3.Call localVarCall = updateSubscriptionValidateBeforeCall(scope, code, updateSubscription, null, new ConfigurationOptions());
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
private ApiResponse updateSubscriptionWithHttpInfo(String scope, String code, UpdateSubscription updateSubscription, ConfigurationOptions opts) throws ApiException {
okhttp3.Call localVarCall = updateSubscriptionValidateBeforeCall(scope, code, updateSubscription, null, opts);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
private okhttp3.Call updateSubscriptionAsync(String scope, String code, UpdateSubscription updateSubscription, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = updateSubscriptionValidateBeforeCall(scope, code, updateSubscription, _callback, new ConfigurationOptions());
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
private okhttp3.Call updateSubscriptionAsync(String scope, String code, UpdateSubscription updateSubscription, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException {
okhttp3.Call localVarCall = updateSubscriptionValidateBeforeCall(scope, code, updateSubscription, _callback, opts);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
public class APIupdateSubscriptionRequest {
private final String scope;
private final String code;
private final UpdateSubscription updateSubscription;
private APIupdateSubscriptionRequest(String scope, String code, UpdateSubscription updateSubscription) {
this.scope = scope;
this.code = code;
this.updateSubscription = updateSubscription;
}
/**
* Build call for updateSubscription
* @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
The details of the input related failure
-
404
No subscription exists in current scope
-
0
Error response
-
*/
public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException {
return updateSubscriptionCall(scope, code, updateSubscription, _callback);
}
/**
* Execute updateSubscription request
* @return Subscription
* @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
The details of the input related failure
-
404
No subscription exists in current scope
-
0
Error response
-
*/
public Subscription execute() throws ApiException {
ApiResponse localVarResp = updateSubscriptionWithHttpInfo(scope, code, updateSubscription);
return localVarResp.getData();
}
/**
* Execute updateSubscription request. Use any specified configuration options to override any other configuration for this request only.
* @return Subscription
* @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
The details of the input related failure
-
404
No subscription exists in current scope
-
0
Error response
-
*/
public Subscription execute(ConfigurationOptions opts) throws ApiException {
ApiResponse localVarResp = updateSubscriptionWithHttpInfo(scope, code, updateSubscription, opts);
return localVarResp.getData();
}
/**
* Execute updateSubscription request with HTTP info returned
* @return ApiResponse<Subscription>
* @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
The details of the input related failure
-
404
No subscription exists in current scope
-
0
Error response
-
*/
public ApiResponse executeWithHttpInfo() throws ApiException {
return updateSubscriptionWithHttpInfo(scope, code, updateSubscription);
}
/**
* Execute updateSubscription request with HTTP info returned. Use any specified configuration options to override any other configuration for this request only.
* @return ApiResponse<Subscription>
* @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
The details of the input related failure
-
404
No subscription exists in current scope
-
0
Error response
-
*/
public ApiResponse executeWithHttpInfo(ConfigurationOptions opts) throws ApiException {
return updateSubscriptionWithHttpInfo(scope, code, updateSubscription, opts);
}
/**
* Execute updateSubscription 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
The details of the input related failure
-
404
No subscription exists in current scope
-
0
Error response
-
*/
public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException {
return updateSubscriptionAsync(scope, code, updateSubscription, _callback);
}
/**
* Execute updateSubscription request (asynchronously). Use any specified configuration options to override any other configuration for this request only.
* @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
The details of the input related failure
-
404
No subscription exists in current scope
-
0
Error response
-
*/
public okhttp3.Call executeAsync(final ApiCallback _callback, ConfigurationOptions opts) throws ApiException {
return updateSubscriptionAsync(scope, code, updateSubscription, _callback, opts);
}
}
/**
* [EXPERIMENTAL] UpdateSubscription: Update an existing subscription.
*
* @param scope The scope that identifies a subscription (required)
* @param code The code that identifies a subscription (required)
* @param updateSubscription The data to update a subscription (required)
* @return APIupdateSubscriptionRequest
* @http.response.details
Status Code
Description
Response Headers
200
Success
-
400
The details of the input related failure
-
404
No subscription exists in current scope
-
0
Error response
-
*/
public APIupdateSubscriptionRequest updateSubscription(String scope, String code, UpdateSubscription updateSubscription) {
return new APIupdateSubscriptionRequest(scope, code, updateSubscription);
}
}