fromMap static method

LabourProfileSessionPrice? fromMap(
  1. Object? body
)

Implementation

static LabourProfileSessionPrice? fromMap(Object? body) {
  final source = readRecord(body);
  if (source == null) return null;
  return LabourProfileSessionPrice(
    enabledProRata: readFlag(source['enabled_pro_rata']),
    hours: readList<LabourProfileSessionPriceHour>(
        source['hours'], LabourProfileSessionPriceHour.fromMap),
    id: readText(source['id']),
    object: readText(source['object']),
    peakHourly: readList<Object>(source['peak_hourly'], readAny),
    price: readDecimal(source['price']),
    priceType: readText(source['price_type']),
    pricingLevel: LabourProfileSessionPricePricingLevel.fromMap(
        source['pricing_level']),
    status: readText(source['status']),
  );
}