toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final json = <String, dynamic>{};
  json[r'uuid'] = this.uuid;
  json[r'partner'] = this.partner;
  if (this.marketplace != null) {
    json[r'marketplace'] = this.marketplace;
  } else {
    json[r'marketplace'] = null;
  }
  json[r'productType'] = this.productType;
  json[r'productSubType'] = this.productSubType;
  json[r'url'] = this.url;
  if (this.recommendationScore != null) {
    json[r'recommendationScore'] = this.recommendationScore;
  } else {
    json[r'recommendationScore'] = null;
  }
  if (this.disclaimer != null) {
    json[r'disclaimer'] = this.disclaimer;
  } else {
    json[r'disclaimer'] = null;
  }
  if (this.productSubTypeDisclaimer != null) {
    json[r'productSubTypeDisclaimer'] = this.productSubTypeDisclaimer;
  } else {
    json[r'productSubTypeDisclaimer'] = null;
  }
  if (this.expiresAt != null) {
    json[r'expiresAt'] = this.expiresAt!.toUtc().toIso8601String();
  } else {
    json[r'expiresAt'] = null;
  }
  if (this.rank != null) {
    json[r'rank'] = this.rank;
  } else {
    json[r'rank'] = null;
  }
  json[r'details'] = this.details;
  return json;
}