Package com.stripe.net
Class StripeResponse
- java.lang.Object
-
- com.stripe.net.StripeResponse
-
public class StripeResponse extends java.lang.Object
A response from Stripe's API, with body represented as a String.
-
-
Constructor Summary
Constructors Constructor Description StripeResponse(int code, HttpHeaders headers, java.lang.String body)
Initializes a new instance of theStripeResponse
class.
-
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.
-
-
-
Constructor Detail
-
StripeResponse
public StripeResponse(int code, HttpHeaders headers, java.lang.String body)
Initializes a new instance of theStripeResponse
class.- Parameters:
code
- the HTTP status code of the responseheaders
- the HTTP headers of the responsebody
- the body of the response- Throws:
java.lang.NullPointerException
- ifheaders
orbody
isnull
-
-
Method Detail
-
code
public final int code()
-
headers
public final HttpHeaders headers()
-
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
-
-