- java.lang.Object
-
- co.tryterra.terraclient.RequestConfig.Builder
-
- Enclosing class:
- RequestConfig
public static class RequestConfig.Builder extends Object
Builder class forRequestConfig
instances.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RequestConfig
build()
Create aRequestConfig
object from this builder.RequestConfig.Builder
retryIfRateLimited(boolean value)
Set whether to retry the request if the request has been rate limited by the provider.RequestConfig.Builder
toWebhook(boolean value)
Set whether the data returned from the API request will be in the response body or sent to the developer webhook.RequestConfig.Builder
withSamples(RequestConfig.Samples value)
Set whether the data returned from the API request will include sample data.
-
-
-
Method Detail
-
build
public RequestConfig build()
Create aRequestConfig
object from this builder.- Returns:
- the created
RequestConfig
object
-
toWebhook
public RequestConfig.Builder toWebhook(boolean value)
Set whether the data returned from the API request will be in the response body or sent to the developer webhook. If this is not specified, it will default totrue
(the data will be sent to webhook).- Parameters:
value
- boolean to set theto_webhook
parameter to- Returns:
- this builder object for method chaining
-
retryIfRateLimited
public RequestConfig.Builder retryIfRateLimited(boolean value)
Set whether to retry the request if the request has been rate limited by the provider.- Parameters:
value
- boolean to set theto_webhook
parameter to- Returns:
- this builder object for method chaining
-
withSamples
public RequestConfig.Builder withSamples(RequestConfig.Samples value)
Set whether the data returned from the API request will include sample data. If this is not specified, it will default toRequestConfig.Samples.ACCOUNT_DEFAULT
.- Parameters:
value
-RequestConfig.Samples
enum value to set thewith_samples
parameter to- Returns:
- this builder object for method chaining
-
-