toJson method

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

Implementation

@override
Map<String, Object?> toJson() => {
      if (reference != null) "reference": encodeValue(reference),
      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 (attributes != null) "attributes": encodeValue(attributes),
      if (publish != null) "publish": encodeValue(publish),
      if (customData != null) "custom_data": encodeValue(customData),
      "type": encodeValue(type),
      "name": encodeValue(name),
    };