Class StripeException

    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected StripeException​(java.lang.String message, java.lang.String requestId, java.lang.String code, java.lang.Integer statusCode)  
      protected StripeException​(java.lang.String message, java.lang.String requestId, java.lang.String code, java.lang.Integer statusCode, java.lang.Throwable e)
      Constructs a new Stripe exception with the specified details.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getCode()  
      java.lang.String getMessage()
      Returns a description of the exception, including the HTTP status code and request ID (if applicable).
      java.lang.String getRequestId()  
      java.lang.Integer getStatusCode()  
      StripeError getStripeError()
      The error resource returned by Stripe's API that caused the exception.
      java.lang.String getUserMessage()
      Returns a description of the user facing exception
      void setStripeError​(StripeError stripeError)
      The error resource returned by Stripe's API that caused the exception.
      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • StripeException

        protected StripeException​(java.lang.String message,
                                  java.lang.String requestId,
                                  java.lang.String code,
                                  java.lang.Integer statusCode)
      • StripeException

        protected StripeException​(java.lang.String message,
                                  java.lang.String requestId,
                                  java.lang.String code,
                                  java.lang.Integer statusCode,
                                  java.lang.Throwable e)
        Constructs a new Stripe exception with the specified details.
    • Method Detail

      • getMessage

        public java.lang.String getMessage()
        Returns a description of the exception, including the HTTP status code and request ID (if applicable).
        Overrides:
        getMessage in class java.lang.Throwable
        Returns:
        a string representation of the exception.
      • getUserMessage

        public java.lang.String getUserMessage()
        Returns a description of the user facing exception
        Returns:
        a string representation of the user facing exception.
      • getStripeError

        public StripeError getStripeError()
        The error resource returned by Stripe's API that caused the exception.
      • getCode

        public java.lang.String getCode()
      • getRequestId

        public java.lang.String getRequestId()
      • getStatusCode

        public java.lang.Integer getStatusCode()
      • setStripeError

        public void setStripeError​(StripeError stripeError)
        The error resource returned by Stripe's API that caused the exception.