Showing
1 changed file
with
39 additions
and
0 deletions
| ... | @@ -1393,6 +1393,45 @@ public class swiftApi { | ... | @@ -1393,6 +1393,45 @@ public class swiftApi { |
| 1393 | return "" | 1393 | return "" |
| 1394 | } | 1394 | } |
| 1395 | 1395 | ||
| 1396 | + public func constructCcmsUrl(_ campaign: CampaignItemModel, _ ccmsCampaign: LoyaltyContextualOfferModel) -> String { | ||
| 1397 | + let instanceOfMyApi = MyApi() | ||
| 1398 | + let campaignInfo = instanceOfMyApi.provideInfoForCampaign() | ||
| 1399 | + let finalUrl = (campaign.index_url ?? "") | ||
| 1400 | + + "?web_id=" + (campaignInfo?["web_id"] as! String) | ||
| 1401 | + + "&app_uuid=" + (campaignInfo?["app_uuid"] as! String) | ||
| 1402 | + + "&api_key=" + (campaignInfo?["api_key"] as! String) | ||
| 1403 | + + "&session_uuid=" + (campaign.session_uuid ?? "") | ||
| 1404 | + + "&access_token=" + (campaignInfo?["access_token"] as! String) | ||
| 1405 | + + "&refresh_token=" + (campaignInfo?["refresh_token"] as! String) | ||
| 1406 | + + "&client_id=" + (campaignInfo?["client_id"] as! String) | ||
| 1407 | + + "&client_secret=" + (campaignInfo?["client_secret"] as! String) | ||
| 1408 | + + "&Session_ID=" + (ccmsCampaign._sessionId as! String) | ||
| 1409 | + + "&businessService=" | ||
| 1410 | + + "&offerName=" + (ccmsCampaign._offerName as! String) | ||
| 1411 | + + "&productType=" + (ccmsCampaign._productType as! String) | ||
| 1412 | + + "&provDuration=" + (ccmsCampaign._provDuration as! String) | ||
| 1413 | + + "&noOfRecurrance="+ (ccmsCampaign._noOfRecurrance as! String) | ||
| 1414 | + + "&price=" + (ccmsCampaign._price as! String) | ||
| 1415 | + + "&discount=" + (ccmsCampaign._discount as! String) | ||
| 1416 | + + "&voiceCategory=" + (ccmsCampaign._voiceCategory as! String) | ||
| 1417 | + + "&dataCategory="+ (ccmsCampaign._dataCategory as! String) | ||
| 1418 | + + "&minsValue="+ (ccmsCampaign._minsValue as! String) | ||
| 1419 | + + "&dataValue="+ (ccmsCampaign._dataValue as! String) | ||
| 1420 | + + "&provStepValueMins=" + (ccmsCampaign._provStepValueMins as! String) | ||
| 1421 | + + "&UACIOfferTrackingCode=" | ||
| 1422 | + + "&MSISDN=" | ||
| 1423 | + + "&OFFERCODE1=" | ||
| 1424 | + + "&SCORE=" | ||
| 1425 | + + "&ZONE=" | ||
| 1426 | + + "&WAVE=" | ||
| 1427 | + + "&VALIDITY=" | ||
| 1428 | + + "&TREATMENT_CODE=" | ||
| 1429 | + + "&GUID=" | ||
| 1430 | + + "&OfferAudienceLevel="; | ||
| 1431 | + | ||
| 1432 | + return finalUrl | ||
| 1433 | + } | ||
| 1434 | + | ||
| 1396 | public func constructCampaignUrlForShare(_ sessionUuid: String, _ sharingId: String) -> String { | 1435 | public func constructCampaignUrlForShare(_ sessionUuid: String, _ sharingId: String) -> String { |
| 1397 | for item in GlobalVariables.campaigns { | 1436 | for item in GlobalVariables.campaigns { |
| 1398 | if (item.session_uuid == sessionUuid) { | 1437 | if (item.session_uuid == sessionUuid) { | ... | ... |
-
Please register or login to post a comment