AuthorizationFuel.fromJson constructor

AuthorizationFuel.fromJson(
  1. Object? json
)

Implementation

factory AuthorizationFuel.fromJson(Object? json) {
  final map = (json as Map).cast<String, Object?>();
  return AuthorizationFuel(
    type:
        map['type'] == null ? null : AuthorizationType.fromJson(map['type']),
    unit:
        map['unit'] == null ? null : AuthorizationUnit.fromJson(map['unit']),
    unitCostDecimal: map['unit_cost_decimal'] == null
        ? null
        : (map['unit_cost_decimal'] as String),
    volumeDecimal: map['volume_decimal'] == null
        ? null
        : (map['volume_decimal'] as String),
  );
}