factory Amount.fromMap(Map<String, dynamic> map) => Amount(map["value"], Currency.fromMap(map["currency"]), map["metadata"]);