Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/main/kotlin/net/tcgdex/sdk/models/Card.kt
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,10 @@ data class Card internal constructor(
*/
val set: SetResume,

/**
* Market pricing information
*/
val pricing: Pricing?,

/**
* the Pokémon Pokédex IDs (multiple if multiple pokémon appears on the card)
Expand Down
13 changes: 13 additions & 0 deletions src/main/kotlin/net/tcgdex/sdk/models/Pricing.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package net.tcgdex.sdk.models

import net.tcgdex.sdk.internal.Model
import net.tcgdex.sdk.models.subs.PricingCardMarket
import net.tcgdex.sdk.models.subs.PricingTcgPlayer

/**
* Pokémon TCG Pricing class
*/
data class Pricing internal constructor(
val tcgplayer: PricingTcgPlayer?,
val cardmarket: PricingCardMarket?
) : Model()
85 changes: 85 additions & 0 deletions src/main/kotlin/net/tcgdex/sdk/models/subs/PricingCardMarket.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
package net.tcgdex.sdk.models.subs

import com.google.gson.annotations.SerializedName
import net.tcgdex.sdk.internal.Model

/**
* Pokémon TCG PricingCardMarket class
*/
data class PricingCardMarket internal constructor(
/**
* Indicate when is the last time it was fetched
*/
val updated: String?,

/**
* Indicate the unit in which the card is sold
*/
val unit: String?,

/**
* Average selling price (non-foil)
*/
val avg: Float?,

/**
* Lowest market price (non-foil)
*/
val low: Float?,

/**
* Trend price from charts (non-foil)
*/
val trend: Float?,

/**
* Average price (last 24 hours)
*/
val avg1: Float?,

/**
* Average price (last 7 days)
*/
val avg7: Float?,

/**
* Average price (last 30 days)
*/
val avg30: Float?,

/**
* Average selling price (foil)
*/
@SerializedName("avg-holo")
val avgHolo: Float?,

/**
* Lowest market price (foil)
*/
@SerializedName("low-holo")
val lowHolo: Float?,

/**
* Trend price from charts (foil)
*/
@SerializedName("trend-holo")
val trendHolo: Float?,

/**
* Average price (last 24 hours, foil)
*/
@SerializedName("avg1-holo")
val avg1Holo: Float?,

/**
* Average price (last 7 days, foil)
*/
@SerializedName("avg7-holo")
val avg7Holo: Float?,

/**
* Average price (last 30 days, foil)
*/
@SerializedName("avg30-holo")
val avg30Holo: Float?
) : Model()
58 changes: 58 additions & 0 deletions src/main/kotlin/net/tcgdex/sdk/models/subs/PricingTcgPlayer.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
package net.tcgdex.sdk.models.subs

import com.google.gson.annotations.SerializedName
import net.tcgdex.sdk.internal.Model

/**
* Pokémon TCG PricingTcgPlayer class
*/
data class PricingTcgPlayer internal constructor(
/**
* Indicate when is the last time it was fetched
*/
val updated: String,

/**
* Indicate the unit in which the card is sold
*/
val unit: String,

/**
* Standard non-foil cards
*/
val normal: PricingTcgPlayerVariant?,

/**
* Holofoil finish cards
*/
val holoFoil: PricingTcgPlayerVariant?,

/**
* Reverse holofoil cards
*/
@SerializedName("reverse-holofoil")
val reverseHolofoil: PricingTcgPlayerVariant?,

/**
* First edition cards
*/
@SerializedName("1st-edition")
val firstEdition: PricingTcgPlayerVariant?,

/**
* First edition holofoil cards
*/
@SerializedName("1st-edition-holofoil")
val firstEditionHolofoil: PricingTcgPlayerVariant?,

/**
* Unlimited edition cards
*/
val unlimited: PricingTcgPlayerVariant?,

/**
* Unlimited holofoil cards
*/
@SerializedName("unlimited-holofoil")
val unlimitedHolofoil: PricingTcgPlayerVariant?
) : Model()
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
package net.tcgdex.sdk.models.subs

/**
* Pokémon TCG PricingTcgPlayerVariant class
*/
data class PricingTcgPlayerVariant internal constructor(
/**
* Lowest available price
*/
val lowPrice: Float?,

/**
* Median market price
*/
val midPrice: Float?,

/**
* Highest available price
*/
val highPrice: Float?,

/**
* Current market price
*/
val marketPrice: Float?,

/**
* Lowest direct seller price
*/
val directLowPrice: Float?
)
Loading