Showing
1 changed file
with
36 additions
and
4 deletions
... | @@ -424,9 +424,9 @@ public class swiftApi { | ... | @@ -424,9 +424,9 @@ public class swiftApi { |
424 | 424 | ||
425 | public class CampaignItemModel { | 425 | public class CampaignItemModel { |
426 | public let index_url: String? | 426 | public let index_url: String? |
427 | - public let logo_url: String? | 427 | + public var logo_url: String? |
428 | public let offer_category: String? | 428 | public let offer_category: String? |
429 | - public let title: String? | 429 | + public var title: String? |
430 | public let subtitle: String? | 430 | public let subtitle: String? |
431 | public let session_uuid: String? | 431 | public let session_uuid: String? |
432 | public let subcategory: String? | 432 | public let subcategory: String? |
... | @@ -436,7 +436,22 @@ public class swiftApi { | ... | @@ -436,7 +436,22 @@ public class swiftApi { |
436 | public let hasExtraFields: Bool? | 436 | public let hasExtraFields: Bool? |
437 | public let ccms_offer: String? | 437 | public let ccms_offer: String? |
438 | 438 | ||
439 | - init(dictionary: [String: Any]) { | 439 | + public init() { |
440 | + self.index_url = "" | ||
441 | + self.logo_url = "" | ||
442 | + self.offer_category = "" | ||
443 | + self.title = "" | ||
444 | + self.subtitle = "" | ||
445 | + self.session_uuid = "" | ||
446 | + self.is_new = false | ||
447 | + self.message = "" | ||
448 | + self.subcategory = "" | ||
449 | + self.loyaltyCampaignId = "" | ||
450 | + self.hasExtraFields = false | ||
451 | + self.ccms_offer = "false" | ||
452 | + } | ||
453 | + | ||
454 | + public init(dictionary: [String: Any]) { | ||
440 | self.index_url = dictionary["index_url"] as? String? ?? "" | 455 | self.index_url = dictionary["index_url"] as? String? ?? "" |
441 | self.logo_url = dictionary["logo_url"] as? String? ?? "" | 456 | self.logo_url = dictionary["logo_url"] as? String? ?? "" |
442 | self.offer_category = dictionary["offer_category"] as? String? ?? "" | 457 | self.offer_category = dictionary["offer_category"] as? String? ?? "" |
... | @@ -473,7 +488,24 @@ public class swiftApi { | ... | @@ -473,7 +488,24 @@ public class swiftApi { |
473 | self.ccms_offer = "false" | 488 | self.ccms_offer = "false" |
474 | print(error) | 489 | print(error) |
475 | } | 490 | } |
476 | - | 491 | + } |
492 | + | ||
493 | + public var _logo_url: String? { | ||
494 | + get { // getter | ||
495 | + return self.logo_url | ||
496 | + } | ||
497 | + set(newValue) { //setter | ||
498 | + self.logo_url = newValue | ||
499 | + } | ||
500 | + } | ||
501 | + | ||
502 | + public var _title: String? { | ||
503 | + get { // getter | ||
504 | + return self.title | ||
505 | + } | ||
506 | + set(newValue) { //setter | ||
507 | + self.title = newValue | ||
508 | + } | ||
477 | } | 509 | } |
478 | } | 510 | } |
479 | 511 | ... | ... |
-
Please register or login to post a comment