Showing
4 changed files
with
63 additions
and
2 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.5.4r6' | 5 | + PUBLISH_VERSION = '4.5.5.4r7' |
6 | PUBLISH_ARTIFACT_ID = 'warply-android-sdk' | 6 | PUBLISH_ARTIFACT_ID = 'warply-android-sdk' |
7 | } | 7 | } |
8 | 8 | ... | ... |
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 | + | ||
29 | +/** | ||
30 | + * Created by Panagiotis Triantafyllou on 22-Jan-24. | ||
31 | + */ | ||
32 | + | ||
33 | +public class RefreshVouchersEventModel { | ||
34 | + private boolean refreshed; | ||
35 | + | ||
36 | + public RefreshVouchersEventModel() { | ||
37 | + this.refreshed = true; | ||
38 | + } | ||
39 | + | ||
40 | + public boolean isRefreshed() { | ||
41 | + return refreshed; | ||
42 | + } | ||
43 | + | ||
44 | + public void setRefreshed(boolean refreshed) { | ||
45 | + this.refreshed = refreshed; | ||
46 | + } | ||
47 | +} |
... | @@ -15,6 +15,7 @@ import ly.warp.sdk.io.models.LoyaltySDKFirebaseEventModel; | ... | @@ -15,6 +15,7 @@ import ly.warp.sdk.io.models.LoyaltySDKFirebaseEventModel; |
15 | import ly.warp.sdk.io.models.LoyaltySDKSessionExpiredEventModel; | 15 | import ly.warp.sdk.io.models.LoyaltySDKSessionExpiredEventModel; |
16 | import ly.warp.sdk.io.models.QuestionnaireEventModel; | 16 | import ly.warp.sdk.io.models.QuestionnaireEventModel; |
17 | import ly.warp.sdk.io.models.RefreshUnifiedCouponsEventModel; | 17 | import ly.warp.sdk.io.models.RefreshUnifiedCouponsEventModel; |
18 | +import ly.warp.sdk.io.models.RefreshVouchersEventModel; | ||
18 | import ly.warp.sdk.io.models.UnifiedCouponsEventModel; | 19 | import ly.warp.sdk.io.models.UnifiedCouponsEventModel; |
19 | import ly.warp.sdk.io.models.VouchersActivityEventModel; | 20 | import ly.warp.sdk.io.models.VouchersActivityEventModel; |
20 | import ly.warp.sdk.io.models.VouchersFetchedEventModel; | 21 | import ly.warp.sdk.io.models.VouchersFetchedEventModel; |
... | @@ -50,7 +51,7 @@ public class WarplyEventBusManager { | ... | @@ -50,7 +51,7 @@ public class WarplyEventBusManager { |
50 | private ActiveDFYCouponEventModel activeCoupon; | 51 | private ActiveDFYCouponEventModel activeCoupon; |
51 | private ContexualEventModel ccmsAdded; | 52 | private ContexualEventModel ccmsAdded; |
52 | private CouponsEventModel couponsAdded; | 53 | private CouponsEventModel couponsAdded; |
53 | - | 54 | + private RefreshVouchersEventModel vouchersRefreshed; |
54 | private UnifiedCouponsEventModel unifiedCouponsAdded; | 55 | private UnifiedCouponsEventModel unifiedCouponsAdded; |
55 | private RefreshUnifiedCouponsEventModel refreshUnifiedCouponsAdded; | 56 | private RefreshUnifiedCouponsEventModel refreshUnifiedCouponsAdded; |
56 | private LoyaltyEventModel campaignsAdded; | 57 | private LoyaltyEventModel campaignsAdded; |
... | @@ -80,6 +81,10 @@ public class WarplyEventBusManager { | ... | @@ -80,6 +81,10 @@ public class WarplyEventBusManager { |
80 | this.questionnaire = questionnaire; | 81 | this.questionnaire = questionnaire; |
81 | } | 82 | } |
82 | 83 | ||
84 | + public WarplyEventBusManager(RefreshVouchersEventModel vouchersRefreshed) { | ||
85 | + this.vouchersRefreshed = vouchersRefreshed; | ||
86 | + } | ||
87 | + | ||
83 | public WarplyEventBusManager(VouchersActivityEventModel vouchersActivity) { | 88 | public WarplyEventBusManager(VouchersActivityEventModel vouchersActivity) { |
84 | this.vouchersActivity = vouchersActivity; | 89 | this.vouchersActivity = vouchersActivity; |
85 | } | 90 | } |
... | @@ -309,4 +314,8 @@ public class WarplyEventBusManager { | ... | @@ -309,4 +314,8 @@ public class WarplyEventBusManager { |
309 | public VouchersServiceUnavailableEventModel getVouchersServiceUnavailableEventModel() { | 314 | public VouchersServiceUnavailableEventModel getVouchersServiceUnavailableEventModel() { |
310 | return serviceUnavailable; | 315 | return serviceUnavailable; |
311 | } | 316 | } |
317 | + | ||
318 | + public RefreshVouchersEventModel getRefreshVouchersEventModel() { | ||
319 | + return vouchersRefreshed; | ||
320 | + } | ||
312 | } | 321 | } | ... | ... |
... | @@ -92,6 +92,7 @@ import ly.warp.sdk.io.models.LoyaltySDKDynatraceEventModel; | ... | @@ -92,6 +92,7 @@ import ly.warp.sdk.io.models.LoyaltySDKDynatraceEventModel; |
92 | import ly.warp.sdk.io.models.LoyaltySDKFirebaseEventModel; | 92 | import ly.warp.sdk.io.models.LoyaltySDKFirebaseEventModel; |
93 | import ly.warp.sdk.io.models.QuestionnaireEventModel; | 93 | import ly.warp.sdk.io.models.QuestionnaireEventModel; |
94 | import ly.warp.sdk.io.models.RefreshUnifiedCouponsEventModel; | 94 | import ly.warp.sdk.io.models.RefreshUnifiedCouponsEventModel; |
95 | +import ly.warp.sdk.io.models.RefreshVouchersEventModel; | ||
95 | import ly.warp.sdk.io.models.WarplyCCMSEnabledModel; | 96 | import ly.warp.sdk.io.models.WarplyCCMSEnabledModel; |
96 | import ly.warp.sdk.io.models.WarplyPacingCardEventModel; | 97 | import ly.warp.sdk.io.models.WarplyPacingCardEventModel; |
97 | import ly.warp.sdk.io.models.WarplyPacingEventModel; | 98 | import ly.warp.sdk.io.models.WarplyPacingEventModel; |
... | @@ -486,6 +487,10 @@ public class WarpView extends WebView implements DefaultLifecycleObserver { | ... | @@ -486,6 +487,10 @@ public class WarpView extends WebView implements DefaultLifecycleObserver { |
486 | } else if (parts[1].equals("loyaltyWallet")) { | 487 | } else if (parts[1].equals("loyaltyWallet")) { |
487 | Intent intent = new Intent((WarpActivity != null && !WarpActivity.isFinishing()) ? WarpActivity : getContext(), LoyaltyWallet.class); | 488 | Intent intent = new Intent((WarpActivity != null && !WarpActivity.isFinishing()) ? WarpActivity : getContext(), LoyaltyWallet.class); |
488 | getContext().startActivity(intent); | 489 | getContext().startActivity(intent); |
490 | + | ||
491 | + RefreshVouchersEventModel vouchersRefreshed = new RefreshVouchersEventModel(); | ||
492 | + vouchersRefreshed.setRefreshed(true); | ||
493 | + EventBus.getDefault().post(new WarplyEventBusManager(vouchersRefreshed)); | ||
489 | } else if (parts[1].equals("ccmsRetrieved")) { | 494 | } else if (parts[1].equals("ccmsRetrieved")) { |
490 | WarplyCCMSEnabledModel ccmsEnabled = new WarplyCCMSEnabledModel(); | 495 | WarplyCCMSEnabledModel ccmsEnabled = new WarplyCCMSEnabledModel(); |
491 | ccmsEnabled.setActivated(true); | 496 | ccmsEnabled.setActivated(true); | ... | ... |
-
Please register or login to post a comment