Turns the maps the host returns into the typed results callers see.
Deliberately separate from the channel itself so the mapping can be tested against captured payloads without a binding, and so a contract test can assert what happens to a map that is wrong in every way a real host might get it wrong: a missing field, a null where a string was promised, an outcome this version has never heard of.
The rule throughout: never invent an outcome. A payload that cannot be read becomes an EcrMalformed failure, which leaves the financial outcome unknown, rather than a decline — because a till that reads an unreadable answer as a refusal will retry, and the customer pays twice.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
capabilities(
Object? payload) → EcrTerminalCapabilities - Reads a capabilities map.
-
failure(
Object? payload) → EcrFailure -
Reads a
failuresub-map. -
inquiry(
Object? payload, {required String operationId}) → EcrInquiry - Reads the answer to an inquiry.
-
reachability(
Object? payload) → EcrReachability - Reads the answer to EcrMethods.probeReachability.
-
receipt(
Object? payload, {required String operationId}) → EcrReceipt - Reads the answer to a receipt request.
-
receiptClosed(
Object? payload, {required String operationId}) → EcrReceiptClosed - Reads a close-receipt answer.
-
result(
Object? payload, {required String operationId}) → EcrResult - Reads the answer to a sale, void or refund.
-
signOn(
Object? payload, {required String operationId}) → EcrSignOn - Reads a sign-on answer.
-
transaction(
Map< Object?, Object?> map) → EcrTransaction -
Reads a
transactionsub-map.