Interface VariantAttributesVariant


public interface VariantAttributesVariant

A Variant with its requested Attributes and lightweight availability information.


Example to create an instance using the builder pattern

     VariantAttributesVariant variantAttributesVariant = VariantAttributesVariant.builder()
             .id("{id}")
             .plusAttributes(attributesBuilder -> attributesBuilder)
             .build()
 
  • Method Details

    • getId

      @NotNull @NotNull String getId()

      Unique identifier of the Variant.

      Returns:
      id
    • getSku

      String getSku()

      SKU of the Variant.

      Returns:
      sku
    • getKey

      String getKey()

      Key of the Variant.

      Returns:
      key
    • getAvailability

      @Valid @Valid VariantAttributesAvailability getAvailability()

      Availability information for this variant. Present only if InventoryEntries exist for the variant's SKU.

      Returns:
      availability
    • getAttributes

      @NotNull @Valid @NotNull @Valid List<Attribute> getAttributes()

      Requested Attributes of the Variant. Only Variant-level Attributes that exist on this Variant and were requested via filter[attributes] are included.

      Returns:
      attributes
    • setId

      void setId(String id)

      Unique identifier of the Variant.

      Parameters:
      id - value to be set
    • setSku

      void setSku(String sku)

      SKU of the Variant.

      Parameters:
      sku - value to be set
    • setKey

      void setKey(String key)

      Key of the Variant.

      Parameters:
      key - value to be set
    • setAvailability

      void setAvailability(VariantAttributesAvailability availability)

      Availability information for this variant. Present only if InventoryEntries exist for the variant's SKU.

      Parameters:
      availability - value to be set
    • setAttributes

      void setAttributes(Attribute... attributes)

      Requested Attributes of the Variant. Only Variant-level Attributes that exist on this Variant and were requested via filter[attributes] are included.

      Parameters:
      attributes - values to be set
    • setAttributes

      void setAttributes(List<Attribute> attributes)

      Requested Attributes of the Variant. Only Variant-level Attributes that exist on this Variant and were requested via filter[attributes] are included.

      Parameters:
      attributes - values to be set
    • of

      factory method
      Returns:
      instance of VariantAttributesVariant
    • of

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

    • deepCopy

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

      builder factory method for VariantAttributesVariant
      Returns:
      builder
    • builder

      create builder for VariantAttributesVariant instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withVariantAttributesVariant

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