Toggle navigation
Toggle navigation
This project
Loading...
Sign in
open-source
/
warply_sdk_framework
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Network
Create a new issue
Commits
Issue Boards
Authored by
Manos Chorianopoulos
2022-06-28 17:42:48 +0300
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
6fa1028cd9a47d025fb15bf5828e191f5b5e4376
6fa1028c
1 parent
b484cdaa
add constructCcmsUrl with CampaignItemModel param
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
39 additions
and
0 deletions
SwiftWarplyFramework/SwiftWarplyFramework/swiftApi.swift
SwiftWarplyFramework/SwiftWarplyFramework/swiftApi.swift
View file @
6fa1028
...
...
@@ -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
)
{
...
...
Please
register
or
login
to post a comment