Class StripeRequest

java.lang.Object
com.stripe.net.StripeRequest

public final class StripeRequest extends Object
A request to Stripe's API.
  • Constructor Details

  • Method Details

    • withAdditionalHeader

      public StripeRequest withAdditionalHeader(String name, String value)
      Returns a new StripeRequest instance with an additional header.
      Parameters:
      name - the additional header's name
      value - the additional header's value
      Returns:
      the new StripeRequest instance
    • method

      public ApiResource.RequestMethod method()
      The HTTP method for the request (GET, POST or DELETE).
    • url

      public URL 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

      public HttpContent content()
      The body of the request. For POST requests, this will be either a application/x-www-form-urlencoded or a multipart/form-data payload. For non-POST requests, this will be null.
    • headers

      public HttpHeaders headers()
      The HTTP headers of the request (Authorization, Stripe-Version, Stripe-Account, Idempotency-Key...).
    • params

      public Map<String,Object> params()
      The parameters of the request (as an unmodifiable map).
    • options

      public RequestOptions options()
      The special modifiers of the request.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object