Package com.stripe
Class StripeClient.StripeClientBuilder
java.lang.Object
com.stripe.StripeClient.StripeClientBuilder
- Enclosing class:
- StripeClient
-
Constructor Summary
ConstructorsConstructorDescriptionConstructs a request options builder with the global parameters (API key and client ID) as default values. -
Method Summary
Modifier and TypeMethodDescriptionbuild()
Constructs aStripeResponseGetterOptions
with the specified values.int
int
int
setApiBase
(String address) Set the base URL for the Stripe API.setAuthenticator
(Authenticator authenticator) setClientId
(String clientId) Set the client id, used for OAuth with Stripe Connect.setConnectBase
(String address) Set the base URL for the Stripe Connect API.setConnectionProxy
(Proxy connectionProxy) Set proxy to tunnel all Stripe connections.setConnectTimeout
(int timeout) Sets the timeout value that will be used for making new connections to the Stripe API (in milliseconds).setFilesBase
(String address) Set the base URL for the Stripe Files API.setMaxNetworkRetries
(int maxNetworkRetries) Sets the maximum number of times the request will be retried in the event of a failure.setMeterEventsBase
(String address) Set the base URL for the Stripe Meter Events API.setProxyCredential
(PasswordAuthentication proxyCredential) Provide credential for proxy authorization if required.setReadTimeout
(int timeout) Sets the timeout value that will be used when reading data from an established connection to the Stripe API (in milliseconds).setStripeAccount
(String account) setStripeContext
(String context)
-
Constructor Details
-
StripeClientBuilder
public StripeClientBuilder()Constructs a request options builder with the global parameters (API key and client ID) as default values.
-
-
Method Details
-
getAuthenticator
-
setAuthenticator
-
getApiKey
-
setApiKey
-
clearApiKey
-
getClientId
-
setClientId
Set the client id, used for OAuth with Stripe Connect.- Parameters:
clientId
- client ID
-
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
public int 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
public int 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
Set proxy to tunnel all Stripe connections.- Parameters:
connectionProxy
- proxy host and port setting
-
getProxyCredential
-
setProxyCredential
Provide credential for proxy authorization if required.- Parameters:
proxyCredential
- proxy required userName and password
-
setApiBase
Set the base URL for the Stripe API. By default this is "https://api.stripe.com".This only affects requests made with a
BaseAddress
of API. UsesetFilesBase(java.lang.String)
orsetConnectBase(java.lang.String)
to interpect requests with other bases. -
getApiBase
-
setFilesBase
Set the base URL for the Stripe Files API. By default this is "https://files.stripe.com".This only affects requests made with a
BaseAddress
of FILES. -
getFilesBase
-
setConnectBase
Set the base URL for the Stripe Connect API. By default this is "https://connect.stripe.com".This only affects requests made with a
BaseAddress
of CONNECT. -
getConnectBase
-
setMeterEventsBase
Set the base URL for the Stripe Meter Events API. By default this is "https://events.stripe.com".This only affects requests made with a
BaseAddress
of EVENTMES. -
getMeterEventsBase
-
setStripeAccount
-
getStripeAccount
-
setStripeContext
-
getStripeContext
-
build
Constructs aStripeResponseGetterOptions
with the specified values.
-