Skip to content

Commit

Permalink
IBillsHandler: add settings
Browse files Browse the repository at this point in the history
  • Loading branch information
michael-say committed May 15, 2024
1 parent ea2dc50 commit 260ae3c
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -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;
}


}
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,12 @@ default Set<Class<? extends BillsHandlerRequest>> 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();
}
}

0 comments on commit 260ae3c

Please sign in to comment.