public abstract class APIResource extends StripeObject
| Modifier and Type | Class and Description |
|---|---|
static class |
APIResource.RequestMethod |
static class |
APIResource.RequestType |
| Modifier and Type | Field and Description |
|---|---|
static String |
CHARSET |
static com.google.gson.Gson |
GSON |
PRETTY_PRINT_GSON| Constructor and Description |
|---|
APIResource() |
| Modifier and Type | Method and Description |
|---|---|
protected static String |
classURL(Class<?> clazz) |
protected static String |
classURL(Class<?> clazz,
String apiBase) |
protected static String |
instanceURL(Class<?> clazz,
String id) |
protected static String |
instanceURL(Class<?> clazz,
String id,
String apiBase) |
static <T> T |
multipartRequest(APIResource.RequestMethod method,
String url,
Map<String,Object> params,
Class<T> clazz,
RequestOptions options) |
static <T> T |
request(APIResource.RequestMethod method,
String url,
Map<String,Object> params,
Class<T> clazz,
RequestOptions options) |
static <T extends StripeCollectionInterface> |
requestCollection(String url,
Map<String,Object> params,
Class<T> clazz,
RequestOptions options)
Similar to #request, but specific for use with collection types that
come from the API (i.e.
|
static void |
setStripeResponseGetter(StripeResponseGetter srg) |
protected static String |
singleClassURL(Class<?> clazz) |
protected static String |
singleClassURL(Class<?> clazz,
String apiBase) |
static String |
urlEncode(String str) |
equals, toStringpublic static final com.google.gson.Gson GSON
public static final String CHARSET
public static void setStripeResponseGetter(StripeResponseGetter srg)
protected static String instanceURL(Class<?> clazz, String id) throws InvalidRequestException
InvalidRequestExceptionprotected static String instanceURL(Class<?> clazz, String id, String apiBase) throws InvalidRequestException
InvalidRequestExceptionpublic static String urlEncode(String str) throws UnsupportedEncodingException
UnsupportedEncodingExceptionpublic static <T> T multipartRequest(APIResource.RequestMethod method, String url, Map<String,Object> params, Class<T> clazz, RequestOptions options) throws AuthenticationException, InvalidRequestException, APIConnectionException, CardException, APIException
public static <T> T request(APIResource.RequestMethod method, String url, Map<String,Object> params, Class<T> clazz, RequestOptions options) throws AuthenticationException, InvalidRequestException, APIConnectionException, CardException, APIException
public static <T extends StripeCollectionInterface> T requestCollection(String url, Map<String,Object> params, Class<T> clazz, RequestOptions options) throws AuthenticationException, InvalidRequestException, APIConnectionException, CardException, APIException
Copyright © 2016 Stripe. All rights reserved.