toMap property

Map<String, String?> get toMap

Implementation

Map<String, String?> get toMap {
  Map<String, String?> adRevenueMap = {'source': _source};

  if (_revenue != null) {
    adRevenueMap['revenue'] = _revenue.toString();
  }
  if (_currency != null) {
    adRevenueMap['currency'] = _currency;
  }
  if (adImpressionsCount != null) {
    adRevenueMap['adImpressionsCount'] = adImpressionsCount.toString();
  }
  if (adRevenueNetwork != null) {
    adRevenueMap['adRevenueNetwork'] = adRevenueNetwork;
  }
  if (adRevenueUnit != null) {
    adRevenueMap['adRevenueUnit'] = adRevenueUnit;
  }
  if (adRevenuePlacement != null) {
    adRevenueMap['adRevenuePlacement'] = adRevenuePlacement;
  }
  if (_callbackParameters!.length > 0) {
    adRevenueMap['callbackParameters'] = json.encode(_callbackParameters);
  }
  if (_partnerParameters!.length > 0) {
    adRevenueMap['partnerParameters'] = json.encode(_partnerParameters);
  }

  return adRevenueMap;
}