Interface StagedOrderChangeCustomLineItemQuantityAction

All Superinterfaces:
ResourceUpdateAction<StagedOrderUpdateAction>, StagedOrderUpdateAction

public interface StagedOrderChangeCustomLineItemQuantityAction extends StagedOrderUpdateAction

When multiple shipping addresses are set for a Custom Line Item, use the Add CustomLineItem update action to change the shipping details. Since it is not possible for the API to infer how the overall change in the Custom Line Item quantity should be distributed over the sub-quantities, the shippingDetails field is kept in its current state to avoid data loss.

To change the Custom Line Item quantity and shipping details together, use this update action in combination with the Set CustomLineItem ShippingDetails update action in a single Order update command.


Example to create an instance using the builder pattern

     StagedOrderChangeCustomLineItemQuantityAction stagedOrderChangeCustomLineItemQuantityAction = StagedOrderChangeCustomLineItemQuantityAction.builder()
             .quantity(0.3)
             .build()
 
  • Field Details

    • CHANGE_CUSTOM_LINE_ITEM_QUANTITY

      static final String CHANGE_CUSTOM_LINE_ITEM_QUANTITY
      discriminator value for StagedOrderChangeCustomLineItemQuantityAction
      See Also:
  • Method Details

    • getCustomLineItemId

      String getCustomLineItemId()

      id of the CustomLineItem to update. Either customLineItemId or customLineItemKey is required.

      Returns:
      customLineItemId
    • getCustomLineItemKey

      String getCustomLineItemKey()

      key of the CustomLineItem to update. Either customLineItemId or customLineItemKey is required.

      Returns:
      customLineItemKey
    • getQuantity

      @NotNull @NotNull Long getQuantity()

      New value to set. If 0, the Custom Line Item is removed from the Order.

      Returns:
      quantity
    • setCustomLineItemId

      void setCustomLineItemId(String customLineItemId)

      id of the CustomLineItem to update. Either customLineItemId or customLineItemKey is required.

      Parameters:
      customLineItemId - value to be set
    • setCustomLineItemKey

      void setCustomLineItemKey(String customLineItemKey)

      key of the CustomLineItem to update. Either customLineItemId or customLineItemKey is required.

      Parameters:
      customLineItemKey - value to be set
    • setQuantity

      void setQuantity(Long quantity)

      New value to set. If 0, the Custom Line Item is removed from the Order.

      Parameters:
      quantity - value to be set
    • of

      factory method
      Returns:
      instance of StagedOrderChangeCustomLineItemQuantityAction
    • of

      factory method to create a shallow copy StagedOrderChangeCustomLineItemQuantityAction
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • deepCopy

      factory method to create a deep copy of StagedOrderChangeCustomLineItemQuantityAction
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • builder

      builder factory method for StagedOrderChangeCustomLineItemQuantityAction
      Returns:
      builder
    • builder

      create builder for StagedOrderChangeCustomLineItemQuantityAction instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withStagedOrderChangeCustomLineItemQuantityAction

      default <T> T withStagedOrderChangeCustomLineItemQuantityAction(Function<StagedOrderChangeCustomLineItemQuantityAction,T> helper)
      accessor map function
      Type Parameters:
      T - mapped type
      Parameters:
      helper - function to map the object
      Returns:
      mapped value
    • typeReference

      static com.fasterxml.jackson.core.type.TypeReference<StagedOrderChangeCustomLineItemQuantityAction> typeReference()
      gives a TypeReference for usage with Jackson DataBind
      Returns:
      TypeReference