UserClient class
Operations scoped to a single user, identified by appUserId.
Properties
Methods
-
claimCode(
String code) → Future< UserClaimCodeResponseData> -
Claims an affiliate, promo, or referral
codefor 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
amountcredits of the reward identified bykey.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited