/** * Generated by API Builder - https://www.apibuilder.io * Service version: 0.0.2-dev * User agent: apibuilder app.apibuilder.io/mard/mard2p-api/0.0.2-dev/http4s_0_23 */ package payp.mard2p.api.v0.mock { class Client[F[_]: cats.Applicative] extends payp.mard2p.api.v0.interfaces.Client[F] { val baseUrl: org.http4s.Uri = org.http4s.Uri.unsafeFromString("http://mock.localhost") override def accounts: payp.mard2p.api.v0.Accounts[F] = new MockAccounts[F] override def deposits: payp.mard2p.api.v0.Deposits[F] = new MockDeposits[F] override def payments: payp.mard2p.api.v0.Payments[F] = new MockPayments[F] override def transfers: payp.mard2p.api.v0.Transfers[F] = new MockTransfers[F] override def validations: payp.mard2p.api.v0.Validations[F] = new MockValidations[F] override def withdraws: payp.mard2p.api.v0.Withdraws[F] = new MockWithdraws[F] } class MockAccounts[F[_]: cats.Applicative] extends payp.mard2p.api.v0.Accounts[F] { /** * Used to create an account. */ def postCreate( accountid: Long, ownerid: String, totalAmount: Double, sold: Double, debit: Double, currency: String, requestHeaders: Seq[(String, String)] = Nil ): F[payp.mard2p.api.v0.models.Account] = cats.Applicative[F].pure { payp.mard2p.api.v0.mock.Factories.makeAccount() } /** * Used to update an account. */ def putUpdateByAccountid( accountid: Long, ownerid: String, totalAmount: Double, currency: String, sold: Double, debit: Double, requestHeaders: Seq[(String, String)] = Nil ): F[payp.mard2p.api.v0.models.Account] = cats.Applicative[F].pure { payp.mard2p.api.v0.mock.Factories.makeAccount() } /** * Delete some account. */ def deleteDeleteByAccountid( accountid: Long, requestHeaders: Seq[(String, String)] = Nil ): F[Unit] = cats.Applicative[F].pure { // unit type } /** * Find account by its id */ def getByAccountid( accountid: Long, ownerid: String, totalAmount: Double, sold: Double, debit: Double, currency: String, requestHeaders: Seq[(String, String)] = Nil ): F[payp.mard2p.api.v0.models.Account] = cats.Applicative[F].pure { payp.mard2p.api.v0.mock.Factories.makeAccount() } /** * Find all the accounts. */ def getList( accountid: Long, ownerid: String, totalAmount: Double, currency: String, sold: Double, debit: Double, requestHeaders: Seq[(String, String)] = Nil ): F[Seq[payp.mard2p.api.v0.models.Account]] = cats.Applicative[F].pure { Nil } } class MockDeposits[F[_]: cats.Applicative] extends payp.mard2p.api.v0.Deposits[F] { /** * Delete some deposit. */ def deleteDeleteByDepid( depid: Long, requestHeaders: Seq[(String, String)] = Nil ): F[Unit] = cats.Applicative[F].pure { // unit type } /** * Find deposit by its id. */ def getByDepid( depid: Long, paymentMethod: String, actorid: String, refAccountid: Long, operatorid: String, amount: Double, phone: Long, pin: Long, currency: String, paymentContext: String, requestHeaders: Seq[(String, String)] = Nil ): F[payp.mard2p.api.v0.models.Payment] = cats.Applicative[F].pure { payp.mard2p.api.v0.mock.Factories.makePayment() } /** * List all the deposits */ def getList( payid: Long, paymentMethod: String, actorid: String, refAccountid: Long, operatorid: String, amount: Double, phone: Long, pin: Long, currency: String, paymentContext: String, requestHeaders: Seq[(String, String)] = Nil ): F[Seq[payp.mard2p.api.v0.models.Payment]] = cats.Applicative[F].pure { Nil } } class MockPayments[F[_]: cats.Applicative] extends payp.mard2p.api.v0.Payments[F] { /** * Used to create a payment. */ def postCreate( payid: Long, paymentMethod: String, actorid: String, refAccountid: Long, operatorid: String, amount: Double, currency: String, phone: Long, pin: Int, paymentContext: String, requestHeaders: Seq[(String, String)] = Nil ): F[payp.mard2p.api.v0.models.Payment] = cats.Applicative[F].pure { payp.mard2p.api.v0.mock.Factories.makePayment() } /** * Used to update a payment. */ def putUpdateByPayid( payid: Long, paymentMethod: String, actorid: String, refAccountid: Long, operatorid: String, amount: Double, phone: Long, pin: Int, currency: String, paymentContext: String, requestHeaders: Seq[(String, String)] = Nil ): F[payp.mard2p.api.v0.models.Payment] = cats.Applicative[F].pure { payp.mard2p.api.v0.mock.Factories.makePayment() } /** * Delete some payment. */ def deleteDeleteByPayid( payid: Long, requestHeaders: Seq[(String, String)] = Nil ): F[Unit] = cats.Applicative[F].pure { // unit type } /** * Find payment by its id. */ def getByPayid( payid: Long, paymentMethod: String, actorid: String, refAccountid: Long, operatorid: String, amount: Double, phone: Long, pin: Long, currency: String, paymentContext: String, requestHeaders: Seq[(String, String)] = Nil ): F[payp.mard2p.api.v0.models.Payment] = cats.Applicative[F].pure { payp.mard2p.api.v0.mock.Factories.makePayment() } /** * Find payment by id accountid */ def getByRefAccountid( refAccountid: Long, payid: Long, paymentMethod: String, actorid: String, operatorid: String, amount: Double, phone: Long, pin: Int, currency: String, paymentContext: String, requestHeaders: Seq[(String, String)] = Nil ): F[payp.mard2p.api.v0.models.Payment] = cats.Applicative[F].pure { payp.mard2p.api.v0.mock.Factories.makePayment() } /** * List all the payments */ def getList( payid: Long, paymentMethod: String, actorid: String, refAccountid: Long, operatorid: String, amount: Double, phone: Long, pin: Long, currency: String, paymentContext: String, requestHeaders: Seq[(String, String)] = Nil ): F[Seq[payp.mard2p.api.v0.models.Payment]] = cats.Applicative[F].pure { Nil } } class MockTransfers[F[_]: cats.Applicative] extends payp.mard2p.api.v0.Transfers[F] { /** * Used to create a transfer resource. */ def postCreate( transferid: Long, senderid: String, amount: Double, currency: String, refAccountidReceiver: Long, refAccountidSender: Long, requestHeaders: Seq[(String, String)] = Nil ): F[payp.mard2p.api.v0.models.Transfer] = cats.Applicative[F].pure { payp.mard2p.api.v0.mock.Factories.makeTransfer() } /** * Used to update a transfer resource. */ def putUpdateByTransferid( transferid: Long, senderid: String, amount: Double, currency: String, refAccountidReceiver: Long, refAccountidSender: Long, requestHeaders: Seq[(String, String)] = Nil ): F[payp.mard2p.api.v0.models.Transfer] = cats.Applicative[F].pure { payp.mard2p.api.v0.mock.Factories.makeTransfer() } /** * Delete some transfer. */ def deleteDeleteByTransferid( transferid: Long, requestHeaders: Seq[(String, String)] = Nil ): F[Unit] = cats.Applicative[F].pure { // unit type } /** * Find transfer by its id */ def getByTransferid( transferid: Long, senderid: String, amount: Double, currency: String, refAccountidReceiver: Long, refAccountidSender: Long, requestHeaders: Seq[(String, String)] = Nil ): F[payp.mard2p.api.v0.models.Account] = cats.Applicative[F].pure { payp.mard2p.api.v0.mock.Factories.makeAccount() } /** * Find all the transfers. */ def getList( transferid: Long, senderid: String, amount: Double, currency: String, refAccountidReceiver: Long, refAccountidSender: Long, requestHeaders: Seq[(String, String)] = Nil ): F[Seq[payp.mard2p.api.v0.models.Account]] = cats.Applicative[F].pure { Nil } } class MockValidations[F[_]: cats.Applicative] extends payp.mard2p.api.v0.Validations[F] { def post( value: String, requestHeaders: Seq[(String, String)] = Nil ): F[payp.mard2p.api.v0.models.Validation] = cats.Applicative[F].pure { payp.mard2p.api.v0.mock.Factories.makeValidation() } } class MockWithdraws[F[_]: cats.Applicative] extends payp.mard2p.api.v0.Withdraws[F] { /** * Delete some withdraw. */ def deleteDeleteByWdwid( wdwid: Long, requestHeaders: Seq[(String, String)] = Nil ): F[Unit] = cats.Applicative[F].pure { // unit type } /** * Find withdraw by its id. */ def getByWdwid( wdwid: Long, depid: Long, paymentMethod: String, actorid: String, refAccountid: Long, operatorid: String, amount: Double, phone: Long, pin: Long, currency: String, paymentContext: String, requestHeaders: Seq[(String, String)] = Nil ): F[payp.mard2p.api.v0.models.Payment] = cats.Applicative[F].pure { payp.mard2p.api.v0.mock.Factories.makePayment() } /** * List all the withdraws */ def getList( payid: Long, paymentMethod: String, actorid: String, refAccountid: Long, operatorid: String, amount: Double, phone: Long, pin: Long, currency: String, paymentContext: String, requestHeaders: Seq[(String, String)] = Nil ): F[Seq[payp.mard2p.api.v0.models.Payment]] = cats.Applicative[F].pure { Nil } } object Factories { def randomString(length: Int = 24): String = { _root_.scala.util.Random.alphanumeric.take(length).mkString } def makeAppSortBy(): payp.mard2p.api.v0.models.AppSortBy = payp.mard2p.api.v0.models.AppSortBy.Created def makeOriginalType(): payp.mard2p.api.v0.models.OriginalType = payp.mard2p.api.v0.models.OriginalType.ApiJson def makePublication(): payp.mard2p.api.v0.models.Publication = payp.mard2p.api.v0.models.Publication.MembershipRequestsCreate def makeSortOrder(): payp.mard2p.api.v0.models.SortOrder = payp.mard2p.api.v0.models.SortOrder.Asc def makeVisibility(): payp.mard2p.api.v0.models.Visibility = payp.mard2p.api.v0.models.Visibility.Public def makeAccount(): payp.mard2p.api.v0.models.Account = payp.mard2p.api.v0.models.Account( accountid = 1L, ownerid = Factories.randomString(24), totalAmount = 1.0, currency = Factories.randomString(24), sold = 1.0, debit = 1.0 ) def makeAccountForm(): payp.mard2p.api.v0.models.AccountForm = payp.mard2p.api.v0.models.AccountForm( accountid = 1L, ownerid = Factories.randomString(24), totalAmount = None, sold = 1.0, debit = None, currency = Factories.randomString(24) ) def makeDeposit(): payp.mard2p.api.v0.models.Deposit = payp.mard2p.api.v0.models.Deposit( depid = 1L, paymentid = 1L ) def makePayment(): payp.mard2p.api.v0.models.Payment = payp.mard2p.api.v0.models.Payment( payid = 1L, actorid = Factories.randomString(24), amount = 1.0, refAccountid = 1L, paymentMethod = Factories.randomString(24), operatorid = Factories.randomString(24), phone = 1L, pin = 1, currency = Factories.randomString(24), paymentContext = Factories.randomString(24) ) def makePaymentForm(): payp.mard2p.api.v0.models.PaymentForm = payp.mard2p.api.v0.models.PaymentForm( payid = 1L, actorid = Factories.randomString(24), amount = 1.0, refAccountid = 1L, paymentMethod = Factories.randomString(24), operatorid = Factories.randomString(24), phone = 1L, pin = 1, currency = Factories.randomString(24), paymentContext = Factories.randomString(24) ) def makeTransfer(): payp.mard2p.api.v0.models.Transfer = payp.mard2p.api.v0.models.Transfer( transferid = 1L, senderid = Factories.randomString(24), amount = 1.0, refAccountidReceiver = 1L, refAccountidSender = 1L, currency = Factories.randomString(24) ) def makeTransferForm(): payp.mard2p.api.v0.models.TransferForm = payp.mard2p.api.v0.models.TransferForm( transferid = 1L, senderid = Factories.randomString(24), amount = 1.0, refAccountidReceiver = 1L, refAccountidSender = 1L, currency = Factories.randomString(24) ) def makeValidation(): payp.mard2p.api.v0.models.Validation = payp.mard2p.api.v0.models.Validation( valid = true, errors = Nil ) def makeWithdraw(): payp.mard2p.api.v0.models.Withdraw = payp.mard2p.api.v0.models.Withdraw( wdwid = 1L, paymentid = 1L ) } }