Class CustomerGroupAssignmentBuilder
java.lang.Object
com.commercetools.api.models.customer.CustomerGroupAssignmentBuilder
- All Implemented Interfaces:
Builder<CustomerGroupAssignment>
public class CustomerGroupAssignmentBuilder
extends Object
implements Builder<CustomerGroupAssignment>
CustomerGroupAssignmentBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
CustomerGroupAssignment customerGroupAssignment = CustomerGroupAssignment.builder()
.customerGroup(customerGroupBuilder -> customerGroupBuilder)
.build()
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()
builds CustomerGroupAssignment with checking for non-null required valuesbuilds CustomerGroupAssignment without checking for non-null required valuescustomerGroup
(CustomerGroupReference customerGroup) Reference to a Customer Group.Reference to a Customer Group.Reference to a Customer Group.of()
factory method for an instance of CustomerGroupAssignmentBuilderof
(CustomerGroupAssignment template) create builder for CustomerGroupAssignment instanceReference to a Customer Group.
-
Constructor Details
-
CustomerGroupAssignmentBuilder
public CustomerGroupAssignmentBuilder()
-
-
Method Details
-
customerGroup
public CustomerGroupAssignmentBuilder customerGroup(Function<CustomerGroupReferenceBuilder, CustomerGroupReferenceBuilder> builder) Reference to a Customer Group.
- Parameters:
builder
- function to build the customerGroup value- Returns:
- Builder
-
withCustomerGroup
public CustomerGroupAssignmentBuilder withCustomerGroup(Function<CustomerGroupReferenceBuilder, CustomerGroupReference> builder) Reference to a Customer Group.
- Parameters:
builder
- function to build the customerGroup value- Returns:
- Builder
-
customerGroup
Reference to a Customer Group.
- Parameters:
customerGroup
- value to be set- Returns:
- Builder
-
getCustomerGroup
Reference to a Customer Group.
- Returns:
- customerGroup
-
build
builds CustomerGroupAssignment with checking for non-null required values- Specified by:
build
in interfaceBuilder<CustomerGroupAssignment>
- Returns:
- CustomerGroupAssignment
-
buildUnchecked
builds CustomerGroupAssignment without checking for non-null required values- Returns:
- CustomerGroupAssignment
-
of
factory method for an instance of CustomerGroupAssignmentBuilder- Returns:
- builder
-
of
create builder for CustomerGroupAssignment instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-