Class AddLineItemWithSku

  • All Implemented Interfaces:
    io.sphere.sdk.commands.UpdateAction<io.sphere.sdk.shoppinglists.ShoppingList>, io.sphere.sdk.types.CustomDraft

    public final class AddLineItemWithSku
    extends io.sphere.sdk.commands.UpdateActionImpl<io.sphere.sdk.shoppinglists.ShoppingList>
    implements io.sphere.sdk.types.CustomDraft
    TODO (JVM-SDK): https://github.com/commercetools/commercetools-jvm-sdk/issues/2079 ShoppingList#AddLineItem action does not support product variant selection by SKU, so we needed to add this custom action as a workaround.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.time.ZonedDateTime getAddedAt()  
      io.sphere.sdk.types.CustomFieldsDraft getCustom()  
      java.lang.Long getQuantity()  
      java.lang.String getSku()  
      static io.sphere.sdk.commands.UpdateAction<io.sphere.sdk.shoppinglists.ShoppingList> of​(io.sphere.sdk.shoppinglists.LineItemDraft lineItemDraft)
      Creates an update action "addLineItem" which adds a line item to a shopping list.
      • Methods inherited from class io.sphere.sdk.commands.UpdateActionImpl

        getAction
      • Methods inherited from class io.sphere.sdk.models.Base

        equals, hashCode, toString
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Method Detail

      • of

        @Nonnull
        public static io.sphere.sdk.commands.UpdateAction<io.sphere.sdk.shoppinglists.ShoppingList> of​(@Nonnull
                                                                                                       io.sphere.sdk.shoppinglists.LineItemDraft lineItemDraft)
        Creates an update action "addLineItem" which adds a line item to a shopping list.
        Parameters:
        lineItemDraft - Line item draft template to map update action's fields.
        Returns:
        an update action "addLineItem" which adds a line item to a shopping list.
      • getSku

        @Nullable
        public java.lang.String getSku()
      • getQuantity

        @Nullable
        public java.lang.Long getQuantity()
      • getAddedAt

        @Nullable
        public java.time.ZonedDateTime getAddedAt()
      • getCustom

        @Nullable
        public io.sphere.sdk.types.CustomFieldsDraft getCustom()
        Specified by:
        getCustom in interface io.sphere.sdk.types.CustomDraft