Package com.stripe.exception

Examples of com.stripe.exception.InvalidRequestException


  protected static String instanceURL(Class<?> clazz, String id) throws InvalidRequestException {
    try {
      return String.format("%s/%s", classURL(clazz), urlEncode(id));
    } catch (UnsupportedEncodingException e) {
      throw new InvalidRequestException("Unable to encode parameters to "
          + CHARSET
          + ". Please contact support@stripe.com for assistance.",
          null, e);
    }
  }
View Full Code Here


              String.format("%s[%s]", key, nestedEntry.getKey()),
              nestedEntry.getValue());
        }
        flatParams.putAll(flattenParams(flatNestedMap));
      } else if ("".equals(value)) {
          throw new InvalidRequestException("You cannot set '"+key+"' to an empty string. "+
                    "We interpret empty strings as null in requests. "+
                    "You may set '"+key+"' to null to delete the property.",
                    key, null);
      } else if (value == null) {
        flatParams.put(key, "");
View Full Code Here

    String query;

    try {
      query = createQuery(params);
    } catch (UnsupportedEncodingException e) {
      throw new InvalidRequestException("Unable to encode parameters to "
          + CHARSET
          + ". Please contact support@stripe.com for assistance.",
          null, e);
    }
View Full Code Here

      CardException, APIException {
    APIResource.Error error = GSON.fromJson(rBody,
        APIResource.ErrorContainer.class).error;
    switch (rCode) {
    case 400:
      throw new InvalidRequestException(error.message, error.param, null);
    case 404:
      throw new InvalidRequestException(error.message, error.param, null);
    case 401:
      throw new AuthenticationException(error.message);
    case 402:
      throw new CardException(error.message, error.code, error.param, null);
    default:
View Full Code Here

TOP

Related Classes of com.stripe.exception.InvalidRequestException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.