Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ import com.sourcepoint.mobile_core.network.requests.ConsentStatusRequest
import com.sourcepoint.mobile_core.network.requests.GDPRChoiceRequest
import com.sourcepoint.mobile_core.network.requests.GlobalCmpChoiceRequest
import com.sourcepoint.mobile_core.network.requests.IncludeData
import com.sourcepoint.mobile_core.network.requests.IncludeData.GPPConfig
import com.sourcepoint.mobile_core.network.requests.MessagesRequest
import com.sourcepoint.mobile_core.network.requests.MetaDataRequest
import com.sourcepoint.mobile_core.network.requests.PreferencesChoiceRequest
Expand Down Expand Up @@ -74,7 +75,7 @@ class Coordinator(
private val idfaStatus: SPIDFAStatus? get() = getIDFAStatus()
// TODO: implement using expect/actual
var getIDFAStatus: (() -> SPIDFAStatus?) = { SPIDFAStatus.current() } // workaround for ios
private val includeData: IncludeData = IncludeData()
private val includeData: IncludeData = IncludeData(gppConfig = campaigns.usnat?.gppConfig ?: GPPConfig())

private var needsNewUSNatData = false
private var needsNewGlobalCmpData = false
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package com.sourcepoint.mobile_core.models

import com.sourcepoint.mobile_core.network.requests.IncludeData
import com.sourcepoint.mobile_core.network.requests.IncludeData.GPPConfig

data class SPCampaign (
val targetingParams: SPTargetingParams = emptyMap(),
val groupPmId: String? = null,
val gppConfig: IncludeData.GPPConfig? = null,
val transitionCCPAAuth: Boolean? = null,
val supportLegacyUSPString: Boolean? = null
val supportLegacyUSPString: Boolean? = null,
val gppConfig: GPPConfig = GPPConfig(uspString = supportLegacyUSPString ?: false),
val transitionCCPAAuth: Boolean? = null
)
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ data class IncludeData(
val localState: TypeString = TypeString(),
val categories: Boolean = true,
var translateMessage: Boolean? = null,
@SerialName("GPPData") val gppData: GPPConfig = GPPConfig()
@SerialName("GPPData") val gppConfig: GPPConfig = GPPConfig()
) {
@Serializable
data class TypeString(val type: String = "string") {
Expand All @@ -24,7 +24,7 @@ data class IncludeData(
val MspaCoveredTransaction: MspaBinaryFlag? = null,
val MspaOptOutOptionMode: MspaTernaryFlag? = null,
val MspaServiceProviderMode: MspaTernaryFlag? = null,
val uspString: Boolean? = true
val uspString: Boolean = false
) {
override fun toString() = json.encodeToString(this)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class IncludeDataTest {
fun defaultValues() {
val includeData = IncludeData().toString()
assertEquals(
"{\"TCData\":{\"type\":\"string\"},\"webConsentPayload\":{\"type\":\"string\"},\"localState\":{\"type\":\"string\"},\"categories\":true,\"GPPData\":{\"uspString\":true}}",
"{\"TCData\":{\"type\":\"string\"},\"webConsentPayload\":{\"type\":\"string\"},\"localState\":{\"type\":\"string\"},\"categories\":true,\"GPPData\":{\"uspString\":false}}",
includeData
)
}
Expand Down