File tree Expand file tree Collapse file tree 3 files changed +24
-0
lines changed
android/src/main/java/com/mparticle/react Expand file tree Collapse file tree 3 files changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -508,6 +508,10 @@ private static MPEvent ConvertMPEvent(ReadableMap map) {
508508 }
509509 }
510510
511+ if (map .hasKey ("shouldUploadEvent" )) {
512+ builder .shouldUploadEvent (map .getBoolean ("shouldUploadEvent" ));
513+ }
514+
511515 return builder .build ();
512516 }
513517
@@ -588,6 +592,10 @@ else if (isPromotion) {
588592 }
589593 }
590594
595+ if (map .hasKey ("shouldUploadEvent" )) {
596+ builder .shouldUploadEvent (map .getBoolean ("shouldUploadEvent" ));
597+ }
598+
591599 return builder .build ();
592600 }
593601
Original file line number Diff line number Diff line change @@ -416,6 +416,9 @@ + (MPCommerceEvent *)MPCommerceEvent:(id)json {
416416 commerceEvent.action = [RCTConvert MPCommerceEventAction: json[@" productActionType" ]];
417417 commerceEvent.checkoutStep = [json[@" checkoutStep" ] intValue ];
418418 commerceEvent.nonInteractive = [json[@" nonInteractive" ] boolValue ];
419+ if json[@" shouldUploadEvent" ] != nil {
420+ event.shouldUploadEvent = [json[@" shouldUploadEvent" ] boolValue ]
421+ }
419422
420423 NSMutableArray *products = [NSMutableArray array ];
421424 NSArray *jsonProducts = json[@" products" ];
@@ -602,6 +605,9 @@ + (MPEvent *)MPEvent:(id)json {
602605 event.name = json[@" name" ];
603606 event.startTime = json[@" startTime" ];
604607 event.type = [json[@" type" ] intValue ];
608+ if json[@" shouldUploadEvent" ] != nil {
609+ event.shouldUploadEvent = [json[@" shouldUploadEvent" ] boolValue ]
610+ }
605611
606612 NSDictionary *jsonFlags = json[@" customFlags" ];
607613 for (NSString *key in jsonFlags) {
Original file line number Diff line number Diff line change @@ -566,6 +566,11 @@ class CommerceEvent {
566566 this . nonInteractive = nonInteractive
567567 return this
568568 }
569+
570+ setShouldUploadEvent ( shouldUploadEvent ) {
571+ this . shouldUploadEvent = shouldUploadEvent
572+ return this
573+ }
569574}
570575
571576class Event {
@@ -605,6 +610,11 @@ class Event {
605610 return this
606611 }
607612
613+ setShouldUploadEvent ( shouldUploadEvent ) {
614+ this . shouldUploadEvent = shouldUploadEvent
615+ return this
616+ }
617+
608618 setCustomFlags ( customFlags ) {
609619 this . customFlags = customFlags
610620 return this
You can’t perform that action at this time.
0 commit comments