Class BaseConfigurationBuilder
-
- All Implemented Interfaces:
public abstract class BaseConfigurationBuilder<ConfigurationT extends Configuration, BuilderT extends BaseConfigurationBuilder<ConfigurationT, BuilderT>>Initialize a configuration builder with the required fields and a shopper locale.
-
-
Constructor Summary
Constructors Constructor Description BaseConfigurationBuilder(Environment environment, String clientKey)Initialize a configuration builder with the required fields. BaseConfigurationBuilder(Context context, Environment environment, String clientKey)Alternative constructor that uses the context to fetch the user locale and use it as a shopper locale. BaseConfigurationBuilder(Locale shopperLocale, Environment environment, String clientKey)
-
Method Summary
Modifier and Type Method Description final BuilderTsetShopperLocale(Locale shopperLocale)Allows setting the preferred locale of the shopper. final BuilderTsetAnalyticsConfiguration(AnalyticsConfiguration analyticsConfiguration)Allows configuring the internal analytics of the library. BuilderTsetAmount(Amount amount)Sets the amount of the transaction. final ConfigurationTbuild()Build a configuration from the builder parameters. -
-
Constructor Detail
-
BaseConfigurationBuilder
BaseConfigurationBuilder(Environment environment, String clientKey)
Initialize a configuration builder with the required fields.- Parameters:
environment- The Environment to be used for internal network calls from the SDK to Adyen.clientKey- Your Client Key used for internal network calls from the SDK to Adyen.
-
BaseConfigurationBuilder
BaseConfigurationBuilder(Context context, Environment environment, String clientKey)
Alternative constructor that uses the context to fetch the user locale and use it as a shopper locale.- Parameters:
context- A Contextenvironment- The Environment to be used for internal network calls from the SDK to Adyen.clientKey- Your Client Key used for internal network calls from the SDK to Adyen.
-
BaseConfigurationBuilder
BaseConfigurationBuilder(Locale shopperLocale, Environment environment, String clientKey)
- Parameters:
shopperLocale- The Locale of the shopper.environment- The Environment to be used for internal network calls from the SDK to Adyen.clientKey- Your Client Key used for internal network calls from the SDK to Adyen.
-
-
Method Detail
-
setShopperLocale
final BuilderT setShopperLocale(Locale shopperLocale)
Allows setting the preferred locale of the shopper.
- Parameters:
shopperLocale- The Locale of the shopper.
-
setAnalyticsConfiguration
final BuilderT setAnalyticsConfiguration(AnalyticsConfiguration analyticsConfiguration)
Allows configuring the internal analytics of the library.
- Parameters:
analyticsConfiguration- the analytics configuration.
-
setAmount
BuilderT setAmount(Amount amount)
Sets the amount of the transaction.
Default is null.
Not applicable for the sessions flow. Check out the Sessions API documentation on how to set this value.
- Parameters:
amount- Amount of the transaction.
-
build
final ConfigurationT build()
Build a configuration from the builder parameters.
-
-
-
-