CloudPosApiClient class

HTTP client for communicating with the Cloud POS backend API.

All methods require authentication via AuthService. Uses LittleFishHttpClient for HTTP transport, consistent with other littlefish payment packages.

Constructors

CloudPosApiClient({required String rawBaseUrl, LittleFishHttpClient? httpClient})
Creates a new CloudPosApiClient targeting the given rawBaseUrl.

Properties

baseUrl String
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

abandonTransaction(String transactionId) Future<CloudPosTransaction>
Abandons a staged or in-progress transaction.
finaliseTransaction(String transactionId, CloudPosTransactionStatus status, {String? message}) Future<void>
Finalises a transaction by reporting its terminal status to the backend.
getAvailableTerminals(String businessId) Future<List<CloudPosTerminal>>
Returns all available (online, payment-capable) terminals for a business.
getTransactionStatus(String transactionId) Future<CloudPosTransaction>
Polls the current status of a staged transaction.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
reassignTransaction(String transactionId, String newTerminalId) Future<CloudPosTransaction>
Reassigns a staged transaction to a different terminal.
retryTransaction(String transactionId) Future<CloudPosTransaction>
Retries a failed or timed-out transaction.
stageTransaction({required String businessId, required String targetTerminalId, required String originatingTerminalId, required int amount, required String currencyCode, required String orderReference, List<Map<String, dynamic>>? items, String? sellerName, String? sellerId, int? totalTaxMinorUnits, bool? taxInclusive, String? customerId, String? customerName, String? customerEmail, String? customerMobile}) Future<CloudPosTransaction>
Stages a new transaction for processing on the specified terminal.
toString() String
A string representation of this object.
inherited

Operators

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