export class AmountData { value?: string; formatted?: number; currency?: string; maxPayout?: number; constructor(params: { value?: string; formatted?: number; currency?: string; maxPayout?: number; }) { this.value = params.value; this.formatted = params.formatted; this.currency = params.currency; this.maxPayout = params.maxPayout; } } export function amountDataFromJson(json: { [key: string]: any }): AmountData { return new AmountData({ value: json.value, formatted: json.formatted, currency: json.currency, maxPayout: json.maxPayout, }); }