Class StripeResponse


  • public final class StripeResponse
    extends java.lang.Object
    A response from Stripe's API.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String body()
      The body of the response.
      int code()
      The HTTP status code of the response.
      java.time.Instant date()
      Gets the date of the request, as returned by Stripe.
      boolean equals​(java.lang.Object o)  
      int hashCode()  
      HttpHeaders headers()
      The HTTP headers of the response.
      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.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, 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

      • 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
      • code

        public int code()
        The HTTP status code of the response.
      • headers

        public HttpHeaders headers()
        The HTTP headers of the response.
      • body

        public java.lang.String body()
        The body of the response.
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object