from Discovery Attraction Response
fun fromDiscoveryAttractionResponse(attractions: List<DiscoveryAttractionDetailsResponse>?, id: String, marketDomain: TMMarketDomain): DiscoveryAttraction
Maps a list of attraction details responses to a single DiscoveryAttraction object.
This method processes a list of DiscoveryAttractionDetailsResponse objects, selecting the attraction that matches the provided ID based on its references. It constructs a DiscoveryAttraction object with the relevant data and market domain.
Return
A DiscoveryAttraction object populated with the mapped data.
Parameters
attractions
The list of attraction details responses from the API.
id
The ID to match against the attraction references.
market Domain
The market domain for the attraction.