Class OrderReferenceBuilder

java.lang.Object
com.commercetools.api.models.order.OrderReferenceBuilder
All Implemented Interfaces:
Builder<OrderReference>

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

     OrderReference orderReference = OrderReference.builder()
             .id("{id}")
             .build()
 
  • Constructor Details

    • OrderReferenceBuilder

      public OrderReferenceBuilder()
  • Method Details

    • id

      public OrderReferenceBuilder id(String id)

      Unique identifier of the referenced Order.

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

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

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

      public OrderReferenceBuilder withObj(Function<OrderBuilder,Order> builder)

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

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

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

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

      public String getId()

      Unique identifier of the referenced Order.

      Returns:
      id
    • getObj

      @Nullable public Order getObj()

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

      Returns:
      obj
    • build

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

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

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

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