toJson method
Implementation
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['product_id'] = this.productId;
if (this.name != null) {
data['name'] = this.name;
}
if (this.variationId != null) {
data['variation_id'] = this.variationId;
}
if (this.taxClass != null) {
data['tax_class'] = this.taxClass;
}
if (this.subtotal != null) {
data['subtotal'] = this.subtotal;
}
if (this.total != null) {
data['total'] = this.total;
}
data['quantity'] = this.quantity;
return data;
}