Class DiscountCodeReferenceBuilder

java.lang.Object
com.commercetools.api.models.discount_code.DiscountCodeReferenceBuilder
All Implemented Interfaces:
Builder<DiscountCodeReference>

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

     DiscountCodeReference discountCodeReference = DiscountCodeReference.builder()
             .id("{id}")
             .build()
 
  • Constructor Details

    • DiscountCodeReferenceBuilder

      public DiscountCodeReferenceBuilder()
  • Method Details

    • id

      Unique identifier of the referenced DiscountCode.

      Parameters:
      id - value to be set
      Returns:
      Builder
    • obj

      Contains the representation of the expanded DiscountCode. Only present in responses to requests with Reference Expansion for DiscountCodes.

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

      Contains the representation of the expanded DiscountCode. Only present in responses to requests with Reference Expansion for DiscountCodes.

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

      Contains the representation of the expanded DiscountCode. Only present in responses to requests with Reference Expansion for DiscountCodes.

      Parameters:
      obj - value to be set
      Returns:
      Builder
    • getId

      public String getId()

      Unique identifier of the referenced DiscountCode.

      Returns:
      id
    • getObj

      @Nullable public DiscountCode getObj()

      Contains the representation of the expanded DiscountCode. Only present in responses to requests with Reference Expansion for DiscountCodes.

      Returns:
      obj
    • build

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

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

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

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