Manos Chorianopoulos

add LoyaltyBadgeModel, set get couponList

......@@ -13,6 +13,7 @@ public struct GlobalVariables {
static var customerState: swiftApi.CustomerStateModel?
static var userTag: String = ""
static var dfyCoupons: Array<swiftApi.ActiveDFYCouponModel> = []
static var couponList: Array<swiftApi.CouponItemModel> = []
}
public class swiftApi {
......@@ -1712,5 +1713,46 @@ public class swiftApi {
}
}
}
public class LoyaltyBadgeModel {
private var value: Float
private var couponCount: Int
public init() {
self.value = 0.0
self.couponCount = 0
}
public var _value: Float {
get { // getter
return self.value
}
set(newValue) { //setter
self.value = newValue
}
}
public var _couponCount: Int {
get { // getter
return self.couponCount
}
set(newValue) { //setter
self.couponCount = newValue
}
}
}
public func setCouponList(_ coupons: Array<CouponItemModel>) {
GlobalVariables.couponList = coupons
}
public func getCouponList() -> Array<CouponItemModel> {
return GlobalVariables.couponList
}
}
......