/** * Generated by API Builder - https://www.apibuilder.io * Service version: 1.1.0 * User agent: apibuilder app.apibuilder.io/hbc/api-product-recommendations-lat/1.1.0/play_2_9_scala_3_controllers */ package com.hbc.api.product.recommendations.lat.v1.controllers import com.hbc.api.product.recommendations.lat.v1.models.json._ trait SimilarProductRecommendationsController extends play.api.mvc.BaseController { sealed trait GetByContextAndProductId extends Product with Serializable object GetByContextAndProductId { final case class HTTP200(body: com.hbc.api.product.recommendations.lat.v1.models.SimilarProductRecommendation) extends GetByContextAndProductId final case class Undocumented(result: play.api.mvc.Result) extends GetByContextAndProductId } def getByContextAndProductId( request: play.api.mvc.Request[play.api.mvc.AnyContent], context: com.hbc.api.product.recommendations.lat.v1.models.SimilarProductContext, productId: String, color: _root_.scala.Option[String], limit: Int, referer: String, abTestName: _root_.scala.Option[String], abTestVariant: _root_.scala.Option[String] ): scala.concurrent.Future[GetByContextAndProductId] final def getByContextAndProductId( context: com.hbc.api.product.recommendations.lat.v1.models.SimilarProductContext, productId: String, color: _root_.scala.Option[String], limit: Int, referer: String, abTestName: _root_.scala.Option[String], abTestVariant: _root_.scala.Option[String] ): play.api.mvc.Action[play.api.mvc.AnyContent] = Action.async { request => getByContextAndProductId(request, context, productId, color, limit, referer, abTestName, abTestVariant) .map { case r: GetByContextAndProductId.HTTP200 => Status(200)(play.api.libs.json.Json.toJson(r.body)) case r: GetByContextAndProductId.Undocumented => r.result }(defaultExecutionContext) } }