Package com.stripe.net
Class RequestOptions.RequestOptionsBuilder
- java.lang.Object
-
- com.stripe.net.RequestOptions.RequestOptionsBuilder
-
- Enclosing class:
- RequestOptions
public static final class RequestOptions.RequestOptionsBuilder extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description RequestOptionsBuilder()
Constructs a request options builder with the global parameters (API key, client ID and API version) as default values.
-
Method Summary
-
-
-
Method Detail
-
getApiKey
public java.lang.String getApiKey()
-
setApiKey
public RequestOptions.RequestOptionsBuilder setApiKey(java.lang.String apiKey)
-
clearApiKey
public RequestOptions.RequestOptionsBuilder clearApiKey()
-
getClientId
public java.lang.String getClientId()
-
setClientId
public RequestOptions.RequestOptionsBuilder setClientId(java.lang.String clientId)
-
clearClientId
public RequestOptions.RequestOptionsBuilder clearClientId()
-
setStripeVersion
public RequestOptions.RequestOptionsBuilder setStripeVersion(java.lang.String stripeVersion)
-
clearStripeVersion
public RequestOptions.RequestOptionsBuilder clearStripeVersion()
-
setIdempotencyKey
public RequestOptions.RequestOptionsBuilder setIdempotencyKey(java.lang.String idempotencyKey)
-
getConnectTimeout
public int getConnectTimeout()
-
setConnectTimeout
public RequestOptions.RequestOptionsBuilder setConnectTimeout(int timeout)
Sets the timeout value that will be used for making new connections to the Stripe API (in milliseconds).- Parameters:
timeout
- timeout value in milliseconds
-
getReadTimeout
public int getReadTimeout()
-
setReadTimeout
public RequestOptions.RequestOptionsBuilder setReadTimeout(int timeout)
Sets the timeout value that will be used when reading data from an established connection to the Stripe API (in milliseconds).Note that this value should be set conservatively because some API requests can take time and a short timeout increases the likelihood of causing a problem in the backend.
- Parameters:
timeout
- timeout value in milliseconds
-
clearIdempotencyKey
public RequestOptions.RequestOptionsBuilder clearIdempotencyKey()
-
getIdempotencyKey
public java.lang.String getIdempotencyKey()
-
getStripeAccount
public java.lang.String getStripeAccount()
-
setStripeAccount
public RequestOptions.RequestOptionsBuilder setStripeAccount(java.lang.String stripeAccount)
-
clearStripeAccount
public RequestOptions.RequestOptionsBuilder clearStripeAccount()
-
build
public RequestOptions build()
Constructs aRequestOptions
with the specified values.
-
-