TransactionService

Service for Transactions.

Author

Jan Müller
interface TransactionService

Functions

equals
Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
getTransactionsOfUser
Link copied to clipboard
Returns all Transactions of the User with the given id. Must validate that the User exists.
abstract suspend fun getTransactionsOfUser(userId: String): Result<TransactionList>
hashCode
Link copied to clipboard
open override fun hashCode(): Int
processFunding
Link copied to clipboard
Processes a Funding for the User with the given id. Must validate that the User exists and the Funding is valid.
abstract suspend fun processFunding(userId: String, funding: Funding): Result<String>
processPurchase
Link copied to clipboard
Processes a Purchase for the User with the given id. Must validate that the User and Item exist and the Purchase is valid.
abstract suspend fun processPurchase(userId: String, purchase: Purchase): Result<String>
refundLastPurchase
Link copied to clipboard
Processes a refund for the User with the given id. Must validate that the User exists and has a refundable Transaction.
abstract suspend fun refundLastPurchase(userId: String): Result<String>
toString
Link copied to clipboard
open override fun toString(): String

Inheritors

DefaultTransactionService
Link copied to clipboard