Class ProductAttribute


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

      • ProductAttribute

        public ProductAttribute()
    • Method Detail

      • getCode

        @Nonnull
        public String getCode()
        Product Attribute Code
        Returns:
        code
      • setCode

        public void setCode​(String code)
      • getValues

        @Nonnull
        public List<String> getValues()
        A list of value(s) associated with a specified attribute code.
        Returns:
        values
      • setValues

        public void setValues​(List<String> values)
      • getVariantReferenceId

        @Nullable
        public String getVariantReferenceId()
        The variant reference ID establishes a link between a product variant and the corresponding [Option Value ID](#operation/createProducts!path=options/values/id&t=request) in a configurable product. A variant reference ID can be specified only for a product that represents a variant of a configurable product.
        Returns:
        variantReferenceId
      • setVariantReferenceId

        public void setVariantReferenceId​(String variantReferenceId)
      • 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 ProductAttribute
      • fromJson

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

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