diff --git a/3ds2/src/test/java/com/adyen/checkout/adyen3ds2/internal/ui/model/Adyen3DS2ComponentParamsMapperTest.kt b/3ds2/src/test/java/com/adyen/checkout/adyen3ds2/internal/ui/model/Adyen3DS2ComponentParamsMapperTest.kt index 545255bf63..a293237036 100644 --- a/3ds2/src/test/java/com/adyen/checkout/adyen3ds2/internal/ui/model/Adyen3DS2ComponentParamsMapperTest.kt +++ b/3ds2/src/test/java/com/adyen/checkout/adyen3ds2/internal/ui/model/Adyen3DS2ComponentParamsMapperTest.kt @@ -91,7 +91,7 @@ internal class Adyen3DS2ComponentParamsMapperTest { shopperLocale = Locale.GERMAN, environment = Environment.EUROPE, clientKey = TEST_CLIENT_KEY_2, - analyticsParams = AnalyticsParams(AnalyticsParamsLevel.NONE, TEST_CLIENT_KEY_2), + analyticsParams = AnalyticsParams(AnalyticsParamsLevel.INITIAL, TEST_CLIENT_KEY_2), isCreatedByDropIn = true, amount = Amount( currency = "CAD", diff --git a/ach/src/test/java/com/adyen/checkout/ach/internal/ui/model/ACHDirectDebitComponentParamsMapperTest.kt b/ach/src/test/java/com/adyen/checkout/ach/internal/ui/model/ACHDirectDebitComponentParamsMapperTest.kt index 632e32b591..1637d2f924 100644 --- a/ach/src/test/java/com/adyen/checkout/ach/internal/ui/model/ACHDirectDebitComponentParamsMapperTest.kt +++ b/ach/src/test/java/com/adyen/checkout/ach/internal/ui/model/ACHDirectDebitComponentParamsMapperTest.kt @@ -88,7 +88,7 @@ internal class ACHDirectDebitComponentParamsMapperTest { shopperLocale = Locale.GERMAN, environment = Environment.EUROPE, clientKey = TEST_CLIENT_KEY_2, - analyticsParams = AnalyticsParams(AnalyticsParamsLevel.NONE, TEST_CLIENT_KEY_2), + analyticsParams = AnalyticsParams(AnalyticsParamsLevel.INITIAL, TEST_CLIENT_KEY_2), isCreatedByDropIn = true, amount = Amount( currency = "EUR", diff --git a/bcmc/src/test/java/com/adyen/checkout/bcmc/internal/ui/model/BcmcComponentParamsMapperTest.kt b/bcmc/src/test/java/com/adyen/checkout/bcmc/internal/ui/model/BcmcComponentParamsMapperTest.kt index d8013b7595..9605275b19 100644 --- a/bcmc/src/test/java/com/adyen/checkout/bcmc/internal/ui/model/BcmcComponentParamsMapperTest.kt +++ b/bcmc/src/test/java/com/adyen/checkout/bcmc/internal/ui/model/BcmcComponentParamsMapperTest.kt @@ -108,7 +108,7 @@ internal class BcmcComponentParamsMapperTest { shopperLocale = Locale.GERMAN, environment = Environment.EUROPE, clientKey = TEST_CLIENT_KEY_2, - analyticsParams = AnalyticsParams(AnalyticsParamsLevel.NONE, TEST_CLIENT_KEY_2), + analyticsParams = AnalyticsParams(AnalyticsParamsLevel.INITIAL, TEST_CLIENT_KEY_2), isCreatedByDropIn = true, amount = Amount( currency = "CAD", diff --git a/boleto/src/test/java/com/adyen/checkout/boleto/internal/ui/model/BoletoComponentParamsMapperTest.kt b/boleto/src/test/java/com/adyen/checkout/boleto/internal/ui/model/BoletoComponentParamsMapperTest.kt index 07a38106f9..21259686ce 100644 --- a/boleto/src/test/java/com/adyen/checkout/boleto/internal/ui/model/BoletoComponentParamsMapperTest.kt +++ b/boleto/src/test/java/com/adyen/checkout/boleto/internal/ui/model/BoletoComponentParamsMapperTest.kt @@ -90,7 +90,7 @@ internal class BoletoComponentParamsMapperTest { shopperLocale = Locale.GERMAN, environment = Environment.EUROPE, clientKey = TEST_CLIENT_KEY_2, - analyticsParams = AnalyticsParams(AnalyticsParamsLevel.NONE, TEST_CLIENT_KEY_2), + analyticsParams = AnalyticsParams(AnalyticsParamsLevel.INITIAL, TEST_CLIENT_KEY_2), isCreatedByDropIn = true, amount = Amount( currency = "EUR", diff --git a/card/src/test/java/com/adyen/checkout/card/internal/ui/model/CardComponentParamsMapperTest.kt b/card/src/test/java/com/adyen/checkout/card/internal/ui/model/CardComponentParamsMapperTest.kt index fdb2308693..be398aa9d9 100644 --- a/card/src/test/java/com/adyen/checkout/card/internal/ui/model/CardComponentParamsMapperTest.kt +++ b/card/src/test/java/com/adyen/checkout/card/internal/ui/model/CardComponentParamsMapperTest.kt @@ -163,7 +163,7 @@ internal class CardComponentParamsMapperTest { shopperLocale = Locale.GERMAN, environment = Environment.EUROPE, clientKey = TEST_CLIENT_KEY_2, - analyticsParams = AnalyticsParams(AnalyticsParamsLevel.NONE, TEST_CLIENT_KEY_2), + analyticsParams = AnalyticsParams(AnalyticsParamsLevel.INITIAL, TEST_CLIENT_KEY_2), isCreatedByDropIn = true, amount = Amount( currency = "EUR", diff --git a/cashapppay/src/test/java/com/adyen/checkout/cashapppay/internal/ui/model/CashAppPayComponentParamsMapperTest.kt b/cashapppay/src/test/java/com/adyen/checkout/cashapppay/internal/ui/model/CashAppPayComponentParamsMapperTest.kt index 7a6634e458..58386c6f0e 100644 --- a/cashapppay/src/test/java/com/adyen/checkout/cashapppay/internal/ui/model/CashAppPayComponentParamsMapperTest.kt +++ b/cashapppay/src/test/java/com/adyen/checkout/cashapppay/internal/ui/model/CashAppPayComponentParamsMapperTest.kt @@ -136,7 +136,7 @@ internal class CashAppPayComponentParamsMapperTest { environment = Environment.EUROPE, cashAppPayEnvironment = CashAppPayEnvironment.PRODUCTION, clientKey = TEST_CLIENT_KEY_2, - analyticsParams = AnalyticsParams(AnalyticsParamsLevel.NONE, TEST_CLIENT_KEY_2), + analyticsParams = AnalyticsParams(AnalyticsParamsLevel.INITIAL, TEST_CLIENT_KEY_2), isCreatedByDropIn = true, amount = Amount( currency = "EUR", diff --git a/components-core/src/main/java/com/adyen/checkout/components/core/CheckoutConfiguration.kt b/components-core/src/main/java/com/adyen/checkout/components/core/CheckoutConfiguration.kt index 551b38a8fd..fa2a13810a 100644 --- a/components-core/src/main/java/com/adyen/checkout/components/core/CheckoutConfiguration.kt +++ b/components-core/src/main/java/com/adyen/checkout/components/core/CheckoutConfiguration.kt @@ -89,7 +89,7 @@ class CheckoutConfiguration( environment = requireNotNull(parcel.readParcelable(Environment::class.java.classLoader)), clientKey = requireNotNull(parcel.readString()), amount = parcel.readParcelable(Amount::class.java.classLoader), - analyticsConfiguration = parcel.readParcelable(Amount::class.java.classLoader), + analyticsConfiguration = parcel.readParcelable(AnalyticsConfiguration::class.java.classLoader), ) { val size = parcel.readInt() diff --git a/components-core/src/main/java/com/adyen/checkout/components/core/internal/analytics/AnalyticsManagerFactory.kt b/components-core/src/main/java/com/adyen/checkout/components/core/internal/analytics/AnalyticsManagerFactory.kt index 9171ee7c03..fb701287ba 100644 --- a/components-core/src/main/java/com/adyen/checkout/components/core/internal/analytics/AnalyticsManagerFactory.kt +++ b/components-core/src/main/java/com/adyen/checkout/components/core/internal/analytics/AnalyticsManagerFactory.kt @@ -74,6 +74,7 @@ class AnalyticsManagerFactory { application = application, shopperLocale = shopperLocale, isCreatedByDropIn = isCreatedByDropIn, + analyticsLevel = analyticsParams.level, amount = amount, source = source, sessionId = sessionId, diff --git a/components-core/src/main/java/com/adyen/checkout/components/core/internal/analytics/DefaultAnalyticsManager.kt b/components-core/src/main/java/com/adyen/checkout/components/core/internal/analytics/DefaultAnalyticsManager.kt index dcc1df5324..73af88f932 100644 --- a/components-core/src/main/java/com/adyen/checkout/components/core/internal/analytics/DefaultAnalyticsManager.kt +++ b/components-core/src/main/java/com/adyen/checkout/components/core/internal/analytics/DefaultAnalyticsManager.kt @@ -125,7 +125,7 @@ internal class DefaultAnalyticsManager( CheckoutAttemptIdState.NotAvailable -> CHECKOUT_ATTEMPT_ID_NOT_FETCHED } - private fun cannotSendEvents() = analyticsParams.level.priority <= AnalyticsParamsLevel.NONE.priority + private fun cannotSendEvents() = analyticsParams.level.priority <= AnalyticsParamsLevel.INITIAL.priority override fun clear(owner: Any) { if (ownerReference != owner::class.qualifiedName) { diff --git a/components-core/src/main/java/com/adyen/checkout/components/core/internal/analytics/data/remote/DefaultAnalyticsSetupProvider.kt b/components-core/src/main/java/com/adyen/checkout/components/core/internal/analytics/data/remote/DefaultAnalyticsSetupProvider.kt index 50473beac8..a5d0927923 100644 --- a/components-core/src/main/java/com/adyen/checkout/components/core/internal/analytics/data/remote/DefaultAnalyticsSetupProvider.kt +++ b/components-core/src/main/java/com/adyen/checkout/components/core/internal/analytics/data/remote/DefaultAnalyticsSetupProvider.kt @@ -14,12 +14,15 @@ import com.adyen.checkout.components.core.Amount import com.adyen.checkout.components.core.internal.analytics.AnalyticsPlatformParams import com.adyen.checkout.components.core.internal.analytics.AnalyticsSource import com.adyen.checkout.components.core.internal.data.model.AnalyticsSetupRequest +import com.adyen.checkout.components.core.internal.ui.model.AnalyticsParamsLevel import java.util.Locale +@Suppress("LongParameterList") internal class DefaultAnalyticsSetupProvider( private val application: Application, private val shopperLocale: Locale, private val isCreatedByDropIn: Boolean, + private val analyticsLevel: AnalyticsParamsLevel, private val amount: Amount?, private val source: AnalyticsSource, private val sessionId: String?, @@ -33,6 +36,7 @@ internal class DefaultAnalyticsSetupProvider( locale = shopperLocale.toLanguageTag(), component = getComponentQueryParameter(source), flavor = getFlavorQueryParameter(isCreatedByDropIn), + level = getLevelQueryParameter(analyticsLevel), deviceBrand = Build.BRAND, deviceModel = Build.MODEL, referrer = application.packageName, @@ -57,8 +61,16 @@ internal class DefaultAnalyticsSetupProvider( is AnalyticsSource.PaymentComponent -> source.paymentMethodType } + private fun getLevelQueryParameter(analyticsParamsLevel: AnalyticsParamsLevel) = when (analyticsParamsLevel) { + AnalyticsParamsLevel.INITIAL -> ANALYTICS_LEVEL_INITIAL + AnalyticsParamsLevel.ALL -> ANALYTICS_LEVEL_ALL + } + companion object { private const val DROP_IN = "dropin" private const val COMPONENTS = "components" + + private const val ANALYTICS_LEVEL_INITIAL = "initial" + private const val ANALYTICS_LEVEL_ALL = "all" } } diff --git a/components-core/src/main/java/com/adyen/checkout/components/core/internal/data/model/AnalyticsSetupRequest.kt b/components-core/src/main/java/com/adyen/checkout/components/core/internal/data/model/AnalyticsSetupRequest.kt index cfedef7b1d..b5e62c5ef4 100644 --- a/components-core/src/main/java/com/adyen/checkout/components/core/internal/data/model/AnalyticsSetupRequest.kt +++ b/components-core/src/main/java/com/adyen/checkout/components/core/internal/data/model/AnalyticsSetupRequest.kt @@ -29,6 +29,7 @@ internal data class AnalyticsSetupRequest( val locale: String?, val component: String?, val flavor: String?, + val level: String?, val deviceBrand: String?, val deviceModel: String?, val referrer: String?, @@ -47,6 +48,7 @@ internal data class AnalyticsSetupRequest( private const val LOCALE = "locale" private const val COMPONENT = "component" private const val FLAVOR = "flavor" + private const val LEVEL = "level" private const val DEVICE_BRAND = "deviceBrand" private const val DEVICE_MODEL = "deviceModel" private const val REFERRER = "referrer" @@ -68,6 +70,7 @@ internal data class AnalyticsSetupRequest( putOpt(LOCALE, modelObject.locale) putOpt(COMPONENT, modelObject.component) putOpt(FLAVOR, modelObject.flavor) + putOpt(LEVEL, modelObject.level) putOpt(DEVICE_BRAND, modelObject.deviceBrand) putOpt(DEVICE_MODEL, modelObject.deviceModel) putOpt(REFERRER, modelObject.referrer) @@ -93,6 +96,7 @@ internal data class AnalyticsSetupRequest( locale = getStringOrNull(LOCALE), component = getStringOrNull(COMPONENT), flavor = getStringOrNull(FLAVOR), + level = getStringOrNull(LEVEL), deviceBrand = getStringOrNull(DEVICE_BRAND), deviceModel = getStringOrNull(DEVICE_MODEL), referrer = getStringOrNull(REFERRER), diff --git a/components-core/src/main/java/com/adyen/checkout/components/core/internal/ui/model/AnalyticsParams.kt b/components-core/src/main/java/com/adyen/checkout/components/core/internal/ui/model/AnalyticsParams.kt index 8214b77f58..6ffd722f0f 100644 --- a/components-core/src/main/java/com/adyen/checkout/components/core/internal/ui/model/AnalyticsParams.kt +++ b/components-core/src/main/java/com/adyen/checkout/components/core/internal/ui/model/AnalyticsParams.kt @@ -26,7 +26,7 @@ data class AnalyticsParams( @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP) enum class AnalyticsParamsLevel(val priority: Int) { - NONE(1), + INITIAL(1), ALL(2), } @@ -34,6 +34,6 @@ private fun getLevel(analyticsConfiguration: AnalyticsConfiguration?): Analytics return when (analyticsConfiguration?.level) { null -> AnalyticsParamsLevel.ALL // default is ALL AnalyticsLevel.ALL -> AnalyticsParamsLevel.ALL - AnalyticsLevel.NONE -> AnalyticsParamsLevel.NONE + AnalyticsLevel.NONE -> AnalyticsParamsLevel.INITIAL } } diff --git a/components-core/src/test/java/com/adyen/checkout/components/core/internal/analytics/DefaultAnalyticsManagerTest.kt b/components-core/src/test/java/com/adyen/checkout/components/core/internal/analytics/DefaultAnalyticsManagerTest.kt index 545e00290f..8472b99395 100644 --- a/components-core/src/test/java/com/adyen/checkout/components/core/internal/analytics/DefaultAnalyticsManagerTest.kt +++ b/components-core/src/test/java/com/adyen/checkout/components/core/internal/analytics/DefaultAnalyticsManagerTest.kt @@ -59,8 +59,8 @@ internal class DefaultAnalyticsManagerTest( } @Test - fun `sending events is disabled, then checkoutAttemptId is still set`() = runTest { - analyticsManager = createAnalyticsManager(AnalyticsParamsLevel.NONE) + fun `analytics level is initial, then checkoutAttemptId is still set`() = runTest { + analyticsManager = createAnalyticsManager(AnalyticsParamsLevel.INITIAL) whenever(analyticsRepository.fetchCheckoutAttemptId()) doReturn "test value" analyticsManager.initialize(this@InitializeTest, this) @@ -95,8 +95,8 @@ internal class DefaultAnalyticsManagerTest( inner class TrackEventTest { @Test - fun `sending events is disabled, then events should not be stored`() = runTest { - analyticsManager = createAnalyticsManager(AnalyticsParamsLevel.NONE) + fun `analytics level is initial, then events should not be stored`() = runTest { + analyticsManager = createAnalyticsManager(AnalyticsParamsLevel.INITIAL) analyticsManager.initialize(this@TrackEventTest, this) analyticsManager.trackEvent(GenericEvents.rendered("dropin", false)) @@ -140,8 +140,8 @@ internal class DefaultAnalyticsManagerTest( inner class SendEventTest { @Test - fun `sending events is disabled, then events are not sent`() = runTest { - analyticsManager = createAnalyticsManager(AnalyticsParamsLevel.NONE) + fun `analytics level is initial, then events are not sent`() = runTest { + analyticsManager = createAnalyticsManager(AnalyticsParamsLevel.INITIAL) analyticsManager.initialize(this@SendEventTest, this) val event = AnalyticsEvent.Info( component = "test", diff --git a/components-core/src/test/java/com/adyen/checkout/components/core/internal/analytics/data/remote/DefaultAnalyticsSetupProviderTest.kt b/components-core/src/test/java/com/adyen/checkout/components/core/internal/analytics/data/remote/DefaultAnalyticsSetupProviderTest.kt index 4ce23be7e7..e793cbb8ea 100644 --- a/components-core/src/test/java/com/adyen/checkout/components/core/internal/analytics/data/remote/DefaultAnalyticsSetupProviderTest.kt +++ b/components-core/src/test/java/com/adyen/checkout/components/core/internal/analytics/data/remote/DefaultAnalyticsSetupProviderTest.kt @@ -8,6 +8,7 @@ import com.adyen.checkout.components.core.Amount import com.adyen.checkout.components.core.internal.analytics.AnalyticsPlatformParams import com.adyen.checkout.components.core.internal.analytics.AnalyticsSource import com.adyen.checkout.components.core.internal.data.model.AnalyticsSetupRequest +import com.adyen.checkout.components.core.internal.ui.model.AnalyticsParamsLevel import org.junit.jupiter.api.Assertions.assertEquals import org.junit.jupiter.api.Test import org.mockito.kotlin.doReturn @@ -25,6 +26,7 @@ internal class DefaultAnalyticsSetupProviderTest { application = createMockApplication(), shopperLocale = Locale.US, isCreatedByDropIn = false, + analyticsLevel = AnalyticsParamsLevel.INITIAL, amount = Amount("USD", 123), source = AnalyticsSource.PaymentComponent("scheme"), sessionId = "sessionId", @@ -39,6 +41,7 @@ internal class DefaultAnalyticsSetupProviderTest { locale = Locale.US.toLanguageTag(), component = "scheme", flavor = "components", + level = "initial", deviceBrand = Build.BRAND, deviceModel = Build.MODEL, referrer = "com.adyen.checkout", @@ -58,6 +61,7 @@ internal class DefaultAnalyticsSetupProviderTest { application = createMockApplication(), shopperLocale = Locale.US, isCreatedByDropIn = true, + analyticsLevel = AnalyticsParamsLevel.INITIAL, amount = Amount("USD", 123), source = AnalyticsSource.PaymentComponent("scheme"), sessionId = "sessionId", @@ -74,6 +78,7 @@ internal class DefaultAnalyticsSetupProviderTest { application = createMockApplication(), shopperLocale = Locale.US, isCreatedByDropIn = false, + analyticsLevel = AnalyticsParamsLevel.INITIAL, amount = Amount("USD", 123), source = AnalyticsSource.PaymentComponent("scheme"), sessionId = "sessionId", @@ -90,6 +95,7 @@ internal class DefaultAnalyticsSetupProviderTest { application = createMockApplication(), shopperLocale = Locale.US, isCreatedByDropIn = true, + analyticsLevel = AnalyticsParamsLevel.INITIAL, amount = Amount("USD", 123), source = AnalyticsSource.DropIn(listOf()), sessionId = "sessionId", @@ -106,6 +112,7 @@ internal class DefaultAnalyticsSetupProviderTest { application = createMockApplication(), shopperLocale = Locale.US, isCreatedByDropIn = true, + analyticsLevel = AnalyticsParamsLevel.INITIAL, amount = Amount("USD", 123), source = AnalyticsSource.PaymentComponent("scheme"), sessionId = "sessionId", @@ -116,6 +123,40 @@ internal class DefaultAnalyticsSetupProviderTest { assertEquals("scheme", result.component) } + @Test + fun `when analytics params level is initial, then level should be initial`() { + analyticsSetupProvider = DefaultAnalyticsSetupProvider( + application = createMockApplication(), + shopperLocale = Locale.US, + isCreatedByDropIn = false, + analyticsLevel = AnalyticsParamsLevel.INITIAL, + amount = Amount("USD", 123), + source = AnalyticsSource.PaymentComponent("scheme"), + sessionId = "sessionId", + ) + + val result = analyticsSetupProvider.provide() + + assertEquals("initial", result.level) + } + + @Test + fun `when analytics params level is all, then level should be all`() { + analyticsSetupProvider = DefaultAnalyticsSetupProvider( + application = createMockApplication(), + shopperLocale = Locale.US, + isCreatedByDropIn = false, + analyticsLevel = AnalyticsParamsLevel.ALL, + amount = Amount("USD", 123), + source = AnalyticsSource.PaymentComponent("scheme"), + sessionId = "sessionId", + ) + + val result = analyticsSetupProvider.provide() + + assertEquals("all", result.level) + } + private fun createMockApplication(): Application { val application = mock() val resources = mock() diff --git a/components-core/src/test/java/com/adyen/checkout/components/core/internal/data/model/AnalyticsSetupRequestTest.kt b/components-core/src/test/java/com/adyen/checkout/components/core/internal/data/model/AnalyticsSetupRequestTest.kt index b533f02035..25da8403f1 100644 --- a/components-core/src/test/java/com/adyen/checkout/components/core/internal/data/model/AnalyticsSetupRequestTest.kt +++ b/components-core/src/test/java/com/adyen/checkout/components/core/internal/data/model/AnalyticsSetupRequestTest.kt @@ -17,6 +17,7 @@ internal class AnalyticsSetupRequestTest { locale = "en-US", component = "dropin", flavor = "dropin", + level = "all", deviceBrand = "Google", deviceModel = "Pixel", referrer = "unknown", @@ -37,6 +38,7 @@ internal class AnalyticsSetupRequestTest { .put("locale", "en-US") .put("component", "dropin") .put("flavor", "dropin") + .put("level", "all") .put("deviceBrand", "Google") .put("deviceModel", "Pixel") .put("referrer", "unknown") @@ -59,6 +61,7 @@ internal class AnalyticsSetupRequestTest { .put("locale", "en-US") .put("component", "dropin") .put("flavor", "dropin") + .put("level", "all") .put("deviceBrand", "Google") .put("deviceModel", "Pixel") .put("referrer", "unknown") @@ -78,6 +81,7 @@ internal class AnalyticsSetupRequestTest { locale = "en-US", component = "dropin", flavor = "dropin", + level = "all", deviceBrand = "Google", deviceModel = "Pixel", referrer = "unknown", diff --git a/components-core/src/test/java/com/adyen/checkout/components/core/internal/ui/model/ButtonComponentParamsMapperTest.kt b/components-core/src/test/java/com/adyen/checkout/components/core/internal/ui/model/ButtonComponentParamsMapperTest.kt index dc725315d8..484e09f7b3 100644 --- a/components-core/src/test/java/com/adyen/checkout/components/core/internal/ui/model/ButtonComponentParamsMapperTest.kt +++ b/components-core/src/test/java/com/adyen/checkout/components/core/internal/ui/model/ButtonComponentParamsMapperTest.kt @@ -66,7 +66,7 @@ internal class ButtonComponentParamsMapperTest { shopperLocale = Locale.GERMAN, environment = Environment.EUROPE, clientKey = TEST_CLIENT_KEY_2, - analyticsParams = AnalyticsParams(AnalyticsParamsLevel.NONE, TEST_CLIENT_KEY_2), + analyticsParams = AnalyticsParams(AnalyticsParamsLevel.INITIAL, TEST_CLIENT_KEY_2), isCreatedByDropIn = true, amount = Amount( currency = "USD", diff --git a/components-core/src/test/java/com/adyen/checkout/components/core/internal/ui/model/GenericComponentParamsMapperTest.kt b/components-core/src/test/java/com/adyen/checkout/components/core/internal/ui/model/GenericComponentParamsMapperTest.kt index bce1246f83..3e001c7e36 100644 --- a/components-core/src/test/java/com/adyen/checkout/components/core/internal/ui/model/GenericComponentParamsMapperTest.kt +++ b/components-core/src/test/java/com/adyen/checkout/components/core/internal/ui/model/GenericComponentParamsMapperTest.kt @@ -66,7 +66,7 @@ internal class GenericComponentParamsMapperTest { shopperLocale = Locale.GERMAN, environment = Environment.EUROPE, clientKey = TEST_CLIENT_KEY_2, - analyticsParams = AnalyticsParams(AnalyticsParamsLevel.NONE, TEST_CLIENT_KEY_2), + analyticsParams = AnalyticsParams(AnalyticsParamsLevel.INITIAL, TEST_CLIENT_KEY_2), isCreatedByDropIn = true, amount = Amount( currency = "CAD", diff --git a/drop-in/src/test/java/com/adyen/checkout/dropin/internal/ui/model/DropInParamsMapperTest.kt b/drop-in/src/test/java/com/adyen/checkout/dropin/internal/ui/model/DropInParamsMapperTest.kt index 7181f45c37..61c3764f7a 100644 --- a/drop-in/src/test/java/com/adyen/checkout/dropin/internal/ui/model/DropInParamsMapperTest.kt +++ b/drop-in/src/test/java/com/adyen/checkout/dropin/internal/ui/model/DropInParamsMapperTest.kt @@ -97,7 +97,7 @@ internal class DropInParamsMapperTest { shopperLocale = Locale.GERMAN, environment = Environment.EUROPE, clientKey = TEST_CLIENT_KEY_2, - analyticsParams = AnalyticsParams(AnalyticsParamsLevel.NONE, TEST_CLIENT_KEY_2), + analyticsParams = AnalyticsParams(AnalyticsParamsLevel.INITIAL, TEST_CLIENT_KEY_2), amount = Amount( currency = "EUR", value = 49_00L, diff --git a/giftcard/src/test/java/com/adyen/checkout/giftcard/internal/ui/model/GiftCardComponentParamsMapperTest.kt b/giftcard/src/test/java/com/adyen/checkout/giftcard/internal/ui/model/GiftCardComponentParamsMapperTest.kt index 3d8e531dbf..92d0aafc10 100644 --- a/giftcard/src/test/java/com/adyen/checkout/giftcard/internal/ui/model/GiftCardComponentParamsMapperTest.kt +++ b/giftcard/src/test/java/com/adyen/checkout/giftcard/internal/ui/model/GiftCardComponentParamsMapperTest.kt @@ -67,7 +67,7 @@ internal class GiftCardComponentParamsMapperTest { shopperLocale = Locale.GERMAN, environment = Environment.EUROPE, clientKey = TEST_CLIENT_KEY_2, - analyticsParams = AnalyticsParams(AnalyticsParamsLevel.NONE, TEST_CLIENT_KEY_2), + analyticsParams = AnalyticsParams(AnalyticsParamsLevel.INITIAL, TEST_CLIENT_KEY_2), isCreatedByDropIn = true, amount = Amount( currency = "CAD", diff --git a/googlepay/src/test/java/com/adyen/checkout/googlepay/internal/ui/model/GooglePayComponentParamsMapperTest.kt b/googlepay/src/test/java/com/adyen/checkout/googlepay/internal/ui/model/GooglePayComponentParamsMapperTest.kt index 244d2b9558..6eda610890 100644 --- a/googlepay/src/test/java/com/adyen/checkout/googlepay/internal/ui/model/GooglePayComponentParamsMapperTest.kt +++ b/googlepay/src/test/java/com/adyen/checkout/googlepay/internal/ui/model/GooglePayComponentParamsMapperTest.kt @@ -166,7 +166,7 @@ internal class GooglePayComponentParamsMapperTest { environment = Environment.EUROPE, clientKey = TEST_CLIENT_KEY_2, googlePayEnvironment = WalletConstants.ENVIRONMENT_PRODUCTION, - analyticsParams = AnalyticsParams(AnalyticsParamsLevel.NONE, TEST_CLIENT_KEY_2), + analyticsParams = AnalyticsParams(AnalyticsParamsLevel.INITIAL, TEST_CLIENT_KEY_2), isCreatedByDropIn = true, amount = Amount( currency = "CAD", diff --git a/googlepay/src/test/java/com/adyen/checkout/googlepay/internal/util/GooglePayUtilsTest.kt b/googlepay/src/test/java/com/adyen/checkout/googlepay/internal/util/GooglePayUtilsTest.kt index a5f45707d4..8d33d0ccf6 100644 --- a/googlepay/src/test/java/com/adyen/checkout/googlepay/internal/util/GooglePayUtilsTest.kt +++ b/googlepay/src/test/java/com/adyen/checkout/googlepay/internal/util/GooglePayUtilsTest.kt @@ -273,7 +273,7 @@ internal class GooglePayUtilsTest { shopperLocale = Locale.GERMAN, environment = Environment.EUROPE, clientKey = "CLIENT_KEY_CUSTOM", - analyticsParams = AnalyticsParams(AnalyticsParamsLevel.NONE, "CLIENT_KEY_CUSTOM"), + analyticsParams = AnalyticsParams(AnalyticsParamsLevel.INITIAL, "CLIENT_KEY_CUSTOM"), isCreatedByDropIn = true, amount = Amount("EUR", 13_37), ), diff --git a/issuer-list/src/test/java/com/adyen/checkout/issuerlist/internal/ui/model/IssuerListComponentParamsMapperTest.kt b/issuer-list/src/test/java/com/adyen/checkout/issuerlist/internal/ui/model/IssuerListComponentParamsMapperTest.kt index 35b4ea78c5..eb61d32752 100644 --- a/issuer-list/src/test/java/com/adyen/checkout/issuerlist/internal/ui/model/IssuerListComponentParamsMapperTest.kt +++ b/issuer-list/src/test/java/com/adyen/checkout/issuerlist/internal/ui/model/IssuerListComponentParamsMapperTest.kt @@ -118,7 +118,7 @@ internal class IssuerListComponentParamsMapperTest { shopperLocale = Locale.GERMAN, environment = Environment.EUROPE, clientKey = TEST_CLIENT_KEY_2, - analyticsParams = AnalyticsParams(AnalyticsParamsLevel.NONE, TEST_CLIENT_KEY_2), + analyticsParams = AnalyticsParams(AnalyticsParamsLevel.INITIAL, TEST_CLIENT_KEY_2), isCreatedByDropIn = true, viewType = IssuerListViewType.SPINNER_VIEW, hideIssuerLogos = true, diff --git a/meal-voucher-fr/src/test/java/com/adyen/checkout/mealvoucherfr/internal/ui/model/MealVoucherFRComponentParamsMapperTest.kt b/meal-voucher-fr/src/test/java/com/adyen/checkout/mealvoucherfr/internal/ui/model/MealVoucherFRComponentParamsMapperTest.kt index bb814e8a8c..6a8f13fe13 100644 --- a/meal-voucher-fr/src/test/java/com/adyen/checkout/mealvoucherfr/internal/ui/model/MealVoucherFRComponentParamsMapperTest.kt +++ b/meal-voucher-fr/src/test/java/com/adyen/checkout/mealvoucherfr/internal/ui/model/MealVoucherFRComponentParamsMapperTest.kt @@ -77,7 +77,7 @@ internal class MealVoucherFRComponentParamsMapperTest { shopperLocale = Locale.GERMAN, environment = Environment.EUROPE, clientKey = TEST_CLIENT_KEY_2, - analyticsParams = AnalyticsParams(AnalyticsParamsLevel.NONE, TEST_CLIENT_KEY_2), + analyticsParams = AnalyticsParams(AnalyticsParamsLevel.INITIAL, TEST_CLIENT_KEY_2), isCreatedByDropIn = true, amount = Amount( currency = "DKK", diff --git a/twint/src/test/java/com/adyen/checkout/twint/internal/ui/model/TwintComponentParamsMapperTest.kt b/twint/src/test/java/com/adyen/checkout/twint/internal/ui/model/TwintComponentParamsMapperTest.kt index 10eaae2f80..a534b667a2 100644 --- a/twint/src/test/java/com/adyen/checkout/twint/internal/ui/model/TwintComponentParamsMapperTest.kt +++ b/twint/src/test/java/com/adyen/checkout/twint/internal/ui/model/TwintComponentParamsMapperTest.kt @@ -107,7 +107,7 @@ internal class TwintComponentParamsMapperTest { shopperLocale = Locale.GERMAN, environment = Environment.EUROPE, clientKey = TEST_CLIENT_KEY_2, - analyticsParams = AnalyticsParams(AnalyticsParamsLevel.NONE, TEST_CLIENT_KEY_2), + analyticsParams = AnalyticsParams(AnalyticsParamsLevel.INITIAL, TEST_CLIENT_KEY_2), isCreatedByDropIn = true, amount = Amount( currency = "EUR",