Package com.stripe.net
Class StripeResponse
- java.lang.Object
-
- com.stripe.net.StripeResponse
-
public final class StripeResponse extends java.lang.ObjectA response from Stripe's API.
-
-
Constructor Summary
Constructors Constructor Description StripeResponse(int code, HttpHeaders headers, java.lang.String body)Initializes a new instance of theStripeResponseclass.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Stringbody()The body of the response.intcode()The HTTP status code of the response.java.time.Instantdate()Gets the date of the request, as returned by Stripe.booleanequals(java.lang.Object o)inthashCode()HttpHeadersheaders()The HTTP headers of the response.java.lang.StringidempotencyKey()Gets the idempotency key of the request, as returned by Stripe.java.lang.StringrequestId()Gets the ID of the request, as returned by Stripe.java.lang.StringtoString()
-
-
-
Constructor Detail
-
StripeResponse
public StripeResponse(int code, HttpHeaders headers, java.lang.String body)Initializes a new instance of theStripeResponseclass.- Parameters:
code- the HTTP status code of the responseheaders- the HTTP headers of the responsebody- the body of the response- Throws:
java.lang.NullPointerException- ifheadersorbodyisnull
-
-
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:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-