Class RelativeAllocationDraftBuilder

java.lang.Object
com.commercetools.api.models.cart.RelativeAllocationDraftBuilder
All Implemented Interfaces:
Builder<RelativeAllocationDraft>

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

     RelativeAllocationDraft relativeAllocationDraft = RelativeAllocationDraft.builder()
             .percentage(0.3)
             .build()
 
  • Constructor Details

    • RelativeAllocationDraftBuilder

      public RelativeAllocationDraftBuilder()
  • Method Details

    • percentage

      public RelativeAllocationDraftBuilder percentage(Integer percentage)

      Percentage of the Order total allocated to the Payment Method. For example, 100 allocates the entire Order total.

      Parameters:
      percentage - value to be set
      Returns:
      Builder
    • getPercentage

      public Integer getPercentage()

      Percentage of the Order total allocated to the Payment Method. For example, 100 allocates the entire Order total.

      Returns:
      percentage
    • build

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

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

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

      create builder for RelativeAllocationDraft instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder