ApiRequest

A class representing a Stripe API or Analytics request.

Types

Link copied to clipboard
object Companion
Link copied to clipboard
class Factory(appInfo: AppInfo? = null, apiVersion: String = ApiVersion.get().code, sdkVersion: String = StripeSdkVersion.VERSION)
Link copied to clipboard
data class Options(val apiKey: String, val stripeAccount: String? = null, val idempotencyKey: String? = null) : Parcelable

Data class representing options for a Stripe API request.

Properties

Link copied to clipboard
Link copied to clipboard
open override val headers: Map<String, String>

The HTTP headers attached to this request

Link copied to clipboard
open override val method: StripeRequest.Method

The type(Get/Post/Delete) of this request.

Link copied to clipboard
open override val mimeType: StripeRequest.MimeType

The MimeType of this request, determines the header and body format for a POST request

Link copied to clipboard
Link copied to clipboard
val params: Map<String, *>? = null
Link copied to clipboard
open override var postHeaders: Map<String, String>?

Additional HTTP headers attached if this is a POST request

Link copied to clipboard
open override val retryResponseCodes: Iterable<Int>

A range of HTTP response code indicating this request should be retried

Link copied to clipboard
open override val shouldCache: Boolean = false

Whether the response should be cached or not

Link copied to clipboard
open override val url: String

If the HTTP method is StripeRequest.Method.GET or StripeRequest.Method.DELETE, this is the URL with query string; otherwise, just the URL.

Functions

Link copied to clipboard
open override fun toString(): String
Link copied to clipboard
open override fun writePostBody(outputStream: OutputStream)

Writes the body of a POST request with OutputStream, left empty for non-POST requests