Class AssociateBuilder

java.lang.Object
com.commercetools.api.models.business_unit.AssociateBuilder
All Implemented Interfaces:
io.vrap.rmf.base.client.Builder<Associate>

public class AssociateBuilder extends Object implements io.vrap.rmf.base.client.Builder<Associate>
AssociateBuilder
Example to create an instance using the builder pattern

     Associate associate = Associate.builder()
             .plusAssociateRoleAssignments(associateRoleAssignmentsBuilder -> associateRoleAssignmentsBuilder)
             .customer(customerBuilder -> customerBuilder)
             .build()
 
  • 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

      Roles assigned to the Associate within a Business Unit.

      Parameters:
      builder - function to build the associateRoleAssignments value
      Returns:
      Builder
    • withAssociateRoleAssignments

      Roles assigned to the Associate within a Business Unit.

      Parameters:
      builder - function to build the associateRoleAssignments value
      Returns:
      Builder
    • addAssociateRoleAssignments

      Roles assigned to the Associate within a Business Unit.

      Parameters:
      builder - function to build the associateRoleAssignments value
      Returns:
      Builder
    • setAssociateRoleAssignments

      Roles assigned to the Associate within a Business Unit.

      Parameters:
      builder - function to build the associateRoleAssignments value
      Returns:
      Builder
    • customer

      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

      public AssociateBuilder customer(CustomerReference customer)

      The Customer that acts as an Associate in the Business Unit.

      Parameters:
      customer - value to be set
      Returns:
      Builder
    • getAssociateRoleAssignments

      public List<AssociateRoleAssignment> getAssociateRoleAssignments()

      Roles assigned to the Associate within a Business Unit.

      Returns:
      associateRoleAssignments
    • getCustomer

      public CustomerReference getCustomer()

      The Customer that acts as an Associate in the Business Unit.

      Returns:
      customer
    • build

      public Associate build()
      builds Associate with checking for non-null required values
      Specified by:
      build in interface io.vrap.rmf.base.client.Builder<Associate>
      Returns:
      Associate
    • buildUnchecked

      public Associate buildUnchecked()
      builds Associate without checking for non-null required values
      Returns:
      Associate
    • of

      public static AssociateBuilder of()
      factory method for an instance of AssociateBuilder
      Returns:
      builder
    • of

      public static AssociateBuilder of(Associate template)
      create builder for Associate instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder