Manos Chorianopoulos

add filter key to CampaignItemModel

......@@ -1193,6 +1193,7 @@ public class swiftApi {
private var category_id: String?
private var start_date: String?
private var end_date: String?
private var filter: String? // supermarket - free - contest etc
public init() {
self.index_url = ""
......@@ -1223,6 +1224,7 @@ public class swiftApi {
self.category_id = ""
self.start_date = ""
self.end_date = ""
self.filter = ""
}
public init(dictionary: [String: Any]) {
......@@ -1277,6 +1279,7 @@ public class swiftApi {
self.banner_img = extra_fields["Banner_img"] as? String ?? ""
self.banner_title = extra_fields["Banner_title"] as? String ?? ""
self.category_id = extra_fields["category_id"] as? String ?? ""
self.filter = extra_fields["filter"] as? String ?? ""
} else {
self.subcategory = ""
self.loyaltyCampaignId = ""
......@@ -1288,6 +1291,7 @@ public class swiftApi {
self.category_title = ""
self.banner_img = ""
self.banner_title = ""
self.filter = ""
}
// let extra_fields = dictionary["extra_fields"] as AnyObject
......@@ -1542,6 +1546,15 @@ public class swiftApi {
self.end_date = newValue
}
}
public var _filter: String? {
get { // getter
return self.filter
}
set(newValue) { //setter
self.filter = newValue
}
}
}
public class CampaignDataModel {
......