Map<String, Object?> toJson() => <String, Object?>{ 'percentage': basisPoints % 100 == 0 ? basisPoints ~/ 100 : basisPoints / 100, 'by': by.name, };