toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final json = <String, dynamic>{};
    json[r'id'] = this.id;
    json[r'userId'] = this.userId;
    json[r'organizationId'] = this.organizationId;
    json[r'productId'] = this.productId;
    json[r'subscriptionId'] = this.subscriptionId;
    json[r'status'] = this.status;
  if (this.assignedBy != null) {
    json[r'assignedBy'] = this.assignedBy;
  } else {
    json[r'assignedBy'] = null;
  }
  if (this.assignedAt != null) {
    json[r'assignedAt'] = this.assignedAt;
  } else {
    json[r'assignedAt'] = null;
  }
  if (this.revokedAt != null) {
    json[r'revokedAt'] = this.revokedAt;
  } else {
    json[r'revokedAt'] = null;
  }
  if (this.revokedBy != null) {
    json[r'revokedBy'] = this.revokedBy;
  } else {
    json[r'revokedBy'] = null;
  }
  if (this.metadata != null) {
    json[r'metadata'] = this.metadata;
  } else {
    json[r'metadata'] = null;
  }
  if (this.createdAt != null) {
    json[r'createdAt'] = this.createdAt;
  } else {
    json[r'createdAt'] = null;
  }
  if (this.updatedAt != null) {
    json[r'updatedAt'] = this.updatedAt;
  } else {
    json[r'updatedAt'] = null;
  }
  return json;
}