Showing
2 changed files
with
17 additions
and
26 deletions
... | @@ -59,24 +59,24 @@ import SwiftEventBus | ... | @@ -59,24 +59,24 @@ import SwiftEventBus |
59 | SwiftEventBus.post("coupon_retrieved", sender: couponEvent) | 59 | SwiftEventBus.post("coupon_retrieved", sender: couponEvent) |
60 | 60 | ||
61 | } else if (eventArray[2] == "serviceDisabled") { | 61 | } else if (eventArray[2] == "serviceDisabled") { |
62 | - let pacingService = swiftApi.WarplyPacingCardServiceEnabledModel() | 62 | + let pacingService = swiftApi.WarplyPacingEventModel() |
63 | pacingService._isEnabled = false | 63 | pacingService._isEnabled = false |
64 | - SwiftEventBus.post("pacing_service", sender: pacingService) | 64 | + SwiftEventBus.post("pacing", sender: pacingService) |
65 | 65 | ||
66 | } else if (eventArray[2] == "serviceEnabled") { | 66 | } else if (eventArray[2] == "serviceEnabled") { |
67 | - let pacingService = swiftApi.WarplyPacingCardServiceEnabledModel() | 67 | + let pacingService = swiftApi.WarplyPacingEventModel() |
68 | pacingService._isEnabled = true | 68 | pacingService._isEnabled = true |
69 | - SwiftEventBus.post("pacing_service", sender: pacingService) | 69 | + SwiftEventBus.post("pacing", sender: pacingService) |
70 | 70 | ||
71 | } else if (eventArray[2] == "shortcutEnabled") { | 71 | } else if (eventArray[2] == "shortcutEnabled") { |
72 | - let pacingEvent = swiftApi.WarplyPacingCardEventModel() | 72 | + let pacingEvent = swiftApi.WarplyPacingEventModel() |
73 | pacingEvent._isVisible = true | 73 | pacingEvent._isVisible = true |
74 | - SwiftEventBus.post("pacing_visible", sender: pacingEvent) | 74 | + SwiftEventBus.post("pacing", sender: pacingEvent) |
75 | 75 | ||
76 | } else if (eventArray[2] == "shortcutDisabled") { | 76 | } else if (eventArray[2] == "shortcutDisabled") { |
77 | - let pacingEvent = swiftApi.WarplyPacingCardEventModel() | 77 | + let pacingEvent = swiftApi.WarplyPacingEventModel() |
78 | pacingEvent._isVisible = false | 78 | pacingEvent._isVisible = false |
79 | - SwiftEventBus.post("pacing_visible", sender: pacingEvent) | 79 | + SwiftEventBus.post("pacing", sender: pacingEvent) |
80 | 80 | ||
81 | } else if (eventArray[1] == "request" || eventArray[1] == "response") { | 81 | } else if (eventArray[1] == "request" || eventArray[1] == "response") { |
82 | print("**************** WARPLY Webview Log START *****************") | 82 | print("**************** WARPLY Webview Log START *****************") | ... | ... |
... | @@ -2034,39 +2034,30 @@ public class swiftApi { | ... | @@ -2034,39 +2034,30 @@ public class swiftApi { |
2034 | } | 2034 | } |
2035 | 2035 | ||
2036 | 2036 | ||
2037 | - public class WarplyPacingCardEventModel { | 2037 | + public class WarplyPacingEventModel { |
2038 | + private var isEnabled: Bool | ||
2038 | private var isVisible: Bool | 2039 | private var isVisible: Bool |
2039 | 2040 | ||
2040 | public init() { | 2041 | public init() { |
2042 | + self.isEnabled = false | ||
2041 | self.isVisible = false | 2043 | self.isVisible = false |
2042 | - | ||
2043 | } | 2044 | } |
2044 | 2045 | ||
2045 | - public var _isVisible: Bool { | 2046 | + public var _isEnabled: Bool { |
2046 | get { // getter | 2047 | get { // getter |
2047 | - return self.isVisible | 2048 | + return self.isEnabled |
2048 | } | 2049 | } |
2049 | set(newValue) { //setter | 2050 | set(newValue) { //setter |
2050 | - self.isVisible = newValue | 2051 | + self.isEnabled = newValue |
2051 | - } | ||
2052 | - } | ||
2053 | } | 2052 | } |
2054 | - | ||
2055 | - | ||
2056 | - public class WarplyPacingCardServiceEnabledModel { | ||
2057 | - private var isEnabled: Bool | ||
2058 | - | ||
2059 | - public init() { | ||
2060 | - self.isEnabled = false | ||
2061 | - | ||
2062 | } | 2053 | } |
2063 | 2054 | ||
2064 | - public var _isEnabled: Bool { | 2055 | + public var _isVisible: Bool { |
2065 | get { // getter | 2056 | get { // getter |
2066 | - return self.isEnabled | 2057 | + return self.isVisible |
2067 | } | 2058 | } |
2068 | set(newValue) { //setter | 2059 | set(newValue) { //setter |
2069 | - self.isEnabled = newValue | 2060 | + self.isVisible = newValue |
2070 | } | 2061 | } |
2071 | } | 2062 | } |
2072 | } | 2063 | } | ... | ... |
-
Please register or login to post a comment