Panagiotis Triantafyllou

additions, new version

......@@ -2,7 +2,7 @@ apply plugin: 'com.android.library'
ext {
PUBLISH_GROUP_ID = 'ly.warp'
PUBLISH_VERSION = '4.5.4-cosbeta9'
PUBLISH_VERSION = '4.5.4-cosbeta10'
PUBLISH_ARTIFACT_ID = 'warply-android-sdk'
}
......
package ly.warp.sdk.activities;
import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;
import ly.warp.sdk.R;
public class LoyaltyAnalysisActivity extends Activity implements View.OnClickListener {
// ===========================================================
// Constants
// ===========================================================
// ===========================================================
// Fields
// ===========================================================
private ImageView mIvBack;
// ===========================================================
// Methods for/from SuperClass/Interfaces
// ===========================================================
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_loyalty_analysis);
mIvBack = findViewById(R.id.iv_loyalty_analysis_close);
initViews();
}
@Override
public void onResume() {
super.onResume();
}
@Override
public void onClick(View view) {
if (view.getId() == R.id.iv_loyalty_analysis_close) {
onBackPressed();
}
}
// ===========================================================
// Methods
// ===========================================================
private void initViews() {
mIvBack.setOnClickListener(this);
}
// ===========================================================
// Inner and Anonymous Classes
// ===========================================================
}
package ly.warp.sdk.io.models;
import java.util.ArrayList;
/**
* Created by Panagiotis Triantafyllou on 08/Ιουν/2022.
*/
public class CustomerStateModel {
private boolean nonTelco = false;
private boolean acceptedConsent = false;
public CustomerStateModel() {
this.nonTelco = false;
this.acceptedConsent = false;
}
public boolean isNonTelco() {
return nonTelco;
}
public void setNonTelco(boolean nonTelco) {
this.nonTelco = nonTelco;
}
public boolean isAcceptedConsent() {
return acceptedConsent;
}
public void setAcceptedConsent(boolean acceptedConsent) {
this.acceptedConsent = acceptedConsent;
}
}
......@@ -12,6 +12,21 @@ public class LoyaltyContextualOfferModel {
private String id;
private String businessAdditionalId;
private String treatmentCode;
private String offerName;
private String productType;
private String provDuration;
private String noOfRecurrance;
private String price;
private String discount;
private String voiceCategory;
private String dataCategory;
private String minsValue;
private String dataValue;
private String provStepValueMins;
private String postpayProduct;
private String notificationMessage;
private String loyaltyCampaignId;
public LoyaltyContextualOfferModel() {
this.sessionId = "";
......@@ -19,37 +34,171 @@ public class LoyaltyContextualOfferModel {
this.id = "";
this.businessAdditionalId = "";
this.treatmentCode = "";
this.offerName = "";
this.productType = "";
this.provDuration = "";
this.noOfRecurrance = "";
this.price = "";
this.discount = "";
this.voiceCategory = "";
this.dataCategory = "";
this.minsValue = "";
this.dataValue = "";
this.provStepValueMins = "";
this.postpayProduct = "";
this.notificationMessage = "";
this.loyaltyCampaignId = "";
}
public String getSessionId() {
return sessionId;
}
public ArrayList<String> getEligibleAssets() {
return eligibleAssets;
}
public String getId() {
return id;
}
public void setSessionId(String sessionId) {
this.sessionId = sessionId;
}
public ArrayList<String> getEligibleAssets() {
return eligibleAssets;
}
public void setEligibleAssets(ArrayList<String> eligibleAssets) {
this.eligibleAssets = eligibleAssets;
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getBusinessAdditionalId() {
return businessAdditionalId;
}
public void setBusinessAdditionalId(String businessAdditionalId) {
this.businessAdditionalId = businessAdditionalId;
}
public String getTreatmentCode() {
return treatmentCode;
}
public void setTreatmentCode(String treatmentCode) {
this.treatmentCode = treatmentCode;
}
public String getOfferName() {
return offerName;
}
public void setOfferName(String offerName) {
this.offerName = offerName;
}
public String getProductType() {
return productType;
}
public void setProductType(String productType) {
this.productType = productType;
}
public String getProvDuration() {
return provDuration;
}
public void setProvDuration(String provDuration) {
this.provDuration = provDuration;
}
public String getNoOfRecurrance() {
return noOfRecurrance;
}
public void setNoOfRecurrance(String noOfRecurrance) {
this.noOfRecurrance = noOfRecurrance;
}
public String getPrice() {
return price;
}
public void setPrice(String price) {
this.price = price;
}
public String getDiscount() {
return discount;
}
public void setDiscount(String discount) {
this.discount = discount;
}
public String getVoiceCategory() {
return voiceCategory;
}
public void setVoiceCategory(String voiceCategory) {
this.voiceCategory = voiceCategory;
}
public String getDataCategory() {
return dataCategory;
}
public void setDataCategory(String dataCategory) {
this.dataCategory = dataCategory;
}
public String getMinsValue() {
return minsValue;
}
public void setMinsValue(String minsValue) {
this.minsValue = minsValue;
}
public String getDataValue() {
return dataValue;
}
public void setDataValue(String dataValue) {
this.dataValue = dataValue;
}
public String getProvStepValueMins() {
return provStepValueMins;
}
public void setProvStepValueMins(String provStepValueMins) {
this.provStepValueMins = provStepValueMins;
}
public String getPostpayProduct() {
return postpayProduct;
}
public void setPostpayProduct(String postpayProduct) {
this.postpayProduct = postpayProduct;
}
public String getNotificationMessage() {
return notificationMessage;
}
public void setNotificationMessage(String notificationMessage) {
this.notificationMessage = notificationMessage;
}
public String getLoyaltyCampaignId() {
return loyaltyCampaignId;
}
public void setLoyaltyCampaignId(String loyaltyCampaignId) {
this.loyaltyCampaignId = loyaltyCampaignId;
}
}
......
/*
* 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;
import java.util.HashMap;
/**
* Created by Panagiotis Triantafyllou on 08-June-22.
*/
public class LoyaltySDKDeeplinkEventModel {
private String deeplinkUrl;
private HashMap<String, String> parameters;
public LoyaltySDKDeeplinkEventModel() {
this.deeplinkUrl = "";
this.parameters = new HashMap();
}
public String getDeeplinkUrl() {
return deeplinkUrl;
}
public void setDeeplinkUrl(String eventName) {
this.deeplinkUrl = eventName;
}
public HashMap<String, String> getParameters() {
return parameters;
}
public void setParameter(String key, String value) {
this.parameters.put(key, value);
}
}
/*
* 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 10-June-22.
*/
public class WarplyCCMSEnabledModel {
private boolean isActivated = false;
public WarplyCCMSEnabledModel() {
this.isActivated = false;
}
public boolean isActivated() {
return isActivated;
}
public void setActivated(boolean activated) {
isActivated = activated;
}
}
/*
* 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 10-June-22.
*/
public class WarplyDealsAnalysisEventModel {
private boolean isPressed = false;
public WarplyDealsAnalysisEventModel() {
this.isPressed = false;
}
public boolean isPressed() {
return isPressed;
}
public void setPressed(boolean pressed) {
isPressed = pressed;
}
}
/*
* 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 10-June-22.
*/
public class WarplyPacingCardEventModel {
private boolean isVisible = false;
public WarplyPacingCardEventModel() {
this.isVisible = false;
}
public boolean isVisible() {
return isVisible;
}
public void setVisible(boolean visible) {
isVisible = visible;
}
}
/*
* 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 10-June-22.
*/
public class WarplyPacingCardServiceEnabledModel {
private boolean isEnabled = false;
public WarplyPacingCardServiceEnabledModel() {
this.isEnabled = false;
}
public boolean isEnabled() {
return isEnabled;
}
public void setEnabled(boolean enabled) {
isEnabled = enabled;
}
}
......@@ -35,6 +35,7 @@ import ly.warp.sdk.io.models.CampaignList;
import ly.warp.sdk.io.models.Consumer;
import ly.warp.sdk.io.models.CouponList;
import ly.warp.sdk.io.models.CouponsetsList;
import ly.warp.sdk.io.models.CustomerStateModel;
import ly.warp.sdk.io.models.LoyaltyContextualOfferModel;
/**
......@@ -64,6 +65,9 @@ public class WarplyManagerHelper {
// Methods
// ===========================================================
/**
* Open Warply campaign
*/
public static String constructCampaignUrl(Campaign item) {
item.setNew(false);
String url = item.getIndexUrl()
......@@ -84,6 +88,9 @@ public class WarplyManagerHelper {
return url;
}
/**
* Open CCMS campaign
*/
public static String constructCcmsUrl(LoyaltyContextualOfferModel item) {
return /*url*/ "";
}
......@@ -97,6 +104,23 @@ public class WarplyManagerHelper {
// return mergedList;
// }
/**
* Open Questionnaire
*/
public static void openQuestionnaire() {
}
/**
* Save if customer is nonTelco and if he/she has accepted the consents
*/
public static void loadCustomerState(CustomerStateModel customerState) {
//TODO: write code to save the parameter
}
/**
* Get user badge tag
*/
public static String getUserTag() {
return "traveller"; //TODO: change in production with actual code
}
......@@ -105,14 +129,23 @@ public class WarplyManagerHelper {
}
/**
* Set the List with active D4Y coupons
*/
public static void setActiveDFYCoupons(ArrayList<String> codes) {
}
/**
* Get the List with active D4Y coupons
*/
public static ArrayList<String> getActiveDFYCoupons() {
return new ArrayList<>();
}
/**
* Set the List with CCMS Campaigns
*/
public static void setCCMSLoyaltyCampaigns(ArrayList<LoyaltyContextualOfferModel> list) {
}
......
......@@ -5,7 +5,10 @@ import java.util.HashMap;
import ly.warp.sdk.io.models.LoyaltyContextualOfferModel;
import ly.warp.sdk.io.models.LoyaltyGiftsForYouOfferClickEvent;
import ly.warp.sdk.io.models.LoyaltySDKFirebaseEventModel;
import ly.warp.sdk.io.request.WarplyEditAddressRequest;
import ly.warp.sdk.io.models.WarplyCCMSEnabledModel;
import ly.warp.sdk.io.models.WarplyDealsAnalysisEventModel;
import ly.warp.sdk.io.models.WarplyPacingCardEventModel;
import ly.warp.sdk.io.models.WarplyPacingCardServiceEnabledModel;
/**
* Created by Panagiotis Triantafyllou on 26/Απρ/2022.
......@@ -15,6 +18,10 @@ public class WarplyEventBusManager {
private LoyaltySDKFirebaseEventModel fireEvent;
private LoyaltyContextualOfferModel ccms;
protected HashMap<String, Object> mWarplyEventBusManager = new HashMap();
private WarplyPacingCardEventModel pacingCard;
private WarplyPacingCardServiceEnabledModel pacingService;
private WarplyDealsAnalysisEventModel dealsAnalysis;
private WarplyCCMSEnabledModel ccmsActivated;
public WarplyEventBusManager() {
......@@ -28,6 +35,22 @@ public class WarplyEventBusManager {
this.fireEvent = fireEvent;
}
public WarplyEventBusManager(WarplyPacingCardEventModel pacingCard) {
this.pacingCard = pacingCard;
}
public WarplyEventBusManager(WarplyPacingCardServiceEnabledModel pacingService) {
this.pacingService = pacingService;
}
public WarplyEventBusManager(WarplyDealsAnalysisEventModel dealsAnalysis) {
this.dealsAnalysis = dealsAnalysis;
}
public WarplyEventBusManager(WarplyCCMSEnabledModel ccmsActivated) {
this.ccmsActivated = ccmsActivated;
}
public WarplyEventBusManager(LoyaltyContextualOfferModel ccms) {
this.ccms = ccms;
}
......
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/cl_bill_payment"
android:layout_width="match_parent"
android:layout_height="match_parent">
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/cl_bill_header"
android:layout_width="match_parent"
android:layout_height="80dp"
app:layout_constraintTop_toTopOf="parent"
android:background="@android:color/white">
<ImageView
android:id="@+id/iv_loyalty_analysis_close"
android:layout_width="21dp"
android:layout_height="20dp"
android:layout_marginStart="24dp"
android:layout_marginTop="4dp"
android:src="@drawable/ic_back"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"/>
<TextView
android:id="@+id/textView3"
android:layout_width="206dp"
android:layout_height="32dp"
android:gravity="center"
android:text="@string/cos_loyalty_analysis"
android:textColor="@color/grey"
android:textSize="17sp"
android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
</RelativeLayout>
\ No newline at end of file
......@@ -23,7 +23,7 @@
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Steps"
android:text="Steps for Good"
android:textColor="@color/grey"
android:textSize="17sp"
android:textStyle="bold"
......
......@@ -72,6 +72,7 @@
<string name="cos_gifts_banner_title">Δώρα:</string>
<string name="cos_see_more">Δες περισσότερα</string>
<string name="cos_active_gifts_title">Ενεργά δώρα</string>
<string name="cos_loyalty_analysis">Ανάλυση συναλλαγών</string>
<string-array name="coupons_array">
<item>Κουπόνια</item>
......