Panagiotis Triantafyllou

fixes

......@@ -2,7 +2,7 @@ apply plugin: 'com.android.library'
ext {
PUBLISH_GROUP_ID = 'ly.warp'
PUBLISH_VERSION = '4.5.4-cosbeta19'
PUBLISH_VERSION = '4.5.4-cosbeta20'
PUBLISH_ARTIFACT_ID = 'warply-android-sdk'
}
......
......@@ -110,13 +110,17 @@ public class GiftsForYouActivity extends Activity implements View.OnClickListene
try {
String key = WarpJSONParser.getJSONFromString(dataItem.getCampaign().getExtraFields()).keys().next();
if (!TextUtils.isEmpty(key) && key.equals("loyaltyCampaignId")) {
String value = WarpJSONParser.getJSONFromString(dataItem.getCampaign().getExtraFields()).optString("loyaltyCampaignId");
for (LoyaltyContextualOfferModel ccms : WarplyManagerHelper.getCCMSLoyaltyCampaigns()) {
if (ccms.getLoyaltyCampaignId().equals(value)) {
startActivity(WarpViewActivity.createIntentFromURL(this, WarplyManagerHelper.constructCcmsUrl(dataItem.getCampaign(), ccms)));
return;
if (!TextUtils.isEmpty(key) && key.equals("ccms_offer")) {
String value = WarpJSONParser.getJSONFromString(dataItem.getCampaign().getExtraFields()).optString(key);
if (!TextUtils.isEmpty(value) && value.equals("true")) {
for (LoyaltyContextualOfferModel ccms : WarplyManagerHelper.getCCMSLoyaltyCampaigns()) {
if (ccms.getLoyaltyCampaignId().equals(dataItem.getCampaign().getSessionUUID())) {
startActivity(WarpViewActivity.createIntentFromURL(this, WarplyManagerHelper.constructCcmsUrl(dataItem.getCampaign(), ccms)));
return;
}
}
} else {
startActivity(WarpViewActivity.createIntentFromURL(this, WarplyManagerHelper.constructCampaignUrl(dataItem.getCampaign())));
}
}
startActivity(WarpViewActivity.createIntentFromURL(this, WarplyManagerHelper.constructCampaignUrl(dataItem.getCampaign())));
......
......@@ -26,6 +26,14 @@ public class LoyaltyContextualOfferModel {
private String postpayProduct;
private String notificationMessage;
private String loyaltyCampaignId;
private String businessService;
private String UACIOfferTrackingCode;
private String offerCode1;
private String score;
private String zone;
private String wave;
private String validity;
private String offerAudienceLevel;
public LoyaltyContextualOfferModel() {
......@@ -48,6 +56,14 @@ public class LoyaltyContextualOfferModel {
this.postpayProduct = "";
this.notificationMessage = "";
this.loyaltyCampaignId = "";
this.businessService = "";
this.UACIOfferTrackingCode = "";
this.offerCode1 = "";
this.score = "";
this.zone = "";
this.wave = "";
this.validity = "";
this.offerAudienceLevel = "";
}
public String getSessionId() {
......@@ -201,4 +217,68 @@ public class LoyaltyContextualOfferModel {
public void setLoyaltyCampaignId(String loyaltyCampaignId) {
this.loyaltyCampaignId = loyaltyCampaignId;
}
public String getBusinessService() {
return businessService;
}
public void setBusinessService(String businessService) {
this.businessService = businessService;
}
public String getUACIOfferTrackingCode() {
return UACIOfferTrackingCode;
}
public void setUACIOfferTrackingCode(String UACIOfferTrackingCode) {
this.UACIOfferTrackingCode = UACIOfferTrackingCode;
}
public String getOfferCode1() {
return offerCode1;
}
public void setOfferCode1(String offerCode1) {
this.offerCode1 = offerCode1;
}
public String getScore() {
return score;
}
public void setScore(String score) {
this.score = score;
}
public String getZone() {
return zone;
}
public void setZone(String zone) {
this.zone = zone;
}
public String getWave() {
return wave;
}
public void setWave(String wave) {
this.wave = wave;
}
public String getValidity() {
return validity;
}
public void setValidity(String validity) {
this.validity = validity;
}
public String getOfferAudienceLevel() {
return offerAudienceLevel;
}
public void setOfferAudienceLevel(String offerAudienceLevel) {
this.offerAudienceLevel = offerAudienceLevel;
}
}
......