IfoodPagoAuthResponse.fromJson constructor

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

Implementation

factory IfoodPagoAuthResponse.fromJson(Map<String, dynamic> json) {
  return IfoodPagoAuthResponse(
    status: IfoodPagoStatusDeeplink.values.firstWhere((e) => e.name == json['status'], orElse: () => IfoodPagoStatusDeeplink.ERROR),
    hash: json['hash'] ?? '',
    createAt: json['createAt'] ?? '',
    deviceSerialNumber: json['deviceSerialNumber'] ?? '',
  );
}