import { request } from "./request.js";
import { reservation } from "./reservation.js";
import { bool_response } from "./bool_response.js";

export class product_give_back_request extends request {
    #reservation;
    
    constructor(reservation) {
        super();

        this.#reservation = reservation;
    }

    get data() {
        return Object.assign(this.#reservation.dump, {
            "apikey": this._apikey
        });
    }

    get _response() {
        return bool_response;
    }

    get method() {
        return "POST";
    }

    get url() {
        return (
            "/give_back/product/barcode/" 
            + this.#reservation.product_barcode
        );
    }
}
