EcrRequest class final

One call's worth of arguments, on their way to the host.

Every field the channel carries is here, so the arguments a host receives can be asserted against this one object rather than reconstructed from six call sites.

Constructors

EcrRequest({required String operationId, required String host, required String serialNumber, required EcrTransport transport, required EcrConfig config, EcrAmount? amount, String receiptNumber = '', String transactionDate = '', String originalTerminalId = '', String merchantReference = '', String originalMerchantReference = ''})
Built by EcrTerminal for each call; assembled by hand only in tests.
const

Properties

amount → EcrAmount?
Null for operations that carry no amount — a void takes the original's.
final
config → EcrConfig
How this till identifies itself and how long it waits.
final
hashCode → int
The hash code for this object.
no setterinherited
host → String
The terminal's address on the local network.
final
merchantReference → String
The till's own reference for this request.
final
operationId → String
Client-generated handle, so a cancel can name this call.
final
originalMerchantReference → String
The reference an earlier transaction was sent with, for a lookup by reference. Empty for every other call.
final
originalTerminalId → String
Empty means "this terminal" — never null, matching the native defaults.
final
receiptNumber → String
The original's receipt number as the operator typed it, unpadded.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
serialNumber → String
The terminal's serial number, as the operator registered it.
final
transactionDate → String
The original's day as yyyyMMdd.
final
transport → EcrTransport
How the terminal is attached, from its TMS profile.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toArguments() → Map<String, Object?>
The argument map as it crosses the channel.
toString() → String
A string representation of this object.
override

Operators

operator ==(Object other) → bool
The equality operator.
inherited