From ad9b169c7fb4f5a87eedce84c7c4f76ebd03488d Mon Sep 17 00:00:00 2001 From: Scott Antonac Date: Thu, 21 Jul 2022 11:58:24 +1000 Subject: [PATCH] pass consumer locale in checkout v2 --- .../com/afterpay/android/internal/AfterpayCheckoutV2.kt | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/afterpay/src/main/kotlin/com/afterpay/android/internal/AfterpayCheckoutV2.kt b/afterpay/src/main/kotlin/com/afterpay/android/internal/AfterpayCheckoutV2.kt index 3f736908..dddff164 100644 --- a/afterpay/src/main/kotlin/com/afterpay/android/internal/AfterpayCheckoutV2.kt +++ b/afterpay/src/main/kotlin/com/afterpay/android/internal/AfterpayCheckoutV2.kt @@ -1,5 +1,6 @@ package com.afterpay.android.internal +import com.afterpay.android.Afterpay import com.afterpay.android.AfterpayCheckoutV2Options import com.afterpay.android.BuildConfig import kotlinx.serialization.Serializable @@ -13,7 +14,8 @@ internal data class AfterpayCheckoutV2( val pickup: Boolean?, val buyNow: Boolean?, val shippingOptionRequired: Boolean?, - val checkoutRedesignForced: Boolean? + val checkoutRedesignForced: Boolean?, + val consumerLocale: String?, ) { constructor( token: String, @@ -27,6 +29,7 @@ internal data class AfterpayCheckoutV2( pickup = options.pickup, buyNow = options.buyNow, shippingOptionRequired = options.shippingOptionRequired, - checkoutRedesignForced = options.enableSingleShippingOptionUpdate + checkoutRedesignForced = options.enableSingleShippingOptionUpdate, + consumerLocale = Afterpay.language.toString() ) }