Class CustomerGroupDraftBuilder
java.lang.Object
com.commercetools.api.models.customer_group.CustomerGroupDraftBuilder
- All Implemented Interfaces:
Builder<CustomerGroupDraft>
CustomerGroupDraftBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
CustomerGroupDraft customerGroupDraft = CustomerGroupDraft.builder()
.groupName("{groupName}")
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
builds CustomerGroupDraft with checking for non-null required valuesbuilds CustomerGroupDraft without checking for non-null required valuescustom
(CustomFieldsDraft custom) Custom Fields for the CustomerGroup.Custom Fields for the CustomerGroup.Custom Fields for the CustomerGroup.Unique value which must be different from any value used forname
in CustomerGroup in the Project.getKey()
User-defined unique identifier for the CustomerGroup.Unique value which must be different from any value used forname
in CustomerGroup in the Project.User-defined unique identifier for the CustomerGroup.static CustomerGroupDraftBuilder
of()
factory method for an instance of CustomerGroupDraftBuilderstatic CustomerGroupDraftBuilder
of
(CustomerGroupDraft template) create builder for CustomerGroupDraft instanceCustom Fields for the CustomerGroup.
-
Constructor Details
-
CustomerGroupDraftBuilder
public CustomerGroupDraftBuilder()
-
-
Method Details
-
key
User-defined unique identifier for the CustomerGroup.
- Parameters:
key
- value to be set- Returns:
- Builder
-
groupName
Unique value which must be different from any value used for
name
in CustomerGroup in the Project. If not, a DuplicateField error is returned.- Parameters:
groupName
- value to be set- Returns:
- Builder
-
custom
public CustomerGroupDraftBuilder custom(Function<CustomFieldsDraftBuilder, CustomFieldsDraftBuilder> builder) Custom Fields for the CustomerGroup.
- Parameters:
builder
- function to build the custom value- Returns:
- Builder
-
withCustom
public CustomerGroupDraftBuilder withCustom(Function<CustomFieldsDraftBuilder, CustomFieldsDraft> builder) Custom Fields for the CustomerGroup.
- Parameters:
builder
- function to build the custom value- Returns:
- Builder
-
custom
Custom Fields for the CustomerGroup.
- Parameters:
custom
- value to be set- Returns:
- Builder
-
getKey
User-defined unique identifier for the CustomerGroup.
- Returns:
- key
-
getGroupName
Unique value which must be different from any value used for
name
in CustomerGroup in the Project. If not, a DuplicateField error is returned.- Returns:
- groupName
-
getCustom
Custom Fields for the CustomerGroup.
- Returns:
- custom
-
build
builds CustomerGroupDraft with checking for non-null required values- Specified by:
build
in interfaceBuilder<CustomerGroupDraft>
- Returns:
- CustomerGroupDraft
-
buildUnchecked
builds CustomerGroupDraft without checking for non-null required values- Returns:
- CustomerGroupDraft
-
of
factory method for an instance of CustomerGroupDraftBuilder- Returns:
- builder
-
of
create builder for CustomerGroupDraft instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-