encode method
Implementation
@override
dynamic encode(TransactionReason self) {
switch (self) {
case TransactionReason.received:
return "RECEIVED";
case TransactionReason.returned:
return "RETURNED";
case TransactionReason.lostInStorage:
return "LOST_IN_STORAGE";
case TransactionReason.lostInTransit:
return "LOST_IN_TRANSIT";
case TransactionReason.damagedInStorage:
return "DAMAGED_IN_STORAGE";
case TransactionReason.damagedInTransit:
return "DAMAGED_IN_TRANSIT";
}
}