Class StagedOrderSetLineItemPriceActionBuilder

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

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

     StagedOrderSetLineItemPriceAction stagedOrderSetLineItemPriceAction = StagedOrderSetLineItemPriceAction.builder()
             .build()
 
  • Constructor Details

    • StagedOrderSetLineItemPriceActionBuilder

      public StagedOrderSetLineItemPriceActionBuilder()
  • Method Details

    • lineItemId

      public StagedOrderSetLineItemPriceActionBuilder lineItemId(@Nullable String lineItemId)

      id of the LineItem to update. Either lineItemId or lineItemKey is required.

      Parameters:
      lineItemId - value to be set
      Returns:
      Builder
    • lineItemKey

      public StagedOrderSetLineItemPriceActionBuilder lineItemKey(@Nullable String lineItemKey)

      key of the LineItem to update. Either lineItemId or lineItemKey is required.

      Parameters:
      lineItemKey - value to be set
      Returns:
      Builder
    • externalPrice

      Value to set. If externalPrice is not given and the priceMode is ExternalPrice, the external price is unset and the priceMode is set to Platform.

      To set the money value in high precision, use HighPrecisionMoneyDraft.

      Parameters:
      builder - function to build the externalPrice value
      Returns:
      Builder
    • withExternalPrice

      Value to set. If externalPrice is not given and the priceMode is ExternalPrice, the external price is unset and the priceMode is set to Platform.

      To set the money value in high precision, use HighPrecisionMoneyDraft.

      Parameters:
      builder - function to build the externalPrice value
      Returns:
      Builder
    • externalPrice

      public StagedOrderSetLineItemPriceActionBuilder externalPrice(@Nullable Money externalPrice)

      Value to set. If externalPrice is not given and the priceMode is ExternalPrice, the external price is unset and the priceMode is set to Platform.

      To set the money value in high precision, use HighPrecisionMoneyDraft.

      Parameters:
      externalPrice - value to be set
      Returns:
      Builder
    • getLineItemId

      @Nullable public String getLineItemId()

      id of the LineItem to update. Either lineItemId or lineItemKey is required.

      Returns:
      lineItemId
    • getLineItemKey

      @Nullable public String getLineItemKey()

      key of the LineItem to update. Either lineItemId or lineItemKey is required.

      Returns:
      lineItemKey
    • getExternalPrice

      @Nullable public Money getExternalPrice()

      Value to set. If externalPrice is not given and the priceMode is ExternalPrice, the external price is unset and the priceMode is set to Platform.

      To set the money value in high precision, use HighPrecisionMoneyDraft.

      Returns:
      externalPrice
    • build

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

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

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

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