Class AssociateBuilder
java.lang.Object
com.commercetools.api.models.business_unit.AssociateBuilder
AssociateBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
Associate associate = Associate.builder()
.plusAssociateRoleAssignments(associateRoleAssignmentsBuilder -> associateRoleAssignmentsBuilder)
.customer(customerBuilder -> customerBuilder)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddAssociateRoleAssignments
(Function<AssociateRoleAssignmentBuilder, AssociateRoleAssignment> builder) Roles assigned to the Associate within a Business Unit.associateRoleAssignments
(AssociateRoleAssignment... associateRoleAssignments) Roles assigned to the Associate within a Business Unit.associateRoleAssignments
(List<AssociateRoleAssignment> associateRoleAssignments) Roles assigned to the Associate within a Business Unit.build()
builds Associate with checking for non-null required valuesbuilds Associate without checking for non-null required valuescustomer
(CustomerReference customer) The Customer that acts as an Associate in the Business Unit.The Customer that acts as an Associate in the Business Unit.Roles assigned to the Associate within a Business Unit.The Customer that acts as an Associate in the Business Unit.static AssociateBuilder
of()
factory method for an instance of AssociateBuilderstatic AssociateBuilder
create builder for Associate instanceplusAssociateRoleAssignments
(AssociateRoleAssignment... associateRoleAssignments) Roles assigned to the Associate within a Business Unit.plusAssociateRoleAssignments
(Function<AssociateRoleAssignmentBuilder, AssociateRoleAssignmentBuilder> builder) Roles assigned to the Associate within a Business Unit.setAssociateRoleAssignments
(Function<AssociateRoleAssignmentBuilder, AssociateRoleAssignment> builder) Roles assigned to the Associate within a Business Unit.withAssociateRoleAssignments
(Function<AssociateRoleAssignmentBuilder, AssociateRoleAssignmentBuilder> builder) Roles assigned to the Associate within a Business Unit.The Customer that acts as an Associate in the Business Unit.
-
Constructor Details
-
AssociateBuilder
public AssociateBuilder()
-
-
Method Details
-
associateRoleAssignments
public AssociateBuilder associateRoleAssignments(AssociateRoleAssignment... associateRoleAssignments) Roles assigned to the Associate within a Business Unit.
- Parameters:
associateRoleAssignments
- value to be set- Returns:
- Builder
-
associateRoleAssignments
public AssociateBuilder associateRoleAssignments(List<AssociateRoleAssignment> associateRoleAssignments) Roles assigned to the Associate within a Business Unit.
- Parameters:
associateRoleAssignments
- value to be set- Returns:
- Builder
-
plusAssociateRoleAssignments
public AssociateBuilder plusAssociateRoleAssignments(AssociateRoleAssignment... associateRoleAssignments) Roles assigned to the Associate within a Business Unit.
- Parameters:
associateRoleAssignments
- value to be set- Returns:
- Builder
-
plusAssociateRoleAssignments
public AssociateBuilder plusAssociateRoleAssignments(Function<AssociateRoleAssignmentBuilder, AssociateRoleAssignmentBuilder> builder) Roles assigned to the Associate within a Business Unit.
- Parameters:
builder
- function to build the associateRoleAssignments value- Returns:
- Builder
-
withAssociateRoleAssignments
public AssociateBuilder withAssociateRoleAssignments(Function<AssociateRoleAssignmentBuilder, AssociateRoleAssignmentBuilder> builder) Roles assigned to the Associate within a Business Unit.
- Parameters:
builder
- function to build the associateRoleAssignments value- Returns:
- Builder
-
addAssociateRoleAssignments
public AssociateBuilder addAssociateRoleAssignments(Function<AssociateRoleAssignmentBuilder, AssociateRoleAssignment> builder) Roles assigned to the Associate within a Business Unit.
- Parameters:
builder
- function to build the associateRoleAssignments value- Returns:
- Builder
-
setAssociateRoleAssignments
public AssociateBuilder setAssociateRoleAssignments(Function<AssociateRoleAssignmentBuilder, AssociateRoleAssignment> builder) Roles assigned to the Associate within a Business Unit.
- Parameters:
builder
- function to build the associateRoleAssignments value- Returns:
- Builder
-
customer
public AssociateBuilder customer(Function<CustomerReferenceBuilder, CustomerReferenceBuilder> builder) The Customer that acts as an Associate in the Business Unit.
- Parameters:
builder
- function to build the customer value- Returns:
- Builder
-
withCustomer
The Customer that acts as an Associate in the Business Unit.
- Parameters:
builder
- function to build the customer value- Returns:
- Builder
-
customer
The Customer that acts as an Associate in the Business Unit.
- Parameters:
customer
- value to be set- Returns:
- Builder
-
getAssociateRoleAssignments
Roles assigned to the Associate within a Business Unit.
- Returns:
- associateRoleAssignments
-
getCustomer
The Customer that acts as an Associate in the Business Unit.
- Returns:
- customer
-
build
builds Associate with checking for non-null required values -
buildUnchecked
builds Associate without checking for non-null required values- Returns:
- Associate
-
of
factory method for an instance of AssociateBuilder- Returns:
- builder
-
of
create builder for Associate instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-