Class RuleRequesterBuilder

java.lang.Object
com.commercetools.api.models.approval_rule.RuleRequesterBuilder
All Implemented Interfaces:
Builder<RuleRequester>

public class RuleRequesterBuilder extends Object implements Builder<RuleRequester>
RuleRequesterBuilder
Example to create an instance using the builder pattern

     RuleRequester ruleRequester = RuleRequester.builder()
             .associateRole(associateRoleBuilder -> associateRoleBuilder)
             .build()
 
  • Constructor Details

    • RuleRequesterBuilder

      public RuleRequesterBuilder()
  • Method Details

    • associateRole

      The Associate Role that an Associate must hold for the Approval Rule to apply to the Orders they create.

      Parameters:
      builder - function to build the associateRole value
      Returns:
      Builder
    • withAssociateRole

      The Associate Role that an Associate must hold for the Approval Rule to apply to the Orders they create.

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

      public RuleRequesterBuilder associateRole(AssociateRoleKeyReference associateRole)

      The Associate Role that an Associate must hold for the Approval Rule to apply to the Orders they create.

      Parameters:
      associateRole - value to be set
      Returns:
      Builder
    • getAssociateRole

      public AssociateRoleKeyReference getAssociateRole()

      The Associate Role that an Associate must hold for the Approval Rule to apply to the Orders they create.

      Returns:
      associateRole
    • build

      public RuleRequester build()
      builds RuleRequester with checking for non-null required values
      Specified by:
      build in interface Builder<RuleRequester>
      Returns:
      RuleRequester
    • buildUnchecked

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

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

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