/** * Generated by API Builder - https://www.apibuilder.io * Service version: 1.0.0-dev * User agent: apibuilder app.apibuilder.io/helicalmoment/zola-takehome/1.0.0-dev/play_2_8_mock_client */ package org.helicalmoment.zola.takehome.v1.mock { trait Client extends org.helicalmoment.zola.takehome.v1.interfaces.Client { val baseUrl: String = "http://mock.localhost" override def invoices: org.helicalmoment.zola.takehome.v1.Invoices = MockInvoicesImpl } object MockInvoicesImpl extends MockInvoices trait MockInvoices extends org.helicalmoment.zola.takehome.v1.Invoices { /** * Insert an invoice */ def put( invoice: org.helicalmoment.zola.takehome.v1.models.Invoice, requestHeaders: Seq[(String, String)] = Nil )(implicit ec: scala.concurrent.ExecutionContext): scala.concurrent.Future[org.helicalmoment.zola.takehome.v1.models.Invoice] = scala.concurrent.Future.successful { org.helicalmoment.zola.takehome.v1.mock.Factories.makeInvoice() } /** * Find an invoice by invoice_number or po_number. If neither is provided, returns * all invoices. * * @param invoiceNumber An invoice number to search for. * @param poNumber An purchase order number to search for. * @param limit How many records to return. Defaults to 50 if not provided or not in the range 0 * < limit <= 50. * @param offset Pagination offset; e.g., to retrieve the second page of invoices with a limit of * 50, set to 51. If not provided, defaults to 0. */ def get( invoiceNumber: _root_.scala.Option[String] = None, poNumber: _root_.scala.Option[String] = None, limit: _root_.scala.Option[Int] = None, offset: _root_.scala.Option[Int] = None, requestHeaders: Seq[(String, String)] = Nil )(implicit ec: scala.concurrent.ExecutionContext): scala.concurrent.Future[Seq[org.helicalmoment.zola.takehome.v1.models.Invoice]] = scala.concurrent.Future.successful { Nil } } object Factories { def randomString(length: Int = 24): String = { _root_.scala.util.Random.alphanumeric.take(length).mkString } def makeInvoice(): org.helicalmoment.zola.takehome.v1.models.Invoice = org.helicalmoment.zola.takehome.v1.models.Invoice( id = None, invoiceNumber = Factories.randomString(24), poNumber = Factories.randomString(24), dueDate = _root_.org.joda.time.LocalDate.now, amountCents = 1L, createdAt = None ) } }