dart_tefip 1.1.2
dart_tefip: ^1.1.2 copied to clipboard
Dart SDK for TEF IP API terminal integration and usage
1.1.2 #
Added #
GET /saleendpoint —sale.get()returns aSaleCouponModelsnapshot of the active saleDELETE /sale/item/clearendpoint —saleItem.clear()removes all items from the current sale at oncediscount: double?andaddition: double?fields onSaleStartRequestModel— sale-level discount and surcharge that affect the final total- New
SaleCouponModelresponse model withsale,items,payments, andsummaryfields - New
SaleSummaryModelwith computed totals:subtotal,surcharge,discount,itemDiscount,itemAddition,total
Notes #
- Item-level
discount/additiononSaleItemModelremain visual only and do not affect sale totals
1.1.1 #
Added #
txid: String?onTransactionModel— PIX transaction ID returned by the acquirer; present only whentype == pix, null for credit/debitcAut: String?onTransactionModel— authorization code returned by the acquirer; present for credit/debit, null for PIXtxid: String?,cAut: String?,cnpj: String?,tBand: String?,tPag: String?onTransactionResponseModel— model now fully mirrorsdj_pay_interface.TransactionResponse
Changed #
- Brand references renamed from "TefIP" to "TEF IP"
1.1.0 #
Added #
- New
displayPopendpoint (POST /display/pop) to close the current display overlay - New
salePayment.patchandsalePayment.deletemethods — full CRUD for sale payments - New
saleItem.patchandsaleItem.deletemethods — full CRUD for sale items - New
sale.patchmethod to update sale metadata at any point during the sale flow
Changed #
SaleItemModel.idandSalePaymentModel.idare now optional (String?) — backend manages IDs internally- Removed
SaleCreatedResponsemodel (sale creation now returnsSuccessResponseModel) SaleStartRequestModelno longer exposes anidfield
Testing #
- Added extensive unit tests for all models:
SaleItem,SalePayment,SaleStartRequest,SaleActionRequest,SaleMutationResponse,SuccessResponse,Transaction,TransactionRequest,AskFormRequest,AskOption,AskParameters,AskQuestion,AskSingleQuestionRequest,DisplayCarouselRequest,DisplayTextRequest - Added tests for enums (
TefIPTransactionType, all other enums), converters (details,images,transaction type,unix datetime), exceptions, endpoint constants, and header builder - Added tests for new
displayPopandsalePaymentendpoints
1.0.8 #
Added #
- New
TefIPSaleendpoint for sale management (start, cancel, finalize, items, payments) - New models:
SaleStartRequest,SaleActionRequest,SaleCreatedResponse,SaleMutationResponse,SaleItem,SalePayment - New enum
TefIPSalePaymentTypefor sale payment types - New tests for all sale endpoints
Fixed #
- Authentication header construction error in
TefIPHeadersBuilder - Updated
example/bin/main.dartto reflect correct SDK usage
Improved #
- Refactored
TefIPNetworkingClientwith better error handling - Updated Ask models (
ask_parameters,answer) with improved structure - General documentation and configuration updates (README.md, CLAUDE.md)
1.0.7 #
- Refactored
TefIPTransactionTypeenum to carry the tPag code as a field (tPag) with afromTPag()factory method - Updated
TefIPTransactionTypeConverterto usefromTPag()for deserialization andobject.tPagfor serialization (instead ofobject.name) - Updated
TransactionRequestModelto serialize/deserialize the transaction type under thetPagJSON key (instead oftype)
1.0.6 #
- Updated
TefIPTransactionTypeConverterto accept tPag numerical codes (03,04,17,99) instead of alphabetic codes (CC,CD,PX,XX) - Updated
TefIPTransactionType@JsonValueannotations to use tPag numerical codes - Fixed
AnswerModel.displayValueparsing using@JsonKey(readValue:)instead of manual JSON manipulation infromJson
1.0.5 #
- Added
askCancelendpoint to cancel ongoing questions - Refactored question models (
AnswerModel,AskQuestionModel,AskParametersModel) - Removed legacy models (
QuestionOptionModel,QuestionRequestModel,QuestionResponseModel)
1.0.4 #
- Refactored
QuestionResponseModelto usefreezed - Updated
QuestionResponseModelto abstract class with factory constructor - Updated
TefIpAsk.postreturn type fromSuccessResponseModeltoQuestionResponseModel - Updated networking layer success parser to map response into
QuestionResponseModel
1.0.3 #
- Updated project README.md
1.0.2 #
- Updated project description in pubspec.yaml
1.0.1 #
- Added example/README.md with usage instructions
- Updated repository link in the main README.md
1.0.0 #
- Initial stable release of
dart_tefip - Full support for TEF IP terminal communication
- Transaction endpoints:
- PIX
- Credit
- Debit
- Transaction query (single and list)
- Reversal
- Terminal endpoints:
- Info
- Status
- Restart (Android/iOS only – returns 403 otherwise)
- Printing endpoints:
- Print text
- Print image
- Print XML
- Display endpoints:
- Display text
- Display image
- Display carousel
- Clear display
- Question endpoint for terminal input
- Centralized networking layer (
TefIPNetworkingClient)- GET
- GET list
- POST
- Optional raw response handling
- Configurable base URL (
TefIPConfigs.baseUrl) - Configurable request timeout (
TefIPConfigs.requestsTimeOut) - Structured exception handling:
TefIPRequestExceptionTefIPUnexpectedException
- Strongly typed request and response models
- Platform-aware HTTP client abstraction (IO/Web)
- Unit test coverage for endpoints and networking layer