Class OrderCustomFieldChangedMessagePayloadBuilder

java.lang.Object
com.commercetools.api.models.message.OrderCustomFieldChangedMessagePayloadBuilder
All Implemented Interfaces:
Builder<OrderCustomFieldChangedMessagePayload>

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

     OrderCustomFieldChangedMessagePayload orderCustomFieldChangedMessagePayload = OrderCustomFieldChangedMessagePayload.builder()
             .name("{name}")
             .build()
 
  • Constructor Details

    • OrderCustomFieldChangedMessagePayloadBuilder

      public OrderCustomFieldChangedMessagePayloadBuilder()
  • Method Details

    • name

      Name of the Custom Field that changed.

      Parameters:
      name - value to be set
      Returns:
      Builder
    • value

      CustomFieldValue based on the FieldType after the Set CustomField update action.

      Parameters:
      value - value to be set
      Returns:
      Builder
    • previousValue

      public OrderCustomFieldChangedMessagePayloadBuilder previousValue(@Nullable Object previousValue)

      CustomFieldValue based on the FieldType before the Set CustomField update action. When there has not been a Custom Field with the name on the Order before, an Order Custom Field Added Message is generated instead.

      Parameters:
      previousValue - value to be set
      Returns:
      Builder
    • getName

      public String getName()

      Name of the Custom Field that changed.

      Returns:
      name
    • getValue

      public Object getValue()

      CustomFieldValue based on the FieldType after the Set CustomField update action.

      Returns:
      value
    • getPreviousValue

      @Nullable public Object getPreviousValue()

      CustomFieldValue based on the FieldType before the Set CustomField update action. When there has not been a Custom Field with the name on the Order before, an Order Custom Field Added Message is generated instead.

      Returns:
      previousValue
    • build

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

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

      factory method for an instance of OrderCustomFieldChangedMessagePayloadBuilder
      Returns:
      builder
    • of

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