All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.api.bloxy.model.dto.tokensale.Sale.kt Maven / Gradle / Ivy

There is a newer version: 1.2.1
Show newest version
package io.api.bloxy.model.dto.tokensale

import com.beust.klaxon.Json
import io.api.bloxy.model.IModel
import io.api.bloxy.model.ITokenModel
import io.api.bloxy.model.dto.TokenType


/**
 * ! NO DESCRIPTION !
 *
 * @author GoodforGod
 * @since 18.11.2018
 */
data class Sale(
    val symbol: String = "",
    val transactions: Long = 0,
    @Json(name = "token_type") val typeAsString: String = "",
    @Json(name = "eth_amount") val ethAmount: Number = .0,
    @Json(name = "token_address") val tokenAddress: String = "",
    @Json(name = "token_amount") val tokenAmount: Number = .0,
    @Json(name = "token_buyers") val tokenBuyers: Long = 0
) : IModel, ITokenModel {

    override val tokenType: TokenType = TokenType.parse(typeAsString)

    override fun isEmpty(): Boolean {
        return tokenAddress.isEmpty() && symbol.isEmpty() && transactions == 0L && ethAmount == .0
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy