Manos Chorianopoulos

add constructCcmsUrl with CampaignItemModel param

......@@ -1393,6 +1393,45 @@ public class swiftApi {
return ""
}
public func constructCcmsUrl(_ campaign: CampaignItemModel, _ ccmsCampaign: LoyaltyContextualOfferModel) -> String {
let instanceOfMyApi = MyApi()
let campaignInfo = instanceOfMyApi.provideInfoForCampaign()
let finalUrl = (campaign.index_url ?? "")
+ "?web_id=" + (campaignInfo?["web_id"] as! String)
+ "&app_uuid=" + (campaignInfo?["app_uuid"] as! String)
+ "&api_key=" + (campaignInfo?["api_key"] as! String)
+ "&session_uuid=" + (campaign.session_uuid ?? "")
+ "&access_token=" + (campaignInfo?["access_token"] as! String)
+ "&refresh_token=" + (campaignInfo?["refresh_token"] as! String)
+ "&client_id=" + (campaignInfo?["client_id"] as! String)
+ "&client_secret=" + (campaignInfo?["client_secret"] as! String)
+ "&Session_ID=" + (ccmsCampaign._sessionId as! String)
+ "&businessService="
+ "&offerName=" + (ccmsCampaign._offerName as! String)
+ "&productType=" + (ccmsCampaign._productType as! String)
+ "&provDuration=" + (ccmsCampaign._provDuration as! String)
+ "&noOfRecurrance="+ (ccmsCampaign._noOfRecurrance as! String)
+ "&price=" + (ccmsCampaign._price as! String)
+ "&discount=" + (ccmsCampaign._discount as! String)
+ "&voiceCategory=" + (ccmsCampaign._voiceCategory as! String)
+ "&dataCategory="+ (ccmsCampaign._dataCategory as! String)
+ "&minsValue="+ (ccmsCampaign._minsValue as! String)
+ "&dataValue="+ (ccmsCampaign._dataValue as! String)
+ "&provStepValueMins=" + (ccmsCampaign._provStepValueMins as! String)
+ "&UACIOfferTrackingCode="
+ "&MSISDN="
+ "&OFFERCODE1="
+ "&SCORE="
+ "&ZONE="
+ "&WAVE="
+ "&VALIDITY="
+ "&TREATMENT_CODE="
+ "&GUID="
+ "&OfferAudienceLevel=";
return finalUrl
}
public func constructCampaignUrlForShare(_ sessionUuid: String, _ sharingId: String) -> String {
for item in GlobalVariables.campaigns {
if (item.session_uuid == sessionUuid) {
......