class FullMapPointsQuery {
  courier;
  country;
  lat;
  lon;
  cod_only;
  function;
  selectedPointId;
  weight;
  latlng;
  limit;
  withoutPrinter;
  zoom;
  onlyMachines;
  showMachines;
  showPoints;

  toString() {
    const obj = this;
    const query =
      // "?" +
      Object.keys(obj)
        .reduce(function (a, k) {
          a.push(k + "=" + encodeURIComponent(obj[k]));
          return a;
        }, [])
        .join("&");
    return query;
  }

  constructor(init) {
    if (init !== undefined) {
      Object.assign(this, init);
    } else {
      this.limit = 100;
      this.country = "PL";
    }
  }
}

export default FullMapPointsQuery;
