Class CartReferenceBuilder

java.lang.Object
com.commercetools.api.models.cart.CartReferenceBuilder
All Implemented Interfaces:
io.vrap.rmf.base.client.Builder<CartReference>

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

     CartReference cartReference = CartReference.builder()
             .id("{id}")
             .build()
 
  • Constructor Details

  • Method Details

    • id

      Unique identifier of the referenced Cart.

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

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

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

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

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

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

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

      public String getId()

      Unique identifier of the referenced Cart.

      Returns:
      id
    • getObj

      @Nullable public Cart getObj()

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

      Returns:
      obj
    • build

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

      builds CartReference without checking for non-null required values
      Returns:
      CartReference
    • of

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

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