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 19:01:23 +0300
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
fb21004a625adc3e6a5e90db40012fa8cc28f2b1
fb21004a
1 parent
bcf95de8
add getCCMSLoyaltyCampaigns
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletions
SwiftWarplyFramework/SwiftWarplyFramework/swiftApi.swift
SwiftWarplyFramework/SwiftWarplyFramework/swiftApi.swift
View file @
fb21004
...
...
@@ -16,6 +16,7 @@ public struct GlobalVariables {
static
var
couponList
:
Array
<
swiftApi
.
CouponItemModel
>
=
[]
static
var
loyaltyBadge
:
swiftApi
.
LoyaltyBadgeModel
=
swiftApi
.
LoyaltyBadgeModel
()
static
var
consumer
:
swiftApi
.
ProfileModel
?
static
var
ccmsCampaigns
:
Array
<
swiftApi
.
LoyaltyContextualOfferModel
>
=
[]
}
public
class
swiftApi
{
...
...
@@ -79,6 +80,10 @@ public class swiftApi {
GlobalVariables
.
campaigns
=
GlobalVariables
.
campaigns
.
filter
{
$0
.
offer_category
!=
"gifts_for_you"
}
+
mergedGFYCampaigns
}
public
func
getCCMSLoyaltyCampaigns
()
->
Array
<
LoyaltyContextualOfferModel
>
{
return
GlobalVariables
.
ccmsCampaigns
}
public
func
getActiveDFYCoupons
()
->
Array
<
ActiveDFYCouponModel
>
{
return
GlobalVariables
.
dfyCoupons
...
...
@@ -1352,7 +1357,7 @@ public class swiftApi {
for
item
in
GlobalVariables
.
campaigns
{
if
(
item
.
loyaltyCampaignId
==
campaign
.
_loyaltyCampaignId
)
{
print
(
"CCMS_PRESSED"
+
" "
+
campaign
.
_id
+
" "
+
campaign
.
_offerName
)
let
instanceOfMyApi
=
MyApi
()
let
campaignInfo
=
instanceOfMyApi
.
provideInfoForCampaign
()
let
finalUrl
=
(
item
.
index_url
??
""
)
...
...
Please
register
or
login
to post a comment