AdaptySDK 4.1.1
Loading...
Searching...
No Matches
AdaptySDK.AdaptyProfileParameters Class Referencesealed

The profile attributes Adapty.UpdateProfile(AdaptySDK.AdaptyProfileParameters, System.Action<AdaptySDK.AdaptyError>) sends. Build one with Builder. More...

Classes

class  Builder
 Assembles an AdaptyProfileParameters. Every setter returns the builder, so calls chain; what is never set is not sent, and is therefore left as it is on the server rather than cleared. More...

Public Member Functions

void SetCustomStringAttribute (string key, string value)
 Sets a custom attribute to a string value.
void SetCustomDoubleAttribute (string key, double value)
 Sets a custom attribute to a numeric value.
void RemoveCustomAttribute (string key)
 Clears a custom attribute. The key is sent with a null value rather than left out, so the server removes it instead of leaving it as it was.
override string ToString ()
 A description for logs and the debugger. The format is not part of the contract — read the members rather than parsing it.

Public Attributes

string FirstName
 The user's first name. Null leaves whatever the profile already has.
string LastName
 The user's last name. Null leaves whatever the profile already has.
AdaptyProfileGenderGender
 The user's gender. Null leaves whatever the profile already has.
DateTime? Birthday
 The user's date of birth. Sent as a calendar date — yyyy-MM-dd — so the time of day and the DateTimeKind are ignored, unlike the dates the SDK hands back.
string Email
 The user's email address. Null leaves whatever the profile already has.
string PhoneNumber
 The user's phone number. Null leaves whatever the profile already has.
AppTrackingTransparencyStatusAppTrackingTransparencyStatus
 iOS only. What the user answered to the App Tracking Transparency prompt. Sent on iOS alone — the contract has no such key for Android.
bool? AnalyticsDisabled
 Switches analytics off for this profile. Calls that need analytics then fail with AdaptyErrorCode.AnalyticsDisabled.

Properties

IReadOnlyDictionary< string, object > CustomAttributes [get]
 The custom attributes set so far, as a read-only view. A key removed with RemoveCustomAttribute is present here with a null value, which is what tells the server to clear it.
string BirthdayForRequest [get]
System.Collections.Generic.Dictionary< string, object > CustomAttributesForRequest [get]

Private Member Functions

void _validateCustomAttributeKey (String addingKey, bool testCount)

Private Attributes

Dictionary< string, object > _CustomAttributes = new Dictionary<string, object>()

Detailed Description

The profile attributes Adapty.UpdateProfile(AdaptySDK.AdaptyProfileParameters, System.Action<AdaptySDK.AdaptyError>) sends. Build one with Builder.

Only what is set is sent — a field left null is not cleared on the server, it is left alone. To clear a custom attribute use RemoveCustomAttribute, which sends an explicit removal.

Member Function Documentation

◆ _validateCustomAttributeKey()

void AdaptySDK.AdaptyProfileParameters._validateCustomAttributeKey ( String addingKey,
bool testCount )
private

◆ RemoveCustomAttribute()

void AdaptySDK.AdaptyProfileParameters.RemoveCustomAttribute ( string key)

Clears a custom attribute. The key is sent with a null value rather than left out, so the server removes it instead of leaving it as it was.

Parameters
keyThe key to clear.
Exceptions
ArgumentExceptionThe key is not a valid custom attribute key.

◆ SetCustomDoubleAttribute()

void AdaptySDK.AdaptyProfileParameters.SetCustomDoubleAttribute ( string key,
double value )

Sets a custom attribute to a numeric value.

Parameters
keyUp to 30 characters of letters, digits, dashes, points and underscores.
valueThe value to store.
Exceptions
ArgumentExceptionThe key breaks those limits, or the profile would end up with more than 30 custom attributes.

◆ SetCustomStringAttribute()

void AdaptySDK.AdaptyProfileParameters.SetCustomStringAttribute ( string key,
string value )

Sets a custom attribute to a string value.

Parameters
keyUp to 30 characters of letters, digits, dashes, points and underscores.
valueBetween 1 and 50 characters.
Exceptions
ArgumentExceptionThe key or the value breaks those limits, or the profile would end up with more than 30 custom attributes.

◆ ToString()

override string AdaptySDK.AdaptyProfileParameters.ToString ( )

A description for logs and the debugger. The format is not part of the contract — read the members rather than parsing it.

Member Data Documentation

◆ _CustomAttributes

Dictionary<string, object> AdaptySDK.AdaptyProfileParameters._CustomAttributes = new Dictionary<string, object>()
private

◆ AnalyticsDisabled

bool? AdaptySDK.AdaptyProfileParameters.AnalyticsDisabled

Switches analytics off for this profile. Calls that need analytics then fail with AdaptyErrorCode.AnalyticsDisabled.

◆ AppTrackingTransparencyStatus

AppTrackingTransparencyStatus? AdaptySDK.AdaptyProfileParameters.AppTrackingTransparencyStatus

iOS only. What the user answered to the App Tracking Transparency prompt. Sent on iOS alone — the contract has no such key for Android.

◆ Birthday

DateTime? AdaptySDK.AdaptyProfileParameters.Birthday

The user's date of birth. Sent as a calendar date — yyyy-MM-dd — so the time of day and the DateTimeKind are ignored, unlike the dates the SDK hands back.

◆ Email

string AdaptySDK.AdaptyProfileParameters.Email

The user's email address. Null leaves whatever the profile already has.

◆ FirstName

string AdaptySDK.AdaptyProfileParameters.FirstName

The user's first name. Null leaves whatever the profile already has.

◆ Gender

AdaptyProfileGender? AdaptySDK.AdaptyProfileParameters.Gender

The user's gender. Null leaves whatever the profile already has.

◆ LastName

string AdaptySDK.AdaptyProfileParameters.LastName

The user's last name. Null leaves whatever the profile already has.

◆ PhoneNumber

string AdaptySDK.AdaptyProfileParameters.PhoneNumber

The user's phone number. Null leaves whatever the profile already has.

Property Documentation

◆ BirthdayForRequest

string AdaptySDK.AdaptyProfileParameters.BirthdayForRequest
getprivate

The contract wants a plain calendar date here, not the timestamp format of the other dates, so this one is written by hand rather than through the date converter.

◆ CustomAttributes

IReadOnlyDictionary<string, object> AdaptySDK.AdaptyProfileParameters.CustomAttributes
get

The custom attributes set so far, as a read-only view. A key removed with RemoveCustomAttribute is present here with a null value, which is what tells the server to clear it.

◆ CustomAttributesForRequest

System.Collections.Generic.Dictionary<string, object> AdaptySDK.AdaptyProfileParameters.CustomAttributesForRequest
getprivate

The documentation for this class was generated from the following files: