Manos Chorianopoulos

add LoyaltyBadgeModel, set get couponList

...@@ -13,6 +13,7 @@ public struct GlobalVariables { ...@@ -13,6 +13,7 @@ public struct GlobalVariables {
13 static var customerState: swiftApi.CustomerStateModel? 13 static var customerState: swiftApi.CustomerStateModel?
14 static var userTag: String = "" 14 static var userTag: String = ""
15 static var dfyCoupons: Array<swiftApi.ActiveDFYCouponModel> = [] 15 static var dfyCoupons: Array<swiftApi.ActiveDFYCouponModel> = []
16 + static var couponList: Array<swiftApi.CouponItemModel> = []
16 } 17 }
17 18
18 public class swiftApi { 19 public class swiftApi {
...@@ -1712,5 +1713,46 @@ public class swiftApi { ...@@ -1712,5 +1713,46 @@ public class swiftApi {
1712 } 1713 }
1713 } 1714 }
1714 } 1715 }
1716 +
1717 +
1718 + public class LoyaltyBadgeModel {
1719 + private var value: Float
1720 + private var couponCount: Int
1721 +
1722 +
1723 + public init() {
1724 + self.value = 0.0
1725 + self.couponCount = 0
1726 +
1727 + }
1728 +
1729 + public var _value: Float {
1730 + get { // getter
1731 + return self.value
1732 + }
1733 + set(newValue) { //setter
1734 + self.value = newValue
1735 + }
1736 + }
1737 +
1738 + public var _couponCount: Int {
1739 + get { // getter
1740 + return self.couponCount
1741 + }
1742 + set(newValue) { //setter
1743 + self.couponCount = newValue
1744 + }
1745 + }
1746 + }
1747 +
1748 +
1749 + public func setCouponList(_ coupons: Array<CouponItemModel>) {
1750 + GlobalVariables.couponList = coupons
1751 + }
1752 +
1753 +
1754 + public func getCouponList() -> Array<CouponItemModel> {
1755 + return GlobalVariables.couponList
1756 + }
1715 1757
1716 } 1758 }
......