public final class StripeRequest
extends java.lang.Object
| Modifier | Constructor and Description |
|---|---|
|
StripeRequest(ApiResource.RequestMethod method,
java.lang.String url,
java.util.Map<java.lang.String,java.lang.Object> params,
RequestOptions options)
Initializes a new instance of the
StripeRequest class. |
protected |
StripeRequest(ApiResource.RequestMethod method,
java.net.URL url,
HttpContent content,
HttpHeaders headers,
java.util.Map<java.lang.String,java.lang.Object> params,
RequestOptions options) |
| Modifier and Type | Method and Description |
|---|---|
HttpContent |
content()
The body of the request.
|
boolean |
equals(java.lang.Object o) |
int |
hashCode() |
HttpHeaders |
headers()
The HTTP headers of the request (
Authorization, Stripe-Version, Stripe-Account, Idempotency-Key...). |
ApiResource.RequestMethod |
method()
The HTTP method for the request (GET, POST or DELETE).
|
RequestOptions |
options()
The special modifiers of the request.
|
java.util.Map<java.lang.String,java.lang.Object> |
params()
The parameters of the request (as an unmodifiable map).
|
java.lang.String |
toString() |
java.net.URL |
url()
The URL for the request.
|
StripeRequest |
withAdditionalHeader(java.lang.String name,
java.lang.String value)
Returns a new
StripeRequest instance with an additional header. |
public StripeRequest(ApiResource.RequestMethod method, java.lang.String url, java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws StripeException
StripeRequest class.method - the HTTP methodurl - the URL of the requestparams - the parameters of the requestoptions - the special modifiers of the requestStripeException - if the request cannot be initialized for any reasonprotected StripeRequest(ApiResource.RequestMethod method, java.net.URL url, HttpContent content, HttpHeaders headers, java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options)
public StripeRequest withAdditionalHeader(java.lang.String name, java.lang.String value)
StripeRequest instance with an additional header.name - the additional header's namevalue - the additional header's valueStripeRequest instancepublic ApiResource.RequestMethod method()
public java.net.URL url()
public HttpContent content()
application/x-www-form-urlencoded or a multipart/form-data payload. For non-POST
requests, this will be null.public HttpHeaders headers()
Authorization, Stripe-Version, Stripe-Account, Idempotency-Key...).public java.util.Map<java.lang.String,java.lang.Object> params()
public RequestOptions options()
public boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object