Showing
2 changed files
with
70 additions
and
0 deletions
No preview for this file type
| ... | @@ -455,6 +455,76 @@ public class swiftApi { | ... | @@ -455,6 +455,76 @@ public class swiftApi { |
| 455 | public func getCampaigns() -> Array<CampaignItemModel> { | 455 | public func getCampaigns() -> Array<CampaignItemModel> { |
| 456 | return CampaignDataModel().getData | 456 | return CampaignDataModel().getData |
| 457 | } | 457 | } |
| 458 | + | ||
| 459 | + | ||
| 460 | + public class LoyaltyContextualOfferModel { | ||
| 461 | + private var sessionId: String | ||
| 462 | + private var eligibleAssets: Array<String> | ||
| 463 | + private var id: String | ||
| 464 | + private var businessAdditionalId: String | ||
| 465 | + private var treatmentCode: String | ||
| 466 | + | ||
| 467 | + public init(sessionId: String?, eligibleAssets: Array<String>?, id: String?, businessAdditionalId: String?, treatmentCode: String?) { | ||
| 468 | + self.sessionId = sessionId ?? "" | ||
| 469 | + self.eligibleAssets = eligibleAssets ?? [] | ||
| 470 | + self.id = id ?? "" | ||
| 471 | + self.businessAdditionalId = businessAdditionalId ?? "" | ||
| 472 | + self.treatmentCode = treatmentCode ?? "" | ||
| 473 | + } | ||
| 474 | + | ||
| 475 | + public init() { | ||
| 476 | + self.sessionId = "" | ||
| 477 | + self.eligibleAssets = [] | ||
| 478 | + self.id = "" | ||
| 479 | + self.businessAdditionalId = "" | ||
| 480 | + self.treatmentCode = "" | ||
| 481 | + } | ||
| 482 | + | ||
| 483 | + public var _sessionId: String { | ||
| 484 | + get { // getter | ||
| 485 | + return self.sessionId | ||
| 486 | + } | ||
| 487 | + set(newValue) { //setter | ||
| 488 | + self.sessionId = newValue | ||
| 489 | + } | ||
| 490 | + } | ||
| 491 | + | ||
| 492 | + public var _eligibleAssets: Array<String> { | ||
| 493 | + get { // getter | ||
| 494 | + return self.eligibleAssets | ||
| 495 | + } | ||
| 496 | + set(newValue) { //setter | ||
| 497 | + self.eligibleAssets = newValue | ||
| 498 | + } | ||
| 499 | + } | ||
| 500 | + | ||
| 501 | + public var _id: String { | ||
| 502 | + get { // getter | ||
| 503 | + return self.id | ||
| 504 | + } | ||
| 505 | + set(newValue) { //setter | ||
| 506 | + self.id = newValue | ||
| 507 | + } | ||
| 508 | + } | ||
| 509 | + | ||
| 510 | + public var _businessAdditionalId: String { | ||
| 511 | + get { // getter | ||
| 512 | + return self.businessAdditionalId | ||
| 513 | + } | ||
| 514 | + set(newValue) { //setter | ||
| 515 | + self.businessAdditionalId = newValue | ||
| 516 | + } | ||
| 517 | + } | ||
| 518 | + | ||
| 519 | + public var _treatmentCode: String { | ||
| 520 | + get { // getter | ||
| 521 | + return self.treatmentCode | ||
| 522 | + } | ||
| 523 | + set(newValue) { //setter | ||
| 524 | + self.treatmentCode = newValue | ||
| 525 | + } | ||
| 526 | + } | ||
| 527 | + } | ||
| 458 | 528 | ||
| 459 | // public func openCoupon(parent: UIView, coupon: CouponSetItemModel) -> UIViewController { | 529 | // public func openCoupon(parent: UIView, coupon: CouponSetItemModel) -> UIViewController { |
| 460 | // return UIHostingController(rootView: CouponView(parentView: parent, coupon: coupon)) | 530 | // return UIHostingController(rootView: CouponView(parentView: parent, coupon: coupon)) | ... | ... |
-
Please register or login to post a comment