Class OrderSetShippingCustomFieldActionBuilder

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

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

     OrderSetShippingCustomFieldAction orderSetShippingCustomFieldAction = OrderSetShippingCustomFieldAction.builder()
             .name("{name}")
             .build()
 
  • Constructor Details

    • OrderSetShippingCustomFieldActionBuilder

      public OrderSetShippingCustomFieldActionBuilder()
  • Method Details

    • shippingKey

      public OrderSetShippingCustomFieldActionBuilder shippingKey(@Nullable String shippingKey)

      The shippingKey of the Shipping to customize. Used to specify which Shipping Method to customize on a Order with Multiple ShippingMode. Leave this empty to customize the one and only ShippingMethod on a Single ShippingMode Order.

      Parameters:
      shippingKey - 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. Trying to remove a field that does not exist will fail with an InvalidOperation error. If value is provided, it is set for the field defined by name.

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

      @Nullable public String getShippingKey()

      The shippingKey of the Shipping to customize. Used to specify which Shipping Method to customize on a Order with Multiple ShippingMode. Leave this empty to customize the one and only ShippingMethod on a Single ShippingMode Order.

      Returns:
      shippingKey
    • 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. Trying to remove a field that does not exist will fail with an InvalidOperation error. If value is provided, it is set for the field defined by name.

      Returns:
      value
    • build

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

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

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

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