toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['download_id'] = downloadId;
  data['download_url'] = downloadUrl;
  data['product_id'] = productId;
  data['product_name'] = productName;
  data['download_name'] = downloadName;
  data['order_id'] = orderId;
  data['order_key'] = orderKey;
  data['downloads_remaining'] = downloadsRemaining;
  data['access_expires'] = accessExpires;
  data['access_expires_gmt'] = accessExpiresGmt;
  if (file != null) {
    data['file'] = file!.toJson();
  }
  if (links != null) {
    data['_links'] = links!.toJson();
  }
  return data;
}