Manos Chorianopoulos

modify CampaignItemModel

......@@ -424,9 +424,9 @@ public class swiftApi {
public class CampaignItemModel {
public let index_url: String?
public let logo_url: String?
public var logo_url: String?
public let offer_category: String?
public let title: String?
public var title: String?
public let subtitle: String?
public let session_uuid: String?
public let subcategory: String?
......@@ -436,7 +436,22 @@ public class swiftApi {
public let hasExtraFields: Bool?
public let ccms_offer: String?
init(dictionary: [String: Any]) {
public init() {
self.index_url = ""
self.logo_url = ""
self.offer_category = ""
self.title = ""
self.subtitle = ""
self.session_uuid = ""
self.is_new = false
self.message = ""
self.subcategory = ""
self.loyaltyCampaignId = ""
self.hasExtraFields = false
self.ccms_offer = "false"
}
public init(dictionary: [String: Any]) {
self.index_url = dictionary["index_url"] as? String? ?? ""
self.logo_url = dictionary["logo_url"] as? String? ?? ""
self.offer_category = dictionary["offer_category"] as? String? ?? ""
......@@ -473,7 +488,24 @@ public class swiftApi {
self.ccms_offer = "false"
print(error)
}
}
public var _logo_url: String? {
get { // getter
return self.logo_url
}
set(newValue) { //setter
self.logo_url = newValue
}
}
public var _title: String? {
get { // getter
return self.title
}
set(newValue) { //setter
self.title = newValue
}
}
}
......