toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final json = <String, dynamic>{};
  if (this.id != null) {
    json[r'id'] = this.id;
  } else {
    json[r'id'] = null;
  }
  if (this.type != null) {
    json[r'type'] = this.type;
  } else {
    json[r'type'] = null;
  }
  if (this.value != null) {
    json[r'value'] = this.value;
  } else {
    json[r'value'] = null;
  }
  if (this.reason != null) {
    json[r'reason'] = this.reason;
  } else {
    json[r'reason'] = null;
  }
  if (this.createdAt != null) {
    json[r'created_at'] = this.createdAt!.toUtc().toIso8601String();
  } else {
    json[r'created_at'] = null;
  }
  return json;
}