/** * Generated by API Builder - https://www.apibuilder.io * Service version: 1.0.1 * User agent: apibuilder app.apibuilder.io/nashtech/order/1.0.1/play_2_8_mock_client */ package com.nashtech.order.v1.mock { trait Client extends com.nashtech.order.v1.interfaces.Client { val baseUrl: String = "http://mock.localhost" override def orders: com.nashtech.order.v1.Orders = MockOrdersImpl } object MockOrdersImpl extends MockOrders trait MockOrders extends com.nashtech.order.v1.Orders { def getByNumber( merchantId: String, number: String, requestHeaders: Seq[(String, String)] = Nil )(implicit ec: scala.concurrent.ExecutionContext): scala.concurrent.Future[com.nashtech.order.v1.models.Order] = scala.concurrent.Future.successful { com.nashtech.order.v1.mock.Factories.makeOrder() } def post( merchantId: String, orderForm: com.nashtech.order.v1.models.OrderForm, requestHeaders: Seq[(String, String)] = Nil )(implicit ec: scala.concurrent.ExecutionContext): scala.concurrent.Future[com.nashtech.order.v1.models.Order] = scala.concurrent.Future.successful { 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 )(implicit ec: scala.concurrent.ExecutionContext): scala.concurrent.Future[com.nashtech.order.v1.models.Order] = scala.concurrent.Future.successful { com.nashtech.order.v1.mock.Factories.makeOrder() } def delete( merchantId: String, requestHeaders: Seq[(String, String)] = Nil )(implicit ec: scala.concurrent.ExecutionContext): scala.concurrent.Future[Unit] = scala.concurrent.Future.successful { // 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_.org.joda.time.DateTime.now, total = BigDecimal("1") ) def makeOrderForm(): com.nashtech.order.v1.models.OrderForm = com.nashtech.order.v1.models.OrderForm( total = BigDecimal("1") ) } }