toJson method
Converts this object into JSON format.
Implementation
Map<String, dynamic> toJson() {
return {
ApiFields.isConfigurable: isConfigurable,
ApiFields.maxSegments: maxSegments,
ApiFields.segments: segments.map((segment) => segment.toJson()).toList(),
};
}