File tree 2 files changed +18
-2
lines changed
iterableapi/src/main/java/com/iterable/iterableapi
2 files changed +18
-2
lines changed Original file line number Diff line number Diff line change @@ -299,6 +299,20 @@ public void updateEmail(String newEmail) {
299
299
_email = newEmail ;
300
300
}
301
301
302
+ public void updateUser (JSONObject dataFields ) {
303
+ JSONObject requestJSON = new JSONObject ();
304
+
305
+ try {
306
+ requestJSON .put (IterableConstants .KEY_EMAIL , _email );
307
+ requestJSON .put (IterableConstants .KEY_DATAFIELDS , dataFields );
308
+ }
309
+ catch (JSONException e ) {
310
+ e .printStackTrace ();
311
+ }
312
+
313
+ sendRequest (IterableConstants .ENDPOINT_UPDATEUSER , requestJSON );
314
+ }
315
+
302
316
public void disablePush (String iterableAppId , String gcmProjectId ) {
303
317
registerForPush (iterableAppId , gcmProjectId );
304
318
Original file line number Diff line number Diff line change @@ -27,15 +27,17 @@ public final class IterableConstants {
27
27
public static final String KEY_USER = "user" ;
28
28
public static final String KEY_ITEMS = "items" ;
29
29
public static final String KEY_TOTAL = "total" ;
30
-
30
+
31
+ public static final String ENDPOINT_DISABLEDEVICE = "users/disableDevice" ;
31
32
public static final String ENDPOINT_PUSHTARGET = "push/target" ;
32
33
public static final String ENDPOINT_REGISTERDEVICETOKEN = "users/registerDeviceToken" ;
33
34
public static final String ENDPOINT_TRACK = "events/track" ;
34
35
public static final String ENDPOINT_TRACKCONVERSION = "events/trackConversion" ;
35
36
public static final String ENDPOINT_TRACKPURCHASE = "commerce/trackPurchase" ;
36
37
public static final String ENDPOINT_TRACKPUSHOPEN = "events/trackPushOpen" ;
37
38
public static final String ENDPOINT_UPDATEEMAIL = "users/updateEmail" ;
38
- public static final String ENDPOINT_DISABLEDEVICE = "users/disableDevice" ;
39
+ public static final String ENDPOINT_UPDATEUSER = "users/update" ;
40
+
39
41
40
42
public static final String PUSH_APPID = "IterableAppId" ;
41
43
public static final String PUSH_PROJECTID = "GCMProjectNumber" ;
You can’t perform that action at this time.
0 commit comments