Showing
4 changed files
with
298 additions
and
30 deletions
... | @@ -2,7 +2,7 @@ apply plugin: 'com.android.library' | ... | @@ -2,7 +2,7 @@ apply plugin: 'com.android.library' |
2 | 2 | ||
3 | ext { | 3 | ext { |
4 | PUBLISH_GROUP_ID = 'ly.warp' | 4 | PUBLISH_GROUP_ID = 'ly.warp' |
5 | - PUBLISH_VERSION = '4.5.4-cosbeta97' | 5 | + PUBLISH_VERSION = '4.5.4-cosbeta98' |
6 | PUBLISH_ARTIFACT_ID = 'warply-android-sdk' | 6 | PUBLISH_ARTIFACT_ID = 'warply-android-sdk' |
7 | } | 7 | } |
8 | 8 | ... | ... |
warply_android_sdk/src/main/java/ly/warp/sdk/io/models/LoyaltySDKDynatraceEventModel.java
0 → 100644
1 | +/* | ||
2 | + * Copyright 2010-2013 Warply Ltd. All rights reserved. | ||
3 | + * | ||
4 | + * Redistribution and use in source and binary forms, without modification, are | ||
5 | + * permitted provided that the following conditions are met: | ||
6 | + * | ||
7 | + * 1. Redistributions of source code must retain the above copyright notice, | ||
8 | + * this list of conditions and the following disclaimer. | ||
9 | + * | ||
10 | + * 2. Redistributions in binary form must reproduce the above copyright notice, | ||
11 | + * this list of conditions and the following disclaimer in the documentation | ||
12 | + * and/or other materials provided with the distribution. | ||
13 | + * | ||
14 | + * THIS SOFTWARE IS PROVIDED BY THE WARPLY LTD ``AS IS'' AND ANY EXPRESS OR | ||
15 | + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF | ||
16 | + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO | ||
17 | + * EVENT SHALL WARPLY LTD OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, | ||
18 | + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | ||
19 | + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, | ||
20 | + * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF | ||
21 | + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING | ||
22 | + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, | ||
23 | + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
24 | + */ | ||
25 | + | ||
26 | +package ly.warp.sdk.io.models; | ||
27 | + | ||
28 | +import java.util.HashMap; | ||
29 | + | ||
30 | +/** | ||
31 | + * Created by Panagiotis Triantafyllou on 21-Oct-22. | ||
32 | + */ | ||
33 | + | ||
34 | +public class LoyaltySDKDynatraceEventModel { | ||
35 | + private String eventName; | ||
36 | + private HashMap<String, String> parameters; | ||
37 | + | ||
38 | + public LoyaltySDKDynatraceEventModel() { | ||
39 | + this.eventName = ""; | ||
40 | + this.parameters = new HashMap(); | ||
41 | + } | ||
42 | + | ||
43 | + public String getEventName() { | ||
44 | + return eventName; | ||
45 | + } | ||
46 | + | ||
47 | + public void setEventName(String eventName) { | ||
48 | + this.eventName = eventName; | ||
49 | + } | ||
50 | + | ||
51 | + public HashMap<String, String> getParameters() { | ||
52 | + return parameters; | ||
53 | + } | ||
54 | + | ||
55 | + public void setParameter(String key, String value) { | ||
56 | + this.parameters.put(key, value); | ||
57 | + } | ||
58 | +} |
... | @@ -10,6 +10,7 @@ import ly.warp.sdk.io.models.HealthEventModel; | ... | @@ -10,6 +10,7 @@ import ly.warp.sdk.io.models.HealthEventModel; |
10 | import ly.warp.sdk.io.models.LoyaltyContextualOfferModel; | 10 | import ly.warp.sdk.io.models.LoyaltyContextualOfferModel; |
11 | import ly.warp.sdk.io.models.LoyaltyEventModel; | 11 | import ly.warp.sdk.io.models.LoyaltyEventModel; |
12 | import ly.warp.sdk.io.models.LoyaltyGiftsForYouOfferClickEvent; | 12 | import ly.warp.sdk.io.models.LoyaltyGiftsForYouOfferClickEvent; |
13 | +import ly.warp.sdk.io.models.LoyaltySDKDynatraceEventModel; | ||
13 | import ly.warp.sdk.io.models.LoyaltySDKFirebaseEventModel; | 14 | import ly.warp.sdk.io.models.LoyaltySDKFirebaseEventModel; |
14 | import ly.warp.sdk.io.models.QuestionnaireEventModel; | 15 | import ly.warp.sdk.io.models.QuestionnaireEventModel; |
15 | import ly.warp.sdk.io.models.WarplyCCMSEnabledModel; | 16 | import ly.warp.sdk.io.models.WarplyCCMSEnabledModel; |
... | @@ -25,6 +26,7 @@ import ly.warp.sdk.io.models.WarplyPacingEventModel; | ... | @@ -25,6 +26,7 @@ import ly.warp.sdk.io.models.WarplyPacingEventModel; |
25 | public class WarplyEventBusManager { | 26 | public class WarplyEventBusManager { |
26 | private String eventName; | 27 | private String eventName; |
27 | private LoyaltySDKFirebaseEventModel fireEvent; | 28 | private LoyaltySDKFirebaseEventModel fireEvent; |
29 | + private LoyaltySDKDynatraceEventModel dynatraceEvent; | ||
28 | private LoyaltyContextualOfferModel ccms; | 30 | private LoyaltyContextualOfferModel ccms; |
29 | protected HashMap<String, Object> mWarplyEventBusManager = new HashMap(); | 31 | protected HashMap<String, Object> mWarplyEventBusManager = new HashMap(); |
30 | private WarplyPacingEventModel pacing; | 32 | private WarplyPacingEventModel pacing; |
... | @@ -90,6 +92,10 @@ public class WarplyEventBusManager { | ... | @@ -90,6 +92,10 @@ public class WarplyEventBusManager { |
90 | this.fireEvent = fireEvent; | 92 | this.fireEvent = fireEvent; |
91 | } | 93 | } |
92 | 94 | ||
95 | + public WarplyEventBusManager(LoyaltySDKDynatraceEventModel dynatraceEvent) { | ||
96 | + this.dynatraceEvent = dynatraceEvent; | ||
97 | + } | ||
98 | + | ||
93 | public WarplyEventBusManager(WarplyPacingEventModel pacing) { | 99 | public WarplyEventBusManager(WarplyPacingEventModel pacing) { |
94 | this.pacing = pacing; | 100 | this.pacing = pacing; |
95 | } | 101 | } |
... | @@ -144,6 +150,10 @@ public class WarplyEventBusManager { | ... | @@ -144,6 +150,10 @@ public class WarplyEventBusManager { |
144 | return fireEvent; | 150 | return fireEvent; |
145 | } | 151 | } |
146 | 152 | ||
153 | + public LoyaltySDKDynatraceEventModel getDynaEvent() { | ||
154 | + return dynatraceEvent; | ||
155 | + } | ||
156 | + | ||
147 | public LoyaltyContextualOfferModel getCcms() { | 157 | public LoyaltyContextualOfferModel getCcms() { |
148 | return ccms; | 158 | return ccms; |
149 | } | 159 | } | ... | ... |
... | @@ -79,6 +79,7 @@ import ly.warp.sdk.io.models.CouponList; | ... | @@ -79,6 +79,7 @@ import ly.warp.sdk.io.models.CouponList; |
79 | import ly.warp.sdk.io.models.Couponset; | 79 | import ly.warp.sdk.io.models.Couponset; |
80 | import ly.warp.sdk.io.models.CouponsetsList; | 80 | import ly.warp.sdk.io.models.CouponsetsList; |
81 | import ly.warp.sdk.io.models.LoyaltyContextualOfferModel; | 81 | import ly.warp.sdk.io.models.LoyaltyContextualOfferModel; |
82 | +import ly.warp.sdk.io.models.LoyaltySDKDynatraceEventModel; | ||
82 | import ly.warp.sdk.io.models.MerchantCategoriesList; | 83 | import ly.warp.sdk.io.models.MerchantCategoriesList; |
83 | import ly.warp.sdk.io.models.MerchantList; | 84 | import ly.warp.sdk.io.models.MerchantList; |
84 | import ly.warp.sdk.io.models.PacingDetails; | 85 | import ly.warp.sdk.io.models.PacingDetails; |
... | @@ -413,17 +414,32 @@ public class WarplyManager { | ... | @@ -413,17 +414,32 @@ public class WarplyManager { |
413 | try { | 414 | try { |
414 | newResult.putOpt("status", 1); | 415 | newResult.putOpt("status", 1); |
415 | newResult.putOpt("message", "Success"); | 416 | newResult.putOpt("message", "Success"); |
417 | + | ||
418 | + LoyaltySDKDynatraceEventModel dynatraceEvent = new LoyaltySDKDynatraceEventModel(); | ||
419 | + dynatraceEvent.setEventName("custom_success_refresh_token_loyalty"); | ||
420 | + EventBus.getDefault().post(new WarplyEventBusManager(dynatraceEvent)); | ||
421 | + | ||
416 | receiver.onSuccess(newResult); | 422 | receiver.onSuccess(newResult); |
417 | } catch (JSONException e) { | 423 | } catch (JSONException e) { |
418 | e.printStackTrace(); | 424 | e.printStackTrace(); |
425 | + LoyaltySDKDynatraceEventModel dynatraceEvent = new LoyaltySDKDynatraceEventModel(); | ||
426 | + dynatraceEvent.setEventName("custom_error_refresh_token_loyalty"); | ||
427 | + EventBus.getDefault().post(new WarplyEventBusManager(dynatraceEvent)); | ||
419 | receiver.onFailure(2); | 428 | receiver.onFailure(2); |
420 | } | 429 | } |
421 | - } else | 430 | + } else { |
431 | + LoyaltySDKDynatraceEventModel dynatraceEvent = new LoyaltySDKDynatraceEventModel(); | ||
432 | + dynatraceEvent.setEventName("custom_error_refresh_token_loyalty"); | ||
433 | + EventBus.getDefault().post(new WarplyEventBusManager(dynatraceEvent)); | ||
422 | receiver.onFailure(2); | 434 | receiver.onFailure(2); |
423 | } | 435 | } |
436 | + } | ||
424 | 437 | ||
425 | @Override | 438 | @Override |
426 | public void onFailure(int errorCode) { | 439 | public void onFailure(int errorCode) { |
440 | + LoyaltySDKDynatraceEventModel dynatraceEvent = new LoyaltySDKDynatraceEventModel(); | ||
441 | + dynatraceEvent.setEventName("custom_error_refresh_token_loyalty"); | ||
442 | + EventBus.getDefault().post(new WarplyEventBusManager(dynatraceEvent)); | ||
427 | if (errorCode == 401) { | 443 | if (errorCode == 401) { |
428 | WarplyDBHelper.getInstance(Warply.getWarplyContext()).deleteAuth(); | 444 | WarplyDBHelper.getInstance(Warply.getWarplyContext()).deleteAuth(); |
429 | WarplyDBHelper.getInstance(Warply.getWarplyContext()).deleteClient(); | 445 | WarplyDBHelper.getInstance(Warply.getWarplyContext()).deleteClient(); |
... | @@ -488,15 +504,24 @@ public class WarplyManager { | ... | @@ -488,15 +504,24 @@ public class WarplyManager { |
488 | public void onSuccess(JSONObject result) { | 504 | public void onSuccess(JSONObject result) { |
489 | int status = result.optInt("status", 2); | 505 | int status = result.optInt("status", 2); |
490 | if (status == 1) { | 506 | if (status == 1) { |
507 | + LoyaltySDKDynatraceEventModel dynatraceEvent = new LoyaltySDKDynatraceEventModel(); | ||
508 | + dynatraceEvent.setEventName("custom_success_profile_loyalty"); | ||
509 | + EventBus.getDefault().post(new WarplyEventBusManager(dynatraceEvent)); | ||
510 | + | ||
491 | result = result.optJSONObject("result"); | 511 | result = result.optJSONObject("result"); |
492 | if (result == null) { | 512 | if (result == null) { |
493 | receiver.onFailure(2); | 513 | receiver.onFailure(2); |
494 | return; | 514 | return; |
495 | } | 515 | } |
496 | receiver.onSuccess(new Consumer(result)); | 516 | receiver.onSuccess(new Consumer(result)); |
497 | - } else | 517 | + } else { |
518 | + LoyaltySDKDynatraceEventModel dynatraceEvent = new LoyaltySDKDynatraceEventModel(); | ||
519 | + dynatraceEvent.setEventName("custom_error_profile_loyalty"); | ||
520 | + EventBus.getDefault().post(new WarplyEventBusManager(dynatraceEvent)); | ||
521 | + | ||
498 | receiver.onFailure(status); | 522 | receiver.onFailure(status); |
499 | } | 523 | } |
524 | + } | ||
500 | 525 | ||
501 | @Override | 526 | @Override |
502 | public void onFailure(int errorCode) { | 527 | public void onFailure(int errorCode) { |
... | @@ -516,9 +541,14 @@ public class WarplyManager { | ... | @@ -516,9 +541,14 @@ public class WarplyManager { |
516 | receiver.onFailure(errorCode); | 541 | receiver.onFailure(errorCode); |
517 | } | 542 | } |
518 | }); | 543 | }); |
519 | - } else | 544 | + } else { |
545 | + LoyaltySDKDynatraceEventModel dynatraceEvent = new LoyaltySDKDynatraceEventModel(); | ||
546 | + dynatraceEvent.setEventName("custom_error_profile_loyalty"); | ||
547 | + EventBus.getDefault().post(new WarplyEventBusManager(dynatraceEvent)); | ||
548 | + | ||
520 | receiver.onFailure(errorCode); | 549 | receiver.onFailure(errorCode); |
521 | } | 550 | } |
551 | + } | ||
522 | }); | 552 | }); |
523 | } | 553 | } |
524 | 554 | ||
... | @@ -537,9 +567,15 @@ public class WarplyManager { | ... | @@ -537,9 +567,15 @@ public class WarplyManager { |
537 | try { | 567 | try { |
538 | newResult.putOpt("status", 1); | 568 | newResult.putOpt("status", 1); |
539 | newResult.putOpt("message", "Success"); | 569 | newResult.putOpt("message", "Success"); |
570 | + LoyaltySDKDynatraceEventModel dynatraceEvent = new LoyaltySDKDynatraceEventModel(); | ||
571 | + dynatraceEvent.setEventName("custom_success_logout_loyalty"); | ||
572 | + EventBus.getDefault().post(new WarplyEventBusManager(dynatraceEvent)); | ||
540 | receiver.onSuccess(newResult); | 573 | receiver.onSuccess(newResult); |
541 | } catch (JSONException e) { | 574 | } catch (JSONException e) { |
542 | e.printStackTrace(); | 575 | e.printStackTrace(); |
576 | + LoyaltySDKDynatraceEventModel dynatraceEvent = new LoyaltySDKDynatraceEventModel(); | ||
577 | + dynatraceEvent.setEventName("custom_error_logout_loyalty"); | ||
578 | + EventBus.getDefault().post(new WarplyEventBusManager(dynatraceEvent)); | ||
543 | receiver.onFailure(2); | 579 | receiver.onFailure(2); |
544 | } | 580 | } |
545 | } | 581 | } |
... | @@ -807,8 +843,15 @@ public class WarplyManager { | ... | @@ -807,8 +843,15 @@ public class WarplyManager { |
807 | try { | 843 | try { |
808 | newResult.putOpt("status", 1); | 844 | newResult.putOpt("status", 1); |
809 | newResult.putOpt("message", "Success"); | 845 | newResult.putOpt("message", "Success"); |
846 | + LoyaltySDKDynatraceEventModel dynatraceEvent = new LoyaltySDKDynatraceEventModel(); | ||
847 | + dynatraceEvent.setEventName("custom_success_login_loyalty"); | ||
848 | + EventBus.getDefault().post(new WarplyEventBusManager(dynatraceEvent)); | ||
810 | receiver.onSuccess(newResult); | 849 | receiver.onSuccess(newResult); |
811 | } catch (JSONException e) { | 850 | } catch (JSONException e) { |
851 | + LoyaltySDKDynatraceEventModel dynatraceEvent = new LoyaltySDKDynatraceEventModel(); | ||
852 | + dynatraceEvent.setEventName("custom_error_login_loyalty"); | ||
853 | + EventBus.getDefault().post(new WarplyEventBusManager(dynatraceEvent)); | ||
854 | + | ||
812 | e.printStackTrace(); | 855 | e.printStackTrace(); |
813 | receiver.onFailure(2); | 856 | receiver.onFailure(2); |
814 | } | 857 | } |
... | @@ -861,14 +904,22 @@ public class WarplyManager { | ... | @@ -861,14 +904,22 @@ public class WarplyManager { |
861 | 904 | ||
862 | } | 905 | } |
863 | }); | 906 | }); |
864 | - } else | 907 | + } else { |
865 | receiver.onFailure(2); | 908 | receiver.onFailure(2); |
866 | - } else | 909 | + } |
910 | + } else { | ||
911 | + LoyaltySDKDynatraceEventModel dynatraceEvent = new LoyaltySDKDynatraceEventModel(); | ||
912 | + dynatraceEvent.setEventName("custom_error_login_loyalty"); | ||
913 | + EventBus.getDefault().post(new WarplyEventBusManager(dynatraceEvent)); | ||
867 | receiver.onFailure(status); | 914 | receiver.onFailure(status); |
868 | } | 915 | } |
916 | + } | ||
869 | 917 | ||
870 | @Override | 918 | @Override |
871 | public void onFailure(int errorCode) { | 919 | public void onFailure(int errorCode) { |
920 | + LoyaltySDKDynatraceEventModel dynatraceEvent = new LoyaltySDKDynatraceEventModel(); | ||
921 | + dynatraceEvent.setEventName("custom_error_login_loyalty"); | ||
922 | + EventBus.getDefault().post(new WarplyEventBusManager(dynatraceEvent)); | ||
872 | receiver.onFailure(errorCode); | 923 | receiver.onFailure(errorCode); |
873 | } | 924 | } |
874 | }); | 925 | }); |
... | @@ -894,6 +945,10 @@ public class WarplyManager { | ... | @@ -894,6 +945,10 @@ public class WarplyManager { |
894 | // } | 945 | // } |
895 | // } | 946 | // } |
896 | // WarplyManagerHelper.setCouponList(mCouponList); | 947 | // WarplyManagerHelper.setCouponList(mCouponList); |
948 | + | ||
949 | + LoyaltySDKDynatraceEventModel dynatraceEvent = new LoyaltySDKDynatraceEventModel(); | ||
950 | + dynatraceEvent.setEventName("custom_success_user_coupons_loyalty"); | ||
951 | + EventBus.getDefault().post(new WarplyEventBusManager(dynatraceEvent)); | ||
897 | receiver.onSuccess(/*mCouponList*/ result); | 952 | receiver.onSuccess(/*mCouponList*/ result); |
898 | } | 953 | } |
899 | 954 | ||
... | @@ -915,9 +970,13 @@ public class WarplyManager { | ... | @@ -915,9 +970,13 @@ public class WarplyManager { |
915 | receiver.onFailure(errorCode); | 970 | receiver.onFailure(errorCode); |
916 | } | 971 | } |
917 | }); | 972 | }); |
918 | - } else | 973 | + } else { |
974 | + LoyaltySDKDynatraceEventModel dynatraceEvent = new LoyaltySDKDynatraceEventModel(); | ||
975 | + dynatraceEvent.setEventName("custom_error_user_coupons_loyalty"); | ||
976 | + EventBus.getDefault().post(new WarplyEventBusManager(dynatraceEvent)); | ||
919 | receiver.onFailure(errorCode); | 977 | receiver.onFailure(errorCode); |
920 | } | 978 | } |
979 | + } | ||
921 | }, | 980 | }, |
922 | request.getSignature())); | 981 | request.getSignature())); |
923 | } | 982 | } |
... | @@ -1298,12 +1357,19 @@ public class WarplyManager { | ... | @@ -1298,12 +1357,19 @@ public class WarplyManager { |
1298 | Warply.postReceiveMicroappData(WarpConstants.MICROAPP_COUPONS, request.toJson(), new CouponsetsHook(new CallbackReceiver<CouponsetsList>() { | 1357 | Warply.postReceiveMicroappData(WarpConstants.MICROAPP_COUPONS, request.toJson(), new CouponsetsHook(new CallbackReceiver<CouponsetsList>() { |
1299 | @Override | 1358 | @Override |
1300 | public void onSuccess(CouponsetsList result) { | 1359 | public void onSuccess(CouponsetsList result) { |
1360 | + LoyaltySDKDynatraceEventModel dynatraceEvent = new LoyaltySDKDynatraceEventModel(); | ||
1361 | + dynatraceEvent.setEventName("custom_success_couponsets_loyalty"); | ||
1362 | + EventBus.getDefault().post(new WarplyEventBusManager(dynatraceEvent)); | ||
1363 | + | ||
1301 | WarplyManagerHelper.setCouponsets(result); | 1364 | WarplyManagerHelper.setCouponsets(result); |
1302 | receiver.onSuccess(result); | 1365 | receiver.onSuccess(result); |
1303 | } | 1366 | } |
1304 | 1367 | ||
1305 | @Override | 1368 | @Override |
1306 | public void onFailure(int errorCode) { | 1369 | public void onFailure(int errorCode) { |
1370 | + LoyaltySDKDynatraceEventModel dynatraceEvent = new LoyaltySDKDynatraceEventModel(); | ||
1371 | + dynatraceEvent.setEventName("custom_error_couponsets_loyalty"); | ||
1372 | + EventBus.getDefault().post(new WarplyEventBusManager(dynatraceEvent)); | ||
1307 | receiver.onFailure(errorCode); | 1373 | receiver.onFailure(errorCode); |
1308 | } | 1374 | } |
1309 | }, | 1375 | }, |
... | @@ -1318,7 +1384,18 @@ public class WarplyManager { | ... | @@ -1318,7 +1384,18 @@ public class WarplyManager { |
1318 | Warply.postReceiveMicroappData(WarpConstants.MICROAPP_COUPONS, true, "context", request.toJson(), new CallbackReceiver<JSONObject>() { | 1384 | Warply.postReceiveMicroappData(WarpConstants.MICROAPP_COUPONS, true, "context", request.toJson(), new CallbackReceiver<JSONObject>() { |
1319 | @Override | 1385 | @Override |
1320 | public void onSuccess(JSONObject result) { | 1386 | public void onSuccess(JSONObject result) { |
1387 | + int status = result.optInt("status"); | ||
1388 | + if (status == 1) { | ||
1389 | + LoyaltySDKDynatraceEventModel dynatraceEvent = new LoyaltySDKDynatraceEventModel(); | ||
1390 | + dynatraceEvent.setEventName("custom_success_retrieve_coupon_loyalty"); | ||
1391 | + EventBus.getDefault().post(new WarplyEventBusManager(dynatraceEvent)); | ||
1321 | receiver.onSuccess(result); | 1392 | receiver.onSuccess(result); |
1393 | + } else { | ||
1394 | + LoyaltySDKDynatraceEventModel dynatraceEvent = new LoyaltySDKDynatraceEventModel(); | ||
1395 | + dynatraceEvent.setEventName("custom_error_retrieve_coupon_loyalty"); | ||
1396 | + EventBus.getDefault().post(new WarplyEventBusManager(dynatraceEvent)); | ||
1397 | + receiver.onFailure(status); | ||
1398 | + } | ||
1322 | } | 1399 | } |
1323 | 1400 | ||
1324 | @Override | 1401 | @Override |
... | @@ -1339,9 +1416,13 @@ public class WarplyManager { | ... | @@ -1339,9 +1416,13 @@ public class WarplyManager { |
1339 | receiver.onFailure(errorCode); | 1416 | receiver.onFailure(errorCode); |
1340 | } | 1417 | } |
1341 | }); | 1418 | }); |
1342 | - } else | 1419 | + } else { |
1420 | + LoyaltySDKDynatraceEventModel dynatraceEvent = new LoyaltySDKDynatraceEventModel(); | ||
1421 | + dynatraceEvent.setEventName("custom_error_retrieve_coupon_loyalty"); | ||
1422 | + EventBus.getDefault().post(new WarplyEventBusManager(dynatraceEvent)); | ||
1343 | receiver.onFailure(errorCode); | 1423 | receiver.onFailure(errorCode); |
1344 | } | 1424 | } |
1425 | + } | ||
1345 | }); | 1426 | }); |
1346 | } | 1427 | } |
1347 | 1428 | ||
... | @@ -1388,6 +1469,10 @@ public class WarplyManager { | ... | @@ -1388,6 +1469,10 @@ public class WarplyManager { |
1388 | Warply.postReceiveMicroappData(WarpConstants.MICROAPP_NEW_CAMPAIGNS, false, "campaigns", request.toJson(), new NewCampaignsHook(new CallbackReceiver<ArrayList<Campaign>>() { | 1469 | Warply.postReceiveMicroappData(WarpConstants.MICROAPP_NEW_CAMPAIGNS, false, "campaigns", request.toJson(), new NewCampaignsHook(new CallbackReceiver<ArrayList<Campaign>>() { |
1389 | @Override | 1470 | @Override |
1390 | public void onSuccess(ArrayList<Campaign> result) { | 1471 | public void onSuccess(ArrayList<Campaign> result) { |
1472 | + LoyaltySDKDynatraceEventModel dynatraceEvent = new LoyaltySDKDynatraceEventModel(); | ||
1473 | + dynatraceEvent.setEventName("custom_success_campaigns_loyalty"); | ||
1474 | + EventBus.getDefault().post(new WarplyEventBusManager(dynatraceEvent)); | ||
1475 | + | ||
1391 | getCampaignsPersonalized(request, new CallbackReceiver<ArrayList<Campaign>>() { | 1476 | getCampaignsPersonalized(request, new CallbackReceiver<ArrayList<Campaign>>() { |
1392 | @Override | 1477 | @Override |
1393 | public void onSuccess(ArrayList<Campaign> resultPersonalized) { | 1478 | public void onSuccess(ArrayList<Campaign> resultPersonalized) { |
... | @@ -2030,6 +2115,9 @@ public class WarplyManager { | ... | @@ -2030,6 +2115,9 @@ public class WarplyManager { |
2030 | 2115 | ||
2031 | @Override | 2116 | @Override |
2032 | public void onFailure(int errorCode) { | 2117 | public void onFailure(int errorCode) { |
2118 | + LoyaltySDKDynatraceEventModel dynatraceEvent = new LoyaltySDKDynatraceEventModel(); | ||
2119 | + dynatraceEvent.setEventName("custom_error_campaigns_loyalty"); | ||
2120 | + EventBus.getDefault().post(new WarplyEventBusManager(dynatraceEvent)); | ||
2033 | receiver.onFailure(errorCode); | 2121 | receiver.onFailure(errorCode); |
2034 | } | 2122 | } |
2035 | }, | 2123 | }, |
... | @@ -2044,6 +2132,9 @@ public class WarplyManager { | ... | @@ -2044,6 +2132,9 @@ public class WarplyManager { |
2044 | Warply.postReceiveMicroappData(WarpConstants.MICROAPP_NEW_CAMPAIGNS, true, "campaignsPersonalized", request.toJson(), new NewCampaignsHook(new CallbackReceiver<ArrayList<Campaign>>() { | 2132 | Warply.postReceiveMicroappData(WarpConstants.MICROAPP_NEW_CAMPAIGNS, true, "campaignsPersonalized", request.toJson(), new NewCampaignsHook(new CallbackReceiver<ArrayList<Campaign>>() { |
2045 | @Override | 2133 | @Override |
2046 | public void onSuccess(ArrayList<Campaign> result) { | 2134 | public void onSuccess(ArrayList<Campaign> result) { |
2135 | + LoyaltySDKDynatraceEventModel dynatraceEvent = new LoyaltySDKDynatraceEventModel(); | ||
2136 | + dynatraceEvent.setEventName("custom_success_campaigns_personalized_loyalty"); | ||
2137 | + EventBus.getDefault().post(new WarplyEventBusManager(dynatraceEvent)); | ||
2047 | receiver.onSuccess(result); | 2138 | receiver.onSuccess(result); |
2048 | } | 2139 | } |
2049 | 2140 | ||
... | @@ -2065,9 +2156,13 @@ public class WarplyManager { | ... | @@ -2065,9 +2156,13 @@ public class WarplyManager { |
2065 | receiver.onFailure(errorCode); | 2156 | receiver.onFailure(errorCode); |
2066 | } | 2157 | } |
2067 | }); | 2158 | }); |
2068 | - } else | 2159 | + } else { |
2160 | + LoyaltySDKDynatraceEventModel dynatraceEvent = new LoyaltySDKDynatraceEventModel(); | ||
2161 | + dynatraceEvent.setEventName("custom_error_campaigns_personalized_loyalty"); | ||
2162 | + EventBus.getDefault().post(new WarplyEventBusManager(dynatraceEvent)); | ||
2069 | receiver.onFailure(errorCode); | 2163 | receiver.onFailure(errorCode); |
2070 | } | 2164 | } |
2165 | + } | ||
2071 | }, | 2166 | }, |
2072 | request.getSignature())); | 2167 | request.getSignature())); |
2073 | } | 2168 | } |
... | @@ -2081,11 +2176,18 @@ public class WarplyManager { | ... | @@ -2081,11 +2176,18 @@ public class WarplyManager { |
2081 | @Override | 2176 | @Override |
2082 | public void onSuccess(JSONObject result) { | 2177 | public void onSuccess(JSONObject result) { |
2083 | int status = result.optInt("status", 2); | 2178 | int status = result.optInt("status", 2); |
2084 | - if (status == 1) | 2179 | + if (status == 1) { |
2180 | + LoyaltySDKDynatraceEventModel dynatraceEvent = new LoyaltySDKDynatraceEventModel(); | ||
2181 | + dynatraceEvent.setEventName("custom_success_customer_state_loyalty"); | ||
2182 | + EventBus.getDefault().post(new WarplyEventBusManager(dynatraceEvent)); | ||
2085 | receiver.onSuccess(result); | 2183 | receiver.onSuccess(result); |
2086 | - else | 2184 | + } else { |
2185 | + LoyaltySDKDynatraceEventModel dynatraceEvent = new LoyaltySDKDynatraceEventModel(); | ||
2186 | + dynatraceEvent.setEventName("custom_error_customer_state_loyalty"); | ||
2187 | + EventBus.getDefault().post(new WarplyEventBusManager(dynatraceEvent)); | ||
2087 | receiver.onFailure(status); | 2188 | receiver.onFailure(status); |
2088 | } | 2189 | } |
2190 | + } | ||
2089 | 2191 | ||
2090 | @Override | 2192 | @Override |
2091 | public void onFailure(int errorCode) { | 2193 | public void onFailure(int errorCode) { |
... | @@ -2105,9 +2207,13 @@ public class WarplyManager { | ... | @@ -2105,9 +2207,13 @@ public class WarplyManager { |
2105 | receiver.onFailure(errorCode); | 2207 | receiver.onFailure(errorCode); |
2106 | } | 2208 | } |
2107 | }); | 2209 | }); |
2108 | - } else | 2210 | + } else { |
2211 | + LoyaltySDKDynatraceEventModel dynatraceEvent = new LoyaltySDKDynatraceEventModel(); | ||
2212 | + dynatraceEvent.setEventName("custom_error_customer_state_loyalty"); | ||
2213 | + EventBus.getDefault().post(new WarplyEventBusManager(dynatraceEvent)); | ||
2109 | receiver.onFailure(errorCode); | 2214 | receiver.onFailure(errorCode); |
2110 | } | 2215 | } |
2216 | + } | ||
2111 | }); | 2217 | }); |
2112 | } | 2218 | } |
2113 | 2219 | ||
... | @@ -2120,11 +2226,18 @@ public class WarplyManager { | ... | @@ -2120,11 +2226,18 @@ public class WarplyManager { |
2120 | @Override | 2226 | @Override |
2121 | public void onSuccess(JSONObject result) { | 2227 | public void onSuccess(JSONObject result) { |
2122 | int status = result.optInt("status", 2); | 2228 | int status = result.optInt("status", 2); |
2123 | - if (status == 1 || status == 4 || status == 5 || status == 7) | 2229 | + if (status == 1 || status == 4 || status == 5 || status == 7) { |
2230 | + LoyaltySDKDynatraceEventModel dynatraceEvent = new LoyaltySDKDynatraceEventModel(); | ||
2231 | + dynatraceEvent.setEventName("custom_success_sharing_loyalty"); | ||
2232 | + EventBus.getDefault().post(new WarplyEventBusManager(dynatraceEvent)); | ||
2124 | receiver.onSuccess(result); | 2233 | receiver.onSuccess(result); |
2125 | - else | 2234 | + } else { |
2235 | + LoyaltySDKDynatraceEventModel dynatraceEvent = new LoyaltySDKDynatraceEventModel(); | ||
2236 | + dynatraceEvent.setEventName("custom_error_sharing_loyalty"); | ||
2237 | + EventBus.getDefault().post(new WarplyEventBusManager(dynatraceEvent)); | ||
2126 | receiver.onFailure(status); | 2238 | receiver.onFailure(status); |
2127 | } | 2239 | } |
2240 | + } | ||
2128 | 2241 | ||
2129 | @Override | 2242 | @Override |
2130 | public void onFailure(int errorCode) { | 2243 | public void onFailure(int errorCode) { |
... | @@ -2144,9 +2257,13 @@ public class WarplyManager { | ... | @@ -2144,9 +2257,13 @@ public class WarplyManager { |
2144 | receiver.onFailure(errorCode); | 2257 | receiver.onFailure(errorCode); |
2145 | } | 2258 | } |
2146 | }); | 2259 | }); |
2147 | - } else | 2260 | + } else { |
2261 | + LoyaltySDKDynatraceEventModel dynatraceEvent = new LoyaltySDKDynatraceEventModel(); | ||
2262 | + dynatraceEvent.setEventName("custom_error_sharing_loyalty"); | ||
2263 | + EventBus.getDefault().post(new WarplyEventBusManager(dynatraceEvent)); | ||
2148 | receiver.onFailure(errorCode); | 2264 | receiver.onFailure(errorCode); |
2149 | } | 2265 | } |
2266 | + } | ||
2150 | }); | 2267 | }); |
2151 | } | 2268 | } |
2152 | 2269 | ||
... | @@ -2159,11 +2276,18 @@ public class WarplyManager { | ... | @@ -2159,11 +2276,18 @@ public class WarplyManager { |
2159 | @Override | 2276 | @Override |
2160 | public void onSuccess(JSONObject result) { | 2277 | public void onSuccess(JSONObject result) { |
2161 | int status = result.optInt("status", 2); | 2278 | int status = result.optInt("status", 2); |
2162 | - if (status == 1) | 2279 | + if (status == 1) { |
2280 | + LoyaltySDKDynatraceEventModel dynatraceEvent = new LoyaltySDKDynatraceEventModel(); | ||
2281 | + dynatraceEvent.setEventName("custom_success_retrieve_sharing_loyalty"); | ||
2282 | + EventBus.getDefault().post(new WarplyEventBusManager(dynatraceEvent)); | ||
2163 | receiver.onSuccess(result); | 2283 | receiver.onSuccess(result); |
2164 | - else | 2284 | + } else { |
2285 | + LoyaltySDKDynatraceEventModel dynatraceEvent = new LoyaltySDKDynatraceEventModel(); | ||
2286 | + dynatraceEvent.setEventName("custom_error_retrieve_sharing_loyalty"); | ||
2287 | + EventBus.getDefault().post(new WarplyEventBusManager(dynatraceEvent)); | ||
2165 | receiver.onFailure(status); | 2288 | receiver.onFailure(status); |
2166 | } | 2289 | } |
2290 | + } | ||
2167 | 2291 | ||
2168 | @Override | 2292 | @Override |
2169 | public void onFailure(int errorCode) { | 2293 | public void onFailure(int errorCode) { |
... | @@ -2183,9 +2307,13 @@ public class WarplyManager { | ... | @@ -2183,9 +2307,13 @@ public class WarplyManager { |
2183 | receiver.onFailure(errorCode); | 2307 | receiver.onFailure(errorCode); |
2184 | } | 2308 | } |
2185 | }); | 2309 | }); |
2186 | - } else | 2310 | + } else { |
2311 | + LoyaltySDKDynatraceEventModel dynatraceEvent = new LoyaltySDKDynatraceEventModel(); | ||
2312 | + dynatraceEvent.setEventName("custom_error_retrieve_sharing_loyalty"); | ||
2313 | + EventBus.getDefault().post(new WarplyEventBusManager(dynatraceEvent)); | ||
2187 | receiver.onFailure(errorCode); | 2314 | receiver.onFailure(errorCode); |
2188 | } | 2315 | } |
2316 | + } | ||
2189 | }); | 2317 | }); |
2190 | } | 2318 | } |
2191 | 2319 | ||
... | @@ -2209,6 +2337,10 @@ public class WarplyManager { | ... | @@ -2209,6 +2337,10 @@ public class WarplyManager { |
2209 | // } | 2337 | // } |
2210 | // } | 2338 | // } |
2211 | 2339 | ||
2340 | + LoyaltySDKDynatraceEventModel dynatraceEvent = new LoyaltySDKDynatraceEventModel(); | ||
2341 | + dynatraceEvent.setEventName("custom_success_pacing_loyalty"); | ||
2342 | + EventBus.getDefault().post(new WarplyEventBusManager(dynatraceEvent)); | ||
2343 | + | ||
2212 | receiver.onSuccess(result); | 2344 | receiver.onSuccess(result); |
2213 | } | 2345 | } |
2214 | 2346 | ||
... | @@ -2230,9 +2362,13 @@ public class WarplyManager { | ... | @@ -2230,9 +2362,13 @@ public class WarplyManager { |
2230 | receiver.onFailure(errorCode); | 2362 | receiver.onFailure(errorCode); |
2231 | } | 2363 | } |
2232 | }); | 2364 | }); |
2233 | - } else | 2365 | + } else { |
2366 | + LoyaltySDKDynatraceEventModel dynatraceEvent = new LoyaltySDKDynatraceEventModel(); | ||
2367 | + dynatraceEvent.setEventName("custom_error_pacing_loyalty"); | ||
2368 | + EventBus.getDefault().post(new WarplyEventBusManager(dynatraceEvent)); | ||
2234 | receiver.onFailure(errorCode); | 2369 | receiver.onFailure(errorCode); |
2235 | } | 2370 | } |
2371 | + } | ||
2236 | }, | 2372 | }, |
2237 | request.getSignature())); | 2373 | request.getSignature())); |
2238 | } | 2374 | } |
... | @@ -2246,11 +2382,18 @@ public class WarplyManager { | ... | @@ -2246,11 +2382,18 @@ public class WarplyManager { |
2246 | @Override | 2382 | @Override |
2247 | public void onSuccess(JSONObject result) { | 2383 | public void onSuccess(JSONObject result) { |
2248 | int status = result.optInt("status", 2); | 2384 | int status = result.optInt("status", 2); |
2249 | - if (status == 1 || status == 3 || status == 4) | 2385 | + if (status == 1 || status == 3 || status == 4) { |
2386 | + LoyaltySDKDynatraceEventModel dynatraceEvent = new LoyaltySDKDynatraceEventModel(); | ||
2387 | + dynatraceEvent.setEventName("custom_success_coupon_sharing_loyalty"); | ||
2388 | + EventBus.getDefault().post(new WarplyEventBusManager(dynatraceEvent)); | ||
2250 | receiver.onSuccess(result); | 2389 | receiver.onSuccess(result); |
2251 | - else | 2390 | + } else { |
2391 | + LoyaltySDKDynatraceEventModel dynatraceEvent = new LoyaltySDKDynatraceEventModel(); | ||
2392 | + dynatraceEvent.setEventName("custom_error_coupon_sharing_loyalty"); | ||
2393 | + EventBus.getDefault().post(new WarplyEventBusManager(dynatraceEvent)); | ||
2252 | receiver.onFailure(status); | 2394 | receiver.onFailure(status); |
2253 | } | 2395 | } |
2396 | + } | ||
2254 | 2397 | ||
2255 | @Override | 2398 | @Override |
2256 | public void onFailure(int errorCode) { | 2399 | public void onFailure(int errorCode) { |
... | @@ -2270,9 +2413,13 @@ public class WarplyManager { | ... | @@ -2270,9 +2413,13 @@ public class WarplyManager { |
2270 | receiver.onFailure(errorCode); | 2413 | receiver.onFailure(errorCode); |
2271 | } | 2414 | } |
2272 | }); | 2415 | }); |
2273 | - } else | 2416 | + } else { |
2417 | + LoyaltySDKDynatraceEventModel dynatraceEvent = new LoyaltySDKDynatraceEventModel(); | ||
2418 | + dynatraceEvent.setEventName("custom_error_coupon_sharing_loyalty"); | ||
2419 | + EventBus.getDefault().post(new WarplyEventBusManager(dynatraceEvent)); | ||
2274 | receiver.onFailure(errorCode); | 2420 | receiver.onFailure(errorCode); |
2275 | } | 2421 | } |
2422 | + } | ||
2276 | }); | 2423 | }); |
2277 | } | 2424 | } |
2278 | 2425 | ||
... | @@ -2287,6 +2434,9 @@ public class WarplyManager { | ... | @@ -2287,6 +2434,9 @@ public class WarplyManager { |
2287 | @Override | 2434 | @Override |
2288 | public void onSuccess(MerchantList result) { | 2435 | public void onSuccess(MerchantList result) { |
2289 | WarplyManagerHelper.setMerchantList(result); | 2436 | WarplyManagerHelper.setMerchantList(result); |
2437 | + LoyaltySDKDynatraceEventModel dynatraceEvent = new LoyaltySDKDynatraceEventModel(); | ||
2438 | + dynatraceEvent.setEventName("custom_success_shops_loyalty"); | ||
2439 | + EventBus.getDefault().post(new WarplyEventBusManager(dynatraceEvent)); | ||
2290 | 2440 | ||
2291 | getCouponsets(new WarplyGetCouponsetsRequest() | 2441 | getCouponsets(new WarplyGetCouponsetsRequest() |
2292 | .setLanguage(WarplyProperty.getLanguage(Warply.getWarplyContext())), new CallbackReceiver<CouponsetsList>() { | 2442 | .setLanguage(WarplyProperty.getLanguage(Warply.getWarplyContext())), new CallbackReceiver<CouponsetsList>() { |
... | @@ -2366,7 +2516,9 @@ public class WarplyManager { | ... | @@ -2366,7 +2516,9 @@ public class WarplyManager { |
2366 | 2516 | ||
2367 | @Override | 2517 | @Override |
2368 | public void onFailure(int errorCode) { | 2518 | public void onFailure(int errorCode) { |
2369 | - | 2519 | + LoyaltySDKDynatraceEventModel dynatraceEvent = new LoyaltySDKDynatraceEventModel(); |
2520 | + dynatraceEvent.setEventName("custom_error_shops_loyalty"); | ||
2521 | + EventBus.getDefault().post(new WarplyEventBusManager(dynatraceEvent)); | ||
2370 | } | 2522 | } |
2371 | }); | 2523 | }); |
2372 | } | 2524 | } |
... | @@ -2474,10 +2626,17 @@ public class WarplyManager { | ... | @@ -2474,10 +2626,17 @@ public class WarplyManager { |
2474 | public void onSuccess(JSONObject result) { | 2626 | public void onSuccess(JSONObject result) { |
2475 | int status = result.optInt("status", 2); | 2627 | int status = result.optInt("status", 2); |
2476 | if (status == 1) { | 2628 | if (status == 1) { |
2629 | + LoyaltySDKDynatraceEventModel dynatraceEvent = new LoyaltySDKDynatraceEventModel(); | ||
2630 | + dynatraceEvent.setEventName("custom_success_submit_order_loyalty"); | ||
2631 | + EventBus.getDefault().post(new WarplyEventBusManager(dynatraceEvent)); | ||
2477 | receiver.onSuccess(result); | 2632 | receiver.onSuccess(result); |
2478 | - } else | 2633 | + } else { |
2634 | + LoyaltySDKDynatraceEventModel dynatraceEvent = new LoyaltySDKDynatraceEventModel(); | ||
2635 | + dynatraceEvent.setEventName("custom_error_submit_order_loyalty"); | ||
2636 | + EventBus.getDefault().post(new WarplyEventBusManager(dynatraceEvent)); | ||
2479 | receiver.onFailure(status); | 2637 | receiver.onFailure(status); |
2480 | } | 2638 | } |
2639 | + } | ||
2481 | 2640 | ||
2482 | @Override | 2641 | @Override |
2483 | public void onFailure(int errorCode) { | 2642 | public void onFailure(int errorCode) { |
... | @@ -2497,9 +2656,13 @@ public class WarplyManager { | ... | @@ -2497,9 +2656,13 @@ public class WarplyManager { |
2497 | receiver.onFailure(errorCode); | 2656 | receiver.onFailure(errorCode); |
2498 | } | 2657 | } |
2499 | }); | 2658 | }); |
2500 | - } else | 2659 | + } else { |
2660 | + LoyaltySDKDynatraceEventModel dynatraceEvent = new LoyaltySDKDynatraceEventModel(); | ||
2661 | + dynatraceEvent.setEventName("custom_error_submit_order_loyalty"); | ||
2662 | + EventBus.getDefault().post(new WarplyEventBusManager(dynatraceEvent)); | ||
2501 | receiver.onFailure(errorCode); | 2663 | receiver.onFailure(errorCode); |
2502 | } | 2664 | } |
2665 | + } | ||
2503 | }); | 2666 | }); |
2504 | } | 2667 | } |
2505 | 2668 | ||
... | @@ -2511,6 +2674,9 @@ public class WarplyManager { | ... | @@ -2511,6 +2674,9 @@ public class WarplyManager { |
2511 | Warply.postReceiveMicroappData(WarpConstants.MICROAPP_COUPONS, true, "context", request.toJson(), new SharingHook(new CallbackReceiver<SharingList>() { | 2674 | Warply.postReceiveMicroappData(WarpConstants.MICROAPP_COUPONS, true, "context", request.toJson(), new SharingHook(new CallbackReceiver<SharingList>() { |
2512 | @Override | 2675 | @Override |
2513 | public void onSuccess(SharingList response) { | 2676 | public void onSuccess(SharingList response) { |
2677 | + LoyaltySDKDynatraceEventModel dynatraceEvent = new LoyaltySDKDynatraceEventModel(); | ||
2678 | + dynatraceEvent.setEventName("custom_success_sharing_history_loyalty"); | ||
2679 | + EventBus.getDefault().post(new WarplyEventBusManager(dynatraceEvent)); | ||
2514 | receiver.onSuccess(response); | 2680 | receiver.onSuccess(response); |
2515 | } | 2681 | } |
2516 | 2682 | ||
... | @@ -2532,9 +2698,13 @@ public class WarplyManager { | ... | @@ -2532,9 +2698,13 @@ public class WarplyManager { |
2532 | receiver.onFailure(errorCode); | 2698 | receiver.onFailure(errorCode); |
2533 | } | 2699 | } |
2534 | }); | 2700 | }); |
2535 | - } else | 2701 | + } else { |
2702 | + LoyaltySDKDynatraceEventModel dynatraceEvent = new LoyaltySDKDynatraceEventModel(); | ||
2703 | + dynatraceEvent.setEventName("custom_error_sharing_history_loyalty"); | ||
2704 | + EventBus.getDefault().post(new WarplyEventBusManager(dynatraceEvent)); | ||
2536 | receiver.onFailure(errorCode); | 2705 | receiver.onFailure(errorCode); |
2537 | } | 2706 | } |
2707 | + } | ||
2538 | }, | 2708 | }, |
2539 | request.getSignature())); | 2709 | request.getSignature())); |
2540 | } | 2710 | } |
... | @@ -2549,10 +2719,17 @@ public class WarplyManager { | ... | @@ -2549,10 +2719,17 @@ public class WarplyManager { |
2549 | public void onSuccess(JSONObject result) { | 2719 | public void onSuccess(JSONObject result) { |
2550 | int status = result.optInt("status", 2); | 2720 | int status = result.optInt("status", 2); |
2551 | if (status == 1) { | 2721 | if (status == 1) { |
2722 | + LoyaltySDKDynatraceEventModel dynatraceEvent = new LoyaltySDKDynatraceEventModel(); | ||
2723 | + dynatraceEvent.setEventName("custom_success_post_event_loyalty"); | ||
2724 | + EventBus.getDefault().post(new WarplyEventBusManager(dynatraceEvent)); | ||
2552 | receiver.onSuccess(result); | 2725 | receiver.onSuccess(result); |
2553 | - } else | 2726 | + } else { |
2727 | + LoyaltySDKDynatraceEventModel dynatraceEvent = new LoyaltySDKDynatraceEventModel(); | ||
2728 | + dynatraceEvent.setEventName("custom_error_post_event_loyalty"); | ||
2729 | + EventBus.getDefault().post(new WarplyEventBusManager(dynatraceEvent)); | ||
2554 | receiver.onFailure(status); | 2730 | receiver.onFailure(status); |
2555 | } | 2731 | } |
2732 | + } | ||
2556 | 2733 | ||
2557 | @Override | 2734 | @Override |
2558 | public void onFailure(int errorCode) { | 2735 | public void onFailure(int errorCode) { |
... | @@ -2572,9 +2749,13 @@ public class WarplyManager { | ... | @@ -2572,9 +2749,13 @@ public class WarplyManager { |
2572 | receiver.onFailure(errorCode); | 2749 | receiver.onFailure(errorCode); |
2573 | } | 2750 | } |
2574 | }); | 2751 | }); |
2575 | - } else | 2752 | + } else { |
2753 | + LoyaltySDKDynatraceEventModel dynatraceEvent = new LoyaltySDKDynatraceEventModel(); | ||
2754 | + dynatraceEvent.setEventName("custom_error_post_event_loyalty"); | ||
2755 | + EventBus.getDefault().post(new WarplyEventBusManager(dynatraceEvent)); | ||
2576 | receiver.onFailure(errorCode); | 2756 | receiver.onFailure(errorCode); |
2577 | } | 2757 | } |
2758 | + } | ||
2578 | }); | 2759 | }); |
2579 | } | 2760 | } |
2580 | 2761 | ||
... | @@ -2588,10 +2769,17 @@ public class WarplyManager { | ... | @@ -2588,10 +2769,17 @@ public class WarplyManager { |
2588 | public void onSuccess(JSONObject result) { | 2769 | public void onSuccess(JSONObject result) { |
2589 | int status = result.optInt("status", 2); | 2770 | int status = result.optInt("status", 2); |
2590 | if (status == 1) { | 2771 | if (status == 1) { |
2772 | + LoyaltySDKDynatraceEventModel dynatraceEvent = new LoyaltySDKDynatraceEventModel(); | ||
2773 | + dynatraceEvent.setEventName("custom_success_save_pacing_loyalty"); | ||
2774 | + EventBus.getDefault().post(new WarplyEventBusManager(dynatraceEvent)); | ||
2591 | receiver.onSuccess(result); | 2775 | receiver.onSuccess(result); |
2592 | - } else | 2776 | + } else { |
2777 | + LoyaltySDKDynatraceEventModel dynatraceEvent = new LoyaltySDKDynatraceEventModel(); | ||
2778 | + dynatraceEvent.setEventName("custom_error_save_pacing_loyalty"); | ||
2779 | + EventBus.getDefault().post(new WarplyEventBusManager(dynatraceEvent)); | ||
2593 | receiver.onFailure(status); | 2780 | receiver.onFailure(status); |
2594 | } | 2781 | } |
2782 | + } | ||
2595 | 2783 | ||
2596 | @Override | 2784 | @Override |
2597 | public void onFailure(int errorCode) { | 2785 | public void onFailure(int errorCode) { |
... | @@ -2611,9 +2799,13 @@ public class WarplyManager { | ... | @@ -2611,9 +2799,13 @@ public class WarplyManager { |
2611 | receiver.onFailure(errorCode); | 2799 | receiver.onFailure(errorCode); |
2612 | } | 2800 | } |
2613 | }); | 2801 | }); |
2614 | - } else | 2802 | + } else { |
2803 | + LoyaltySDKDynatraceEventModel dynatraceEvent = new LoyaltySDKDynatraceEventModel(); | ||
2804 | + dynatraceEvent.setEventName("custom_error_save_pacing_loyalty"); | ||
2805 | + EventBus.getDefault().post(new WarplyEventBusManager(dynatraceEvent)); | ||
2615 | receiver.onFailure(errorCode); | 2806 | receiver.onFailure(errorCode); |
2616 | } | 2807 | } |
2808 | + } | ||
2617 | }); | 2809 | }); |
2618 | } | 2810 | } |
2619 | 2811 | ||
... | @@ -2628,6 +2820,10 @@ public class WarplyManager { | ... | @@ -2628,6 +2820,10 @@ public class WarplyManager { |
2628 | new CallbackReceiver<JSONObject>() { | 2820 | new CallbackReceiver<JSONObject>() { |
2629 | @Override | 2821 | @Override |
2630 | public void onSuccess(JSONObject result) { | 2822 | public void onSuccess(JSONObject result) { |
2823 | + LoyaltySDKDynatraceEventModel dynatraceEvent = new LoyaltySDKDynatraceEventModel(); | ||
2824 | + dynatraceEvent.setEventName("custom_success_read_campaign_loyalty"); | ||
2825 | + EventBus.getDefault().post(new WarplyEventBusManager(dynatraceEvent)); | ||
2826 | + | ||
2631 | getCampaigns(new WarplyGetCampaignsRequest().setLanguage("en"), new CallbackReceiver<ArrayList<Campaign>>() { | 2827 | getCampaigns(new WarplyGetCampaignsRequest().setLanguage("en"), new CallbackReceiver<ArrayList<Campaign>>() { |
2632 | @Override | 2828 | @Override |
2633 | public void onSuccess(ArrayList<Campaign> result) { | 2829 | public void onSuccess(ArrayList<Campaign> result) { |
... | @@ -2644,6 +2840,10 @@ public class WarplyManager { | ... | @@ -2644,6 +2840,10 @@ public class WarplyManager { |
2644 | 2840 | ||
2645 | @Override | 2841 | @Override |
2646 | public void onFailure(int errorCode) { | 2842 | public void onFailure(int errorCode) { |
2843 | + LoyaltySDKDynatraceEventModel dynatraceEvent = new LoyaltySDKDynatraceEventModel(); | ||
2844 | + dynatraceEvent.setEventName("custom_success_read_campaign_loyalty"); | ||
2845 | + EventBus.getDefault().post(new WarplyEventBusManager(dynatraceEvent)); | ||
2846 | + | ||
2647 | getCampaigns(new WarplyGetCampaignsRequest().setLanguage("en"), new CallbackReceiver<ArrayList<Campaign>>() { | 2847 | getCampaigns(new WarplyGetCampaignsRequest().setLanguage("en"), new CallbackReceiver<ArrayList<Campaign>>() { |
2648 | @Override | 2848 | @Override |
2649 | public void onSuccess(ArrayList<Campaign> result) { | 2849 | public void onSuccess(ArrayList<Campaign> result) { | ... | ... |
-
Please register or login to post a comment