Purchase

Purchase Transaction.

Author

Jan Müller
data class Purchase(value: Double,timestamp: Long,itemId: String,itemName: String,amount: Int) : Transaction

Constructors

<init>
Link copied to clipboard
fun <init>(value: Double, timestamp: Long, itemId: String, itemName: String, amount: Int)

Functions

component1
Link copied to clipboard
operator fun component1(): Double
component2
Link copied to clipboard
operator fun component2(): Long
component3
Link copied to clipboard
operator fun component3(): String
component4
Link copied to clipboard
operator fun component4(): String
component5
Link copied to clipboard
operator fun component5(): Int
copy
Link copied to clipboard
fun copy(value: Double, timestamp: Long, itemId: String, itemName: String, amount: Int): Transaction.Purchase
equals
Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
hashCode
Link copied to clipboard
open override fun hashCode(): Int
toString
Link copied to clipboard
open override fun toString(): String

Properties

amount
Link copied to clipboard
The purchased amount.
val amount: Int
itemId
Link copied to clipboard
The id of the purchased Item.
val itemId: String
itemName
Link copied to clipboard
The name of the purchased Item.
val itemName: String
timestamp
Link copied to clipboard
The timestamp of the Transaction.
open override val timestamp: Long
value
Link copied to clipboard
The value of the Transaction.
open override val value: Double

Extensions

asRefund
Link copied to clipboard
Extension method for turning Transaction.Purchases into Transaction.Refunds.
fun Transaction.Purchase.asRefund(): Transaction.Refund