diff --git a/src/main/java/com/untill/driver/interfaces/bills/BillsHandlerSettings.java b/src/main/java/com/untill/driver/interfaces/bills/BillsHandlerSettings.java new file mode 100644 index 0000000..617f9a7 --- /dev/null +++ b/src/main/java/com/untill/driver/interfaces/bills/BillsHandlerSettings.java @@ -0,0 +1,30 @@ +package com.untill.driver.interfaces.bills; + +import com.untill.driver.interfaces.fiscalprinter.IFiscalPrinter; + +/** + * An instance of this class returned by {@link IBillsHandler#getSettings()} to specify details of driver behavior + * + * @see IFiscalPrinter + */ +public class BillsHandlerSettings { + + + boolean consolidatedCombiDealsExpected; + + /** + * Returns true if the driver expects combi-deals to be sent from POS consolidated in the {@link Bill} object + */ + public boolean isConsolidatedCombiDealsExpected() { + return consolidatedCombiDealsExpected; + } + + /** + * Specifies that the driver expects combi-deals to be sent from POS consolidated in the {@link Bill} object + */ + public void setConsolidatedCombiDealsExpected(boolean consolidatedCombiDealsExpected) { + this.consolidatedCombiDealsExpected = consolidatedCombiDealsExpected; + } + + +} diff --git a/src/main/java/com/untill/driver/interfaces/bills/IBillsHandler.java b/src/main/java/com/untill/driver/interfaces/bills/IBillsHandler.java index 5669ced..acab86d 100644 --- a/src/main/java/com/untill/driver/interfaces/bills/IBillsHandler.java +++ b/src/main/java/com/untill/driver/interfaces/bills/IBillsHandler.java @@ -47,4 +47,12 @@ default Set> supportedRequests(DriverConfig requests.add(BillPaymentCancelledRequest.class); return requests; } + + /** + * @return Returns the optional settings clarifying the driver behavior + * @see {@link BillsHandlerSettings} + */ + default BillsHandlerSettings getSettings() { + return new BillsHandlerSettings(); + } } \ No newline at end of file