- java.lang.Object
-
- co.tryterra.terraclient.RequestConfig.Builder
-
- Enclosing class:
- RequestConfig
public static class RequestConfig.Builder extends Object
Builder class forRequestConfiginstances.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RequestConfigbuild()Create aRequestConfigobject from this builder.RequestConfig.BuilderretryIfRateLimited(boolean value)Set whether to retry the request if the request has been rate limited by the provider.RequestConfig.BuildertoWebhook(boolean value)Set whether the data returned from the API request will be in the response body or sent to the developer webhook.RequestConfig.BuilderwithSamples(RequestConfig.Samples value)Set whether the data returned from the API request will include sample data.
-
-
-
Method Detail
-
build
public RequestConfig build()
Create aRequestConfigobject from this builder.- Returns:
- the created
RequestConfigobject
-
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_webhookparameter 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_webhookparameter 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.Samplesenum value to set thewith_samplesparameter to- Returns:
- this builder object for method chaining
-
-