toJson method
Implementation
Map<String, dynamic> toJson() {
return {
'paymentAmount': paymentAmount,
'reference': reference,
'articles': articles.map((article) => article.toJson()).toList(),
if (paymentSources != null) 'paymentSources': paymentSources!.map((e) => e.name).toList(),
};
}