Manos Chorianopoulos

add getCCMSLoyaltyCampaigns

...@@ -16,6 +16,7 @@ public struct GlobalVariables { ...@@ -16,6 +16,7 @@ public struct GlobalVariables {
16 static var couponList: Array<swiftApi.CouponItemModel> = [] 16 static var couponList: Array<swiftApi.CouponItemModel> = []
17 static var loyaltyBadge: swiftApi.LoyaltyBadgeModel = swiftApi.LoyaltyBadgeModel() 17 static var loyaltyBadge: swiftApi.LoyaltyBadgeModel = swiftApi.LoyaltyBadgeModel()
18 static var consumer: swiftApi.ProfileModel? 18 static var consumer: swiftApi.ProfileModel?
19 + static var ccmsCampaigns: Array<swiftApi.LoyaltyContextualOfferModel> = []
19 } 20 }
20 21
21 public class swiftApi { 22 public class swiftApi {
...@@ -80,6 +81,10 @@ public class swiftApi { ...@@ -80,6 +81,10 @@ public class swiftApi {
80 GlobalVariables.campaigns = GlobalVariables.campaigns.filter { $0.offer_category != "gifts_for_you" } + mergedGFYCampaigns 81 GlobalVariables.campaigns = GlobalVariables.campaigns.filter { $0.offer_category != "gifts_for_you" } + mergedGFYCampaigns
81 } 82 }
82 83
84 + public func getCCMSLoyaltyCampaigns() -> Array<LoyaltyContextualOfferModel> {
85 + return GlobalVariables.ccmsCampaigns
86 + }
87 +
83 public func getActiveDFYCoupons() -> Array<ActiveDFYCouponModel> { 88 public func getActiveDFYCoupons() -> Array<ActiveDFYCouponModel> {
84 return GlobalVariables.dfyCoupons 89 return GlobalVariables.dfyCoupons
85 } 90 }
......