Class OrderSetParcelCustomFieldActionBuilder

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

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

     OrderSetParcelCustomFieldAction orderSetParcelCustomFieldAction = OrderSetParcelCustomFieldAction.builder()
             .name("{name}")
             .build()
 
  • Constructor Details

    • OrderSetParcelCustomFieldActionBuilder

      public OrderSetParcelCustomFieldActionBuilder()
  • Method Details

    • parcelId

      id of an existing Parcel.

      Either parcelId or parcelKey must be provided.

      Parameters:
      parcelId - value to be set
      Returns:
      Builder
    • parcelKey

      key of an existing Parcel.

      Either parcelId or parcelKey must be provided.

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

      Name of the Custom Field.

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

      If value is absent or null, this field will be removed if it exists. Removing a field that does not exist returns an InvalidOperation error. If value is provided, it is set for the field defined by name.

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

      @Nullable public String getParcelId()

      id of an existing Parcel.

      Either parcelId or parcelKey must be provided.

      Returns:
      parcelId
    • getParcelKey

      @Nullable public String getParcelKey()

      key of an existing Parcel.

      Either parcelId or parcelKey must be provided.

      Returns:
      parcelKey
    • getName

      public String getName()

      Name of the Custom Field.

      Returns:
      name
    • getValue

      @Nullable public Object getValue()

      If value is absent or null, this field will be removed if it exists. Removing a field that does not exist returns an InvalidOperation error. If value is provided, it is set for the field defined by name.

      Returns:
      value
    • build

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

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

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

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