Class StripeResponse


  • public class StripeResponse
    extends java.lang.Object
    A response from Stripe's API, with body represented as a String.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      T body()  
      int code()  
      java.time.Instant date()
      Gets the date of the request, as returned by Stripe.
      HttpHeaders headers()  
      java.lang.String idempotencyKey()
      Gets the idempotency key of the request, as returned by Stripe.
      java.lang.String requestId()
      Gets the ID of the request, as returned by Stripe.
      • Methods inherited from class java.lang.Object

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

      • StripeResponse

        public StripeResponse​(int code,
                              HttpHeaders headers,
                              java.lang.String body)
        Initializes a new instance of the StripeResponse class.
        Parameters:
        code - the HTTP status code of the response
        headers - the HTTP headers of the response
        body - the body of the response
        Throws:
        java.lang.NullPointerException - if headers or body is null
    • Method Detail

      • code

        public final int code()
      • body

        public final T body()
      • date

        public java.time.Instant date()
        Gets the date of the request, as returned by Stripe.
        Returns:
        the date of the request, as returned by Stripe
      • idempotencyKey

        public java.lang.String idempotencyKey()
        Gets the idempotency key of the request, as returned by Stripe.
        Returns:
        the idempotency key of the request, as returned by Stripe
      • requestId

        public java.lang.String requestId()
        Gets the ID of the request, as returned by Stripe.
        Returns:
        the ID of the request, as returned by Stripe