Skip to content

Commit

Permalink
feat: Update Setting Name to bundleCommerceEventData (#143)
Browse files Browse the repository at this point in the history
  • Loading branch information
BrandonStalnaker authored Jun 15, 2023
1 parent 575ab79 commit eb3e07d
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/main/kotlin/com/mparticle/kits/AppboyKit.kt
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ open class AppboyKit : KitIntegration(), AttributeListener, CommerceListener,
KitIntegration.EventListener, PushListener, IdentityListener {

var enableTypeDetection = false
var bundleProductsWithCommerceEvents = false
var bundleCommerceEvents = false
var isMpidIdentityType = false
var identityType: IdentityType? = null
private val dataFlushHandler = Handler()
Expand Down Expand Up @@ -68,12 +68,12 @@ open class AppboyKit : KitIntegration(), AttributeListener, CommerceListener,
Logger.warning("Braze, unable to parse \"enableDetectionType\"")
}
}
val bundleProducts = settings[BUNDLE_PRODUCTS_WITH_COMMERCE_EVENTS]
if (!KitUtils.isEmpty(bundleProducts)) {
val bundleCommerce = settings[BUNDLE_COMMERCE_EVENTS]
if (!KitUtils.isEmpty(bundleCommerce)) {
try {
bundleProductsWithCommerceEvents = bundleProducts.toBoolean()
bundleCommerceEvents = bundleCommerce.toBoolean()
} catch (e: Exception) {
bundleProductsWithCommerceEvents = false
bundleCommerceEvents = false
}
}
forwardScreenViews = settings[FORWARD_SCREEN_VIEWS].toBoolean()
Expand Down Expand Up @@ -203,7 +203,7 @@ open class AppboyKit : KitIntegration(), AttributeListener, CommerceListener,
true
) && !event.products.isNullOrEmpty()
) {
if (bundleProductsWithCommerceEvents) {
if (bundleCommerceEvents) {
logOrderLevelTransaction(event)
messages.add(ReportingMessage.fromEvent(this, event))
} else {
Expand All @@ -216,7 +216,7 @@ open class AppboyKit : KitIntegration(), AttributeListener, CommerceListener,
}
messages.add(ReportingMessage.fromEvent(this, event))
} else {
if (bundleProductsWithCommerceEvents) {
if (bundleCommerceEvents) {
logOrderLevelTransaction(event)
messages.add(ReportingMessage.fromEvent(this, event))
} else {
Expand Down Expand Up @@ -851,7 +851,7 @@ open class AppboyKit : KitIntegration(), AttributeListener, CommerceListener,
const val FORWARD_SCREEN_VIEWS = "forwardScreenViews"
const val USER_IDENTIFICATION_TYPE = "userIdentificationType"
const val ENABLE_TYPE_DETECTION = "enableTypeDetection"
const val BUNDLE_PRODUCTS_WITH_COMMERCE_EVENTS = "bundleProductsWithCommerceEvents"
const val BUNDLE_COMMERCE_EVENTS = "bundleCommerceEventData"
const val HOST = "host"
const val PUSH_ENABLED = "push_enabled"
const val NAME = "Appboy"
Expand Down

0 comments on commit eb3e07d

Please sign in to comment.