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