GetReservationPurchaseRecommendationResponse.fromJson constructor

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

Implementation

factory GetReservationPurchaseRecommendationResponse.fromJson(
    Map<String, dynamic> json) {
  return GetReservationPurchaseRecommendationResponse(
    metadata: json['Metadata'] != null
        ? ReservationPurchaseRecommendationMetadata.fromJson(
            json['Metadata'] as Map<String, dynamic>)
        : null,
    nextPageToken: json['NextPageToken'] as String?,
    recommendations: (json['Recommendations'] as List?)
        ?.whereNotNull()
        .map((e) => ReservationPurchaseRecommendation.fromJson(
            e as Map<String, dynamic>))
        .toList(),
  );
}