Class ProductConfiguration


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

      • ProductConfiguration

        public ProductConfiguration()
    • Method Detail

      • getAttributeCode

        @Nonnull
        public String getAttributeCode()
        Product option attribute code. For `CONFIGURABLE` or `SWATCH` option types, this ID must match the [\"attribute code\"](#operation/createProducts!path=attributes/code&t=request) used for the configurable product (for example, \"color\").
        Returns:
        attributeCode
      • setAttributeCode

        public void setAttributeCode​(String attributeCode)
      • getLabel

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

        public void setLabel​(String label)
      • getDefaultVariantReferenceId

        @Nullable
        public String getDefaultVariantReferenceId()
        Specifies the pre-selected value variant reference id of the current option.
        Returns:
        defaultVariantReferenceId
      • setDefaultVariantReferenceId

        public void setDefaultVariantReferenceId​(String defaultVariantReferenceId)
      • getType

        @Nonnull
        public ProductConfiguration.TypeEnum getType()
        Option type. Indicates the product type the option can be assigned to. - `CONFIGURABLE`: Configurable product option - `SWATCH`: Swatch product option. Must be used for color or text swatches attributes
        Returns:
        type
      • getValues

        @Nonnull
        public List<ProductOptionValue> getValues()
        A list of option values. Defines option values available to shoppers (for example, \"red\" color or \"large\" size).
        Returns:
        values
      • 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 ProductConfiguration
      • fromJson

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

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