Package com.stripe.net
Class RequestOptions.RequestOptionsBuilder
java.lang.Object
com.stripe.net.RequestOptions.RequestOptionsBuilder
- Enclosing class:
- RequestOptions
-
Constructor Summary
ConstructorDescriptionConstructs a request options builder with the global parameters (API key and client ID) as default values. -
Method Summary
Modifier and TypeMethodDescriptionbuild()
Constructs aRequestOptions
with the specified values.int
setBaseUrl
(String baseUrl) setClientId
(String clientId) setConnectionProxy
(Proxy connectionProxy) setConnectTimeout
(Integer timeout) Sets the timeout value that will be used for making new connections to the Stripe API (in milliseconds).setIdempotencyKey
(String idempotencyKey) setMaxNetworkRetries
(Integer maxNetworkRetries) Sets the maximum number of times the request will be retried in the event of a failure.setProxyCredential
(PasswordAuthentication proxyCredential) setReadTimeout
(Integer timeout) Sets the timeout value that will be used when reading data from an established connection to the Stripe API (in milliseconds).setStripeAccount
(String stripeAccount) unsafeSetStripeVersionOverride
(RequestOptions.RequestOptionsBuilder builder, String stripeVersionOverride) This is for internal use only.
-
Constructor Details
-
RequestOptionsBuilder
public RequestOptionsBuilder()Constructs a request options builder with the global parameters (API key and client ID) as default values.
-
-
Method Details
-
getApiKey
-
setApiKey
-
clearApiKey
-
getClientId
-
setClientId
-
clearClientId
-
setIdempotencyKey
-
getConnectTimeout
public int getConnectTimeout() -
setConnectTimeout
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
-
setReadTimeout
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
-
getMaxNetworkRetries
-
setMaxNetworkRetries
Sets the maximum number of times the request will be retried in the event of a failure.- Parameters:
maxNetworkRetries
- the number of times to retry the request
-
getConnectionProxy
-
setConnectionProxy
-
getProxyCredential
-
setProxyCredential
public RequestOptions.RequestOptionsBuilder setProxyCredential(PasswordAuthentication proxyCredential) -
clearIdempotencyKey
-
getIdempotencyKey
-
getStripeAccount
-
setStripeAccount
-
clearStripeAccount
-
unsafeSetStripeVersionOverride
public static RequestOptions.RequestOptionsBuilder unsafeSetStripeVersionOverride(RequestOptions.RequestOptionsBuilder builder, String stripeVersionOverride) This is for internal use only. SeeEphemeralKey.create(Map, RequestOptions)
. Setting this yourself will result in a version mismatch between your request and this library's types, which can result in missing data and deserialization errors.Static, so that it doesn't appear in IDE auto-completion alongside the other setters.
- Returns:
- option builder
-
setBaseUrl
-
build
Constructs aRequestOptions
with the specified values.
-