toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final data = <String, dynamic>{
    'value': value,
    'tenant_id': tenantId,
    'expiration': expiration,
  };
  if (name != null && document != null) {
    data['name'] = name;
    data['document'] = document;
  }
  return data;
}