UNPKG

aps-data-api

Version:

package for data extraction from APS company for omnimetic project

32 lines (29 loc) 877 B
import { BaseModel } from './base-model'; import { Month } from '../typings'; export class MonthlyUtilityData extends BaseModel { amountInCents: number; energyConsumptionInWatts: number; month: Month; offPeakUsageInWatts: number; onPeakUsageInWatts: number; serviceAccountId: string; year: number; constructor(json?: any) { super(json); if (json) { this.serviceAccountId = json.serviceAccountId; this.month = json.month; this.offPeakUsageInWatts = json.offPeakUsageInWatts ? json.offPeakUsageInWatts : 0; this.onPeakUsageInWatts = json.onPeakUsageInWatts ? json.onPeakUsageInWatts : 0; this.year = json.year; this.amountInCents = json.amountInCents; this.energyConsumptionInWatts = json.energyConsumptionInWatts ? json.energyConsumptionInWatts : 0; } } }