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.
package io.logicdrop.openapi.jersey.api;
import io.logicdrop.openapi.jersey.ApiException;
import io.logicdrop.openapi.jersey.ApiClient;
import io.logicdrop.openapi.jersey.ApiResponse;
import io.logicdrop.openapi.jersey.Configuration;
import io.logicdrop.openapi.jersey.Pair;
import javax.ws.rs.core.GenericType;
import io.logicdrop.openapi.models.SubscriberDetails;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class SubscriptionServicesApi {
private ApiClient apiClient;
public SubscriptionServicesApi() {
this(Configuration.getDefaultApiClient());
}
public SubscriptionServicesApi(ApiClient apiClient) {
this.apiClient = apiClient;
}
public ApiClient getApiClient() {
return apiClient;
}
public void setApiClient(ApiClient apiClient) {
this.apiClient = apiClient;
}
/**
* Create subscription
* Create a client subscription
* @param client Client name (required)
* @param subscriberDetails Create subscription request (required)
* @throws ApiException if fails to make API call
* @http.response.details
Status Code
Description
Response Headers
200
Results of the operation
-
400
Bad request
-
401
Unauthorized
-
403
Forbidden
-
404
No records match
-
500
Backend Error
-
*/
public void createSubscription(String client, SubscriberDetails subscriberDetails) throws ApiException {
createSubscriptionWithHttpInfo(client, subscriberDetails);
}
/**
* Create subscription
* Create a client subscription
* @param client Client name (required)
* @param subscriberDetails Create subscription request (required)
* @return ApiResponse<Void>
* @throws ApiException if fails to make API call
* @http.response.details
Status Code
Description
Response Headers
200
Results of the operation
-
400
Bad request
-
401
Unauthorized
-
403
Forbidden
-
404
No records match
-
500
Backend Error
-
*/
public ApiResponse createSubscriptionWithHttpInfo(String client, SubscriberDetails subscriberDetails) throws ApiException {
Object localVarPostBody = subscriberDetails;
// verify the required parameter 'client' is set
if (client == null) {
throw new ApiException(400, "Missing the required parameter 'client' when calling createSubscription");
}
// verify the required parameter 'subscriberDetails' is set
if (subscriberDetails == null) {
throw new ApiException(400, "Missing the required parameter 'subscriberDetails' when calling createSubscription");
}
// create path and map variables
String localVarPath = "/subscription/{client}/create"
.replaceAll("\\{" + "client" + "\\}", apiClient.escapeString(client.toString()));
// query params
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
"application/json"
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "api", "jwt", "oauth2" };
return apiClient.invokeAPI("SubscriptionServicesApi.createSubscription", localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
}
/**
* Get subscription
* Get client subscription
* @param client Client name (required)
* @throws ApiException if fails to make API call
* @http.response.details
Status Code
Description
Response Headers
200
Results of the operation
-
400
Bad request
-
401
Unauthorized
-
403
Forbidden
-
404
No records match
-
500
Backend Error
-
*/
public void getSubscription(String client) throws ApiException {
getSubscriptionWithHttpInfo(client);
}
/**
* Get subscription
* Get client subscription
* @param client Client name (required)
* @return ApiResponse<Void>
* @throws ApiException if fails to make API call
* @http.response.details
Status Code
Description
Response Headers
200
Results of the operation
-
400
Bad request
-
401
Unauthorized
-
403
Forbidden
-
404
No records match
-
500
Backend Error
-
*/
public ApiResponse getSubscriptionWithHttpInfo(String client) throws ApiException {
Object localVarPostBody = null;
// verify the required parameter 'client' is set
if (client == null) {
throw new ApiException(400, "Missing the required parameter 'client' when calling getSubscription");
}
// create path and map variables
String localVarPath = "/subscription/{client}"
.replaceAll("\\{" + "client" + "\\}", apiClient.escapeString(client.toString()));
// query params
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "api", "jwt", "oauth2" };
return apiClient.invokeAPI("SubscriptionServicesApi.getSubscription", localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
}
/**
* Update subscription
* Update a client subscription
* @param client Client name (required)
* @param subscriberDetails Update subscription request (required)
* @throws ApiException if fails to make API call
* @http.response.details
Status Code
Description
Response Headers
200
Results of the operation
-
400
Bad request
-
401
Unauthorized
-
403
Forbidden
-
404
No records match
-
500
Backend Error
-
*/
public void updateSubscription(String client, SubscriberDetails subscriberDetails) throws ApiException {
updateSubscriptionWithHttpInfo(client, subscriberDetails);
}
/**
* Update subscription
* Update a client subscription
* @param client Client name (required)
* @param subscriberDetails Update subscription request (required)
* @return ApiResponse<Void>
* @throws ApiException if fails to make API call
* @http.response.details
Status Code
Description
Response Headers
200
Results of the operation
-
400
Bad request
-
401
Unauthorized
-
403
Forbidden
-
404
No records match
-
500
Backend Error
-
*/
public ApiResponse updateSubscriptionWithHttpInfo(String client, SubscriberDetails subscriberDetails) throws ApiException {
Object localVarPostBody = subscriberDetails;
// verify the required parameter 'client' is set
if (client == null) {
throw new ApiException(400, "Missing the required parameter 'client' when calling updateSubscription");
}
// verify the required parameter 'subscriberDetails' is set
if (subscriberDetails == null) {
throw new ApiException(400, "Missing the required parameter 'subscriberDetails' when calling updateSubscription");
}
// create path and map variables
String localVarPath = "/subscription/{client}/update"
.replaceAll("\\{" + "client" + "\\}", apiClient.escapeString(client.toString()));
// query params
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
"application/json"
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "api", "jwt", "oauth2" };
return apiClient.invokeAPI("SubscriptionServicesApi.updateSubscription", localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
}
/**
* Change payment method
* Change subscription payment method
* @param client Client name (required)
* @param subscriberDetails Change payment method request (required)
* @throws ApiException if fails to make API call
* @http.response.details
Status Code
Description
Response Headers
200
Results of the operation
-
400
Bad request
-
401
Unauthorized
-
403
Forbidden
-
404
No records match
-
500
Backend Error
-
*/
public void updateSubscriptionPayment(String client, SubscriberDetails subscriberDetails) throws ApiException {
updateSubscriptionPaymentWithHttpInfo(client, subscriberDetails);
}
/**
* Change payment method
* Change subscription payment method
* @param client Client name (required)
* @param subscriberDetails Change payment method request (required)
* @return ApiResponse<Void>
* @throws ApiException if fails to make API call
* @http.response.details
Status Code
Description
Response Headers
200
Results of the operation
-
400
Bad request
-
401
Unauthorized
-
403
Forbidden
-
404
No records match
-
500
Backend Error
-
*/
public ApiResponse updateSubscriptionPaymentWithHttpInfo(String client, SubscriberDetails subscriberDetails) throws ApiException {
Object localVarPostBody = subscriberDetails;
// verify the required parameter 'client' is set
if (client == null) {
throw new ApiException(400, "Missing the required parameter 'client' when calling updateSubscriptionPayment");
}
// verify the required parameter 'subscriberDetails' is set
if (subscriberDetails == null) {
throw new ApiException(400, "Missing the required parameter 'subscriberDetails' when calling updateSubscriptionPayment");
}
// create path and map variables
String localVarPath = "/subscription/{client}/pay"
.replaceAll("\\{" + "client" + "\\}", apiClient.escapeString(client.toString()));
// query params
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
"application/json"
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "api", "jwt", "oauth2" };
return apiClient.invokeAPI("SubscriptionServicesApi.updateSubscriptionPayment", localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
}
}