import { Body, Controller, Post } from "@nestjs/common";
import { DocumentCreateDto } from "../../dto/document.dto";
import ResponseDto from "../../dto/response.dto";
import InvoiceProvider from "./invoice.provider";

@Controller("/invoice")
export default class InvoiceController {

    constructor(private readonly invoiceProvider: InvoiceProvider){}

    @Post("/hasValidDataForInvoiceOrCreditNote")
    async hasValidDataForInvoiceOrCreditNote(@Body() payload: DocumentCreateDto): Promise<ResponseDto>{
        return await this.invoiceProvider.hasValidDataForInvoiceOrCreditNote(payload);
    }

}