Panagiotis Triantafyllou

sm pass fixes

...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
4 <component name="GradleSettings"> 4 <component name="GradleSettings">
5 <option name="linkedExternalProjectsSettings"> 5 <option name="linkedExternalProjectsSettings">
6 <GradleProjectSettings> 6 <GradleProjectSettings>
7 + <option name="testRunner" value="CHOOSE_PER_TEST" />
7 <option name="externalProjectPath" value="$PROJECT_DIR$" /> 8 <option name="externalProjectPath" value="$PROJECT_DIR$" />
8 <option name="gradleHome" value="$PROJECT_DIR$/../../../../../../gradle-6.6.1" /> 9 <option name="gradleHome" value="$PROJECT_DIR$/../../../../../../gradle-6.6.1" />
9 <option name="gradleJvm" value="#GRADLE_LOCAL_JAVA_HOME" /> 10 <option name="gradleJvm" value="#GRADLE_LOCAL_JAVA_HOME" />
......
1 +<?xml version="1.0" encoding="UTF-8"?>
2 +<project version="4">
3 + <component name="RunConfigurationProducerService">
4 + <option name="ignoredProducers">
5 + <set>
6 + <option value="com.intellij.execution.junit.AbstractAllInDirectoryConfigurationProducer" />
7 + <option value="com.intellij.execution.junit.AllInPackageConfigurationProducer" />
8 + <option value="com.intellij.execution.junit.PatternConfigurationProducer" />
9 + <option value="com.intellij.execution.junit.TestInClassConfigurationProducer" />
10 + <option value="com.intellij.execution.junit.UniqueIdConfigurationProducer" />
11 + <option value="com.intellij.execution.junit.testDiscovery.JUnitTestDiscoveryConfigurationProducer" />
12 + <option value="org.jetbrains.kotlin.idea.junit.KotlinJUnitRunConfigurationProducer" />
13 + <option value="org.jetbrains.kotlin.idea.junit.KotlinPatternConfigurationProducer" />
14 + </set>
15 + </option>
16 + </component>
17 +</project>
...\ No newline at end of file ...\ No newline at end of file
...@@ -5,7 +5,7 @@ android.buildFeatures.buildConfig = true ...@@ -5,7 +5,7 @@ android.buildFeatures.buildConfig = true
5 5
6 ext { 6 ext {
7 PUBLISH_GROUP_ID = 'ly.warp' 7 PUBLISH_GROUP_ID = 'ly.warp'
8 - PUBLISH_VERSION = '4.5.5.4r46' 8 + PUBLISH_VERSION = '4.5.5.4r47'
9 PUBLISH_ARTIFACT_ID = 'warply-android-sdk' 9 PUBLISH_ARTIFACT_ID = 'warply-android-sdk'
10 } 10 }
11 11
......
...@@ -27,7 +27,6 @@ import ly.warp.sdk.io.callbacks.CallbackReceiver; ...@@ -27,7 +27,6 @@ import ly.warp.sdk.io.callbacks.CallbackReceiver;
27 import ly.warp.sdk.io.models.Campaign; 27 import ly.warp.sdk.io.models.Campaign;
28 import ly.warp.sdk.io.models.CouponList; 28 import ly.warp.sdk.io.models.CouponList;
29 import ly.warp.sdk.io.models.MarketPassDetailsModel; 29 import ly.warp.sdk.io.models.MarketPassDetailsModel;
30 -import ly.warp.sdk.io.models.UnifiedCoupon;
31 import ly.warp.sdk.utils.managers.WarplyManager; 30 import ly.warp.sdk.utils.managers.WarplyManager;
32 31
33 public class BaseFragmentActivity extends FragmentActivity implements NavigationBarView.OnItemSelectedListener { 32 public class BaseFragmentActivity extends FragmentActivity implements NavigationBarView.OnItemSelectedListener {
...@@ -58,7 +57,6 @@ public class BaseFragmentActivity extends FragmentActivity implements Navigation ...@@ -58,7 +57,6 @@ public class BaseFragmentActivity extends FragmentActivity implements Navigation
58 if (WarplyDBHelper.getInstance(this).isTableNotEmpty("auth")) { 57 if (WarplyDBHelper.getInstance(this).isTableNotEmpty("auth")) {
59 WarplyManager.getUserCouponsWithCouponsets(mUserCouponsReceiver); 58 WarplyManager.getUserCouponsWithCouponsets(mUserCouponsReceiver);
60 WarplyManager.getCampaigns(mCampaignsCallback); 59 WarplyManager.getCampaigns(mCampaignsCallback);
61 - WarplyManager.getUnifiedCouponsDeals(mUnifiedCallback);
62 WarplyManager.getMarketPassDetails(mMarketPassDetailsCallback); 60 WarplyManager.getMarketPassDetails(mMarketPassDetailsCallback);
63 } 61 }
64 62
...@@ -182,18 +180,6 @@ public class BaseFragmentActivity extends FragmentActivity implements Navigation ...@@ -182,18 +180,6 @@ public class BaseFragmentActivity extends FragmentActivity implements Navigation
182 } 180 }
183 }; 181 };
184 182
185 - private final CallbackReceiver<ArrayList<UnifiedCoupon>> mUnifiedCallback = new CallbackReceiver<ArrayList<UnifiedCoupon>>() {
186 - @Override
187 - public void onSuccess(ArrayList<UnifiedCoupon> result) {
188 - Toast.makeText(BaseFragmentActivity.this, "Unified Coupons Success " + String.valueOf(result.size()), Toast.LENGTH_SHORT).show();
189 - }
190 -
191 - @Override
192 - public void onFailure(int errorCode) {
193 - Toast.makeText(BaseFragmentActivity.this, "Unified Coupons Error", Toast.LENGTH_SHORT).show();
194 - }
195 - };
196 -
197 private final CallbackReceiver<MarketPassDetailsModel> mMarketPassDetailsCallback = new CallbackReceiver<MarketPassDetailsModel>() { 183 private final CallbackReceiver<MarketPassDetailsModel> mMarketPassDetailsCallback = new CallbackReceiver<MarketPassDetailsModel>() {
198 @Override 184 @Override
199 public void onSuccess(MarketPassDetailsModel result) { 185 public void onSuccess(MarketPassDetailsModel result) {
......
...@@ -253,21 +253,19 @@ public class LoyaltyHistoryActivity extends Activity implements View.OnClickList ...@@ -253,21 +253,19 @@ public class LoyaltyHistoryActivity extends Activity implements View.OnClickList
253 /** First Banner */ 253 /** First Banner */
254 254
255 /** Second Expandable Banner */ 255 /** Second Expandable Banner */
256 - if (WarplyManagerHelper.getMarketCoupons() != null && WarplyManagerHelper.getMarketCoupons().size() > 0) { 256 + if (WarplyManagerHelper.getCouponRedeemedList() != null && !WarplyManagerHelper.getCouponRedeemedList().isEmpty()) {
257 countValue = 0.0f; 257 countValue = 0.0f;
258 258
259 - if (WarplyManagerHelper.getCouponRedeemedList().size() > 0) { 259 + for (Coupon cou : WarplyManagerHelper.getCouponRedeemedList()) {
260 - for (Coupon cou : WarplyManagerHelper.getCouponRedeemedList()) { 260 + if (cou.getCouponsetDetails().getCouponsetType().equals("supermarket")) {
261 - if (cou.getCouponsetDetails().getCouponsetType().equals("supermarket")) { 261 + countValue += Float.parseFloat(cou.getDiscount());
262 - countValue += Float.parseFloat(cou.getDiscount()); 262 + cou.setDescription(cou.getCouponsetDetails().getShortDescription());
263 - cou.setDescription(cou.getCouponsetDetails().getShortDescription()); 263 + cou.setImage(cou.getCouponsetDetails().getImgPreview());
264 - cou.setImage(cou.getCouponsetDetails().getImgPreview()); 264 + cou.setName(cou.getCouponsetDetails().getName());
265 - cou.setName(cou.getCouponsetDetails().getName()); 265 + cou.setMerchantUuid(cou.getCouponsetDetails().getMerchantUuid());
266 - cou.setMerchantUuid(cou.getCouponsetDetails().getMerchantUuid()); 266 + cou.setInnerText(cou.getCouponsetDetails().getInnerText());
267 - cou.setInnerText(cou.getCouponsetDetails().getInnerText()); 267 + cou.setDiscount_type(cou.getCouponsetDetails().getDiscount_type());
268 - cou.setDiscount_type(cou.getCouponsetDetails().getDiscount_type()); 268 + cou.setFinal_price(cou.getCouponsetDetails().getFinal_price());
269 - cou.setFinal_price(cou.getCouponsetDetails().getFinal_price());
270 - }
271 } 269 }
272 } 270 }
273 271
......
...@@ -34,12 +34,10 @@ import ly.warp.sdk.io.models.CustomTypefaceSpan; ...@@ -34,12 +34,10 @@ import ly.warp.sdk.io.models.CustomTypefaceSpan;
34 import ly.warp.sdk.io.models.LoyaltySDKFirebaseEventModel; 34 import ly.warp.sdk.io.models.LoyaltySDKFirebaseEventModel;
35 import ly.warp.sdk.io.models.SharingCoupon; 35 import ly.warp.sdk.io.models.SharingCoupon;
36 import ly.warp.sdk.io.models.SharingList; 36 import ly.warp.sdk.io.models.SharingList;
37 -import ly.warp.sdk.io.request.WarplySharingHistoryRequest;
38 import ly.warp.sdk.utils.WarpUtils; 37 import ly.warp.sdk.utils.WarpUtils;
39 import ly.warp.sdk.utils.WarplyManagerHelper; 38 import ly.warp.sdk.utils.WarplyManagerHelper;
40 import ly.warp.sdk.utils.managers.WarplyAnalyticsManager; 39 import ly.warp.sdk.utils.managers.WarplyAnalyticsManager;
41 import ly.warp.sdk.utils.managers.WarplyEventBusManager; 40 import ly.warp.sdk.utils.managers.WarplyEventBusManager;
42 -import ly.warp.sdk.utils.managers.WarplyManager;
43 import ly.warp.sdk.views.adapters.ExpiredCouponAdapter; 41 import ly.warp.sdk.views.adapters.ExpiredCouponAdapter;
44 import ly.warp.sdk.views.adapters.SharedCouponAdapter; 42 import ly.warp.sdk.views.adapters.SharedCouponAdapter;
45 43
...@@ -99,28 +97,16 @@ public class LoyaltyMarketAnalysisActivity extends Activity implements View.OnCl ...@@ -99,28 +97,16 @@ public class LoyaltyMarketAnalysisActivity extends Activity implements View.OnCl
99 mFontSharedMore); 97 mFontSharedMore);
100 98
101 99
102 - if (WarplyManagerHelper.getMarketCoupons() != null && WarplyManagerHelper.getMarketCoupons().size() > 0) { 100 + if (WarplyManagerHelper.getCouponRedeemedList() != null && !WarplyManagerHelper.getCouponRedeemedList().isEmpty()) {
103 final ExecutorService executor = Executors.newFixedThreadPool(1); 101 final ExecutorService executor = Executors.newFixedThreadPool(1);
104 executor.submit(() -> { 102 executor.submit(() -> {
105 -// for (UnifiedCoupon unicoupon : WarplyManagerHelper.getMarketCoupons()) { 103 + for (Coupon cou : WarplyManagerHelper.getCouponRedeemedList()) {
106 -// if (unicoupon.getCoupons() != null && unicoupon.getCoupons().size() > 0) { 104 + if (cou.getCouponsetDetails().getCouponsetType().equals("supermarket")) {
107 -// for (Coupon inncoupon : unicoupon.getCoupons()) { 105 + countValue += Float.valueOf(cou.getDiscount());
108 -// if (inncoupon.getStatus() == 0) { 106 + mExpiredMarketCoupons.add(cou);
109 -// countValue += Float.valueOf(inncoupon.getDiscount());
110 -// mExpiredMarketCoupons.add(inncoupon);
111 -// }
112 -// }
113 -// }
114 -// }
115 -
116 - if (WarplyManagerHelper.getCouponRedeemedList().size() > 0) {
117 - for (Coupon cou : WarplyManagerHelper.getCouponRedeemedList()) {
118 - if (cou.getCouponsetDetails().getCouponsetType().equals("supermarket")) {
119 - countValue += Float.valueOf(cou.getDiscount());
120 - mExpiredMarketCoupons.add(cou);
121 - }
122 } 107 }
123 } 108 }
109 +
124 Collections.sort(mExpiredMarketCoupons, (coupon1, coupon2) -> coupon2.getChangesDates().optString("redeemed").compareTo(coupon1.getChangesDates().optString("redeemed"))); 110 Collections.sort(mExpiredMarketCoupons, (coupon1, coupon2) -> coupon2.getChangesDates().optString("redeemed").compareTo(coupon1.getChangesDates().optString("redeemed")));
125 new Handler(Looper.getMainLooper()).post(this::initViews); 111 new Handler(Looper.getMainLooper()).post(this::initViews);
126 executor.shutdownNow(); 112 executor.shutdownNow();
......
...@@ -28,7 +28,6 @@ import ly.warp.sdk.io.callbacks.CallbackReceiver; ...@@ -28,7 +28,6 @@ import ly.warp.sdk.io.callbacks.CallbackReceiver;
28 import ly.warp.sdk.io.models.Campaign; 28 import ly.warp.sdk.io.models.Campaign;
29 import ly.warp.sdk.io.models.CouponList; 29 import ly.warp.sdk.io.models.CouponList;
30 import ly.warp.sdk.io.models.MarketPassDetailsModel; 30 import ly.warp.sdk.io.models.MarketPassDetailsModel;
31 -import ly.warp.sdk.io.models.UnifiedCoupon;
32 import ly.warp.sdk.utils.WarpJSONParser; 31 import ly.warp.sdk.utils.WarpJSONParser;
33 import ly.warp.sdk.utils.WarplyManagerHelper; 32 import ly.warp.sdk.utils.WarplyManagerHelper;
34 import ly.warp.sdk.utils.managers.WarplyManager; 33 import ly.warp.sdk.utils.managers.WarplyManager;
...@@ -128,7 +127,6 @@ public class HomeFragment extends Fragment implements View.OnClickListener, Swip ...@@ -128,7 +127,6 @@ public class HomeFragment extends Fragment implements View.OnClickListener, Swip
128 if (WarplyDBHelper.getInstance(getActivity()).isTableNotEmpty("auth")) { 127 if (WarplyDBHelper.getInstance(getActivity()).isTableNotEmpty("auth")) {
129 WarplyManager.getUserCouponsWithCouponsets(mUserCouponsReceiver); 128 WarplyManager.getUserCouponsWithCouponsets(mUserCouponsReceiver);
130 WarplyManager.getCampaigns(mCampaignsCallback); 129 WarplyManager.getCampaigns(mCampaignsCallback);
131 - WarplyManager.getUnifiedCouponsDeals(mUnifiedCallback);
132 WarplyManager.getMarketPassDetails(mMarketPassDetailsCallback); 130 WarplyManager.getMarketPassDetails(mMarketPassDetailsCallback);
133 mSwipeRefresh.setRefreshing(false); 131 mSwipeRefresh.setRefreshing(false);
134 } else { 132 } else {
...@@ -191,18 +189,6 @@ public class HomeFragment extends Fragment implements View.OnClickListener, Swip ...@@ -191,18 +189,6 @@ public class HomeFragment extends Fragment implements View.OnClickListener, Swip
191 } 189 }
192 }; 190 };
193 191
194 - private final CallbackReceiver<ArrayList<UnifiedCoupon>> mUnifiedCallback = new CallbackReceiver<ArrayList<UnifiedCoupon>>() {
195 - @Override
196 - public void onSuccess(ArrayList<UnifiedCoupon> result) {
197 - Toast.makeText(getActivity(), "Unified Coupons Success " + String.valueOf(result.size()), Toast.LENGTH_SHORT).show();
198 - }
199 -
200 - @Override
201 - public void onFailure(int errorCode) {
202 - Toast.makeText(getActivity(), "Unified Coupons Error", Toast.LENGTH_SHORT).show();
203 - }
204 - };
205 -
206 private final CallbackReceiver<JSONObject> mLogoutReceiver = new CallbackReceiver<JSONObject>() { 192 private final CallbackReceiver<JSONObject> mLogoutReceiver = new CallbackReceiver<JSONObject>() {
207 @Override 193 @Override
208 public void onSuccess(JSONObject result) { 194 public void onSuccess(JSONObject result) {
...@@ -240,7 +226,6 @@ public class HomeFragment extends Fragment implements View.OnClickListener, Swip ...@@ -240,7 +226,6 @@ public class HomeFragment extends Fragment implements View.OnClickListener, Swip
240 226
241 WarplyManager.getUserCouponsWithCouponsets(mUserCouponsReceiver); 227 WarplyManager.getUserCouponsWithCouponsets(mUserCouponsReceiver);
242 WarplyManager.getCampaigns(mCampaignsCallback); 228 WarplyManager.getCampaigns(mCampaignsCallback);
243 - WarplyManager.getUnifiedCouponsDeals(mUnifiedCallback);
244 WarplyManager.getMarketPassDetails(mMarketPassDetailsCallback); 229 WarplyManager.getMarketPassDetails(mMarketPassDetailsCallback);
245 } 230 }
246 231
......
...@@ -191,7 +191,7 @@ ...@@ -191,7 +191,7 @@
191 <string name="cos_market_ab_subtitle">1. Eνεργοποίησε τον κωδικό στην κάρτα ΑΒ PLUS στο kiosk του καταστήματος ή μέσω eshop / app στην ενοτητα στην ενότητα Συνεργασίες – SUPERMARKET DEALS.\n\n2. Κάνε τις αγορές σου και κέρδισε απευθείας έκπτωση με χρήση της AB PLUS από τα διαθέσιμα κουπόνια.</string> 191 <string name="cos_market_ab_subtitle">1. Eνεργοποίησε τον κωδικό στην κάρτα ΑΒ PLUS στο kiosk του καταστήματος ή μέσω eshop / app στην ενοτητα στην ενότητα Συνεργασίες – SUPERMARKET DEALS.\n\n2. Κάνε τις αγορές σου και κέρδισε απευθείας έκπτωση με χρήση της AB PLUS από τα διαθέσιμα κουπόνια.</string>
192 <string name="cos_market_pass_title">SUPERMARKET DEALS CARD</string> 192 <string name="cos_market_pass_title">SUPERMARKET DEALS CARD</string>
193 <string name="cos_market_pass_subtitle">Χρησιμοποίησε τον κωδικό σου και κέρδισε έκπτωση στις αγορές σου!</string> 193 <string name="cos_market_pass_subtitle">Χρησιμοποίησε τον κωδικό σου και κέρδισε έκπτωση στις αγορές σου!</string>
194 - <string name="cos_market_pass_return">Επιστροφή στο Supermarket Deals</string> 194 + <string name="cos_market_pass_return">Επιστροφή</string>
195 <string name="cos_market_pass_coupons_title">Έχεις κουπόνια συνολικής αξίας %1$s€</string> 195 <string name="cos_market_pass_coupons_title">Έχεις κουπόνια συνολικής αξίας %1$s€</string>
196 <string name="cos_market_subtitle">Δημιούργησε το δικό σου ενιαίο κουπόνι προσφορών, και εξαργύρωσέ το στα supermarket της επιλογής σου γρήγορα και εύκολα με ένα μόνο κωδικό κουπονιού!</string> 196 <string name="cos_market_subtitle">Δημιούργησε το δικό σου ενιαίο κουπόνι προσφορών, και εξαργύρωσέ το στα supermarket της επιλογής σου γρήγορα και εύκολα με ένα μόνο κωδικό κουπονιού!</string>
197 <string name="cos_market_close">Τέλος</string> 197 <string name="cos_market_close">Τέλος</string>
......