class PointsAutocompleteQuery {
  courier;
  q;
  cod_only;
  function;
  weight;
  id_list;
  limit;
  withoutPrinter;

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

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

export default PointsAutocompleteQuery;
