Panagiotis Triantafyllou

new additions and minor fixes

......@@ -42,7 +42,7 @@ public class SplashActivity extends BaseActivity {
// );
WarplyManager.getCosmoteUser(new WarplyCosmoteUserRequest()
.setGuid("6012049321"), //6012049321, 6012049322
.setGuid("6012049323"), //6012049321, 6012049322, 6012049323
mLoginReceiver);
// WarplyManager.verifyTicket(new WarplyVerifyTicketRequest()
......
......@@ -2,7 +2,7 @@ apply plugin: 'com.android.library'
ext {
PUBLISH_GROUP_ID = 'ly.warp'
PUBLISH_VERSION = '4.5.4-cosbeta37i'
PUBLISH_VERSION = '4.5.4-cosbeta37'
PUBLISH_ARTIFACT_ID = 'warply-android-sdk'
}
......
......@@ -995,7 +995,7 @@ public enum Warply {
try {
JSONObject extraFields = WarpJSONParser.getJSONFromString(camp.getExtraFields());
if (extraFields != null) {
if (extraFields.length() == 0 || !extraFields.has("ccms_offer")) {
if (extraFields.length() == 0 || !(extraFields.has("ccms_offer") || extraFields.has("type"))) {
campaignLoyaltyList.add(camp);
}
}
......
......@@ -27,8 +27,10 @@ import ly.warp.sdk.io.callbacks.CallbackReceiver;
import ly.warp.sdk.io.models.Campaign;
import ly.warp.sdk.io.models.Consumer;
import ly.warp.sdk.io.models.LoyaltyContextualOfferModel;
import ly.warp.sdk.io.request.CosmotePostEventRequest;
import ly.warp.sdk.io.request.CosmoteSubmitOrderRequest;
import ly.warp.sdk.io.request.WarplyConsumerRequest;
import ly.warp.sdk.utils.WarpUtils;
import ly.warp.sdk.utils.managers.WarplyManager;
......@@ -247,6 +249,26 @@ public class TelcoActivity extends Activity implements View.OnClickListener {
else
errorActivatingDialog();
});
if (status == 1) {
new Thread(() -> {
if (!Thread.currentThread().isInterrupted()) {
WarplyManager.postEvent(new CosmotePostEventRequest()
.setCommunicationUuid(mLoyalty.getSessionUUID())
.setUserMsisdn(mSender)
.setOfferAudienceLevel(mCCMS.getOfferAudienceLevel())
.setUACIOfferTrackingCode(mCCMS.getUACIOfferTrackingCode())
.setOfferCode1(mCCMS.getOfferCode1())
.setScore(mCCMS.getScore())
.setZone(mCCMS.getZone())
.setWave(mCCMS.getWave())
.setValidity(mCCMS.getValidity())
.setTreatmentCode(mCCMS.getTreatmentCode()),
mPostCallback);
}
Thread.currentThread().interrupt();
}).start();
}
}
@Override
......@@ -254,4 +276,17 @@ public class TelcoActivity extends Activity implements View.OnClickListener {
runOnUiThread(() -> errorActivatingDialog());
}
};
private CallbackReceiver<JSONObject> mPostCallback = new CallbackReceiver<JSONObject>() {
@Override
public void onSuccess(JSONObject result) {
Thread.currentThread().interrupt();
}
@Override
public void onFailure(int errorCode) {
WarpUtils.log("POST_EVENT_ERROR " + String.valueOf(errorCode));
Thread.currentThread().interrupt();
}
};
}
......
package ly.warp.sdk.io.request;
import android.util.Base64;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import java.io.UnsupportedEncodingException;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.util.HashMap;
import ly.warp.sdk.utils.constants.WarpConstants;
/**
* Created by Panagiotis Triantafyllou on 19-July-22.
*/
public class CosmotePostEventRequest {
// ===========================================================
// Constants
// ===========================================================
private final String KEY_MAPP = "consumer_data";
private final String KEY_ACTION = "action";
private final String KEY_ACTION_VALUE = "integration";
private final String KEY_METHOD = "method";
private final String KEY_METHOD_VALUE = "postEvent";
private final String KEY_DATA = "data";
private final String KEY_PARAMETERS = "parameters";
// ===========================================================
// Fields
// ===========================================================
private HashMap<String, String> mFilters;
private long mCacheUpdateInterval = 0;
private String mUserMsisdn = "";
private String mCommunicationUuid = "";
private String mOfferAudienceLevel = "";
private String mUACIOfferTrackingCode = "";
private String mOfferCode1 = "";
private String mScore = "";
private String mZone = "";
private String mWave = "";
private String mValidity = "";
private String mTreatmentCode = "";
// ===========================================================
// Constructor
// ===========================================================
/**
* Default constructor of WarplyConsumerRequest, initializes an empty filters HashMap
*/
public CosmotePostEventRequest() {
mFilters = new HashMap<>();
}
public CosmotePostEventRequest(CosmotePostEventRequest copy) {
if (copy != null) {
this.mFilters = copy.mFilters;
this.mCacheUpdateInterval = copy.mCacheUpdateInterval;
}
}
// ===========================================================
// Methods for/from SuperClass/Interfaces
// ===========================================================
@Override
public boolean equals(Object object) {
if (object instanceof CosmotePostEventRequest) {
CosmotePostEventRequest other = (CosmotePostEventRequest) object;
return other == this || (this.mFilters == other.mFilters || (this.mFilters != null && this.mFilters.equals(other.mFilters)));
}
return false;
}
@Override
public int hashCode() {
return mFilters.hashCode();
}
// ===========================================================
// Methods
// ===========================================================
// ===========================================================
// Getter & Setter
// ===========================================================
public CosmotePostEventRequest setCommunicationUuid(String communicationUuid) {
this.mCommunicationUuid = communicationUuid;
return this;
}
public CosmotePostEventRequest setUserMsisdn(String userMsisdn) {
this.mUserMsisdn = userMsisdn;
return this;
}
public CosmotePostEventRequest setOfferAudienceLevel(String offerAudienceLevel) {
this.mOfferAudienceLevel = offerAudienceLevel;
return this;
}
public CosmotePostEventRequest setUACIOfferTrackingCode(String uaciOfferTrackingCode) {
this.mUACIOfferTrackingCode = uaciOfferTrackingCode;
return this;
}
public CosmotePostEventRequest setOfferCode1(String offerCode1) {
this.mOfferCode1 = offerCode1;
return this;
}
public CosmotePostEventRequest setScore(String score) {
this.mScore = score;
return this;
}
public CosmotePostEventRequest setZone(String zone) {
this.mZone = zone;
return this;
}
public CosmotePostEventRequest setWave(String wave) {
this.mWave = wave;
return this;
}
public CosmotePostEventRequest setValidity(String validity) {
this.mValidity = validity;
return this;
}
public CosmotePostEventRequest setTreatmentCode(String treatmentCode) {
this.mTreatmentCode = treatmentCode;
return this;
}
/**
* Call this to get how often the cached data will be updated.
*
* @return mCacheUpdateInterval
*/
public long getCacheUpdateInterval() {
return mCacheUpdateInterval;
}
/**
* Call this to set how often the cached data will be updated.
*
* @param updateInterval The time that data will be cached
* @return WarplyConsumerRequest
*/
public CosmotePostEventRequest setCacheUpdateInterval(long updateInterval) {
this.mCacheUpdateInterval = updateInterval;
if (mCacheUpdateInterval < 0) {
mCacheUpdateInterval = 0;
}
return this;
}
/**
* Call this to check if the Application uses Cache
*
* @return <p>true - the Application is using Cache</p>
* <p>false - the Application is not using Cache</p>
*/
public boolean isUseCache() {
return mCacheUpdateInterval > 0;
}
/**
* Call this to check whether the cached data need to be updated
*
* @param useCache <p>true - the Application is using Cache</p>
* <p>false - the Application is not using Cache</p>
* @return WarplyConsumerRequest
*/
public CosmotePostEventRequest setUseCache(boolean useCache) {
if (useCache) {
mCacheUpdateInterval = mCacheUpdateInterval > 0 ? mCacheUpdateInterval
: WarpConstants.INBOX_UPDATE_INTERVAL;
} else {
mCacheUpdateInterval = 0;
}
return this;
}
/**
* Call this to build the offers Json object
*
* @return bodyJsonObject
*/
public JSONObject toJson() {
JSONObject bodyJsonObject = new JSONObject();
try {
JSONObject extraJson = new JSONObject();
extraJson.putOpt(KEY_ACTION, KEY_ACTION_VALUE);
extraJson.putOpt(KEY_METHOD, KEY_METHOD_VALUE);
JSONObject data = new JSONObject();
data.putOpt("InteractiveChannel", "COSMOTE_OMNI");
data.putOpt("InteractionPoint", "COSMOTE_APP_GIFTS4U");
data.putOpt("Session_ID", mCommunicationUuid);
data.putOpt("OfferAudienceLevel", mOfferAudienceLevel);
data.putOpt("MSISDN", mOfferAudienceLevel.equals("msisdn") ? mUserMsisdn : "");
data.putOpt("GUID", "");
JSONArray parameters = new JSONArray();
JSONObject param1 = new JSONObject();
param1.putOpt("Name", "UACIOfferTrackingCode");
param1.putOpt("Value", mUACIOfferTrackingCode);
param1.putOpt("Type", "string");
parameters.put(param1);
JSONObject param2 = new JSONObject();
param2.putOpt("Name", "UACICustomLoggerTableName");
param2.putOpt("Value", "VW_WHITELIST");
param2.putOpt("Type", "string");
parameters.put(param2);
JSONObject param3 = new JSONObject();
param3.putOpt("Name", "MSISDN");
param3.putOpt("Value", mUserMsisdn);
param3.putOpt("Type", "string");
parameters.put(param3);
JSONObject param4 = new JSONObject();
param4.putOpt("Name", "OFFERCODE1");
param4.putOpt("Value", mOfferCode1);
param4.putOpt("Type", "string");
parameters.put(param4);
JSONObject param5 = new JSONObject();
param5.putOpt("Name", "SCORE");
param5.putOpt("Value", mScore);
param5.putOpt("Type", "numeric");
parameters.put(param5);
JSONObject param6 = new JSONObject();
param6.putOpt("Name", "PREDICATE");
param6.putOpt("Value", "0");
param6.putOpt("Type", "string");
parameters.put(param6);
JSONObject param7 = new JSONObject();
param7.putOpt("Name", "ZONE");
param7.putOpt("Value", mZone);
param7.putOpt("Type", "string");
parameters.put(param7);
JSONObject param8 = new JSONObject();
param8.putOpt("Name", "APPLICATIONNAME");
param8.putOpt("Value", "COSMOTE_APP_GIFTS4U");
param8.putOpt("Type", "string");
parameters.put(param8);
JSONObject param9 = new JSONObject();
param9.putOpt("Name", "Session_ID");
param9.putOpt("Value", mCommunicationUuid);
param9.putOpt("Type", "string");
parameters.put(param9);
JSONObject param10 = new JSONObject();
param10.putOpt("Name", "CAMPAIGN_CODE");
param10.putOpt("Value", "MCC_00006");
param10.putOpt("Type", "string");
parameters.put(param10);
JSONObject param11 = new JSONObject();
param11.putOpt("Name", "CAMPAIGN_TYPE");
param11.putOpt("Value", "Inbound");
param11.putOpt("Type", "string");
parameters.put(param11);
JSONObject param12 = new JSONObject();
param12.putOpt("Name", "UACIResponseTypeCode");
param12.putOpt("Value", "CON");
param12.putOpt("Type", "string");
parameters.put(param12);
JSONObject param13 = new JSONObject();
param13.putOpt("Name", "CHANNEL");
param13.putOpt("Value", "ONE_APP");
param13.putOpt("Type", "string");
parameters.put(param13);
JSONObject param14 = new JSONObject();
param14.putOpt("Name", "WAVE");
param14.putOpt("Value", mWave);
param14.putOpt("Type", "string");
parameters.put(param14);
JSONObject param15 = new JSONObject();
param15.putOpt("Name", "RESPONSECHANNEL");
param15.putOpt("Value", "ONE_APP");
param15.putOpt("Type", "string");
parameters.put(param15);
JSONObject param16 = new JSONObject();
param16.putOpt("Name", "VALIDITY");
param16.putOpt("Value", mValidity);
param16.putOpt("Type", "numeric");
parameters.put(param16);
JSONObject param17 = new JSONObject();
param17.putOpt("Name", "TREATMENT_CODE");
param17.putOpt("Value", mTreatmentCode);
param17.putOpt("Type", "string");
parameters.put(param17);
JSONObject param18 = new JSONObject();
param18.putOpt("Name", "EventName");
param18.putOpt("Value", "INTEREST_P");
param18.putOpt("Type", "string");
parameters.put(param18);
data.putOpt(KEY_PARAMETERS, parameters);
extraJson.putOpt(KEY_DATA, data);
bodyJsonObject.putOpt(KEY_MAPP, extraJson);
} catch (JSONException e) {
if (WarpConstants.DEBUG)
e.printStackTrace();
}
return bodyJsonObject;
}
public String getSignature() {
String signature = mFilters != null && mFilters.size() > 0 ? String.valueOf(mFilters.hashCode()) : "default_consumer_request";
try {
byte[] hash = MessageDigest.getInstance("SHA-256").digest(signature.getBytes("UTF-8"));
signature = Base64.encodeToString(hash, Base64.NO_WRAP);
} catch (NullPointerException | NoSuchAlgorithmException
| UnsupportedEncodingException e) {
e.printStackTrace();
}
return signature;
}
}
......@@ -632,7 +632,7 @@ public class WarplyManagerHelper {
try {
JSONObject extraFields = WarpJSONParser.getJSONFromString(camp.getExtraFields());
if (extraFields != null) {
if (extraFields.length() == 0 || !extraFields.has("ccms_offer")) {
if (extraFields.length() == 0 || !(extraFields.has("ccms_offer") || extraFields.has("type"))) {
mCampaignList.add(camp);
}
}
......
......@@ -74,6 +74,7 @@ import ly.warp.sdk.io.models.TagsCategoriesList;
import ly.warp.sdk.io.models.TagsList;
import ly.warp.sdk.io.models.TransactionsList;
import ly.warp.sdk.io.request.CosmoteCouponSharingRequest;
import ly.warp.sdk.io.request.CosmotePostEventRequest;
import ly.warp.sdk.io.request.CosmoteRetrieveSharingRequest;
import ly.warp.sdk.io.request.CosmoteSharingRequest;
import ly.warp.sdk.io.request.CosmoteSubmitOrderRequest;
......@@ -1376,7 +1377,7 @@ public class WarplyManager {
try {
JSONObject extraFields = WarpJSONParser.getJSONFromString(camp.getExtraFields());
if (extraFields != null) {
if (extraFields.length() == 0 || !extraFields.has("ccms_offer")) {
if (extraFields.length() == 0 || !(extraFields.has("ccms_offer") || extraFields.has("type"))) {
campaignLoyaltyList.add(camp);
}
}
......@@ -1384,514 +1385,514 @@ public class WarplyManager {
campaignLoyaltyList.add(camp);
}
}
WarplyManagerHelper.setCampaignList(/*mNewCampaignList*/campaignLoyaltyList);
ArrayList<LoyaltyContextualOfferModel> list = new ArrayList<>();
JSONArray jArray = null;
try {
jArray = new JSONArray("[\n" +
" {\n" +
" \"UACIOfferTrackingCode\": \"5166.e07.fffffffffa10663a.ffffffffda30c76a\",\n" +
" \"businessAdditionalId\": \"\",\n" +
" \"dataCategory\": \"Data\",\n" +
" \"dataValue\": \"None\",\n" +
" \"discount\": \"None\",\n" +
" \"eligibleAssets\": [\n" +
" \"306945218770\",\n" +
" \"306944333488\",\n" +
" \"306932222490\",\n" +
" \"306996824010\",\n" +
" \"306972713201\",\n" +
" \"306942496252\",\n" +
" \"306977316716\",\n" +
" \"306945433100\",\n" +
" \"306977403986\",\n" +
" \"306936581495\",\n" +
" \"306980689662\",\n" +
" \"306970101490\",\n" +
" \"306973396329\",\n" +
" \"306972577064\",\n" +
" \"306974923219\",\n" +
" \"306977513761\",\n" +
" \"306984220987\",\n" +
" \"306979949205\",\n" +
" \"306943134127\",\n" +
" \"306970437794\",\n" +
" \"306932535319\",\n" +
" \"306974063133\",\n" +
" \"306932520323\",\n" +
" \"306978733823\",\n" +
" \"306985995420\",\n" +
" \"306983879555\",\n" +
" ],\n" +
" \"id\": \"000003590\",\n" +
" \"loyaltyCampaignId\": \"NA\",\n" +
" \"minsValue\": \"None\",\n" +
" \"noOfRecurrance\": \"None\",\n" +
" \"notificationMessage\": \"None\",\n" +
" \"offerAudienceLevel\": \"msisdn\",\n" +
" \"offerCode1\": \"000003590\",\n" +
" \"offerName\": \"CCMS loyalty white label\",\n" +
" \"price\": \"None\",\n" +
" \"productType\": \"White Label\",\n" +
" \"provDuration\": \"0.0\",\n" +
" \"provStepValueMins\": \"None\",\n" +
" \"score\": \"50\",\n" +
" \"treatmentCode\": \"5166.e07.fffffffffa10663a.ffffffffda30c76a\",\n" +
" \"validity\": \"0\",\n" +
" \"voiceCategory\": \"None\",\n" +
" \"wave\": \"1\",\n" +
" \"zone\": \"COSMOTE_APP_LOYALTY_PROMO\"\n" +
" },\n" +
" {\n" +
" \"UACIOfferTrackingCode\": \"51ed.e10.2c006f18.71e96d08\",\n" +
" \"businessAdditionalId\": \"\",\n" +
" \"dataCategory\": \"Data\",\n" +
" \"dataValue\": \"233\",\n" +
" \"discount\": \"None\",\n" +
" \"eligibleAssets\": [\n" +
" \"306945218770\",\n" +
" \"306944333488\",\n" +
" \"306932222490\",\n" +
" \"306996824010\",\n" +
" \"306972713201\",\n" +
" \"306942496252\",\n" +
" \"306977316716\",\n" +
" \"306945433100\",\n" +
" \"306977403986\",\n" +
" \"306936581495\",\n" +
" \"306980689662\",\n" +
" \"306970101490\",\n" +
" \"306973396329\",\n" +
" \"306972577064\",\n" +
" \"306974923219\",\n" +
" \"306977513761\",\n" +
" \"306984220987\",\n" +
" \"306979949205\",\n" +
" \"306943134127\",\n" +
" \"306970437794\",\n" +
" \"306932535319\",\n" +
" \"306974063133\",\n" +
" \"306932520323\",\n" +
" \"306978733823\",\n" +
" \"306985995420\",\n" +
" \"306983879555\",\n" +
" ],\n" +
" \"id\": \"000003599\",\n" +
" \"loyaltyCampaignId\": \"9a92d445956145f6bbc5cd20cef543b9\",\n" + //c5cc5f4f65624f47a580b720233fa60d
" \"minsValue\": \"None\",\n" +
" \"noOfRecurrance\": \"None\",\n" +
" \"notificationMessage\": \"None\",\n" +
" \"offerAudienceLevel\": \"msisdn\",\n" +
" \"offerCode1\": \"000003599\",\n" +
" \"offerName\": \"CCMS loyalty white label with campaignId\",\n" +
" \"price\": \"None\",\n" +
" \"productType\": \"White Label\",\n" +
" \"provDuration\": \"0.0\",\n" +
" \"provStepValueMins\": \"None\",\n" +
" \"score\": \"50\",\n" +
" \"treatmentCode\": \"51ed.e10.2c006f18.71e96d08\",\n" +
" \"validity\": \"0\",\n" +
" \"voiceCategory\": \"None\",\n" +
" \"wave\": \"1\",\n" +
" \"imageUrl\": \"https://www.cosmotetvott.gr/assets/images/ogImage.jpg\",\n" +
" \"title\": \"Test1\",\n" +
" \"subtitle\": \"Test1\",\n" +
" \"description\": \"Test1\",\n" +
" \"zone\": \"COSMOTE_APP_LOYALTY_PROMO\"\n" +
" },\n" +
" {\n" +
" \"UACIOfferTrackingCode\": \"516c.e05.ffffffffa943695b.79ff470b\",\n" +
" \"businessAdditionalId\": \"\",\n" +
" \"businessService\": \"0.0\",\n" +
" \"eligibleAssets\": [\n" +
" \"306945218770\",\n" +
" \"306944333488\",\n" +
" \"306932222490\",\n" +
" \"306996824010\",\n" +
" \"306972713201\",\n" +
" \"306942496252\",\n" +
" \"306977316716\",\n" +
" \"306945433100\",\n" +
" \"306977403986\",\n" +
" \"306936581495\",\n" +
" \"306980689662\",\n" +
" \"306970101490\",\n" +
" \"306973396329\",\n" +
" \"306972577064\",\n" +
" \"306974923219\",\n" +
" \"306977513761\",\n" +
" \"306984220987\",\n" +
" \"306979949205\",\n" +
" \"306943134127\",\n" +
" \"306970437794\",\n" +
" \"306932535319\",\n" +
" \"306974063133\",\n" +
" \"306932520323\",\n" +
" \"306978733823\",\n" +
" \"306985995420\",\n" +
" \"306983879555\",\n" +
" ],\n" +
" \"id\": \"000003588\",\n" +
" \"loyaltyCampaignId\": \"NA\",\n" +
" \"noOfRecurrance\": \"0\",\n" +
" \"notificationMessage\": \"None\",\n" +
" \"offerAudienceLevel\": \"msisdn\",\n" +
" \"offerCode1\": \"000003588\",\n" +
" \"offerName\": \"CCMS loyalty postpay addon\",\n" +
" \"postpayProduct\": \"0.0\",\n" +
" \"price\": \"None\",\n" +
" \"productType\": \"MOBILE ADDON\",\n" +
" \"provDuration\": \"0.0\",\n" +
" \"score\": \"50\",\n" +
" \"treatmentCode\": \"516c.e05.ffffffffa943695b.79ff470b\",\n" +
" \"validity\": \"0\",\n" +
" \"wave\": \"1\",\n" +
" \"imageUrl\": \"https://www.cosmotetvott.gr/assets/images/ogImage.jpg\",\n" +
" \"title\": \"Test2\",\n" +
" \"subtitle\": \"Test2\",\n" +
" \"description\": \"Test2\",\n" +
" \"zone\": \"COSMOTE_APP_LOYALTY_PROMO\"\n" +
" },\n" +
" {\n" +
" \"UACIOfferTrackingCode\": \"5224.e19.30e2f27b.ffffffffeb22b0db\",\n" +
" \"businessAdditionalId\": \"\",\n" +
" \"dataCategory\": \"Data\",\n" +
" \"dataValue\": \"None\",\n" +
" \"discount\": \"None\",\n" +
" \"eligibleAssets\": [\n" +
" \"306945218770\",\n" +
" \"306944333488\",\n" +
" \"306932222490\",\n" +
" \"306996824010\",\n" +
" \"306972713201\",\n" +
" \"306942496252\",\n" +
" \"306977316716\",\n" +
" \"306945433100\",\n" +
" \"306977403986\",\n" +
" \"306936581495\",\n" +
" \"306980689662\",\n" +
" \"306970101490\",\n" +
" \"306973396329\",\n" +
" \"306972577064\",\n" +
" \"306974923219\",\n" +
" \"306977513761\",\n" +
" \"306984220987\",\n" +
" \"306979949205\",\n" +
" \"306943134127\",\n" +
" \"306970437794\",\n" +
" \"306932535319\",\n" +
" \"306974063133\",\n" +
" \"306932520323\",\n" +
" \"306978733823\",\n" +
" \"306985995420\",\n" +
" \"306983879555\",\n" +
" ],\n" +
" \"id\": \"000003608\",\n" +
" \"loyaltyCampaignId\": \"c134cdeb8a924f8eac38e261acb9caf5\",\n" +
" \"minsValue\": \"None\",\n" +
" \"noOfRecurrance\": \"None\",\n" +
" \"notificationMessage\": \"None\",\n" +
" \"offerAudienceLevel\": \"msisdn\",\n" +
" \"offerCode1\": \"000003608\",\n" +
" \"offerName\": \"CCMS loyalty gifts4u v1\",\n" +
" \"price\": \"None\",\n" +
" \"productType\": \"White Label\",\n" +
" \"provDuration\": \"0.0\",\n" +
" \"provStepValueMins\": \"None\",\n" +
" \"score\": \"50\",\n" +
" \"treatmentCode\": \"5224.e19.30e2f27b.ffffffffeb22b0db\",\n" +
" \"validity\": \"0\",\n" +
" \"voiceCategory\": \"None\",\n" +
" \"wave\": \"1\",\n" +
" \"imageUrl\": \"https://www.cosmotetvott.gr/assets/images/ogImage.jpg\",\n" +
" \"title\": \"Test3\",\n" +
" \"subtitle\": \"Test3\",\n" +
" \"description\": \"Test3\",\n" +
" \"zone\": \"COSMOTE_APP_GIFTS4U\"\n" +
" },\n" +
" {\n" +
" \"UACIOfferTrackingCode\": \"5228.e1d.38378e61.750186c1\",\n" +
" \"businessAdditionalId\": \"\",\n" +
" \"businessService\": \"0.0\",\n" +
" \"eligibleAssets\": [\n" +
" \"306945218770\",\n" +
" \"306944333488\",\n" +
" \"306932222490\",\n" +
" \"306996824010\",\n" +
" \"306972713201\",\n" +
" \"306942496252\",\n" +
" \"306977316716\",\n" +
" \"306945433100\",\n" +
" \"306977403986\",\n" +
" \"306936581495\",\n" +
" \"306980689662\",\n" +
" \"306970101490\",\n" +
" \"306973396329\",\n" +
" \"306972577064\",\n" +
" \"306974923219\",\n" +
" \"306977513761\",\n" +
" \"306984220987\",\n" +
" \"306979949205\",\n" +
" \"306943134127\",\n" +
" \"306970437794\",\n" +
" \"306932535319\",\n" +
" \"306974063133\",\n" +
" \"306932520323\",\n" +
" \"306978733823\",\n" +
" \"306985995420\",\n" +
" \"306983879555\",\n" +
" ],\n" +
" \"id\": \"000003612\",\n" +
" \"loyaltyCampaignId\": \"8eb71c4ceaff409c896e2d1f6f1c20f3\",\n" +
" \"noOfRecurrance\": \"0\",\n" +
" \"notificationMessage\": \"None\",\n" +
" \"offerAudienceLevel\": \"msisdn\",\n" +
" \"offerCode1\": \"000003612\",\n" +
" \"offerName\": \"CCMS loyalty - postpay addon gifts4u\",\n" +
" \"postpayProduct\": \"0.0\",\n" +
" \"price\": \"None\",\n" +
" \"productType\": \"MOBILE ADDON\",\n" +
" \"provDuration\": \"0.0\",\n" +
" \"score\": \"50\",\n" +
" \"treatmentCode\": \"5228.e1d.38378e61.750186c1\",\n" +
" \"validity\": \"0\",\n" +
" \"wave\": \"1\",\n" +
" \"imageUrl\": \"https://www.cosmotetvott.gr/assets/images/ogImage.jpg\",\n" +
" \"title\": \"Test4\",\n" +
" \"subtitle\": \"Test4\",\n" +
" \"description\": \"Test4\",\n" +
" \"zone\": \"COSMOTE_APP_GIFTS4U\"\n" +
" },\n" +
" {\n" +
" \"UACIOfferTrackingCode\": \"5222.e1b.ffffffffe725d1b3.ffffffffed6d8723\",\n" +
" \"businessAdditionalId\": \"\",\n" +
" \"dataCategory\": \"Data\",\n" +
" \"dataValue\": \"None\",\n" +
" \"discount\": \"None\",\n" +
" \"eligibleAssets\": [\n" +
" \"306945218770\",\n" +
" \"306944333488\",\n" +
" \"306932222490\",\n" +
" \"306996824010\",\n" +
" \"306972713201\",\n" +
" \"306942496252\",\n" +
" \"306977316716\",\n" +
" \"306945433100\",\n" +
" \"306977403986\",\n" +
" \"306936581495\",\n" +
" \"306980689662\",\n" +
" \"306970101490\",\n" +
" \"306973396329\",\n" +
" \"306972577064\",\n" +
" \"306974923219\",\n" +
" \"306977513761\",\n" +
" \"306984220987\",\n" +
" \"306979949205\",\n" +
" \"306943134127\",\n" +
" \"306970437794\",\n" +
" \"306932535319\",\n" +
" \"306974063133\",\n" +
" \"306932520323\",\n" +
" \"306978733823\",\n" +
" \"306985995420\",\n" +
" \"306983879555\",\n" +
" ],\n" +
" \"id\": \"000003610\",\n" +
" \"loyaltyCampaignId\": \"8e2c88ec94c948d8b51577324ed9a4d5\",\n" +
" \"minsValue\": \"None\",\n" +
" \"noOfRecurrance\": \"None\",\n" +
" \"notificationMessage\": \"None\",\n" +
" \"offerAudienceLevel\": \"msisdn\",\n" +
" \"offerCode1\": \"000003610\",\n" +
" \"offerName\": \"CCMS loyalty more4u v1\",\n" +
" \"price\": \"20\",\n" +
" \"productType\": \"White Label\",\n" +
" \"provDuration\": \"7.0\",\n" +
" \"provStepValueMins\": \"None\",\n" +
" \"score\": \"60\",\n" +
" \"treatmentCode\": \"5222.e1b.ffffffffe725d1b3.ffffffffed6d8723\",\n" +
" \"validity\": \"0\",\n" +
" \"voiceCategory\": \"None\",\n" +
" \"wave\": \"1\",\n" +
" \"imageUrl\": \"https://www.cosmotetvott.gr/assets/images/ogImage.jpg\",\n" +
" \"title\": \"Test5\",\n" +
" \"subtitle\": \"Test5\",\n" +
" \"description\": \"Test5\",\n" +
" \"zone\": \"COSMOTE_APP_MORE4U\"\n" +
" },\n" +
" {\n" +
" \"UACIOfferTrackingCode\": \"5226.e1f.728b68c6.ffffffffa6c7b10e\",\n" +
" \"businessAdditionalId\": \"\",\n" +
" \"businessService\": \"0.0\",\n" +
" \"eligibleAssets\": [\n" +
" \"306945218770\",\n" +
" \"306944333488\",\n" +
" \"306932222490\",\n" +
" \"306996824010\",\n" +
" \"306972713201\",\n" +
" \"306942496252\",\n" +
" \"306977316716\",\n" +
" \"306945433100\",\n" +
" \"306977403986\",\n" +
" \"306936581495\",\n" +
" \"306980689662\",\n" +
" \"306970101490\",\n" +
" \"306973396329\",\n" +
" \"306972577064\",\n" +
" \"306974923219\",\n" +
" \"306977513761\",\n" +
" \"306984220987\",\n" +
" \"306979949205\",\n" +
" \"306943134127\",\n" +
" \"306970437794\",\n" +
" \"306932535319\",\n" +
" \"306974063133\",\n" +
" \"306932520323\",\n" +
" \"306978733823\",\n" +
" \"306985995420\",\n" +
" \"306983879555\",\n" +
" ],\n" +
" \"id\": \"000003614\",\n" +
" \"loyaltyCampaignId\": \"aaf4022194584f02bb84c7b283c7c51e\",\n" +
" \"noOfRecurrance\": \"0\",\n" +
" \"notificationMessage\": \"None\",\n" +
" \"offerAudienceLevel\": \"msisdn\",\n" +
" \"offerCode1\": \"000003614\",\n" +
" \"offerName\": \"CCMS loyalty - postpay addon more4u\",\n" +
" \"postpayProduct\": \"0.0\",\n" +
" \"price\": \"None\",\n" +
" \"productType\": \"MOBILE ADDON\",\n" +
" \"provDuration\": \"0.0\",\n" +
" \"score\": \"50\",\n" +
" \"treatmentCode\": \"5226.e1f.728b68c6.ffffffffa6c7b10e\",\n" +
" \"validity\": \"0\",\n" +
" \"wave\": \"1\",\n" +
" \"imageUrl\": \"https://www.cosmotetvott.gr/assets/images/ogImage.jpg\",\n" +
" \"title\": \"Test6\",\n" +
" \"subtitle\": \"Test6\",\n" +
" \"description\": \"Test6\",\n" +
" \"zone\": \"COSMOTE_APP_MORE4U\"\n" +
" },\n" +
" {\n" +
" \"UACIOfferTrackingCode\": \"5154.e03.ffffffffeebc476a.ffffffffc5b96f6a\",\n" +
" \"businessAdditionalId\": \"\",\n" +
" \"eligibleAssets\": [],\n" +
" \"id\": \"000003586\",\n" +
" \"loyaltyCampaignId\": \"NA\",\n" +
" \"offerAudienceLevel\": \"guid\",\n" +
" \"offerCode1\": \"000003586\",\n" +
" \"offerName\": \"CCMS loyalty offer 6\",\n" +
" \"productType\": \"GENERIC\",\n" +
" \"score\": \"50\",\n" +
" \"treatmentCode\": \"5154.e03.ffffffffeebc476a.ffffffffc5b96f6a\",\n" +
" \"validity\": \"0\",\n" +
" \"zone\": \"COSMOTE_APP_LOYALTY_PROMO\"\n" +
" },\n" +
" {\n" +
" \"UACIOfferTrackingCode\": \"51d2.e0c.291f49d9.40d5a689\",\n" +
" \"businessAdditionalId\": \"\",\n" +
" \"eligibleAssets\": [],\n" +
" \"id\": \"000003595\",\n" +
" \"loyaltyCampaignId\": \"c5cc5f4f65624f47a580b720233fa60d\",\n" +
" \"offerAudienceLevel\": \"guid\",\n" +
" \"offerCode1\": \"000003595\",\n" +
" \"offerName\": \"CCMS Loyal offer campaignId\",\n" +
" \"productType\": \"GENERIC\",\n" +
" \"score\": \"50\",\n" +
" \"treatmentCode\": \"51d2.e0c.291f49d9.40d5a689\",\n" +
" \"validity\": \"0\",\n" +
" \"imageUrl\": \"https://www.cosmotetvott.gr/assets/images/ogImage.jpg\",\n" +
" \"title\": \"Test7\",\n" +
" \"subtitle\": \"Test7\",\n" +
" \"description\": \"Test7\",\n" +
" \"zone\": \"COSMOTE_APP_LOYALTY_PROMO\"\n" +
" },\n" +
" {\n" +
" \"UACIOfferTrackingCode\": \"51d6.e0c.291f49d9.40d5a689\",\n" +
" \"businessAdditionalId\": \"\",\n" +
" \"eligibleAssets\": [],\n" +
" \"id\": \"000003595\",\n" +
" \"loyaltyCampaignId\": \"c5cc5f4f65624f47a580b720233fa60d\",\n" +
" \"offerAudienceLevel\": \"guid\",\n" +
" \"offerCode1\": \"000003595\",\n" +
" \"offerName\": \"CCMS Loyal offer campaignId\",\n" +
" \"productType\": \"GENERIC\",\n" +
" \"score\": \"50\",\n" +
" \"treatmentCode\": \"51d6.e0c.291f49d9.40d5a689\",\n" +
" \"validity\": \"0\",\n" +
" \"imageUrl\": \"https://www.cosmotetvott.gr/assets/images/ogImage.jpg\",\n" +
" \"title\": \"Test8\",\n" +
" \"subtitle\": \"Test8\",\n" +
" \"description\": \"Test8\",\n" +
" \"zone\": \"COSMOTE_APP_GIFTS4U\"\n" +
" },\n" +
" {\n" +
" \"UACIOfferTrackingCode\": \"5150.e03.ffffffffeebc476a.ffffffffc5b96f6a\",\n" +
" \"businessAdditionalId\": \"\",\n" +
" \"eligibleAssets\": [],\n" +
" \"id\": \"000003586\",\n" +
" \"loyaltyCampaignId\": \"NA\",\n" +
" \"offerAudienceLevel\": \"guid\",\n" +
" \"offerCode1\": \"000003586\",\n" +
" \"offerName\": \"CCMS loyalty offer 6\",\n" +
" \"productType\": \"GENERIC\",\n" +
" \"score\": \"50\",\n" +
" \"treatmentCode\": \"5150.e03.ffffffffeebc476a.ffffffffc5b96f6a\",\n" +
" \"validity\": \"0\",\n" +
" \"zone\": \"COSMOTE_APP_GIFTS4U\"\n" +
" },\n" +
" {\n" +
" \"UACIOfferTrackingCode\": \"5152.e03.ffffffffeebc476a.ffffffffc5b96f6a\",\n" +
" \"businessAdditionalId\": \"\",\n" +
" \"eligibleAssets\": [],\n" +
" \"id\": \"000003586\",\n" +
" \"loyaltyCampaignId\": \"NA\",\n" +
" \"offerAudienceLevel\": \"guid\",\n" +
" \"offerCode1\": \"000003586\",\n" +
" \"offerName\": \"CCMS loyalty offer 6\",\n" +
" \"productType\": \"GENERIC\",\n" +
" \"score\": \"50\",\n" +
" \"treatmentCode\": \"5152.e03.ffffffffeebc476a.ffffffffc5b96f6a\",\n" +
" \"validity\": \"0\",\n" +
" \"zone\": \"COSMOTE_APP_MORE4U\"\n" +
" },\n" +
" {\n" +
" \"UACIOfferTrackingCode\": \"51d4.e0c.291f49d9.40d5a689\",\n" +
" \"businessAdditionalId\": \"\",\n" +
" \"eligibleAssets\": [],\n" +
" \"id\": \"000003595\",\n" +
" \"loyaltyCampaignId\": \"c5cc5f4f65624f47a580b720233fa60d\",\n" +
" \"offerAudienceLevel\": \"guid\",\n" +
" \"offerCode1\": \"000003595\",\n" +
" \"offerName\": \"CCMS Loyal offer campaignId\",\n" +
" \"productType\": \"GENERIC\",\n" +
" \"score\": \"50\",\n" +
" \"treatmentCode\": \"51d4.e0c.291f49d9.40d5a689\",\n" +
" \"validity\": \"0\",\n" +
" \"imageUrl\": \"https://www.cosmotetvott.gr/assets/images/ogImage.jpg\",\n" +
" \"title\": \"Test9\",\n" +
" \"subtitle\": \"Test9\",\n" +
" \"description\": \"Test9\",\n" +
" \"zone\": \"COSMOTE_APP_MORE4U\"\n" +
" }\n" +
" ]");
} catch (JSONException e) {
e.printStackTrace();
}
if (jArray != null && jArray.length() > 0) {
for (int i = 0; i < jArray.length(); i++) {
JSONObject jobj = new JSONObject();
jobj = jArray.optJSONObject(i);
if (jobj != null) {
LoyaltyContextualOfferModel model = new LoyaltyContextualOfferModel(jobj);
list.add(model);
}
}
}
WarplyManagerHelper.setCCMSLoyaltyCampaigns(list);
WarplyManagerHelper.setCampaignList(mNewCampaignList);
// ArrayList<LoyaltyContextualOfferModel> list = new ArrayList<>();
// JSONArray jArray = null;
// try {
// jArray = new JSONArray("[\n" +
// " {\n" +
// " \"UACIOfferTrackingCode\": \"5166.e07.fffffffffa10663a.ffffffffda30c76a\",\n" +
// " \"businessAdditionalId\": \"\",\n" +
// " \"dataCategory\": \"Data\",\n" +
// " \"dataValue\": \"None\",\n" +
// " \"discount\": \"None\",\n" +
// " \"eligibleAssets\": [\n" +
// " \"306945218770\",\n" +
// " \"306944333488\",\n" +
// " \"306932222490\",\n" +
// " \"306996824010\",\n" +
// " \"306972713201\",\n" +
// " \"306942496252\",\n" +
// " \"306977316716\",\n" +
// " \"306945433100\",\n" +
// " \"306977403986\",\n" +
// " \"306936581495\",\n" +
// " \"306980689662\",\n" +
// " \"306970101490\",\n" +
// " \"306973396329\",\n" +
// " \"306972577064\",\n" +
// " \"306974923219\",\n" +
// " \"306977513761\",\n" +
// " \"306984220987\",\n" +
// " \"306979949205\",\n" +
// " \"306943134127\",\n" +
// " \"306970437794\",\n" +
// " \"306932535319\",\n" +
// " \"306974063133\",\n" +
// " \"306932520323\",\n" +
// " \"306978733823\",\n" +
// " \"306985995420\",\n" +
// " \"306983879555\",\n" +
// " ],\n" +
// " \"id\": \"000003590\",\n" +
// " \"loyaltyCampaignId\": \"NA\",\n" +
// " \"minsValue\": \"None\",\n" +
// " \"noOfRecurrance\": \"None\",\n" +
// " \"notificationMessage\": \"None\",\n" +
// " \"offerAudienceLevel\": \"msisdn\",\n" +
// " \"offerCode1\": \"000003590\",\n" +
// " \"offerName\": \"CCMS loyalty white label\",\n" +
// " \"price\": \"None\",\n" +
// " \"productType\": \"White Label\",\n" +
// " \"provDuration\": \"0.0\",\n" +
// " \"provStepValueMins\": \"None\",\n" +
// " \"score\": \"50\",\n" +
// " \"treatmentCode\": \"5166.e07.fffffffffa10663a.ffffffffda30c76a\",\n" +
// " \"validity\": \"0\",\n" +
// " \"voiceCategory\": \"None\",\n" +
// " \"wave\": \"1\",\n" +
// " \"zone\": \"COSMOTE_APP_LOYALTY_PROMO\"\n" +
// " },\n" +
// " {\n" +
// " \"UACIOfferTrackingCode\": \"51ed.e10.2c006f18.71e96d08\",\n" +
// " \"businessAdditionalId\": \"\",\n" +
// " \"dataCategory\": \"Data\",\n" +
// " \"dataValue\": \"233\",\n" +
// " \"discount\": \"None\",\n" +
// " \"eligibleAssets\": [\n" +
// " \"306945218770\",\n" +
// " \"306944333488\",\n" +
// " \"306932222490\",\n" +
// " \"306996824010\",\n" +
// " \"306972713201\",\n" +
// " \"306942496252\",\n" +
// " \"306977316716\",\n" +
// " \"306945433100\",\n" +
// " \"306977403986\",\n" +
// " \"306936581495\",\n" +
// " \"306980689662\",\n" +
// " \"306970101490\",\n" +
// " \"306973396329\",\n" +
// " \"306972577064\",\n" +
// " \"306974923219\",\n" +
// " \"306977513761\",\n" +
// " \"306984220987\",\n" +
// " \"306979949205\",\n" +
// " \"306943134127\",\n" +
// " \"306970437794\",\n" +
// " \"306932535319\",\n" +
// " \"306974063133\",\n" +
// " \"306932520323\",\n" +
// " \"306978733823\",\n" +
// " \"306985995420\",\n" +
// " \"306983879555\",\n" +
// " ],\n" +
// " \"id\": \"000003599\",\n" +
// " \"loyaltyCampaignId\": \"9a92d445956145f6bbc5cd20cef543b9\",\n" + //c5cc5f4f65624f47a580b720233fa60d
// " \"minsValue\": \"None\",\n" +
// " \"noOfRecurrance\": \"None\",\n" +
// " \"notificationMessage\": \"None\",\n" +
// " \"offerAudienceLevel\": \"msisdn\",\n" +
// " \"offerCode1\": \"000003599\",\n" +
// " \"offerName\": \"CCMS loyalty white label with campaignId\",\n" +
// " \"price\": \"None\",\n" +
// " \"productType\": \"White Label\",\n" +
// " \"provDuration\": \"0.0\",\n" +
// " \"provStepValueMins\": \"None\",\n" +
// " \"score\": \"50\",\n" +
// " \"treatmentCode\": \"51ed.e10.2c006f18.71e96d08\",\n" +
// " \"validity\": \"0\",\n" +
// " \"voiceCategory\": \"None\",\n" +
// " \"wave\": \"1\",\n" +
// " \"imageUrl\": \"https://www.cosmotetvott.gr/assets/images/ogImage.jpg\",\n" +
// " \"title\": \"Test1\",\n" +
// " \"subtitle\": \"Test1\",\n" +
// " \"description\": \"Test1\",\n" +
// " \"zone\": \"COSMOTE_APP_LOYALTY_PROMO\"\n" +
// " },\n" +
// " {\n" +
// " \"UACIOfferTrackingCode\": \"516c.e05.ffffffffa943695b.79ff470b\",\n" +
// " \"businessAdditionalId\": \"\",\n" +
// " \"businessService\": \"0.0\",\n" +
// " \"eligibleAssets\": [\n" +
// " \"306945218770\",\n" +
// " \"306944333488\",\n" +
// " \"306932222490\",\n" +
// " \"306996824010\",\n" +
// " \"306972713201\",\n" +
// " \"306942496252\",\n" +
// " \"306977316716\",\n" +
// " \"306945433100\",\n" +
// " \"306977403986\",\n" +
// " \"306936581495\",\n" +
// " \"306980689662\",\n" +
// " \"306970101490\",\n" +
// " \"306973396329\",\n" +
// " \"306972577064\",\n" +
// " \"306974923219\",\n" +
// " \"306977513761\",\n" +
// " \"306984220987\",\n" +
// " \"306979949205\",\n" +
// " \"306943134127\",\n" +
// " \"306970437794\",\n" +
// " \"306932535319\",\n" +
// " \"306974063133\",\n" +
// " \"306932520323\",\n" +
// " \"306978733823\",\n" +
// " \"306985995420\",\n" +
// " \"306983879555\",\n" +
// " ],\n" +
// " \"id\": \"000003588\",\n" +
// " \"loyaltyCampaignId\": \"NA\",\n" +
// " \"noOfRecurrance\": \"0\",\n" +
// " \"notificationMessage\": \"None\",\n" +
// " \"offerAudienceLevel\": \"msisdn\",\n" +
// " \"offerCode1\": \"000003588\",\n" +
// " \"offerName\": \"CCMS loyalty postpay addon\",\n" +
// " \"postpayProduct\": \"0.0\",\n" +
// " \"price\": \"None\",\n" +
// " \"productType\": \"MOBILE ADDON\",\n" +
// " \"provDuration\": \"0.0\",\n" +
// " \"score\": \"50\",\n" +
// " \"treatmentCode\": \"516c.e05.ffffffffa943695b.79ff470b\",\n" +
// " \"validity\": \"0\",\n" +
// " \"wave\": \"1\",\n" +
// " \"imageUrl\": \"https://www.cosmotetvott.gr/assets/images/ogImage.jpg\",\n" +
// " \"title\": \"Test2\",\n" +
// " \"subtitle\": \"Test2\",\n" +
// " \"description\": \"Test2\",\n" +
// " \"zone\": \"COSMOTE_APP_LOYALTY_PROMO\"\n" +
// " },\n" +
// " {\n" +
// " \"UACIOfferTrackingCode\": \"5224.e19.30e2f27b.ffffffffeb22b0db\",\n" +
// " \"businessAdditionalId\": \"\",\n" +
// " \"dataCategory\": \"Data\",\n" +
// " \"dataValue\": \"None\",\n" +
// " \"discount\": \"None\",\n" +
// " \"eligibleAssets\": [\n" +
// " \"306945218770\",\n" +
// " \"306944333488\",\n" +
// " \"306932222490\",\n" +
// " \"306996824010\",\n" +
// " \"306972713201\",\n" +
// " \"306942496252\",\n" +
// " \"306977316716\",\n" +
// " \"306945433100\",\n" +
// " \"306977403986\",\n" +
// " \"306936581495\",\n" +
// " \"306980689662\",\n" +
// " \"306970101490\",\n" +
// " \"306973396329\",\n" +
// " \"306972577064\",\n" +
// " \"306974923219\",\n" +
// " \"306977513761\",\n" +
// " \"306984220987\",\n" +
// " \"306979949205\",\n" +
// " \"306943134127\",\n" +
// " \"306970437794\",\n" +
// " \"306932535319\",\n" +
// " \"306974063133\",\n" +
// " \"306932520323\",\n" +
// " \"306978733823\",\n" +
// " \"306985995420\",\n" +
// " \"306983879555\",\n" +
// " ],\n" +
// " \"id\": \"000003608\",\n" +
// " \"loyaltyCampaignId\": \"c134cdeb8a924f8eac38e261acb9caf5\",\n" +
// " \"minsValue\": \"None\",\n" +
// " \"noOfRecurrance\": \"None\",\n" +
// " \"notificationMessage\": \"None\",\n" +
// " \"offerAudienceLevel\": \"msisdn\",\n" +
// " \"offerCode1\": \"000003608\",\n" +
// " \"offerName\": \"CCMS loyalty gifts4u v1\",\n" +
// " \"price\": \"None\",\n" +
// " \"productType\": \"White Label\",\n" +
// " \"provDuration\": \"0.0\",\n" +
// " \"provStepValueMins\": \"None\",\n" +
// " \"score\": \"50\",\n" +
// " \"treatmentCode\": \"5224.e19.30e2f27b.ffffffffeb22b0db\",\n" +
// " \"validity\": \"0\",\n" +
// " \"voiceCategory\": \"None\",\n" +
// " \"wave\": \"1\",\n" +
// " \"imageUrl\": \"https://www.cosmotetvott.gr/assets/images/ogImage.jpg\",\n" +
// " \"title\": \"Test3\",\n" +
// " \"subtitle\": \"Test3\",\n" +
// " \"description\": \"Test3\",\n" +
// " \"zone\": \"COSMOTE_APP_GIFTS4U\"\n" +
// " },\n" +
// " {\n" +
// " \"UACIOfferTrackingCode\": \"5228.e1d.38378e61.750186c1\",\n" +
// " \"businessAdditionalId\": \"\",\n" +
// " \"businessService\": \"0.0\",\n" +
// " \"eligibleAssets\": [\n" +
// " \"306945218770\",\n" +
// " \"306944333488\",\n" +
// " \"306932222490\",\n" +
// " \"306996824010\",\n" +
// " \"306972713201\",\n" +
// " \"306942496252\",\n" +
// " \"306977316716\",\n" +
// " \"306945433100\",\n" +
// " \"306977403986\",\n" +
// " \"306936581495\",\n" +
// " \"306980689662\",\n" +
// " \"306970101490\",\n" +
// " \"306973396329\",\n" +
// " \"306972577064\",\n" +
// " \"306974923219\",\n" +
// " \"306977513761\",\n" +
// " \"306984220987\",\n" +
// " \"306979949205\",\n" +
// " \"306943134127\",\n" +
// " \"306970437794\",\n" +
// " \"306932535319\",\n" +
// " \"306974063133\",\n" +
// " \"306932520323\",\n" +
// " \"306978733823\",\n" +
// " \"306985995420\",\n" +
// " \"306983879555\",\n" +
// " ],\n" +
// " \"id\": \"000003612\",\n" +
// " \"loyaltyCampaignId\": \"8eb71c4ceaff409c896e2d1f6f1c20f3\",\n" +
// " \"noOfRecurrance\": \"0\",\n" +
// " \"notificationMessage\": \"None\",\n" +
// " \"offerAudienceLevel\": \"msisdn\",\n" +
// " \"offerCode1\": \"000003612\",\n" +
// " \"offerName\": \"CCMS loyalty - postpay addon gifts4u\",\n" +
// " \"postpayProduct\": \"0.0\",\n" +
// " \"price\": \"None\",\n" +
// " \"productType\": \"MOBILE ADDON\",\n" +
// " \"provDuration\": \"0.0\",\n" +
// " \"score\": \"50\",\n" +
// " \"treatmentCode\": \"5228.e1d.38378e61.750186c1\",\n" +
// " \"validity\": \"0\",\n" +
// " \"wave\": \"1\",\n" +
// " \"imageUrl\": \"https://www.cosmotetvott.gr/assets/images/ogImage.jpg\",\n" +
// " \"title\": \"Test4\",\n" +
// " \"subtitle\": \"Test4\",\n" +
// " \"description\": \"Test4\",\n" +
// " \"zone\": \"COSMOTE_APP_GIFTS4U\"\n" +
// " },\n" +
// " {\n" +
// " \"UACIOfferTrackingCode\": \"5222.e1b.ffffffffe725d1b3.ffffffffed6d8723\",\n" +
// " \"businessAdditionalId\": \"\",\n" +
// " \"dataCategory\": \"Data\",\n" +
// " \"dataValue\": \"None\",\n" +
// " \"discount\": \"None\",\n" +
// " \"eligibleAssets\": [\n" +
// " \"306945218770\",\n" +
// " \"306944333488\",\n" +
// " \"306932222490\",\n" +
// " \"306996824010\",\n" +
// " \"306972713201\",\n" +
// " \"306942496252\",\n" +
// " \"306977316716\",\n" +
// " \"306945433100\",\n" +
// " \"306977403986\",\n" +
// " \"306936581495\",\n" +
// " \"306980689662\",\n" +
// " \"306970101490\",\n" +
// " \"306973396329\",\n" +
// " \"306972577064\",\n" +
// " \"306974923219\",\n" +
// " \"306977513761\",\n" +
// " \"306984220987\",\n" +
// " \"306979949205\",\n" +
// " \"306943134127\",\n" +
// " \"306970437794\",\n" +
// " \"306932535319\",\n" +
// " \"306974063133\",\n" +
// " \"306932520323\",\n" +
// " \"306978733823\",\n" +
// " \"306985995420\",\n" +
// " \"306983879555\",\n" +
// " ],\n" +
// " \"id\": \"000003610\",\n" +
// " \"loyaltyCampaignId\": \"8e2c88ec94c948d8b51577324ed9a4d5\",\n" +
// " \"minsValue\": \"None\",\n" +
// " \"noOfRecurrance\": \"None\",\n" +
// " \"notificationMessage\": \"None\",\n" +
// " \"offerAudienceLevel\": \"msisdn\",\n" +
// " \"offerCode1\": \"000003610\",\n" +
// " \"offerName\": \"CCMS loyalty more4u v1\",\n" +
// " \"price\": \"20\",\n" +
// " \"productType\": \"White Label\",\n" +
// " \"provDuration\": \"7.0\",\n" +
// " \"provStepValueMins\": \"None\",\n" +
// " \"score\": \"60\",\n" +
// " \"treatmentCode\": \"5222.e1b.ffffffffe725d1b3.ffffffffed6d8723\",\n" +
// " \"validity\": \"0\",\n" +
// " \"voiceCategory\": \"None\",\n" +
// " \"wave\": \"1\",\n" +
// " \"imageUrl\": \"https://www.cosmotetvott.gr/assets/images/ogImage.jpg\",\n" +
// " \"title\": \"Test5\",\n" +
// " \"subtitle\": \"Test5\",\n" +
// " \"description\": \"Test5\",\n" +
// " \"zone\": \"COSMOTE_APP_MORE4U\"\n" +
// " },\n" +
// " {\n" +
// " \"UACIOfferTrackingCode\": \"5226.e1f.728b68c6.ffffffffa6c7b10e\",\n" +
// " \"businessAdditionalId\": \"\",\n" +
// " \"businessService\": \"0.0\",\n" +
// " \"eligibleAssets\": [\n" +
// " \"306945218770\",\n" +
// " \"306944333488\",\n" +
// " \"306932222490\",\n" +
// " \"306996824010\",\n" +
// " \"306972713201\",\n" +
// " \"306942496252\",\n" +
// " \"306977316716\",\n" +
// " \"306945433100\",\n" +
// " \"306977403986\",\n" +
// " \"306936581495\",\n" +
// " \"306980689662\",\n" +
// " \"306970101490\",\n" +
// " \"306973396329\",\n" +
// " \"306972577064\",\n" +
// " \"306974923219\",\n" +
// " \"306977513761\",\n" +
// " \"306984220987\",\n" +
// " \"306979949205\",\n" +
// " \"306943134127\",\n" +
// " \"306970437794\",\n" +
// " \"306932535319\",\n" +
// " \"306974063133\",\n" +
// " \"306932520323\",\n" +
// " \"306978733823\",\n" +
// " \"306985995420\",\n" +
// " \"306983879555\",\n" +
// " ],\n" +
// " \"id\": \"000003614\",\n" +
// " \"loyaltyCampaignId\": \"aaf4022194584f02bb84c7b283c7c51e\",\n" +
// " \"noOfRecurrance\": \"0\",\n" +
// " \"notificationMessage\": \"None\",\n" +
// " \"offerAudienceLevel\": \"msisdn\",\n" +
// " \"offerCode1\": \"000003614\",\n" +
// " \"offerName\": \"CCMS loyalty - postpay addon more4u\",\n" +
// " \"postpayProduct\": \"0.0\",\n" +
// " \"price\": \"None\",\n" +
// " \"productType\": \"MOBILE ADDON\",\n" +
// " \"provDuration\": \"0.0\",\n" +
// " \"score\": \"50\",\n" +
// " \"treatmentCode\": \"5226.e1f.728b68c6.ffffffffa6c7b10e\",\n" +
// " \"validity\": \"0\",\n" +
// " \"wave\": \"1\",\n" +
// " \"imageUrl\": \"https://www.cosmotetvott.gr/assets/images/ogImage.jpg\",\n" +
// " \"title\": \"Test6\",\n" +
// " \"subtitle\": \"Test6\",\n" +
// " \"description\": \"Test6\",\n" +
// " \"zone\": \"COSMOTE_APP_MORE4U\"\n" +
// " },\n" +
// " {\n" +
// " \"UACIOfferTrackingCode\": \"5154.e03.ffffffffeebc476a.ffffffffc5b96f6a\",\n" +
// " \"businessAdditionalId\": \"\",\n" +
// " \"eligibleAssets\": [],\n" +
// " \"id\": \"000003586\",\n" +
// " \"loyaltyCampaignId\": \"NA\",\n" +
// " \"offerAudienceLevel\": \"guid\",\n" +
// " \"offerCode1\": \"000003586\",\n" +
// " \"offerName\": \"CCMS loyalty offer 6\",\n" +
// " \"productType\": \"GENERIC\",\n" +
// " \"score\": \"50\",\n" +
// " \"treatmentCode\": \"5154.e03.ffffffffeebc476a.ffffffffc5b96f6a\",\n" +
// " \"validity\": \"0\",\n" +
// " \"zone\": \"COSMOTE_APP_LOYALTY_PROMO\"\n" +
// " },\n" +
// " {\n" +
// " \"UACIOfferTrackingCode\": \"51d2.e0c.291f49d9.40d5a689\",\n" +
// " \"businessAdditionalId\": \"\",\n" +
// " \"eligibleAssets\": [],\n" +
// " \"id\": \"000003595\",\n" +
// " \"loyaltyCampaignId\": \"c5cc5f4f65624f47a580b720233fa60d\",\n" +
// " \"offerAudienceLevel\": \"guid\",\n" +
// " \"offerCode1\": \"000003595\",\n" +
// " \"offerName\": \"CCMS Loyal offer campaignId\",\n" +
// " \"productType\": \"GENERIC\",\n" +
// " \"score\": \"50\",\n" +
// " \"treatmentCode\": \"51d2.e0c.291f49d9.40d5a689\",\n" +
// " \"validity\": \"0\",\n" +
// " \"imageUrl\": \"https://www.cosmotetvott.gr/assets/images/ogImage.jpg\",\n" +
// " \"title\": \"Test7\",\n" +
// " \"subtitle\": \"Test7\",\n" +
// " \"description\": \"Test7\",\n" +
// " \"zone\": \"COSMOTE_APP_LOYALTY_PROMO\"\n" +
// " },\n" +
// " {\n" +
// " \"UACIOfferTrackingCode\": \"51d6.e0c.291f49d9.40d5a689\",\n" +
// " \"businessAdditionalId\": \"\",\n" +
// " \"eligibleAssets\": [],\n" +
// " \"id\": \"000003595\",\n" +
// " \"loyaltyCampaignId\": \"c5cc5f4f65624f47a580b720233fa60d\",\n" +
// " \"offerAudienceLevel\": \"guid\",\n" +
// " \"offerCode1\": \"000003595\",\n" +
// " \"offerName\": \"CCMS Loyal offer campaignId\",\n" +
// " \"productType\": \"GENERIC\",\n" +
// " \"score\": \"50\",\n" +
// " \"treatmentCode\": \"51d6.e0c.291f49d9.40d5a689\",\n" +
// " \"validity\": \"0\",\n" +
// " \"imageUrl\": \"https://www.cosmotetvott.gr/assets/images/ogImage.jpg\",\n" +
// " \"title\": \"Test8\",\n" +
// " \"subtitle\": \"Test8\",\n" +
// " \"description\": \"Test8\",\n" +
// " \"zone\": \"COSMOTE_APP_GIFTS4U\"\n" +
// " },\n" +
// " {\n" +
// " \"UACIOfferTrackingCode\": \"5150.e03.ffffffffeebc476a.ffffffffc5b96f6a\",\n" +
// " \"businessAdditionalId\": \"\",\n" +
// " \"eligibleAssets\": [],\n" +
// " \"id\": \"000003586\",\n" +
// " \"loyaltyCampaignId\": \"NA\",\n" +
// " \"offerAudienceLevel\": \"guid\",\n" +
// " \"offerCode1\": \"000003586\",\n" +
// " \"offerName\": \"CCMS loyalty offer 6\",\n" +
// " \"productType\": \"GENERIC\",\n" +
// " \"score\": \"50\",\n" +
// " \"treatmentCode\": \"5150.e03.ffffffffeebc476a.ffffffffc5b96f6a\",\n" +
// " \"validity\": \"0\",\n" +
// " \"zone\": \"COSMOTE_APP_GIFTS4U\"\n" +
// " },\n" +
// " {\n" +
// " \"UACIOfferTrackingCode\": \"5152.e03.ffffffffeebc476a.ffffffffc5b96f6a\",\n" +
// " \"businessAdditionalId\": \"\",\n" +
// " \"eligibleAssets\": [],\n" +
// " \"id\": \"000003586\",\n" +
// " \"loyaltyCampaignId\": \"NA\",\n" +
// " \"offerAudienceLevel\": \"guid\",\n" +
// " \"offerCode1\": \"000003586\",\n" +
// " \"offerName\": \"CCMS loyalty offer 6\",\n" +
// " \"productType\": \"GENERIC\",\n" +
// " \"score\": \"50\",\n" +
// " \"treatmentCode\": \"5152.e03.ffffffffeebc476a.ffffffffc5b96f6a\",\n" +
// " \"validity\": \"0\",\n" +
// " \"zone\": \"COSMOTE_APP_MORE4U\"\n" +
// " },\n" +
// " {\n" +
// " \"UACIOfferTrackingCode\": \"51d4.e0c.291f49d9.40d5a689\",\n" +
// " \"businessAdditionalId\": \"\",\n" +
// " \"eligibleAssets\": [],\n" +
// " \"id\": \"000003595\",\n" +
// " \"loyaltyCampaignId\": \"c5cc5f4f65624f47a580b720233fa60d\",\n" +
// " \"offerAudienceLevel\": \"guid\",\n" +
// " \"offerCode1\": \"000003595\",\n" +
// " \"offerName\": \"CCMS Loyal offer campaignId\",\n" +
// " \"productType\": \"GENERIC\",\n" +
// " \"score\": \"50\",\n" +
// " \"treatmentCode\": \"51d4.e0c.291f49d9.40d5a689\",\n" +
// " \"validity\": \"0\",\n" +
// " \"imageUrl\": \"https://www.cosmotetvott.gr/assets/images/ogImage.jpg\",\n" +
// " \"title\": \"Test9\",\n" +
// " \"subtitle\": \"Test9\",\n" +
// " \"description\": \"Test9\",\n" +
// " \"zone\": \"COSMOTE_APP_MORE4U\"\n" +
// " }\n" +
// " ]");
// } catch (JSONException e) {
// e.printStackTrace();
// }
// if (jArray != null && jArray.length() > 0) {
// for (int i = 0; i < jArray.length(); i++) {
// JSONObject jobj = new JSONObject();
// jobj = jArray.optJSONObject(i);
// if (jobj != null) {
// LoyaltyContextualOfferModel model = new LoyaltyContextualOfferModel(jobj);
// list.add(model);
// }
// }
// }
// WarplyManagerHelper.setCCMSLoyaltyCampaigns(list);
receiver.onSuccess(result);
receiver.onSuccess(/*result*/campaignLoyaltyList);
}
@Override
......@@ -2298,4 +2299,26 @@ public class WarplyManager {
},
request.getSignature()));
}
public static void postEvent(CosmotePostEventRequest request, final CallbackReceiver<JSONObject> receiver) {
WarpUtils.log("************* WARPLY Post Event Request ********************");
WarpUtils.log("[WARP Trace] WARPLY Post Event Request is active");
WarpUtils.log("**************************************************");
Warply.postReceiveMicroappData(true, "context", request.toJson(), new CallbackReceiver<JSONObject>() {
@Override
public void onSuccess(JSONObject result) {
int status = result.optInt("status", 2);
if (status == 1) {
receiver.onSuccess(result);
} else
receiver.onFailure(status);
}
@Override
public void onFailure(int errorCode) {
receiver.onFailure(errorCode);
}
});
}
}
......