toJson method

  1. @override
Map<String, Object?> toJson()

Implementation

@override
Map<String, Object?> toJson() => {
      "active": encodeValue(active),
      if (defaultProductId != null)
        "default_product_id": encodeValue(defaultProductId),
      if (description != null) "description": encodeValue(description),
      "id": encodeValue(id),
      "name": encodeValue(name),
      if (reference != null) "reference": encodeValue(reference),
      "variant_axes": encodeValue(variantAxes),
      "variants": encodeValue(variants),
    };