Class ProductOptionValue


  • @Generated(value="org.openapitools.codegen.languages.JavaClientCodegen",
               comments="Generator version: 7.4.0")
    public class ProductOptionValue
    extends Object
    ProductOptionValue
    • Constructor Detail

      • ProductOptionValue

        public ProductOptionValue()
    • Method Detail

      • getVariantReferenceId

        @Nonnull
        public String getVariantReferenceId()
        Option value ID. For `CONFIGURABLE` or `SWATCH` option types, this ID must match the [\"variantReferenceId\"](#operation/createProducts!path=attributes/variantReferenceId&t=request) defined in the product variant.
        Returns:
        variantReferenceId
      • setVariantReferenceId

        public void setVariantReferenceId​(String variantReferenceId)
      • getLabel

        @Nullable
        public String getLabel()
        Option value label
        Returns:
        label
      • setLabel

        public void setLabel​(String label)
      • getColorHex

        @Nullable
        public String getColorHex()
        A hex representation of the color of the option value. Can be used for option with a SWATCH type.
        Returns:
        colorHex
      • setColorHex

        public void setColorHex​(String colorHex)
      • getImageUrl

        @Nullable
        public String getImageUrl()
        Image URL of the option value. Can be used for option with a SWATCH type.
        Returns:
        imageUrl
      • setImageUrl

        public void setImageUrl​(String imageUrl)
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • validateJsonElement

        public static void validateJsonElement​(com.google.gson.JsonElement jsonElement)
                                        throws IOException
        Validates the JSON Element and throws an exception if issues found
        Parameters:
        jsonElement - JSON Element
        Throws:
        IOException - if the JSON Element is invalid with respect to ProductOptionValue
      • fromJson

        public static ProductOptionValue fromJson​(String jsonString)
                                           throws IOException
        Create an instance of ProductOptionValue given an JSON string
        Parameters:
        jsonString - JSON string
        Returns:
        An instance of ProductOptionValue
        Throws:
        IOException - if the JSON string is invalid with respect to ProductOptionValue
      • toJson

        public String toJson()
        Convert an instance of ProductOptionValue to an JSON string
        Returns:
        JSON string