import { request } from "./request.js";
import { autocomplete_response } from "./autocomplete_response.js";

export class autocomplete_request extends request {
    #barcode;

    constructor(barcode) {
        super()

        this.#barcode = barcode;
    }

    get _response() {
        return autocomplete_response;
    }

    get data() {
        return {
            "apikey": this._apikey
        };
    }

    get method() {
        return "POST";
    }

    get url() {
        return "/complete/barcode/" + this.#barcode;
    }
}