StripeResponse

data class StripeResponse<ResponseBody>(    val code: Int,     val body: ResponseBody?,     val headers: Map<String, List<String>> = emptyMap())

Represents a response from the Stripe servers. Upon receiving the HTTP response, its body is parsed into ResponseBody, such as a String or a File.

Parameters

code

the response code (i.e. 404)

body

the body of the response

headers

any headers associated with the response

Constructors

Link copied to clipboard
fun <ResponseBody> StripeResponse(    code: Int,     body: ResponseBody?,     headers: Map<String, List<String>> = emptyMap())

Functions

Link copied to clipboard
fun getHeaderValue(key: String): List<String>?
Link copied to clipboard
open override fun toString(): String

Properties

Link copied to clipboard
val body: ResponseBody?

the response body

Link copied to clipboard
val code: Int

the response code

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

the response headers

Link copied to clipboard
val isError: Boolean
Link copied to clipboard
val isOk: Boolean
Link copied to clipboard
val isRateLimited: Boolean
Link copied to clipboard
val requestId: RequestId?

Extensions

Link copied to clipboard
fun StripeResponse<String>.responseJson(): JSONObject