ZeroSettlePlatform class abstract

Inheritance
  • Object
  • PlatformInterface
  • ZeroSettlePlatform
Implementers

Constructors

ZeroSettlePlatform()

Properties

applePayStateUpdates Stream<String>
Stream of Apple Pay availability state changes from the iOS Kit's applePayAvailability.statePublisher. Each event is the raw string ("ready" / "setupRequired" / "unavailable"); the facade converts to ApplePayAvailabilityState.
no setter
checkoutEvents Stream<Map<String, dynamic>>
no setter
currentUserIdUpdates Stream<String?>
Stream of the currently-identified user id. Emits null on logout / before identify. Mirrors Android SDK's StateFlow<String?> and the iOS plugin's shadowed cache (Kit currentUserId is internal).
no setter
entitlementUpdates Stream<List<Map<String, dynamic>>>
no setter
eventsUpdates Stream<Map<String, dynamic>>
Raw stream of SDK analytics/lifecycle events. Each emission is a Map<String, dynamic> with a "type" discriminator (camelCase). The facade converts these to ZeroSettleEvent instances via ZeroSettleEvent.fromMap.
no setter
hashCode int
The hash code for this object.
no setterinherited
isBootstrappedUpdates Stream<bool>
Stream of the "has identify(...) completed successfully?" flag. Mirrors the SDK's isBootstrapped state observable.
no setter
isUcbEnabledUpdates Stream<bool>
Reactive getIsUcbEnabled. Emits false once on iOS (UCB is Android/Play only).
no setter
pendingActionsUpdates Stream<List<Map<String, dynamic>>>
Stream of pending-action list snapshots. Emits whenever the SDK's pendingActions StateFlow mutates. iOS always emits an empty list once.
no setter
pendingCheckoutUpdates Stream<bool>
Stream of the "is a web checkout in-flight?" flag. Mirrors the SDK's pendingCheckout state observable on both platforms.
no setter
pendingClaimsUpdates Stream<List<Map<String, dynamic>>>
Stream of pending-claim list snapshots. Emits whenever the SDK's pendingClaims mutates (claim added or removed).
no setter
productsUpdates Stream<List<Map<String, dynamic>>>
Stream of product catalog snapshots. Mirrors the native SDK's products state observable. Emits the current catalog on listen, then every subsequent change.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

