File tree Expand file tree Collapse file tree 6 files changed +45
-0
lines changed
newarch/java/com/mparticle/react/rokt
oldarch/java/com/mparticle/react Expand file tree Collapse file tree 6 files changed +45
-0
lines changed Original file line number Diff line number Diff line change @@ -55,6 +55,15 @@ class MPRoktModule(
5555 )
5656 }
5757
58+ @ReactMethod
59+ override fun purchaseFinalized (
60+ placementId : String ,
61+ catalogItemId : String ,
62+ success : Boolean ,
63+ ) {
64+ impl.purchaseFinalized(placementId, catalogItemId, success)
65+ }
66+
5867
5968 /* *
6069 * Process placeholders from ReadableMap to a map of Widgets for use with Rokt.
Original file line number Diff line number Diff line change @@ -20,4 +20,10 @@ abstract class NativeMPRoktSpec(
2020 roktConfig : ReadableMap ? ,
2121 fontFilesMap : ReadableMap ? ,
2222 )
23+
24+ abstract fun purchaseFinalized (
25+ placementId : String ,
26+ catalogItemId : String ,
27+ success : Boolean ,
28+ )
2329}
Original file line number Diff line number Diff line change @@ -53,6 +53,15 @@ class MPRoktModule(
5353 }
5454 }
5555
56+ @ReactMethod
57+ override fun purchaseFinalized (
58+ placementId : String ,
59+ catalogItemId : String ,
60+ success : Boolean ,
61+ ) {
62+ impl.purchaseFinalized(placementId, catalogItemId, success)
63+ }
64+
5665 private fun safeUnwrapPlaceholders (
5766 placeholders : ReadableMap ? ,
5867 nativeViewHierarchyManager : NativeViewHierarchyManager ,
Original file line number Diff line number Diff line change @@ -129,6 +129,13 @@ - (void)selectPlacements:(NSString *)identifer
129129 }];
130130}
131131
132+ RCT_EXPORT_METHOD (purchaseFinalized : (NSString *)placementId catalogItemId : (
133+ NSString *)catalogItemId success : (BOOL )success) {
134+ [[[MParticle sharedInstance ] rokt ] purchaseFinalized: placementId
135+ catalogItemId: catalogItemId
136+ success: success];
137+ }
138+
132139- (NSMutableDictionary *)convertToMutableDictionaryOfStrings:(NSDictionary *)attributes
133140{
134141 NSMutableDictionary *finalAttributes = [attributes mutableCopy ];
Original file line number Diff line number Diff line change @@ -21,6 +21,12 @@ export interface Spec extends TurboModule {
2121 roktConfig ?: RoktConfigType ,
2222 fontFilesMap ?: { [ key : string ] : string }
2323 ) : void ;
24+
25+ purchaseFinalized (
26+ placementId : string ,
27+ catalogItemId : string ,
28+ success : boolean
29+ ) : void ;
2430}
2531
2632export default TurboModuleRegistry . getEnforcing < Spec > ( 'RNMPRokt' ) ;
Original file line number Diff line number Diff line change @@ -31,6 +31,14 @@ export abstract class Rokt {
3131 ) ;
3232 }
3333
34+ static async purchaseFinalized (
35+ placementId : string ,
36+ catalogItemId : string ,
37+ success : boolean
38+ ) : Promise < void > {
39+ MPRokt . purchaseFinalized ( placementId , catalogItemId , success ) ;
40+ }
41+
3442 static createRoktConfig ( colorMode ?: ColorMode , cacheConfig ?: CacheConfig ) {
3543 return new RoktConfig ( colorMode ?? 'system' , cacheConfig ) ;
3644 }
You can’t perform that action at this time.
0 commit comments