Class StripeResponse

java.lang.Object
com.stripe.net.StripeResponse

public class StripeResponse extends Object
A response from Stripe's API, with body represented as a String.
  • Constructor Details

    • StripeResponse

      public StripeResponse(int code, HttpHeaders headers, 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:
      NullPointerException - if headers or body is null
  • Method Details

    • code

      public final int code()
    • headers

      public final HttpHeaders headers()
    • body

      public final String body()
    • date

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

      public 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 String requestId()
      Gets the ID of the request, as returned by Stripe.
      Returns:
      the ID of the request, as returned by Stripe