com.maxio.advancedbilling.CompatibilityFactoryImpl Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of advanced-billing-sdk Show documentation
Show all versions of advanced-billing-sdk Show documentation
Ultimate billing and pricing flexibility for B2B SaaS.
Maxio integrates directly into your product, so you can seamlessly manage your product catalog, bill customers, and collect payments.
/*
* AdvancedBilling
*
* This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ).
*/
package com.maxio.advancedbilling;
import com.maxio.advancedbilling.http.Headers;
import com.maxio.advancedbilling.http.client.HttpContext;
import com.maxio.advancedbilling.http.request.HttpBodyRequest;
import com.maxio.advancedbilling.http.request.HttpMethod;
import com.maxio.advancedbilling.http.request.HttpRequest;
import com.maxio.advancedbilling.http.response.HttpResponse;
import com.maxio.advancedbilling.http.response.HttpStringResponse;
import io.apimatic.coreinterfaces.compatibility.CompatibilityFactory;
import io.apimatic.coreinterfaces.http.Context;
import io.apimatic.coreinterfaces.http.HttpHeaders;
import io.apimatic.coreinterfaces.http.Method;
import io.apimatic.coreinterfaces.http.request.Request;
import io.apimatic.coreinterfaces.http.response.ApiResponseType;
import io.apimatic.coreinterfaces.http.response.DynamicType;
import io.apimatic.coreinterfaces.http.response.Response;
import java.io.InputStream;
import java.util.AbstractMap.SimpleEntry;
import java.util.List;
import java.util.Map;
public class CompatibilityFactoryImpl implements CompatibilityFactory {
@Override
public Context createHttpContext(Request request, Response response) {
return new HttpContext((HttpRequest) request, (HttpResponse) response);
}
@Override
public Request createHttpRequest(Method httpMethod,
StringBuilder queryUrlBuilder, HttpHeaders headers, Map queryParameters,
List> formParameters) {
return new HttpRequest(HttpMethod.valueOf(httpMethod.toString()), queryUrlBuilder,
(Headers) headers, queryParameters, formParameters);
}
@Override
public Request createHttpRequest(Method httpMethod,
StringBuilder queryUrlBuilder, HttpHeaders headers, Map queryParameters,
Object body) {
return new HttpBodyRequest(HttpMethod.valueOf(httpMethod.toString()), queryUrlBuilder,
(Headers) headers, queryParameters, body);
}
@Override
public Response createHttpResponse(int code, HttpHeaders headers, InputStream rawBody) {
return new HttpResponse(code, (Headers) headers, rawBody);
}
@Override
public Response createHttpResponse(int code, HttpHeaders headers, InputStream rawBody,
String body) {
return new HttpStringResponse(code, (Headers) headers, rawBody, body);
}
@Override
public HttpHeaders createHttpHeaders(Map> headers) {
return new Headers(headers);
}
@Override
public HttpHeaders createHttpHeaders(HttpHeaders headers) {
return new Headers((Headers) headers);
}
@Override
public HttpHeaders createHttpHeaders() {
return new Headers();
}
@Override
public DynamicType createDynamicResponse(Response httpResponse) {
return null;
}
@Override
public ApiResponseType createApiResponse(int statusCode, HttpHeaders headers, T result) {
return null;
}
}