toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final name = this.name;
  final unit = this.unit;
  final allowCheckIn = this.allowCheckIn;
  final maxCount = this.maxCount;
  final overage = this.overage;
  final value = this.value;
  return {
    'Name': name,
    'Unit': unit.toValue(),
    if (allowCheckIn != null) 'AllowCheckIn': allowCheckIn,
    if (maxCount != null) 'MaxCount': maxCount,
    if (overage != null) 'Overage': overage,
    if (value != null) 'Value': value,
  };
}