Showing
10 changed files
with
80 additions
and
6 deletions
... | @@ -36,7 +36,7 @@ public class SplashActivity extends BaseActivity { | ... | @@ -36,7 +36,7 @@ public class SplashActivity extends BaseActivity { |
36 | public void onWarplyReady() { | 36 | public void onWarplyReady() { |
37 | if (!WarplyDBHelper.getInstance(SplashActivity.this).isTableNotEmpty("auth")) { | 37 | if (!WarplyDBHelper.getInstance(SplashActivity.this).isTableNotEmpty("auth")) { |
38 | WarplyManager.getCosmoteUser(new WarplyCosmoteUserRequest() | 38 | WarplyManager.getCosmoteUser(new WarplyCosmoteUserRequest() |
39 | - .setGuid("6005892749"), //6012049321, 6012049322, 6012049323, 7000000831 history, 7000000826, 7000000831 shared coupons, prod 6006552990, prod 6005892749, live 3000184910 | 39 | + .setGuid("6010490808"), //6012049321, 6012049322, 6012049323, 7000000831 history, 7000000826, 7000000831 shared coupons, prod 6006552990, prod 6005892749, live 3000184910 |
40 | mLoginReceiver); | 40 | mLoginReceiver); |
41 | } else { | 41 | } else { |
42 | startNextActivity(); | 42 | startNextActivity(); | ... | ... |
... | @@ -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.6rc36' | 5 | + PUBLISH_VERSION = '4.5.4.6rc37' |
6 | PUBLISH_ARTIFACT_ID = 'warply-android-sdk' | 6 | PUBLISH_ARTIFACT_ID = 'warply-android-sdk' |
7 | } | 7 | } |
8 | 8 | ... | ... |
... | @@ -298,6 +298,7 @@ public class LoyaltyAnalysisActivity extends Activity implements View.OnClickLis | ... | @@ -298,6 +298,7 @@ public class LoyaltyAnalysisActivity extends Activity implements View.OnClickLis |
298 | SharingCoupon newShCoupon = new SharingCoupon(); | 298 | SharingCoupon newShCoupon = new SharingCoupon(); |
299 | newShCoupon = shCoupon; | 299 | newShCoupon = shCoupon; |
300 | newShCoupon.setName(cpnset.getName()); | 300 | newShCoupon.setName(cpnset.getName()); |
301 | + newShCoupon.setFinal_price(cpnset.getFinal_price()); | ||
301 | mSharedCoupons.add(newShCoupon); | 302 | mSharedCoupons.add(newShCoupon); |
302 | break; | 303 | break; |
303 | } | 304 | } | ... | ... |
warply_android_sdk/src/main/java/ly/warp/sdk/io/models/LoyaltySDKSessionExpiredEventModel.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 | +/** | ||
29 | + * Created by Panagiotis Triantafyllou on 13-Jan-23. | ||
30 | + */ | ||
31 | + | ||
32 | +public class LoyaltySDKSessionExpiredEventModel { | ||
33 | + private boolean sessionExpired; | ||
34 | + | ||
35 | + public LoyaltySDKSessionExpiredEventModel() { | ||
36 | + this.sessionExpired = true; | ||
37 | + } | ||
38 | + | ||
39 | + public boolean isLoyaltySessionExpired() { | ||
40 | + return sessionExpired; | ||
41 | + } | ||
42 | + | ||
43 | + public void setLoyaltySessionExpired(boolean sessionExpired) { | ||
44 | + this.sessionExpired = sessionExpired; | ||
45 | + } | ||
46 | +} |
... | @@ -53,6 +53,7 @@ public class SharingCoupon implements Parcelable, Serializable { | ... | @@ -53,6 +53,7 @@ public class SharingCoupon implements Parcelable, Serializable { |
53 | private static final String COUPONSET_UUID = "couponset_uuid"; | 53 | private static final String COUPONSET_UUID = "couponset_uuid"; |
54 | private static final String NAME = "name"; | 54 | private static final String NAME = "name"; |
55 | private static final String MERCHANT_UUID = "merchant_uuid"; | 55 | private static final String MERCHANT_UUID = "merchant_uuid"; |
56 | + private static final String FINAL_PRICE = "final_price"; | ||
56 | 57 | ||
57 | /* Member variables of the Campaign object */ | 58 | /* Member variables of the Campaign object */ |
58 | 59 | ||
... | @@ -63,6 +64,7 @@ public class SharingCoupon implements Parcelable, Serializable { | ... | @@ -63,6 +64,7 @@ public class SharingCoupon implements Parcelable, Serializable { |
63 | private String couponsetUuid = ""; | 64 | private String couponsetUuid = ""; |
64 | private String name = ""; | 65 | private String name = ""; |
65 | private String merchantUuid = ""; | 66 | private String merchantUuid = ""; |
67 | + private double final_price = 0.0d; | ||
66 | 68 | ||
67 | /** | 69 | /** |
68 | * Basic constructor used to create an object from a String, representing a | 70 | * Basic constructor used to create an object from a String, representing a |
... | @@ -82,6 +84,7 @@ public class SharingCoupon implements Parcelable, Serializable { | ... | @@ -82,6 +84,7 @@ public class SharingCoupon implements Parcelable, Serializable { |
82 | this.date = ""; | 84 | this.date = ""; |
83 | this.couponsetUuid = ""; | 85 | this.couponsetUuid = ""; |
84 | this.name = ""; | 86 | this.name = ""; |
87 | + this.final_price = 0.0d; | ||
85 | } | 88 | } |
86 | 89 | ||
87 | /** | 90 | /** |
... | @@ -98,6 +101,7 @@ public class SharingCoupon implements Parcelable, Serializable { | ... | @@ -98,6 +101,7 @@ public class SharingCoupon implements Parcelable, Serializable { |
98 | this.transactionMetadata = json.optString(TRANSACTION_METADATA); | 101 | this.transactionMetadata = json.optString(TRANSACTION_METADATA); |
99 | this.name = json.optString(NAME); | 102 | this.name = json.optString(NAME); |
100 | this.merchantUuid = json.optString(MERCHANT_UUID); | 103 | this.merchantUuid = json.optString(MERCHANT_UUID); |
104 | + this.final_price = json.optDouble(FINAL_PRICE); | ||
101 | } | 105 | } |
102 | } | 106 | } |
103 | 107 | ||
... | @@ -109,6 +113,7 @@ public class SharingCoupon implements Parcelable, Serializable { | ... | @@ -109,6 +113,7 @@ public class SharingCoupon implements Parcelable, Serializable { |
109 | this.transactionMetadata = source.readString(); | 113 | this.transactionMetadata = source.readString(); |
110 | this.name = source.readString(); | 114 | this.name = source.readString(); |
111 | this.merchantUuid = source.readString(); | 115 | this.merchantUuid = source.readString(); |
116 | + this.final_price = source.readDouble(); | ||
112 | } | 117 | } |
113 | 118 | ||
114 | @Override | 119 | @Override |
... | @@ -120,6 +125,7 @@ public class SharingCoupon implements Parcelable, Serializable { | ... | @@ -120,6 +125,7 @@ public class SharingCoupon implements Parcelable, Serializable { |
120 | dest.writeString(this.transactionMetadata); | 125 | dest.writeString(this.transactionMetadata); |
121 | dest.writeString(this.name); | 126 | dest.writeString(this.name); |
122 | dest.writeString(this.merchantUuid); | 127 | dest.writeString(this.merchantUuid); |
128 | + dest.writeDouble(this.final_price); | ||
123 | } | 129 | } |
124 | 130 | ||
125 | /** | 131 | /** |
... | @@ -137,6 +143,7 @@ public class SharingCoupon implements Parcelable, Serializable { | ... | @@ -137,6 +143,7 @@ public class SharingCoupon implements Parcelable, Serializable { |
137 | jObj.putOpt(TRANSACTION_METADATA, this.transactionMetadata); | 143 | jObj.putOpt(TRANSACTION_METADATA, this.transactionMetadata); |
138 | jObj.putOpt(NAME, this.name); | 144 | jObj.putOpt(NAME, this.name); |
139 | jObj.putOpt(MERCHANT_UUID, this.merchantUuid); | 145 | jObj.putOpt(MERCHANT_UUID, this.merchantUuid); |
146 | + jObj.putOpt(FINAL_PRICE, this.final_price); | ||
140 | } catch (JSONException e) { | 147 | } catch (JSONException e) { |
141 | if (WarpConstants.DEBUG) { | 148 | if (WarpConstants.DEBUG) { |
142 | e.printStackTrace(); | 149 | e.printStackTrace(); |
... | @@ -232,6 +239,14 @@ public class SharingCoupon implements Parcelable, Serializable { | ... | @@ -232,6 +239,14 @@ public class SharingCoupon implements Parcelable, Serializable { |
232 | this.merchantUuid = merchantUuid; | 239 | this.merchantUuid = merchantUuid; |
233 | } | 240 | } |
234 | 241 | ||
242 | + public double getFinal_price() { | ||
243 | + return final_price; | ||
244 | + } | ||
245 | + | ||
246 | + public void setFinal_price(double final_price) { | ||
247 | + this.final_price = final_price; | ||
248 | + } | ||
249 | + | ||
235 | @Override | 250 | @Override |
236 | public int describeContents() { | 251 | public int describeContents() { |
237 | return 0; | 252 | return 0; | ... | ... |
... | @@ -12,6 +12,7 @@ import ly.warp.sdk.io.models.LoyaltyEventModel; | ... | @@ -12,6 +12,7 @@ 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.LoyaltySDKDynatraceEventModel; |
14 | import ly.warp.sdk.io.models.LoyaltySDKFirebaseEventModel; | 14 | import ly.warp.sdk.io.models.LoyaltySDKFirebaseEventModel; |
15 | +import ly.warp.sdk.io.models.LoyaltySDKSessionExpiredEventModel; | ||
15 | import ly.warp.sdk.io.models.QuestionnaireEventModel; | 16 | import ly.warp.sdk.io.models.QuestionnaireEventModel; |
16 | import ly.warp.sdk.io.models.WarplyCCMSEnabledModel; | 17 | import ly.warp.sdk.io.models.WarplyCCMSEnabledModel; |
17 | import ly.warp.sdk.io.models.WarplyCouponsChangedEventModel; | 18 | import ly.warp.sdk.io.models.WarplyCouponsChangedEventModel; |
... | @@ -43,6 +44,7 @@ public class WarplyEventBusManager { | ... | @@ -43,6 +44,7 @@ public class WarplyEventBusManager { |
43 | private HealthEventModel healthAdded; | 44 | private HealthEventModel healthAdded; |
44 | private WarplyCouponsChangedEventModel couponsChanged; | 45 | private WarplyCouponsChangedEventModel couponsChanged; |
45 | private WarplyPacingCardEventModel widgetChanged; | 46 | private WarplyPacingCardEventModel widgetChanged; |
47 | + private LoyaltySDKSessionExpiredEventModel sessionExpired; | ||
46 | 48 | ||
47 | public WarplyEventBusManager() { | 49 | public WarplyEventBusManager() { |
48 | 50 | ||
... | @@ -60,6 +62,10 @@ public class WarplyEventBusManager { | ... | @@ -60,6 +62,10 @@ public class WarplyEventBusManager { |
60 | this.ccmsAdded = ccmsAdded; | 62 | this.ccmsAdded = ccmsAdded; |
61 | } | 63 | } |
62 | 64 | ||
65 | + public WarplyEventBusManager (LoyaltySDKSessionExpiredEventModel sessionExpired) { | ||
66 | + this.sessionExpired = sessionExpired; | ||
67 | + } | ||
68 | + | ||
63 | public WarplyEventBusManager(CouponsEventModel couponsAdded) { | 69 | public WarplyEventBusManager(CouponsEventModel couponsAdded) { |
64 | this.couponsAdded = couponsAdded; | 70 | this.couponsAdded = couponsAdded; |
65 | } | 71 | } |
... | @@ -217,4 +223,8 @@ public class WarplyEventBusManager { | ... | @@ -217,4 +223,8 @@ public class WarplyEventBusManager { |
217 | public WarplyPacingCardEventModel getWidgetChanged() { | 223 | public WarplyPacingCardEventModel getWidgetChanged() { |
218 | return widgetChanged; | 224 | return widgetChanged; |
219 | } | 225 | } |
226 | + | ||
227 | + public LoyaltySDKSessionExpiredEventModel isLoyaltySessionExpired() { | ||
228 | + return sessionExpired; | ||
229 | + } | ||
220 | } | 230 | } | ... | ... |
This diff is collapsed. Click to expand it.
... | @@ -124,7 +124,8 @@ public class ExpiredCouponAdapter extends RecyclerView.Adapter<ExpiredCouponAdap | ... | @@ -124,7 +124,8 @@ public class ExpiredCouponAdapter extends RecyclerView.Adapter<ExpiredCouponAdap |
124 | simpleDateFormat = new SimpleDateFormat("dd/MM/yyyy"); | 124 | simpleDateFormat = new SimpleDateFormat("dd/MM/yyyy"); |
125 | holder.tvCouponDate.setText(simpleDateFormat.format(newDate != null ? newDate : "")); | 125 | holder.tvCouponDate.setText(simpleDateFormat.format(newDate != null ? newDate : "")); |
126 | 126 | ||
127 | - holder.tvCouponValue.setText(couponItem.getDiscount() + mContext.getResources().getString(R.string.euro)); | 127 | + String itemValue = String.format("%.02f", couponItem.getFinal_price()); |
128 | + holder.tvCouponValue.setText(itemValue + mContext.getResources().getString(R.string.euro)); | ||
128 | holder.itemView.setOnClickListener(v -> onClickSubject.onNext(couponItem)); | 129 | holder.itemView.setOnClickListener(v -> onClickSubject.onNext(couponItem)); |
129 | } | 130 | } |
130 | } | 131 | } | ... | ... |
... | @@ -144,7 +144,8 @@ public class SharedCouponAdapter extends RecyclerView.Adapter<SharedCouponAdapte | ... | @@ -144,7 +144,8 @@ public class SharedCouponAdapter extends RecyclerView.Adapter<SharedCouponAdapte |
144 | } | 144 | } |
145 | } | 145 | } |
146 | 146 | ||
147 | - holder.tvCouponValue.setText(couponItem.getDiscount() + mContext.getResources().getString(R.string.euro)); | 147 | + String itemValue = String.format("%.02f", couponItem.getFinal_price()); |
148 | + holder.tvCouponValue.setText(itemValue + mContext.getResources().getString(R.string.euro)); | ||
148 | holder.itemView.setOnClickListener(v -> onClickSubject.onNext(couponItem)); | 149 | holder.itemView.setOnClickListener(v -> onClickSubject.onNext(couponItem)); |
149 | } | 150 | } |
150 | } | 151 | } | ... | ... |
... | @@ -70,7 +70,7 @@ | ... | @@ -70,7 +70,7 @@ |
70 | <string name="cos_popup_gifts_title">COSMOTE GIFTS FOR YOU</string> | 70 | <string name="cos_popup_gifts_title">COSMOTE GIFTS FOR YOU</string> |
71 | <string name="cos_popup_gifts_subtitle">Σε αυτή την ενότητα βρίσκεις τα διαθέσιμα δώρα και επιβραβεύσεις αποκλειστικά για σένα!</string> | 71 | <string name="cos_popup_gifts_subtitle">Σε αυτή την ενότητα βρίσκεις τα διαθέσιμα δώρα και επιβραβεύσεις αποκλειστικά για σένα!</string> |
72 | <string name="cos_mycoupon_date">Το κουπόνι ισχύει έως %1$s</string> | 72 | <string name="cos_mycoupon_date">Το κουπόνι ισχύει έως %1$s</string> |
73 | - <string name="cos_gift_it">Kάνε δώρο</string> | 73 | + <string name="cos_gift_it">Δώρισε το</string> |
74 | <string name="cos_popup_more_title">COSMOTE MORE FOR YOU</string> | 74 | <string name="cos_popup_more_title">COSMOTE MORE FOR YOU</string> |
75 | <string name="cos_popup_more_subtitle">Σε αυτή την ενότητα βρες έρευνες, παιχνίδια, διαγωνισμούς και επιβραβεύσεις για τις αθλητικές σου δραστηριότητες!</string> | 75 | <string name="cos_popup_more_subtitle">Σε αυτή την ενότητα βρες έρευνες, παιχνίδια, διαγωνισμούς και επιβραβεύσεις για τις αθλητικές σου δραστηριότητες!</string> |
76 | <string name="cos_deals_win_title">Μέχρι τώρα έχεις κερδίσει %1$s€ σε προσφορές από %2$s κουπόνια!</string> | 76 | <string name="cos_deals_win_title">Μέχρι τώρα έχεις κερδίσει %1$s€ σε προσφορές από %2$s κουπόνια!</string> |
... | @@ -95,7 +95,7 @@ | ... | @@ -95,7 +95,7 @@ |
95 | <string name="cos_shops">Δες τα καταστήματα</string> | 95 | <string name="cos_shops">Δες τα καταστήματα</string> |
96 | <string name="cos_website">Δες το eshop</string> | 96 | <string name="cos_website">Δες το eshop</string> |
97 | <string name="cos_coupon_shops_title">Καταστήματα</string> | 97 | <string name="cos_coupon_shops_title">Καταστήματα</string> |
98 | - <string name="cos_coupon_gift">Kάνε δώρο</string> | 98 | + <string name="cos_coupon_gift">Δώρισε το</string> |
99 | <string name="cos_coupon_share_gift_title">Επίλεξε το κινητό από το οποίο θα γίνει η αποστολή και συμπλήρωσε το COSMOTE κινητό που θα λάβει το δώρο.</string> | 99 | <string name="cos_coupon_share_gift_title">Επίλεξε το κινητό από το οποίο θα γίνει η αποστολή και συμπλήρωσε το COSMOTE κινητό που θα λάβει το δώρο.</string> |
100 | <string name="cos_coupon_share_sender">Αποστολέας</string> | 100 | <string name="cos_coupon_share_sender">Αποστολέας</string> |
101 | <string name="cos_coupon_share_hint">Καταχώρηση τηλεφώνου</string> | 101 | <string name="cos_coupon_share_hint">Καταχώρηση τηλεφώνου</string> | ... | ... |
-
Please register or login to post a comment