UserClient class

Operations scoped to a single user, identified by appUserId.

Properties

appUserId String
The app user id this client acts on.
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

claimCode(String code) Future<UserClaimCodeResponseData>
Claims an affiliate, promo, or referral code for this user.
createOrUpdate({bool? isTrial, bool? isPremium, DateTime? firstSeenAt, Map<String, dynamic>? metadata, String? stripeCustomerId}) Future<User>
Creates the user if missing, or updates the existing one.
get() Future<User>
Fetches the user.
grantReward({required String key, String? operationId}) Future<UserGrantRewardResponseData>
Grants a reward to this user. Requires a secret API key.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
registerAppStoreTransaction({required String originalTransactionId, String? appAccountToken}) Future<void>
Registers the mapping between this user and an Apple originalTransactionId.
registerGooglePlayTransaction({required String purchaseToken, String? obfuscatedExternalAccountId}) Future<void>
Registers the mapping between this user and a Google Play purchaseToken.
toString() String
A string representation of this object.
inherited
withdrawCredits({required String key, required int amount, String? operationId}) Future<UserWithdrawCreditsResponseData>
Withdraws amount credits of the reward identified by key.

Operators

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