InputIdentityDocument.fromJson constructor

InputIdentityDocument.fromJson(
  1. Map<String, dynamic> json
)

Parse from a json

Implementation

factory InputIdentityDocument.fromJson(Map<String, dynamic> json) =>
    InputIdentityDocument(
      number: json['number'],
      expirationDate: json['expiration_date'] == null
          ? null
          : Date.fromJson(json['expiration_date']),
      frontSide: InputFile.fromJson(json['front_side']),
      reverseSide: json['reverse_side'] == null
          ? null
          : InputFile.fromJson(json['reverse_side']),
      selfie:
          json['selfie'] == null ? null : InputFile.fromJson(json['selfie']),
      translation: List<InputFile>.from((json['translation'] ?? [])
          .map((item) => InputFile.fromJson(item))
          .toList()),
    );