com.stripe.net
Class APIResource

java.lang.Object
  extended by com.stripe.model.StripeObject
      extended by com.stripe.net.APIResource
Direct Known Subclasses:
Account, ApplicationFee, Balance, BalanceTransaction, Card, Charge, Coupon, Customer, Event, Fee, Invoice, InvoiceItem, Plan, Recipient, StripeColllectionAPIResource, Subscription, Token, Transfer

public abstract class APIResource
extends StripeObject


Nested Class Summary
protected static class APIResource.RequestMethod
           
 
Field Summary
static String CHARSET
           
static com.google.gson.Gson GSON
           
 
Fields inherited from class com.stripe.model.StripeObject
PRETTY_PRINT_GSON
 
Constructor Summary
APIResource()
           
 
Method Summary
protected static
<T> T
_request(APIResource.RequestMethod method, String url, Map<String,Object> params, Class<T> clazz, String apiKey)
           
protected static String classURL(Class<?> clazz)
           
protected static String instanceURL(Class<?> clazz, String id)
           
protected static
<T> T
request(APIResource.RequestMethod method, String url, Map<String,Object> params, Class<T> clazz, String apiKey)
           
protected static String singleClassURL(Class<?> clazz)
           
 
Methods inherited from class com.stripe.model.StripeObject
toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

GSON

public static final com.google.gson.Gson GSON

CHARSET

public static final String CHARSET
See Also:
Constant Field Values
Constructor Detail

APIResource

public APIResource()
Method Detail

singleClassURL

protected static String singleClassURL(Class<?> clazz)

classURL

protected static String classURL(Class<?> clazz)

instanceURL

protected static String instanceURL(Class<?> clazz,
                                    String id)
                             throws InvalidRequestException
Throws:
InvalidRequestException

request

protected static <T> T request(APIResource.RequestMethod method,
                               String url,
                               Map<String,Object> params,
                               Class<T> clazz,
                               String apiKey)
                    throws AuthenticationException,
                           InvalidRequestException,
                           APIConnectionException,
                           CardException,
                           APIException
Throws:
AuthenticationException
InvalidRequestException
APIConnectionException
CardException
APIException

_request

protected static <T> T _request(APIResource.RequestMethod method,
                                String url,
                                Map<String,Object> params,
                                Class<T> clazz,
                                String apiKey)
                     throws AuthenticationException,
                            InvalidRequestException,
                            APIConnectionException,
                            CardException,
                            APIException
Throws:
AuthenticationException
InvalidRequestException
APIConnectionException
CardException
APIException


Copyright © 2014 Stripe. All rights reserved.