Price

data class Price(val currency: String, val value: Double) : JSONable, Parcelable

The price of a publication in an OPDS link.

https://drafts.opds.io/schema/properties.schema.json

Parameters

currency

Currency for the price, eg. EUR.

value

Price value, should only be used for display purposes, because of precision issues inherent with Double and the JSON parsing.

Constructors

Link copied to clipboard
constructor(currency: String, value: Double)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
abstract fun describeContents(): Int
Link copied to clipboard
open override fun toJSON(): JSONObject

Serializes an Price to its JSON representation.

Link copied to clipboard
abstract fun writeToParcel(p0: Parcel, p1: Int)