react-native-mparticle 2.7.3 → 2.7.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -587,7 +587,7 @@ public class MParticleModule extends ReactContextBaseJavaModule {
587
587
  Promotion promotion = ConvertPromotion(promotionMap);
588
588
  builder = new CommerceEvent.Builder(promotionAction, promotion);
589
589
 
590
- for (int i = 0; i < promotionsReadableArray.size(); ++i) {
590
+ for (int i = 1; i < promotionsReadableArray.size(); ++i) {
591
591
  promotionMap = promotionsReadableArray.getMap(i);
592
592
  promotion = ConvertPromotion(promotionMap);
593
593
  builder.addPromotion(promotion);
@@ -599,7 +599,7 @@ public class MParticleModule extends ReactContextBaseJavaModule {
599
599
  Impression impression = ConvertImpression(impressionMap);
600
600
  builder = new CommerceEvent.Builder(impression);
601
601
 
602
- for (int i = 0; i < impressionsArray.size(); ++i) {
602
+ for (int i = 1; i < impressionsArray.size(); ++i) {
603
603
  impressionMap = impressionsArray.getMap(i);
604
604
  impression = ConvertImpression(impressionMap);
605
605
  builder.addImpression(impression);
@@ -5,6 +5,7 @@ import android.support.annotation.Nullable;
5
5
 
6
6
  import com.mparticle.MParticle;
7
7
  import com.mparticle.UserAttributeListener;
8
+ import com.mparticle.UserAttributeListenerType;
8
9
  import com.mparticle.consent.ConsentState;
9
10
  import com.mparticle.identity.MParticleUser;
10
11
 
@@ -33,7 +34,7 @@ public class MockMParticleUser implements MParticleUser {
33
34
 
34
35
  @Nullable
35
36
  @Override
36
- public Map<String, Object> getUserAttributes(@Nullable UserAttributeListener userAttributeListener) {
37
+ public Map<String, Object> getUserAttributes(@Nullable UserAttributeListenerType userAttributeListener) {
37
38
  return null;
38
39
  }
39
40
 
@@ -59,7 +60,7 @@ public class MockMParticleUser implements MParticleUser {
59
60
  }
60
61
 
61
62
  @Override
62
- public boolean incrementUserAttribute(@NonNull String s, int i) {
63
+ public boolean incrementUserAttribute(@NonNull String s, Number i) {
63
64
  return false;
64
65
  }
65
66
 
package/js/index.js CHANGED
@@ -346,17 +346,17 @@ class TransactionAttributes {
346
346
  }
347
347
 
348
348
  setRevenue (revenue) {
349
- this.revenue = revenue
349
+ this.revenue = typeof revenue === 'string' ? parseFloat(revenue) : revenue
350
350
  return this
351
351
  }
352
352
 
353
353
  setShipping (shipping) {
354
- this.shipping = shipping
354
+ this.shipping = typeof shipping === 'string' ? parseFloat(shipping) : shipping
355
355
  return this
356
356
  }
357
357
 
358
358
  setTax (tax) {
359
- this.tax = tax
359
+ this.tax = typeof tax === 'string' ? parseFloat(tax) : tax
360
360
  return this
361
361
  }
362
362
 
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "homepage": "https://www.mparticle.com",
5
5
  "license": "Apache-2.0",
6
6
  "repository": "mParticle/react-native-mparticle",
7
- "version": "2.7.3",
7
+ "version": "2.7.6",
8
8
  "main": "js/index.js",
9
9
  "scripts": {
10
10
  "test": "./node_modules/standard/bin/cmd.js",
@@ -11,8 +11,7 @@ Pod::Spec.new do |s|
11
11
 
12
12
  s.homepage = package['homepage']
13
13
  s.license = package['license']
14
- s.platform = :ios, "9.0"
15
-
14
+ s.platforms = { :ios => "9.0", :tvos => "9.2" }
16
15
 
17
16
  s.source = { :git => "https://github.com/mParticle/react-native-mparticle.git", :tag => "#{s.version}" }
18
17
  s.source_files = "ios/**/*.{h,m}"