Skip to content

Commit ba53787

Browse files
feat: add marketing consent support (#3899)
1 parent 1dec37c commit ba53787

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

Source/Immutable/Private/Immutable/ImmutableDataTypes.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,5 +112,7 @@ TSharedPtr<FJsonObject> FImmutableDirectLoginOptions::ToJsonObject() const
112112
JsonObject->SetStringField(TEXT("email"), Email);
113113
}
114114

115+
JsonObject->SetStringField(TEXT("marketingConsentStatus"), StaticEnum<EImmutableMarketingConsentStatus>()->GetNameStringByValue(static_cast<int64>(MarketingConsentStatus)).ToLower());
116+
115117
return JsonObject;
116118
}

Source/Immutable/Public/Immutable/ImmutableDataTypes.h

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,16 @@ DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FImmutableDeepLinkDynamicMulticastDe
1414
// This hardcoded value will be updated by a workflow during the release process.
1515
#define ENGINE_SDK_VERSION TEXT("1.11.0")
1616

17+
/**
18+
* Enum representing marketing consent status for authentication
19+
*/
20+
UENUM(BlueprintType)
21+
enum class EImmutableMarketingConsentStatus : uint8
22+
{
23+
Opted_In,
24+
Unsubscribed
25+
};
26+
1727
/**
1828
* Enum representing direct login methods for authentication providers
1929
*/
@@ -46,6 +56,10 @@ struct IMMUTABLE_API FImmutableDirectLoginOptions
4656
/** Email address for email-based authentication (only used when DirectLoginMethod is Email) */
4757
UPROPERTY(EditAnywhere, BlueprintReadWrite)
4858
FString Email;
59+
60+
/** Marketing consent status for authentication (defaults to opted in) */
61+
UPROPERTY(EditAnywhere, BlueprintReadWrite)
62+
EImmutableMarketingConsentStatus MarketingConsentStatus = EImmutableMarketingConsentStatus::Opted_In;
4963
};
5064

5165
USTRUCT()

0 commit comments

Comments
 (0)