ProductOption class

A Product Option defines properties that may vary between different variants of a Product. Common Product Options are "Size" and "Color". Admins are free to create any product options.

Annotations
  • @JsonSerializable()

Constructors

ProductOption({required String id, required String title, List<ProductOptionValue>? values, required String productId, Product? product, required String createdAt, required String updatedAt, String? deletedAt, Map<String, dynamic>? metadata})
ProductOption.fromJson(Map<String, dynamic> json)
factory

Properties

createdAt String
The date with timezone at which the resource was created.
final
deletedAt String?
The date with timezone at which the resource was deleted.
final
hashCode int
The hash code for this object.
no setterinherited
id String
The product option's ID
final
metadata Map<String, dynamic>?
An optional key-value map with additional details
final
product Product?
The details of the product that this product option belongs to.
final
productId String
The ID of the product that this product option belongs to.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
title String
The title that the Product Option is defined by (e.g. Size).
final
updatedAt String
The date with timezone at which the resource was updated.
final
values List<ProductOptionValue>?
The details of the values of the product option.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited