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-07-04 19:19:25 +0300
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
775fbe593d826dde3d626ec45fd9d7a7ccf3dc5b
775fbe59
1 parent
bce4f5d5
fix constructCcmsUrl
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
2 deletions
SwiftWarplyFramework/SwiftWarplyFramework/swiftApi.swift
SwiftWarplyFramework/SwiftWarplyFramework/swiftApi.swift
View file @
775fbe5
...
...
@@ -1525,6 +1525,17 @@ public class swiftApi {
if
(
item
.
loyaltyCampaignId
==
campaign
.
_loyaltyCampaignId
)
{
print
(
"CCMS_PRESSED"
+
" "
+
campaign
.
_id
+
" "
+
campaign
.
_offerName
)
var
assetsString
=
""
if
(
campaign
.
_eligibleAssets
!=
nil
&&
campaign
.
_eligibleAssets
.
count
>
0
)
{
for
(
index
,
item
)
in
campaign
.
_eligibleAssets
.
enumerated
()
{
if
(
index
==
(
campaign
.
_eligibleAssets
.
endIndex
-
1
))
{
assetsString
+=
String
(
item
)
}
else
{
assetsString
+=
String
(
item
)
+
","
}
}
}
let
instanceOfMyApi
=
MyApi
()
let
campaignInfo
=
instanceOfMyApi
.
provideInfoForCampaign
()
let
finalUrl
=
(
item
.
index_url
??
""
)
...
...
@@ -1555,7 +1566,8 @@ public class swiftApi {
+
"&WAVE="
+
(
campaign
.
_wave
)
+
"&VALIDITY="
+
(
campaign
.
_validity
)
+
"&TREATMENT_CODE="
+
(
campaign
.
_treatmentCode
)
+
"&OfferAudienceLevel="
+
(
campaign
.
_eligibleAssets
!=
nil
&&
campaign
.
_eligibleAssets
.
count
>
0
?
"MSISDN"
:
"GUID"
);
+
"&OfferAudienceLevel="
+
(
campaign
.
_eligibleAssets
!=
nil
&&
campaign
.
_eligibleAssets
.
count
>
0
?
"MSISDN"
:
"GUID"
)
+
"&ASSETS="
+
(
assetsString
);
print
(
"constructCcmsUrl url: "
+
finalUrl
)
return
finalUrl
...
...
@@ -1569,6 +1581,17 @@ public class swiftApi {
public
func
constructCcmsUrl
(
_
campaign
:
CampaignItemModel
,
_
ccmsCampaign
:
LoyaltyContextualOfferModel
)
->
String
{
print
(
"CCMS_PRESSED"
+
" "
+
ccmsCampaign
.
_id
+
" "
+
ccmsCampaign
.
_offerName
)
var
assetsString
=
""
if
(
ccmsCampaign
.
_eligibleAssets
!=
nil
&&
ccmsCampaign
.
_eligibleAssets
.
count
>
0
)
{
for
(
index
,
item
)
in
ccmsCampaign
.
_eligibleAssets
.
enumerated
()
{
if
(
index
==
(
ccmsCampaign
.
_eligibleAssets
.
endIndex
-
1
))
{
assetsString
+=
String
(
item
)
}
else
{
assetsString
+=
String
(
item
)
+
","
}
}
}
let
instanceOfMyApi
=
MyApi
()
let
campaignInfo
=
instanceOfMyApi
.
provideInfoForCampaign
()
let
finalUrl
=
(
campaign
.
index_url
??
""
)
...
...
@@ -1599,7 +1622,8 @@ public class swiftApi {
+
"&WAVE="
+
(
ccmsCampaign
.
_wave
)
+
"&VALIDITY="
+
(
ccmsCampaign
.
_validity
)
+
"&TREATMENT_CODE="
+
(
ccmsCampaign
.
_treatmentCode
)
+
"&OfferAudienceLevel="
+
(
ccmsCampaign
.
_eligibleAssets
!=
nil
&&
ccmsCampaign
.
_eligibleAssets
.
count
>
0
?
"MSISDN"
:
"GUID"
);
+
"&OfferAudienceLevel="
+
(
ccmsCampaign
.
_eligibleAssets
!=
nil
&&
ccmsCampaign
.
_eligibleAssets
.
count
>
0
?
"MSISDN"
:
"GUID"
)
+
"&ASSETS="
+
(
assetsString
);
print
(
"constructCcmsUrl url: "
+
finalUrl
)
return
finalUrl
...
...
Please
register
or
login
to post a comment