/** * Generated by API Builder - https://www.apibuilder.io * Service version: 0.0.1-dev * User agent: apibuilder app.apibuilder.io/nashtech/order/0.0.1-dev/http4s_0_23 */ package com.nashtech.order.v0.mock { class Client[F[_]: cats.Applicative] extends com.nashtech.order.v0.interfaces.Client[F] { val baseUrl: org.http4s.Uri = org.http4s.Uri.unsafeFromString("http://mock.localhost") override def orders: com.nashtech.order.v0.Orders[F] = new MockOrders[F] } class MockOrders[F[_]: cats.Applicative] extends com.nashtech.order.v0.Orders[F] { def getByNumber( merchantId: String, number: String, requestHeaders: Seq[(String, String)] = Nil ): F[com.nashtech.order.v0.models.Order] = cats.Applicative[F].pure { com.nashtech.order.v0.mock.Factories.makeOrder() } } object Factories { def randomString(length: Int = 24): String = { _root_.scala.util.Random.alphanumeric.take(length).mkString } def makeOrder(): com.nashtech.order.v0.models.Order = com.nashtech.order.v0.models.Order( id = Factories.randomString(24), number = Factories.randomString(24), merchantId = Factories.randomString(24), submittedAt = _root_.java.time.Instant.now, total = BigDecimal("1") ) } }