public abstract class WebpayApiResource extends Object
| Constructor and Description |
|---|
WebpayApiResource() |
| Modifier and Type | Method and Description |
|---|---|
static Map<String,String> |
buildHeaders(Options options)
Builds the headers for a Webpay API request.
|
static <T> T |
execute(String endpoint,
HttpUtil.RequestMethod method,
Options options,
Class<T> clazz)
Executes a Webpay API request.
|
static <T> T |
execute(String endpoint,
HttpUtil.RequestMethod method,
WebpayApiRequest request,
Options options)
Executes a Webpay API request with a request body.
|
static <T> T |
execute(String endpoint,
HttpUtil.RequestMethod method,
WebpayApiRequest request,
Options options,
Class<T> clazz)
Executes a Webpay API request with a request body.
|
static <T> List<T> |
executeToList(String endpoint,
HttpUtil.RequestMethod method,
Options options,
Class<T[]> clazz)
Executes a Webpay API request and returns a list of responses.
|
static <T> List<T> |
executeToList(String endpoint,
HttpUtil.RequestMethod method,
WebpayApiRequest request,
Options options,
Class<T[]> clazz)
Executes a Webpay API request with a request body and returns a list of responses.
|
public static Map<String,String> buildHeaders(Options options)
options - The options for the request.public static <T> T execute(String endpoint, HttpUtil.RequestMethod method, Options options, Class<T> clazz) throws TransbankException, IOException
T - The type of the response.endpoint - The endpoint for the request.method - The HTTP method for the request.options - The options for the request.clazz - The class of the response.TransbankException - If an error occurs during the request.IOException - If an error occurs during the request.public static <T> T execute(String endpoint, HttpUtil.RequestMethod method, WebpayApiRequest request, Options options) throws TransbankException, IOException
T - The type of the response.endpoint - The endpoint for the request.method - The HTTP method for the request.request - The request body.options - The options for the request.TransbankException - If an error occurs during the request.IOException - If an error occurs during the request.public static <T> T execute(String endpoint, HttpUtil.RequestMethod method, WebpayApiRequest request, Options options, Class<T> clazz) throws TransbankException, IOException
T - The type of the response.endpoint - The endpoint for the request.method - The HTTP method for the request.request - The request body.options - The options for the request.clazz - The class of the response.TransbankException - If an error occurs during the request.IOException - If an error occurs during the request.public static <T> List<T> executeToList(String endpoint, HttpUtil.RequestMethod method, Options options, Class<T[]> clazz) throws TransbankException, IOException
T - The type of the response.endpoint - The endpoint for the request.method - The HTTP method for the request.options - The options for the request.clazz - The class of the response.TransbankException - If an error occurs during the request.IOException - If an error occurs during the request.public static <T> List<T> executeToList(String endpoint, HttpUtil.RequestMethod method, WebpayApiRequest request, Options options, Class<T[]> clazz) throws TransbankException, IOException
T - The type of the response.endpoint - The endpoint for the request.method - The HTTP method for the request.request - The request body.options - The options for the request.clazz - The class of the response.TransbankException - If an error occurs during the request.IOException - If an error occurs during the request.Copyright © 2018–2024. All rights reserved.