postBooksScanBookWithHttpInfo method
Posts a reviewed scanned bill to the ledger.
Posts a reviewed scanned bill to the ledger. It is the scanner's ONLY write: the voucher goes through the same post() choke point every other source uses, so it is checked to balance (Σdebit == Σcredit) and is idempotent by (scan, scanId) — re-booking the same scan answers posted=false and writes nothing. A bill whose economic identity (vendor, total, issue date) already posted under a DIFFERENT scan is refused 409 unless override is set, which is what stops the same receipt re-scanned into a new file hash from double-booking. An unbalanced voucher is refused 400.
Note: This method returns the HTTP Response.
Parameters:
- BookRequest bookRequest (required):
Implementation
Future<Response> postBooksScanBookWithHttpInfo(BookRequest bookRequest,) async {
// ignore: prefer_const_declarations
final path = r'/v1/books/scan/book';
// ignore: prefer_final_locals
Object? postBody = bookRequest;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
const contentTypes = <String>['application/json'];
return apiClient.invokeAPI(
path,
'POST',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}