@readium/shared
Version:
Shared models to be used across other Readium projects and implementations in Typescript
30 lines (29 loc) • 908 B
TypeScript
/**
* The price of a publication in an OPDS link.
*
* https://drafts.opds.io/schema/properties.schema.json
*
* 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.
*/
export declare class Price {
/** Currency for the price, eg. EUR. */
currency: string;
/** Price value, should only be used for display purposes, because of precision issues
* inherent with Double and the JSON parsing. */
value: number;
/** Creates a [Price]. */
constructor(values: {
currency: string;
value: number;
});
/**
* Parses a [Price] from its RWPM JSON representation.
*/
static deserialize(json: any): Price | undefined;
/**
* Serializes a [Price] to its RWPM JSON representation.
*/
serialize(): any;
}