Skip to content

Commit 719cc41

Browse files
Add support for 'subscribed' marketing consent status
1 parent 2acee77 commit 719cc41

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

src/Packages/Passport/Runtime/Scripts/Private/Model/MarketingConsentStatus.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ namespace Immutable.Passport.Model
99
public enum MarketingConsentStatus
1010
{
1111
OptedIn,
12+
Subscribed,
1213
Unsubscribed
1314
}
1415

@@ -27,6 +28,7 @@ public static string ToApiString(this MarketingConsentStatus status)
2728
return status switch
2829
{
2930
MarketingConsentStatus.OptedIn => "opted_in",
31+
MarketingConsentStatus.Subscribed => "subscribed",
3032
MarketingConsentStatus.Unsubscribed => "unsubscribed",
3133
_ => throw new ArgumentOutOfRangeException(nameof(status), status, "Unknown MarketingConsentStatus value")
3234
};

src/Packages/Passport/Runtime/Scripts/Public/PassportUI.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -547,6 +547,9 @@ private async void HandleLoginData(string jsonData)
547547
case "opted_in":
548548
loginOptions.marketingConsentStatus = MarketingConsentStatus.OptedIn;
549549
break;
550+
case "subscribed":
551+
loginOptions.marketingConsentStatus = MarketingConsentStatus.Subscribed;
552+
break;
550553
case "unsubscribed":
551554
loginOptions.marketingConsentStatus = MarketingConsentStatus.Unsubscribed;
552555
break;

0 commit comments

Comments
 (0)