Showing
1 changed file
with
20 additions
and
1 deletions
| ... | @@ -775,7 +775,17 @@ public class swiftApi { | ... | @@ -775,7 +775,17 @@ public class swiftApi { |
| 775 | self.short_description = dictionary["short_description"] as? String? ?? "" | 775 | self.short_description = dictionary["short_description"] as? String? ?? "" |
| 776 | self.terms = dictionary["terms"] as? String? ?? "" | 776 | self.terms = dictionary["terms"] as? String? ?? "" |
| 777 | 777 | ||
| 778 | - if let couponSetData = dictionary["couponset_data"] as? [String: Any]? ?? ["":""] { | 778 | + // TODO: DELETE |
| 779 | +// if let couponSetData = dictionary["couponset_data"] as? [String: Any]? ?? ["":""] { | ||
| 780 | +// | ||
| 781 | +// let tempCouponset = CouponSetItemModel(dictionary: couponSetData) | ||
| 782 | +// | ||
| 783 | +// self.couponset_data = tempCouponset | ||
| 784 | +// } else { | ||
| 785 | +// self.couponset_data = nil | ||
| 786 | +// } | ||
| 787 | + | ||
| 788 | + if let couponSetData = dictionary["couponset_data"] as? [String: Any] { | ||
| 779 | 789 | ||
| 780 | let tempCouponset = CouponSetItemModel(dictionary: couponSetData) | 790 | let tempCouponset = CouponSetItemModel(dictionary: couponSetData) |
| 781 | 791 | ||
| ... | @@ -784,6 +794,15 @@ public class swiftApi { | ... | @@ -784,6 +794,15 @@ public class swiftApi { |
| 784 | self.couponset_data = nil | 794 | self.couponset_data = nil |
| 785 | } | 795 | } |
| 786 | 796 | ||
| 797 | + if let couponSetDetails = dictionary["couponset_details"] as? [String: Any] { | ||
| 798 | + | ||
| 799 | + let tempCouponset = CouponSetItemModel(dictionary: couponSetDetails) | ||
| 800 | + | ||
| 801 | + self.couponset_data = tempCouponset | ||
| 802 | + } else { | ||
| 803 | + self.couponset_data = nil | ||
| 804 | + } | ||
| 805 | + | ||
| 787 | 806 | ||
| 788 | let expirationString = dictionary["expiration"] as? String? ?? "" | 807 | let expirationString = dictionary["expiration"] as? String? ?? "" |
| 789 | // Example expirationString: Optional(2022-12-05 01:55) | 808 | // Example expirationString: Optional(2022-12-05 01:55) | ... | ... |
-
Please register or login to post a comment