/** * 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_6_mock_client */ package com.hbc.api.product.recommendations.lat.v1.mock { trait Client extends com.hbc.api.product.recommendations.lat.v1.interfaces.Client { val baseUrl: String = "http://mock.localhost" override def similarProductRecommendations: com.hbc.api.product.recommendations.lat.v1.SimilarProductRecommendations = MockSimilarProductRecommendationsImpl } object MockSimilarProductRecommendationsImpl extends MockSimilarProductRecommendations trait MockSimilarProductRecommendations extends com.hbc.api.product.recommendations.lat.v1.SimilarProductRecommendations { /** * Gets similar products recommendations inferring the org from the domain referrer * * @param context Context in which to show similar products, eg: PDP * @param productId Product code for which we want to return similar products * @param color plain text color * @param limit Limit on number of recommendations to be returned * @param referer The service will use the content of this header to infer the org * @param abTestName Name of the abTest being run (if any) * @param abTestVariant Variant in the abTest (if any) */ def getByContextAndProductId( context: com.hbc.api.product.recommendations.lat.v1.models.SimilarProductContext = com.hbc.api.product.recommendations.lat.v1.models.SimilarProductContext.Pdp, productId: String, color: _root_.scala.Option[String] = None, limit: Int = 10, abTestName: _root_.scala.Option[String] = None, abTestVariant: _root_.scala.Option[String] = None, referer: String, requestHeaders: Seq[(String, String)] = Nil )(implicit ec: scala.concurrent.ExecutionContext): scala.concurrent.Future[com.hbc.api.product.recommendations.lat.v1.models.SimilarProductRecommendation] = scala.concurrent.Future.successful { com.hbc.api.product.recommendations.lat.v1.mock.Factories.makeSimilarProductRecommendation() } } object Factories { def randomString(length: Int = 24): String = { _root_.scala.util.Random.alphanumeric.take(length).mkString } def makeSimilarProductContext(): com.hbc.api.product.recommendations.lat.v1.models.SimilarProductContext = com.hbc.api.product.recommendations.lat.v1.models.SimilarProductContext.Pdp def makePrice(): com.hbc.api.product.recommendations.lat.v1.models.Price = com.hbc.api.product.recommendations.lat.v1.models.Price( was = Factories.randomString(24), now = Factories.randomString(24), onSale = true ) def makeRecommendation(): com.hbc.api.product.recommendations.lat.v1.models.Recommendation = com.hbc.api.product.recommendations.lat.v1.models.Recommendation( productId = Factories.randomString(24), productName = Factories.randomString(24), productUrl = Factories.randomString(24), productImageUrl = Factories.randomString(24), brandName = Factories.randomString(24), price = com.hbc.api.product.recommendations.lat.v1.mock.Factories.makePrice(), rating = None, numReviews = None ) def makeSimilarProductRecommendation(): com.hbc.api.product.recommendations.lat.v1.models.SimilarProductRecommendation = com.hbc.api.product.recommendations.lat.v1.models.SimilarProductRecommendation( recommendations = Nil ) } }