toJson method
Implementation
@override
Map<String, Object?> toJson() => {
if (type != null) "type": encodeValue(type),
if (name != null) "name": encodeValue(name),
if (description != null) "description": encodeValue(description),
if (about != null) "about": encodeValue(about),
if (taxCode != null) "tax_code": encodeValue(taxCode),
if (category != null) "category": encodeValue(category),
if (shipment != null) "shipment": encodeValue(shipment),
if (dimensions != null) "dimensions": encodeValue(dimensions),
if (unitDimension != null) "unit_dimension": encodeValue(unitDimension),
if (media != null) "media": encodeValue(media),
if (images != null) "images": encodeValue(images),
if (attributes != null) "attributes": encodeValue(attributes),
if (customData != null) "custom_data": encodeValue(customData),
"product_id": encodeValue(productId),
};