fromMap static method

Implementation

static OrderInformationDiscountProfile? fromMap(Object? body) {
  final source = readRecord(body);
  if (source == null) return null;
  return OrderInformationDiscountProfile(
    amount: readText(source['amount']),
    href: readText(source['href']),
    id: readText(source['id']),
    name: readText(source['name']),
    object: readText(source['object']),
    redemptionCode: readText(source['redemption_code']),
    type: readText(source['type']),
  );
}