Interface ProductChangePriceAction

All Superinterfaces:
ProductUpdateAction, ResourceUpdateAction<ProductUpdateAction>

public interface ProductChangePriceAction extends ProductUpdateAction

This action produces the ProductPriceChanged Message.


Example to create an instance using the builder pattern

     ProductChangePriceAction productChangePriceAction = ProductChangePriceAction.builder()
             .priceId("{priceId}")
             .price(priceBuilder -> priceBuilder)
             .build()
 
  • Field Details

  • Method Details

    • getPriceId

      @NotNull @NotNull String getPriceId()

      The id of the Embedded Price to update.

      Returns:
      priceId
    • getPrice

      @NotNull @Valid @NotNull @Valid PriceDraft getPrice()

      Value to set.

      If the key of the Price is used by another Embedded Price on the ProductVariant, a DuplicatePriceKey error is returned.

      If the new Embedded Price has the same price scope as another Embedded Price on the ProductVariant, a DuplicatePriceScope error is returned.

      If the new Embedded Price has overlapping validity periods within the same price scope, an OverlappingPriceValidity error is returned. An Embedded Price without validity period does not conflict with an Embedded Price defined for a time period.

      Returns:
      price
    • getStaged

      Boolean getStaged()

      Whether only the staged Embedded Price is updated. If false, both the current and staged Embedded Price are updated.

      Returns:
      staged
    • setPriceId

      void setPriceId(String priceId)

      The id of the Embedded Price to update.

      Parameters:
      priceId - value to be set
    • setPrice

      void setPrice(PriceDraft price)

      Value to set.

      If the key of the Price is used by another Embedded Price on the ProductVariant, a DuplicatePriceKey error is returned.

      If the new Embedded Price has the same price scope as another Embedded Price on the ProductVariant, a DuplicatePriceScope error is returned.

      If the new Embedded Price has overlapping validity periods within the same price scope, an OverlappingPriceValidity error is returned. An Embedded Price without validity period does not conflict with an Embedded Price defined for a time period.

      Parameters:
      price - value to be set
    • setStaged

      void setStaged(Boolean staged)

      Whether only the staged Embedded Price is updated. If false, both the current and staged Embedded Price are updated.

      Parameters:
      staged - value to be set
    • of

      factory method
      Returns:
      instance of ProductChangePriceAction
    • of

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

      Specified by:
      copyDeep in interface ProductUpdateAction
    • deepCopy

      @Nullable static ProductChangePriceAction deepCopy(@Nullable ProductChangePriceAction template)
      factory method to create a deep copy of ProductChangePriceAction
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • builder

      builder factory method for ProductChangePriceAction
      Returns:
      builder
    • builder

      create builder for ProductChangePriceAction instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withProductChangePriceAction

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

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