BankIdNoStatus.fromJson constructor

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

Implementation

factory BankIdNoStatus.fromJson(Map<String, dynamic> json) =>
    switch (json['status']) {
      'PENDING' => BankIdNoPending.fromJson(json),
      'COMPLETED' => BankIdNoCompleted.fromJson(json),
      'FAILED' => BankIdNoFailed.fromJson(json),
      final String status => BankIdNoUnknown(status: status),
      _ => throw IdentisureException(
          0, 'Invalid bankid-no status: ${json['status']}'),
    };