toJson method

Map<String, dynamic> toJson()

Creates a new EncryptedPassportElement object from json.

Implementation

Map<String, dynamic> toJson() {
  return {
    'type': type.toJson(),
    'data': data,
    'phone_number': phoneNumber,
    'email': email,
    'files': files?.map((e) => e.toJson()).toList(),
    'front_side': frontSide?.toJson(),
    'reverse_side': reverseSide?.toJson(),
    'selfie': selfie?.toJson(),
    'translation': translation?.map((e) => e.toJson()).toList(),
    'hash': hash,
  }..removeWhere(_nullFilter);
}