Package com.stripe.net
Class StripeRequest
java.lang.Object
com.stripe.net.StripeRequest
A request to Stripe's API.
-
Constructor Summary
ModifierConstructorDescriptionStripeRequest
(ApiResource.RequestMethod method, String url, Map<String, Object> params, RequestOptions options) Initializes a new instance of theStripeRequest
class.protected
StripeRequest
(ApiResource.RequestMethod method, URL url, HttpContent content, HttpHeaders headers, Map<String, Object> params, RequestOptions options) -
Method Summary
Modifier and TypeMethodDescriptioncontent()
The body of the request.boolean
int
hashCode()
headers()
The HTTP headers of the request (Authorization
,Stripe-Version
,Stripe-Account
,Idempotency-Key
...).method()
The HTTP method for the request (GET, POST or DELETE).options()
The special modifiers of the request.params()
The parameters of the request (as an unmodifiable map).toString()
url()
The URL for the request.withAdditionalHeader
(String name, String value) Returns a newStripeRequest
instance with an additional header.
-
Constructor Details
-
StripeRequest
public StripeRequest(ApiResource.RequestMethod method, String url, Map<String, Object> params, RequestOptions options) throws StripeExceptionInitializes a new instance of theStripeRequest
class.- Parameters:
method
- the HTTP methodurl
- the URL of the requestparams
- the parameters of the requestoptions
- the special modifiers of the request- Throws:
StripeException
- if the request cannot be initialized for any reason
-
StripeRequest
protected StripeRequest(ApiResource.RequestMethod method, URL url, HttpContent content, HttpHeaders headers, Map<String, Object> params, RequestOptions options)
-
-
Method Details
-
withAdditionalHeader
Returns a newStripeRequest
instance with an additional header.- Parameters:
name
- the additional header's namevalue
- the additional header's value- Returns:
- the new
StripeRequest
instance
-
method
The HTTP method for the request (GET, POST or DELETE). -
url
The URL for the request. If this is a GET or DELETE request, the URL also includes the request parameters in its query string. -
content
The body of the request. For POST requests, this will be either aapplication/x-www-form-urlencoded
or amultipart/form-data
payload. For non-POST requests, this will benull
. -
headers
The HTTP headers of the request (Authorization
,Stripe-Version
,Stripe-Account
,Idempotency-Key
...). -
params
The parameters of the request (as an unmodifiable map). -
options
The special modifiers of the request. -
equals
-
hashCode
public int hashCode() -
toString
-