Panagiotis Triantafyllou

new models, new version

......@@ -2,7 +2,7 @@ apply plugin: 'com.android.library'
ext {
PUBLISH_GROUP_ID = 'ly.warp'
PUBLISH_VERSION = '4.5.4-cosbeta7'
PUBLISH_VERSION = '4.5.4-cosbeta8'
PUBLISH_ARTIFACT_ID = 'warply-android-sdk'
}
......
/*
* 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 25-May-22.
*/
public class LoyaltySDKFirebaseEventModel {
private String eventName;
private HashMap<String, String> parameters;
public LoyaltySDKFirebaseEventModel() {
this.eventName = "";
this.parameters = new HashMap();
}
public String getEventName() {
return eventName;
}
public void setEventName(String eventName) {
this.eventName = 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;
import android.os.Parcel;
import android.os.Parcelable;
import org.json.JSONException;
import org.json.JSONObject;
import java.io.Serializable;
import java.util.ArrayList;
import ly.warp.sdk.utils.WarpUtils;
import ly.warp.sdk.utils.constants.WarpConstants;
/**
* Created by Panagiotis Triantafyllou on 25-May-22.
*/
public class WarplyPacingModel {
// [
// {
// type: 'Tree',
// data: {
// year: {
// emmision: '',
// distance: '',
// consumption: '',
// liters: '',
// emmisionSaving: '',
// treeSum: ''
// },
// month: {
// emmision: '',
// distance: '',
// consumption: '',
// liters: '',
// emmisionSaving: '',
// treeSum: ''
// },
// week: {
// emmision: '',
// distance: '',
// consumption: '',
// liters: '',
// emmisionSaving: '',
// treeSum: ''
// },
// day: {
// emmision: '',
// distance: '',
// consumption: '',
// liters: '',
// emmisionSaving: '',
// treeSum: ''
// }
// }
// }
//]
private double tree_co2_year;
private double tree_co2_month;
private double tree_co2_week;
private double tree_co2_day;
private double car_distance_year;
private double car_distance_month;
private double car_distance_week;
private double car_distance_day;
private double car_consumption_year;
private double car_consumption_month;
private double car_consumption_week;
private double car_consumption_day;
private double car_co2_year;
private double car_co2_month;
private double car_co2_week;
private double car_co2_day;
private double walking_distance_year;
private double walking_distance_month;
private double walking_distance_week;
private double walking_distance_day;
private double liters_saved_year;
private double liters_saved_month;
private double liters_saved_week;
private double liters_saved_day;
private double co2_saved_year;
private double co2_saved_month;
private double co2_saved_week;
private double co2_saved_day;
public WarplyPacingModel() {
this.tree_co2_year = 0.0d;
this.tree_co2_month = 0.0d;
this.tree_co2_week = 0.0d;
this.tree_co2_day = 0.0d;
this.car_distance_year = 0.0d;
this.car_distance_month = 0.0d;
this.car_distance_week = 0.0d;
this.car_distance_day = 0.0d;
this.car_consumption_year = 0.0d;
this.car_consumption_month = 0.0d;
this.car_consumption_week = 0.0d;
this.car_consumption_day = 0.0d;
this.car_co2_year = 0.0d;
this.car_co2_month = 0.0d;
this.car_co2_week = 0.0d;
this.car_co2_day = 0.0d;
this.walking_distance_year = 0.0d;
this.walking_distance_month = 0.0d;
this.walking_distance_week = 0.0d;
this.walking_distance_day = 0.0d;
this.liters_saved_year = 0.0d;
this.liters_saved_month = 0.0d;
this.liters_saved_week = 0.0d;
this.liters_saved_day = 0.0d;
this.co2_saved_year = 0.0d;
this.co2_saved_month = 0.0d;
this.co2_saved_week = 0.0d;
this.co2_saved_day = 0.0d;
}
public double getTree_co2_year() {
return tree_co2_year;
}
public void setTree_co2_year(double tree_co2_year) {
this.tree_co2_year = tree_co2_year;
}
public double getTree_co2_month() {
return tree_co2_month;
}
public void setTree_co2_month(double tree_co2_month) {
this.tree_co2_month = tree_co2_month;
}
public double getTree_co2_week() {
return tree_co2_week;
}
public void setTree_co2_week(double tree_co2_week) {
this.tree_co2_week = tree_co2_week;
}
public double getTree_co2_day() {
return tree_co2_day;
}
public void setTree_co2_day(double tree_co2_day) {
this.tree_co2_day = tree_co2_day;
}
public double getCar_distance_year() {
return car_distance_year;
}
public void setCar_distance_year(double car_distance_year) {
this.car_distance_year = car_distance_year;
}
public double getCar_distance_month() {
return car_distance_month;
}
public void setCar_distance_month(double car_distance_month) {
this.car_distance_month = car_distance_month;
}
public double getCar_distance_week() {
return car_distance_week;
}
public void setCar_distance_week(double car_distance_week) {
this.car_distance_week = car_distance_week;
}
public double getCar_distance_day() {
return car_distance_day;
}
public void setCar_distance_day(double car_distance_day) {
this.car_distance_day = car_distance_day;
}
public double getCar_consumption_year() {
return car_consumption_year;
}
public void setCar_consumption_year(double car_consumption_year) {
this.car_consumption_year = car_consumption_year;
}
public double getCar_consumption_month() {
return car_consumption_month;
}
public void setCar_consumption_month(double car_consumption_month) {
this.car_consumption_month = car_consumption_month;
}
public double getCar_consumption_week() {
return car_consumption_week;
}
public void setCar_consumption_week(double car_consumption_week) {
this.car_consumption_week = car_consumption_week;
}
public double getCar_consumption_day() {
return car_consumption_day;
}
public void setCar_consumption_day(double car_consumption_day) {
this.car_consumption_day = car_consumption_day;
}
public double getCar_co2_year() {
return car_co2_year;
}
public void setCar_co2_year(double car_co2_year) {
this.car_co2_year = car_co2_year;
}
public double getCar_co2_month() {
return car_co2_month;
}
public void setCar_co2_month(double car_co2_month) {
this.car_co2_month = car_co2_month;
}
public double getCar_co2_week() {
return car_co2_week;
}
public void setCar_co2_week(double car_co2_week) {
this.car_co2_week = car_co2_week;
}
public double getCar_co2_day() {
return car_co2_day;
}
public void setCar_co2_day(double car_co2_day) {
this.car_co2_day = car_co2_day;
}
public double getWalking_distance_year() {
return walking_distance_year;
}
public void setWalking_distance_year(double walking_distance_year) {
this.walking_distance_year = walking_distance_year;
}
public double getWalking_distance_month() {
return walking_distance_month;
}
public void setWalking_distance_month(double walking_distance_month) {
this.walking_distance_month = walking_distance_month;
}
public double getWalking_distance_week() {
return walking_distance_week;
}
public void setWalking_distance_week(double walking_distance_week) {
this.walking_distance_week = walking_distance_week;
}
public double getWalking_distance_day() {
return walking_distance_day;
}
public void setWalking_distance_day(double walking_distance_day) {
this.walking_distance_day = walking_distance_day;
}
public double getLiters_saved_year() {
return liters_saved_year;
}
public void setLiters_saved_year(double liters_saved_year) {
this.liters_saved_year = liters_saved_year;
}
public double getLiters_saved_month() {
return liters_saved_month;
}
public void setLiters_saved_month(double liters_saved_month) {
this.liters_saved_month = liters_saved_month;
}
public double getLiters_saved_week() {
return liters_saved_week;
}
public void setLiters_saved_week(double liters_saved_week) {
this.liters_saved_week = liters_saved_week;
}
public double getLiters_saved_day() {
return liters_saved_day;
}
public void setLiters_saved_day(double liters_saved_day) {
this.liters_saved_day = liters_saved_day;
}
public double getCo2_saved_year() {
return co2_saved_year;
}
public void setCo2_saved_year(double co2_saved_year) {
this.co2_saved_year = co2_saved_year;
}
public double getCo2_saved_month() {
return co2_saved_month;
}
public void setCo2_saved_month(double co2_saved_month) {
this.co2_saved_month = co2_saved_month;
}
public double getCo2_saved_week() {
return co2_saved_week;
}
public void setCo2_saved_week(double co2_saved_week) {
this.co2_saved_week = co2_saved_week;
}
public double getCo2_saved_day() {
return co2_saved_day;
}
public void setCo2_saved_day(double co2_saved_day) {
this.co2_saved_day = co2_saved_day;
}
}
......@@ -84,6 +84,10 @@ public class WarplyManagerHelper {
return url;
}
public static String constructCcmsUrl(LoyaltyContextualOfferModel item) {
return /*url*/ "";
}
// public static CampaignList mergeCCMS(ArrayList<LoyaltyContextualOfferModel> ccmslist, CampaignList clist) {
// CampaignList mergedList = clist;
// for (LoyaltyContextualOfferModel element : ccmslist) {
......
package ly.warp.sdk.utils.managers;
import ly.warp.sdk.io.models.LoyaltyContextualOfferModel;
import ly.warp.sdk.io.models.LoyaltySDKFirebaseEventModel;
/**
* Created by Panagiotis Triantafyllou on 26/Απρ/2022.
*/
public class WarplyEventBusManager {
private String eventName;
private LoyaltySDKFirebaseEventModel fireEvent;
private LoyaltyContextualOfferModel ccms;
public WarplyEventBusManager(String eventName) {
this.eventName = eventName;
}
public WarplyEventBusManager(LoyaltySDKFirebaseEventModel fireEvent) {
this.fireEvent = fireEvent;
}
public WarplyEventBusManager(LoyaltyContextualOfferModel ccms) {
this.ccms = ccms;
}
}
......