acceptSaveOffer({required String productId, required String userId}) Future<Map<String, dynamic>>
acceptSaveOfferForCurrentUser({required String productId}) Future<Map<String, dynamic>>
1.3.0 no-userId overload — uses the currently identified user.
bootstrap({required String userId}) Future<Map<String, dynamic>>
cancelSubscription({required String productId, required String userId, bool immediate = false}) Future<void>
cancelSubscriptionForCurrentUser({required String productId, bool immediate = false}) Future<void>
1.3.0 no-userId overload — uses the currently identified user.
configure({required String publishableKey, bool syncStoreKitTransactions = true, String? appleMerchantId, bool preloadCheckout = false, int? maxPreloadedWebViews, String? applePaySetupBehavior, String? playLicenseKey, bool syncPlayPurchases = true, bool strictAck = false}) Future<void>
dismissPendingAction({required String transactionId}) Future<void>
Dismiss a pending action identified by transactionId. No-op on iOS.
fetchCancelFlowConfig({String? userId}) Future<Map<String, dynamic>>
fetchProducts({String? userId}) Future<Map<String, dynamic>>
fetchTransactionHistory({required String userId}) Future<List<Map<String, dynamic>>>
fetchTransactionHistoryForCurrentUser() Future<List<Map<String, dynamic>>>
1.3.0 no-userId overload — uses the currently identified user.
fetchUpgradeOfferConfig({String? productId, required String userId}) Future<Map<String, dynamic>>
fetchUpgradeOfferConfigForCurrentUser({String? productId}) Future<Map<String, dynamic>>
1.3.0 no-userId overload — uses the currently identified user.
fetchUserOffer() Future<Map<String, dynamic>>
Fetches the server-resolved offer for the currently-identified user. Returns the raw UserOfferResponse wire map. The facade converts this to UserOfferResponse.
getApplePayState() Future<String>
Reads the current Apple Pay availability state once. Returned as a raw string ("ready" / "setupRequired" / "unavailable"); the facade converts to ApplePayAvailabilityState.
getCancelFlowConfig() Future<Map<String, dynamic>?>
getCurrentUserId() Future<String?>
The currently identified user ID, or null if identify() hasn't been called.
getDetectedJurisdiction() Future<String?>
getEntitlements() Future<List<Map<String, dynamic>>>
getIsApplePayOnly() Future<bool>
Whether the SDK is currently treating this merchant as Apple-Pay-only. Mirrors ZeroSettle.shared.isApplePayOnly on iOS.
getIsBootstrapped() Future<bool>
Whether identify() (or the deprecated bootstrap()) has completed.
getIsConfigured() Future<bool>
getIsUcbEnabled() Future<bool>
Whether User Choice Billing is currently active for this tenant/market. Always false on iOS (UCB is an Android/Play concept).
getPendingActions() Future<List<Map<String, dynamic>>>
Returns the current list of pending actions as raw maps. Android only; iOS always returns an empty list.
getPendingCheckout() Future<bool>
getPendingClaims() Future<List<Map<String, dynamic>>>
StoreKit purchases the current user could claim from another ZeroSettle account.
getProducts() Future<List<Map<String, dynamic>>>
getRemoteConfig() Future<Map<String, dynamic>?>
getSdkVersion() Future<String>
hasActiveEntitlement({required String productId}) Future<bool>
identify({required String type, String? id, String? name, String? email}) Future<Map<String, dynamic>?>
logout() Future<void>
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
openCustomerPortal({required String userId}) Future<void>
pauseSubscription({required String productId, required String userId, required int pauseOptionId}) Future<String?>
pauseSubscriptionForCurrentUser({required String productId, int? pauseDurationDays}) Future<String?>
1.3.0 no-userId overload — uses the currently identified user. Takes pauseDurationDays per Kit 1.3.0 (replaces the old pauseOptionId).
preloadPaymentSheet({required String productId, String? userId}) Future<void>
presentApplePaySetup() Future<void>
Launches the system Wallet setup flow so the user can add a card for Apple Pay. Mirrors ZeroSettle.shared.presentApplePaySetup() on iOS.
presentCancelFlow({required String productId, required String userId}) Future<String>
presentCancelFlowForCurrentUser({required String productId}) Future<String?>
1.3.0 no-userId overload — uses the currently identified user.
presentPaymentSheet({required String productId, String? userId, bool dismissible = true}) Future<Map<String, dynamic>>
iOS only. Android intentionally returns a not_implemented error — Android routes payment through Google Play User Choice Billing, and the web payment sheet is presented internally by the SDK for upgrade/switch offers rather than via this method.
presentSaveTheSaleSheet() Future<String>
presentUpgradeOffer({String? productId, required String userId}) Future<String>
presentUpgradeOfferForCurrentUser({String? productId}) Future<String>
1.3.0 no-userId overload — uses the currently identified user.
product({required String productId}) Future<Map<String, dynamic>?>
purchase({required String productId, String? presentation}) Future<Map<String, dynamic>>
Unified purchase entry point. Routes to web checkout or StoreKit based on jurisdiction + remote config; can be overridden per-call by presentation.
purchaseViaPlayBilling({required String productId}) Future<Map<String, dynamic>>
Android peer of purchaseViaStoreKit. Routes through the Google Play Billing dialog and returns the resulting CheckoutTransaction shape (source == "play_store").
purchaseViaStoreKit({required String productId}) Future<Map<String, dynamic>>
Force a StoreKit (App Store IAP) purchase, bypassing web checkout.
recommendedAppAccountToken() Future<String>
Derive a deterministic UUID for appAccountToken from the currently identified user ID. Returned as a string.
releasePendingCheckout() Future<void>
Cancels an in-flight web checkout. No-op on iOS.
resetMigrateTipState() Future<void>
resolveMigrationManagerHandle({String? stripeCustomerId}) Future<String>
Returns the iOS-side handle ID for the migration manager scoped to the currently-identified user and the optional stripeCustomerId. The returned ID is opaque; pass it to MigrationManager.fromHandleId.
resolveOfferManagerHandle({String? stripeCustomerId}) Future<String>
Returns the iOS-side handle ID for the offer manager scoped to the currently-identified user and the optional stripeCustomerId. The returned ID is opaque; pass it to OfferManager.fromHandleId.
restoreEntitlements({required String userId}) Future<List<Map<String, dynamic>>>
restoreEntitlementsForCurrentUser() Future<List<Map<String, dynamic>>>
1.3.0 no-userId overload — uses the currently identified user.
resumeSubscription({required String productId, required String userId}) Future<void>
resumeSubscriptionForCurrentUser({required String productId}) Future<void>
1.3.0 no-userId overload — uses the currently identified user.
setBaseUrlOverride(String? url) Future<void>
setCustomer({String? name, String? email}) Future<void>
showManageSubscription({required String userId}) Future<void>
submitCancelFlowResponse(Map<String, dynamic> response) Future<void>
toString() String
A string representation of this object.
inherited
trackEvent({required String eventType, required String productId, String? screenName, Map<String, String>? metadata}) Future<void>
trackMigrationConversion({required String userId}) Future<void>
trackMigrationConversionForCurrentUser() Future<void>
1.3.0 no-userId overload — uses the currently identified user.
transferPlayOwnershipToCurrentUser({required String productId, required String originalTransactionId}) Future<void>
Android peer of transferStoreKitOwnershipToCurrentUser. Takes both productId and originalTransactionId (the Play purchase token) — the SDK needs both to resolve the source purchase via the Play API.
transferStoreKitOwnershipToCurrentUser({required String productId}) Future<void>
warmUpPaymentSheet({required String productId, String? userId}) Future<void>

Operators

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

Static Properties

instance ZeroSettlePlatform
getter/setter pair