Class ValidFromAndUntilValueBuilder

java.lang.Object
com.commercetools.history.models.change_value.ValidFromAndUntilValueBuilder
All Implemented Interfaces:
Builder<ValidFromAndUntilValue>

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

     ValidFromAndUntilValue validFromAndUntilValue = ValidFromAndUntilValue.builder()
             .validFrom("{validFrom}")
             .validUntil("{validUntil}")
             .build()
 
  • Constructor Details

    • ValidFromAndUntilValueBuilder

      public ValidFromAndUntilValueBuilder()
  • Method Details

    • validFrom

      public ValidFromAndUntilValueBuilder validFrom(String validFrom)

      Date and time (UTC) from when the Discount is effective.

      Parameters:
      validFrom - value to be set
      Returns:
      Builder
    • validUntil

      public ValidFromAndUntilValueBuilder validUntil(String validUntil)

      Date and time (UTC) until when the Discount is effective.

      Parameters:
      validUntil - value to be set
      Returns:
      Builder
    • getValidFrom

      public String getValidFrom()

      Date and time (UTC) from when the Discount is effective.

      Returns:
      validFrom
    • getValidUntil

      public String getValidUntil()

      Date and time (UTC) until when the Discount is effective.

      Returns:
      validUntil
    • build

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

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

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

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