Class ProductDiscountReferenceBuilder

java.lang.Object
com.commercetools.api.models.product_discount.ProductDiscountReferenceBuilder
All Implemented Interfaces:
io.vrap.rmf.base.client.Builder<ProductDiscountReference>

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

     ProductDiscountReference productDiscountReference = ProductDiscountReference.builder()
             .id("{id}")
             .build()
 
  • Constructor Details

    • ProductDiscountReferenceBuilder

      public ProductDiscountReferenceBuilder()
  • Method Details

    • id

      Unique identifier of the referenced ProductDiscount.

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

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

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

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

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

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

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

      public String getId()

      Unique identifier of the referenced ProductDiscount.

      Returns:
      id
    • getObj

      @Nullable public ProductDiscount getObj()

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

      Returns:
      obj
    • build

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

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

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

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