Class StagedOrderSetShippingCustomFieldActionBuilder

java.lang.Object
com.commercetools.api.models.order_edit.StagedOrderSetShippingCustomFieldActionBuilder
All Implemented Interfaces:
Builder<StagedOrderSetShippingCustomFieldAction>

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

     StagedOrderSetShippingCustomFieldAction stagedOrderSetShippingCustomFieldAction = StagedOrderSetShippingCustomFieldAction.builder()
             .name("{name}")
             .build()
 
  • Constructor Details

    • StagedOrderSetShippingCustomFieldActionBuilder

      public StagedOrderSetShippingCustomFieldActionBuilder()
  • Method Details

    • 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 StagedOrderSetShippingCustomFieldAction with checking for non-null required values
      Specified by:
      build in interface Builder<StagedOrderSetShippingCustomFieldAction>
      Returns:
      StagedOrderSetShippingCustomFieldAction
    • buildUnchecked

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

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

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