toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final json = <String, dynamic>{};
  if (this.assetId != null) {
    json[r'asset_id'] = this.assetId;
  } else {
    json[r'asset_id'] = null;
  }
  if (this.priceUsd != null) {
    json[r'price_usd'] = this.priceUsd;
  } else {
    json[r'price_usd'] = null;
  }
  if (this.dateEnded != null) {
    json[r'date_ended'] = this.dateEnded!.toUtc().toIso8601String();
  } else {
    json[r'date_ended'] = null;
  }
  return json;
}