toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final json = <String, dynamic>{};
  json[r'id'] = this.id;
  json[r'account'] = this.account;
  json[r'source'] = this.source_;
  if (this.sourceId != null) {
    json[r'source_id'] = this.sourceId;
  } else {
    json[r'source_id'] = null;
  }
  json[r'description'] = this.description;
  json[r'gold'] = this.gold;
  json[r'items'] = this.items;
  json[r'created_at'] = this.createdAt.toUtc().toIso8601String();
  if (this.claimedAt != null) {
    json[r'claimed_at'] = this.claimedAt!.toUtc().toIso8601String();
  } else {
    json[r'claimed_at'] = null;
  }
  return json;
}