Toggle navigation
Toggle navigation
This project
Loading...
Sign in
open-source
/
warply_android_sdk_maven_plugin
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
Panagiotis Triantafyllou
2024-01-22 11:27:27 +0200
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
d43c4a7b57ef9321b740774337bfcb1fec73578c
d43c4a7b
1 parent
d8bcf086
added vouchers refreshed event
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
63 additions
and
2 deletions
warply_android_sdk/build.gradle
warply_android_sdk/src/main/java/ly/warp/sdk/io/models/RefreshVouchersEventModel.java
warply_android_sdk/src/main/java/ly/warp/sdk/utils/managers/WarplyEventBusManager.java
warply_android_sdk/src/main/java/ly/warp/sdk/views/WarpView.java
warply_android_sdk/build.gradle
View file @
d43c4a7
...
...
@@ -2,7 +2,7 @@ apply plugin: 'com.android.library'
ext
{
PUBLISH_GROUP_ID
=
'ly.warp'
PUBLISH_VERSION
=
'4.5.5.4r
6
'
PUBLISH_VERSION
=
'4.5.5.4r
7
'
PUBLISH_ARTIFACT_ID
=
'warply-android-sdk'
}
...
...
warply_android_sdk/src/main/java/ly/warp/sdk/io/models/RefreshVouchersEventModel.java
0 → 100644
View file @
d43c4a7
/*
* Copyright 2010-2013 Warply Ltd. All rights reserved.
*
* Redistribution and use in source and binary forms, without modification, are
* permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE WARPLY LTD ``AS IS'' AND ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
* EVENT SHALL WARPLY LTD OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
* OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package
ly
.
warp
.
sdk
.
io
.
models
;
/**
* Created by Panagiotis Triantafyllou on 22-Jan-24.
*/
public
class
RefreshVouchersEventModel
{
private
boolean
refreshed
;
public
RefreshVouchersEventModel
()
{
this
.
refreshed
=
true
;
}
public
boolean
isRefreshed
()
{
return
refreshed
;
}
public
void
setRefreshed
(
boolean
refreshed
)
{
this
.
refreshed
=
refreshed
;
}
}
warply_android_sdk/src/main/java/ly/warp/sdk/utils/managers/WarplyEventBusManager.java
View file @
d43c4a7
...
...
@@ -15,6 +15,7 @@ import ly.warp.sdk.io.models.LoyaltySDKFirebaseEventModel;
import
ly.warp.sdk.io.models.LoyaltySDKSessionExpiredEventModel
;
import
ly.warp.sdk.io.models.QuestionnaireEventModel
;
import
ly.warp.sdk.io.models.RefreshUnifiedCouponsEventModel
;
import
ly.warp.sdk.io.models.RefreshVouchersEventModel
;
import
ly.warp.sdk.io.models.UnifiedCouponsEventModel
;
import
ly.warp.sdk.io.models.VouchersActivityEventModel
;
import
ly.warp.sdk.io.models.VouchersFetchedEventModel
;
...
...
@@ -50,7 +51,7 @@ public class WarplyEventBusManager {
private
ActiveDFYCouponEventModel
activeCoupon
;
private
ContexualEventModel
ccmsAdded
;
private
CouponsEventModel
couponsAdded
;
private
RefreshVouchersEventModel
vouchersRefreshed
;
private
UnifiedCouponsEventModel
unifiedCouponsAdded
;
private
RefreshUnifiedCouponsEventModel
refreshUnifiedCouponsAdded
;
private
LoyaltyEventModel
campaignsAdded
;
...
...
@@ -80,6 +81,10 @@ public class WarplyEventBusManager {
this
.
questionnaire
=
questionnaire
;
}
public
WarplyEventBusManager
(
RefreshVouchersEventModel
vouchersRefreshed
)
{
this
.
vouchersRefreshed
=
vouchersRefreshed
;
}
public
WarplyEventBusManager
(
VouchersActivityEventModel
vouchersActivity
)
{
this
.
vouchersActivity
=
vouchersActivity
;
}
...
...
@@ -309,4 +314,8 @@ public class WarplyEventBusManager {
public
VouchersServiceUnavailableEventModel
getVouchersServiceUnavailableEventModel
()
{
return
serviceUnavailable
;
}
public
RefreshVouchersEventModel
getRefreshVouchersEventModel
()
{
return
vouchersRefreshed
;
}
}
...
...
warply_android_sdk/src/main/java/ly/warp/sdk/views/WarpView.java
View file @
d43c4a7
...
...
@@ -92,6 +92,7 @@ import ly.warp.sdk.io.models.LoyaltySDKDynatraceEventModel;
import
ly.warp.sdk.io.models.LoyaltySDKFirebaseEventModel
;
import
ly.warp.sdk.io.models.QuestionnaireEventModel
;
import
ly.warp.sdk.io.models.RefreshUnifiedCouponsEventModel
;
import
ly.warp.sdk.io.models.RefreshVouchersEventModel
;
import
ly.warp.sdk.io.models.WarplyCCMSEnabledModel
;
import
ly.warp.sdk.io.models.WarplyPacingCardEventModel
;
import
ly.warp.sdk.io.models.WarplyPacingEventModel
;
...
...
@@ -486,6 +487,10 @@ public class WarpView extends WebView implements DefaultLifecycleObserver {
}
else
if
(
parts
[
1
].
equals
(
"loyaltyWallet"
))
{
Intent
intent
=
new
Intent
((
WarpActivity
!=
null
&&
!
WarpActivity
.
isFinishing
())
?
WarpActivity
:
getContext
(),
LoyaltyWallet
.
class
);
getContext
().
startActivity
(
intent
);
RefreshVouchersEventModel
vouchersRefreshed
=
new
RefreshVouchersEventModel
();
vouchersRefreshed
.
setRefreshed
(
true
);
EventBus
.
getDefault
().
post
(
new
WarplyEventBusManager
(
vouchersRefreshed
));
}
else
if
(
parts
[
1
].
equals
(
"ccmsRetrieved"
))
{
WarplyCCMSEnabledModel
ccmsEnabled
=
new
WarplyCCMSEnabledModel
();
ccmsEnabled
.
setActivated
(
true
);
...
...
Please
register
or
login
to post a comment