Class ProjectBuilder
Example to create an instance using the builder pattern
Project project = Project.builder()
.version(0.3)
.key("{key}")
.name("{name}")
.plusCountries(countriesBuilder -> countriesBuilder)
.plusCurrencies(currenciesBuilder -> currenciesBuilder)
.plusLanguages(languagesBuilder -> languagesBuilder)
.createdAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
.messages(messagesBuilder -> messagesBuilder)
.carts(cartsBuilder -> cartsBuilder)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
builds Project with checking for non-null required valuesbuilds Project without checking for non-null required valuesbusinessUnits
(BusinessUnitConfiguration businessUnits) Holds configuration specific to Business Units.Holds configuration specific to Business Units.carts
(CartsConfiguration carts) Holds the configuration for the Carts feature.Holds the configuration for the Carts feature.Country code of the geographic location.Country code of the geographic location.createdAt
(ZonedDateTime createdAt) Date and time (UTC) the Project was initially created.currencies
(String... currencies) Currency code of the country.currencies
(List<String> currencies) Currency code of the country.externalOAuth
(ExternalOAuth externalOAuth) Represents a RFC 7662 compliant OAuth 2.0 Token Introspection endpoint.Represents a RFC 7662 compliant OAuth 2.0 Token Introspection endpoint.Holds configuration specific to Business Units.getCarts()
Holds the configuration for the Carts feature.Country code of the geographic location.Date and time (UTC) the Project was initially created.Currency code of the country.Represents a RFC 7662 compliant OAuth 2.0 Token Introspection endpoint.getKey()
User-defined unique identifier of the Project.Language of the country.Holds the configuration for the Messages Query feature.getName()
Name of the Project.Controls indexing of resources to be provided on high performance read-only search endpoints.Holds the configuration for the tiered shipping rates feature.Holds the configuration for the Shopping Lists feature.Date in YYYY-MM format specifying when the trial period for the Project ends.Current version of the Project.User-defined unique identifier of the Project.Language of the country.Language of the country.messages
(MessagesConfiguration messages) Holds the configuration for the Messages Query feature.Holds the configuration for the Messages Query feature.Name of the Project.static ProjectBuilder
of()
factory method for an instance of ProjectBuilderstatic ProjectBuilder
create builder for Project instanceplusCountries
(String... countries) Country code of the geographic location.plusCurrencies
(String... currencies) Currency code of the country.plusLanguages
(String... languages) Language of the country.searchIndexing
(SearchIndexingConfiguration searchIndexing) Controls indexing of resources to be provided on high performance read-only search endpoints.searchIndexing
(Function<SearchIndexingConfigurationBuilder, SearchIndexingConfigurationBuilder> builder) Controls indexing of resources to be provided on high performance read-only search endpoints.shippingRateInputType
(ShippingRateInputType shippingRateInputType) Holds the configuration for the tiered shipping rates feature.shippingRateInputType
(Function<ShippingRateInputTypeBuilder, Builder<? extends ShippingRateInputType>> builder) Holds the configuration for the tiered shipping rates feature.shoppingLists
(ShoppingListsConfiguration shoppingLists) Holds the configuration for the Shopping Lists feature.shoppingLists
(Function<ShoppingListsConfigurationBuilder, ShoppingListsConfigurationBuilder> builder) Holds the configuration for the Shopping Lists feature.trialUntil
(String trialUntil) Date in YYYY-MM format specifying when the trial period for the Project ends.Current version of the Project.Holds configuration specific to Business Units.Holds the configuration for the Carts feature.Represents a RFC 7662 compliant OAuth 2.0 Token Introspection endpoint.Holds the configuration for the Messages Query feature.withSearchIndexing
(Function<SearchIndexingConfigurationBuilder, SearchIndexingConfiguration> builder) Controls indexing of resources to be provided on high performance read-only search endpoints.Holds the configuration for the Shopping Lists feature.
-
Constructor Details
-
ProjectBuilder
public ProjectBuilder()
-
-
Method Details
-
version
Current version of the Project.
- Parameters:
version
- value to be set- Returns:
- Builder
-
key
User-defined unique identifier of the Project.
- Parameters:
key
- value to be set- Returns:
- Builder
-
name
Name of the Project.
- Parameters:
name
- value to be set- Returns:
- Builder
-
countries
Country code of the geographic location.
- Parameters:
countries
- value to be set- Returns:
- Builder
-
countries
Country code of the geographic location.
- Parameters:
countries
- value to be set- Returns:
- Builder
-
plusCountries
Country code of the geographic location.
- Parameters:
countries
- value to be set- Returns:
- Builder
-
currencies
Currency code of the country. A Project must have at least one currency.
- Parameters:
currencies
- value to be set- Returns:
- Builder
-
currencies
Currency code of the country. A Project must have at least one currency.
- Parameters:
currencies
- value to be set- Returns:
- Builder
-
plusCurrencies
Currency code of the country. A Project must have at least one currency.
- Parameters:
currencies
- value to be set- Returns:
- Builder
-
languages
Language of the country. A Project must have at least one language.
- Parameters:
languages
- value to be set- Returns:
- Builder
-
languages
Language of the country. A Project must have at least one language.
- Parameters:
languages
- value to be set- Returns:
- Builder
-
plusLanguages
Language of the country. A Project must have at least one language.
- Parameters:
languages
- value to be set- Returns:
- Builder
-
createdAt
Date and time (UTC) the Project was initially created.
- Parameters:
createdAt
- value to be set- Returns:
- Builder
-
trialUntil
Date in YYYY-MM format specifying when the trial period for the Project ends. Only present on Projects in trial period.
- Parameters:
trialUntil
- value to be set- Returns:
- Builder
-
messages
public ProjectBuilder messages(Function<MessagesConfigurationBuilder, MessagesConfigurationBuilder> builder) Holds the configuration for the Messages Query feature.
- Parameters:
builder
- function to build the messages value- Returns:
- Builder
-
withMessages
public ProjectBuilder withMessages(Function<MessagesConfigurationBuilder, MessagesConfiguration> builder) Holds the configuration for the Messages Query feature.
- Parameters:
builder
- function to build the messages value- Returns:
- Builder
-
messages
Holds the configuration for the Messages Query feature.
- Parameters:
messages
- value to be set- Returns:
- Builder
-
carts
Holds the configuration for the Carts feature.
- Parameters:
builder
- function to build the carts value- Returns:
- Builder
-
withCarts
Holds the configuration for the Carts feature.
- Parameters:
builder
- function to build the carts value- Returns:
- Builder
-
carts
Holds the configuration for the Carts feature.
- Parameters:
carts
- value to be set- Returns:
- Builder
-
shoppingLists
public ProjectBuilder shoppingLists(Function<ShoppingListsConfigurationBuilder, ShoppingListsConfigurationBuilder> builder) Holds the configuration for the Shopping Lists feature. This field may not be present on Projects created before January 2020.
- Parameters:
builder
- function to build the shoppingLists value- Returns:
- Builder
-
withShoppingLists
public ProjectBuilder withShoppingLists(Function<ShoppingListsConfigurationBuilder, ShoppingListsConfiguration> builder) Holds the configuration for the Shopping Lists feature. This field may not be present on Projects created before January 2020.
- Parameters:
builder
- function to build the shoppingLists value- Returns:
- Builder
-
shoppingLists
Holds the configuration for the Shopping Lists feature. This field may not be present on Projects created before January 2020.
- Parameters:
shoppingLists
- value to be set- Returns:
- Builder
-
shippingRateInputType
Holds the configuration for the tiered shipping rates feature.
- Parameters:
shippingRateInputType
- value to be set- Returns:
- Builder
-
shippingRateInputType
public ProjectBuilder shippingRateInputType(Function<ShippingRateInputTypeBuilder, Builder<? extends ShippingRateInputType>> builder) Holds the configuration for the tiered shipping rates feature.
- Parameters:
builder
- function to build the shippingRateInputType value- Returns:
- Builder
-
externalOAuth
Represents a RFC 7662 compliant OAuth 2.0 Token Introspection endpoint.
- Parameters:
builder
- function to build the externalOAuth value- Returns:
- Builder
-
withExternalOAuth
Represents a RFC 7662 compliant OAuth 2.0 Token Introspection endpoint.
- Parameters:
builder
- function to build the externalOAuth value- Returns:
- Builder
-
externalOAuth
Represents a RFC 7662 compliant OAuth 2.0 Token Introspection endpoint.
- Parameters:
externalOAuth
- value to be set- Returns:
- Builder
-
searchIndexing
public ProjectBuilder searchIndexing(Function<SearchIndexingConfigurationBuilder, SearchIndexingConfigurationBuilder> builder) Controls indexing of resources to be provided on high performance read-only search endpoints.
- Parameters:
builder
- function to build the searchIndexing value- Returns:
- Builder
-
withSearchIndexing
public ProjectBuilder withSearchIndexing(Function<SearchIndexingConfigurationBuilder, SearchIndexingConfiguration> builder) Controls indexing of resources to be provided on high performance read-only search endpoints.
- Parameters:
builder
- function to build the searchIndexing value- Returns:
- Builder
-
searchIndexing
Controls indexing of resources to be provided on high performance read-only search endpoints.
- Parameters:
searchIndexing
- value to be set- Returns:
- Builder
-
businessUnits
public ProjectBuilder businessUnits(Function<BusinessUnitConfigurationBuilder, BusinessUnitConfigurationBuilder> builder) Holds configuration specific to Business Units.
- Parameters:
builder
- function to build the businessUnits value- Returns:
- Builder
-
withBusinessUnits
public ProjectBuilder withBusinessUnits(Function<BusinessUnitConfigurationBuilder, BusinessUnitConfiguration> builder) Holds configuration specific to Business Units.
- Parameters:
builder
- function to build the businessUnits value- Returns:
- Builder
-
businessUnits
Holds configuration specific to Business Units.
- Parameters:
businessUnits
- value to be set- Returns:
- Builder
-
getVersion
Current version of the Project.
- Returns:
- version
-
getKey
User-defined unique identifier of the Project.
- Returns:
- key
-
getName
Name of the Project.
- Returns:
- name
-
getCountries
Country code of the geographic location.
- Returns:
- countries
-
getCurrencies
Currency code of the country. A Project must have at least one currency.
- Returns:
- currencies
-
getLanguages
Language of the country. A Project must have at least one language.
- Returns:
- languages
-
getCreatedAt
Date and time (UTC) the Project was initially created.
- Returns:
- createdAt
-
getTrialUntil
Date in YYYY-MM format specifying when the trial period for the Project ends. Only present on Projects in trial period.
- Returns:
- trialUntil
-
getMessages
Holds the configuration for the Messages Query feature.
- Returns:
- messages
-
getCarts
Holds the configuration for the Carts feature.
- Returns:
- carts
-
getShoppingLists
Holds the configuration for the Shopping Lists feature. This field may not be present on Projects created before January 2020.
- Returns:
- shoppingLists
-
getShippingRateInputType
Holds the configuration for the tiered shipping rates feature.
- Returns:
- shippingRateInputType
-
getExternalOAuth
Represents a RFC 7662 compliant OAuth 2.0 Token Introspection endpoint.
- Returns:
- externalOAuth
-
getSearchIndexing
Controls indexing of resources to be provided on high performance read-only search endpoints.
- Returns:
- searchIndexing
-
getBusinessUnits
Holds configuration specific to Business Units.
- Returns:
- businessUnits
-
build
builds Project with checking for non-null required values -
buildUnchecked
builds Project without checking for non-null required values- Returns:
- Project
-
of
factory method for an instance of ProjectBuilder- Returns:
- builder
-
of
create builder for Project instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-