Interface VariantCreatedMessagePayload

All Superinterfaces:
MessagePayload, MessagePayloadMixin

public interface VariantCreatedMessagePayload extends MessagePayload

Generated after a successful Create Variant request.


Example to create an instance using the builder pattern

     VariantCreatedMessagePayload variantCreatedMessagePayload = VariantCreatedMessagePayload.builder()
             .id("{id}")
             .productId("{productId}")
             .variantId(1)
             .publish(true)
             .build()
 
  • Field Details

    • VARIANT_CREATED

      static final String VARIANT_CREATED
      discriminator value for VariantCreatedMessagePayload
      See Also:
  • Method Details

    • getId

      @NotNull @NotNull String getId()

      Unique identifier of the Variant.

      Returns:
      id
    • getProductId

      @NotNull @NotNull String getProductId()

      Unique identifier of the Product to which the Variant belongs.

      Returns:
      productId
    • getVariantId

      @NotNull @NotNull Integer getVariantId()

      Unique identifier of the Variant within its parent Product.

      Returns:
      variantId
    • getKey

      String getKey()

      User-defined unique identifier of the Variant.

      Returns:
      key
    • getSku

      String getSku()

      SKU of the Variant.

      Returns:
      sku
    • getAttributes

      @Valid @Valid List<Attribute> getAttributes()

      Attributes of the Variant.

      Returns:
      attributes
    • getAssets

      @Valid @Valid List<Asset> getAssets()

      Assets of the Variant.

      Returns:
      assets
    • getImages

      @Valid @Valid List<Image> getImages()

      Images of the Variant.

      Returns:
      images
    • getPublish

      @NotNull @NotNull Boolean getPublish()

      Whether the Variant was published.

      Returns:
      publish
    • setId

      void setId(String id)

      Unique identifier of the Variant.

      Parameters:
      id - value to be set
    • setProductId

      void setProductId(String productId)

      Unique identifier of the Product to which the Variant belongs.

      Parameters:
      productId - value to be set
    • setVariantId

      void setVariantId(Integer variantId)

      Unique identifier of the Variant within its parent Product.

      Parameters:
      variantId - value to be set
    • setKey

      void setKey(String key)

      User-defined unique identifier of the Variant.

      Parameters:
      key - value to be set
    • setSku

      void setSku(String sku)

      SKU of the Variant.

      Parameters:
      sku - value to be set
    • setAttributes

      void setAttributes(Attribute... attributes)

      Attributes of the Variant.

      Parameters:
      attributes - values to be set
    • setAttributes

      void setAttributes(List<Attribute> attributes)

      Attributes of the Variant.

      Parameters:
      attributes - values to be set
    • setAssets

      void setAssets(Asset... assets)

      Assets of the Variant.

      Parameters:
      assets - values to be set
    • setAssets

      void setAssets(List<Asset> assets)

      Assets of the Variant.

      Parameters:
      assets - values to be set
    • setImages

      void setImages(Image... images)

      Images of the Variant.

      Parameters:
      images - values to be set
    • setImages

      void setImages(List<Image> images)

      Images of the Variant.

      Parameters:
      images - values to be set
    • setPublish

      void setPublish(Boolean publish)

      Whether the Variant was published.

      Parameters:
      publish - value to be set
    • of

      factory method
      Returns:
      instance of VariantCreatedMessagePayload
    • of

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

      Specified by:
      copyDeep in interface MessagePayload
    • deepCopy

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

      builder factory method for VariantCreatedMessagePayload
      Returns:
      builder
    • builder

      create builder for VariantCreatedMessagePayload instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withVariantCreatedMessagePayload

      default <T> T withVariantCreatedMessagePayload(Function<VariantCreatedMessagePayload,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<VariantCreatedMessagePayload> typeReference()
      gives a TypeReference for usage with Jackson DataBind
      Returns:
      TypeReference