Manos Chorianopoulos

update Client Documentation

...@@ -295,6 +295,7 @@ The SwiftWarplyFramework provides ready-to-use view controllers that you can int ...@@ -295,6 +295,7 @@ The SwiftWarplyFramework provides ready-to-use view controllers that you can int
295 | `MyRewardsViewController` | Main rewards screen | Displays campaigns, offers, and banners | 295 | `MyRewardsViewController` | Main rewards screen | Displays campaigns, offers, and banners |
296 | `ProfileViewController` | User profile & coupons | Shows user profile and coupon management | 296 | `ProfileViewController` | User profile & coupons | Shows user profile and coupon management |
297 | `CouponViewController` | Individual coupon details | Displays detailed coupon information | 297 | `CouponViewController` | Individual coupon details | Displays detailed coupon information |
298 +| `CouponsetViewController` | Coupon set details | Displays detailed coupon set information with expandable description, terms, store locator, and website link |
298 299
299 #### **Basic Integration Example** 300 #### **Basic Integration Example**
300 301
...@@ -318,6 +319,15 @@ class MainViewController: UIViewController { ...@@ -318,6 +319,15 @@ class MainViewController: UIViewController {
318 // Push onto navigation stack 319 // Push onto navigation stack
319 navigationController?.pushViewController(profileVC, animated: true) 320 navigationController?.pushViewController(profileVC, animated: true)
320 } 321 }
322 +
323 + func showCouponSetDetails(_ couponSet: CouponSetItemModel) {
324 + // Create the coupon set detail view controller
325 + let couponsetVC = CouponsetViewController()
326 + couponsetVC.couponset = couponSet
327 +
328 + // Push onto navigation stack
329 + navigationController?.pushViewController(couponsetVC, animated: true)
330 + }
321 } 331 }
322 ``` 332 ```
323 333
...@@ -431,6 +441,12 @@ class WarplyFlowCoordinator { ...@@ -431,6 +441,12 @@ class WarplyFlowCoordinator {
431 navigationController?.pushViewController(couponVC, animated: true) 441 navigationController?.pushViewController(couponVC, animated: true)
432 } 442 }
433 443
444 + func showCouponSetDetails(with couponSet: CouponSetItemModel) {
445 + let couponsetVC = CouponsetViewController()
446 + couponsetVC.couponset = couponSet
447 + navigationController?.pushViewController(couponsetVC, animated: true)
448 + }
449 +
434 func dismissToRoot() { 450 func dismissToRoot() {
435 navigationController?.popToRootViewController(animated: true) 451 navigationController?.popToRootViewController(animated: true)
436 } 452 }
...@@ -517,6 +533,10 @@ class MainViewController: UIViewController { ...@@ -517,6 +533,10 @@ class MainViewController: UIViewController {
517 if let couponId = navigationData["coupon_id"] as? String { 533 if let couponId = navigationData["coupon_id"] as? String {
518 showCouponDetails(couponId: couponId) 534 showCouponDetails(couponId: couponId)
519 } 535 }
536 + case "couponset_details":
537 + if let couponSet = navigationData["coupon_set"] as? CouponSetItemModel {
538 + showCouponSetDetails(couponSet: couponSet)
539 + }
520 default: 540 default:
521 break 541 break
522 } 542 }
...@@ -533,6 +553,12 @@ class MainViewController: UIViewController { ...@@ -533,6 +553,12 @@ class MainViewController: UIViewController {
533 // Configure with coupon ID 553 // Configure with coupon ID
534 navigationController?.pushViewController(couponVC, animated: true) 554 navigationController?.pushViewController(couponVC, animated: true)
535 } 555 }
556 +
557 + private func showCouponSetDetails(couponSet: CouponSetItemModel) {
558 + let couponsetVC = CouponsetViewController()
559 + couponsetVC.couponset = couponSet
560 + navigationController?.pushViewController(couponsetVC, animated: true)
561 + }
536 } 562 }
537 ``` 563 ```
538 564
...@@ -645,6 +671,7 @@ class AppCoordinator { ...@@ -645,6 +671,7 @@ class AppCoordinator {
645 protocol WarplyNavigationDelegate: AnyObject { 671 protocol WarplyNavigationDelegate: AnyObject {
646 func didRequestShowProfile() 672 func didRequestShowProfile()
647 func didRequestShowCoupon(_ coupon: OfferModel) 673 func didRequestShowCoupon(_ coupon: OfferModel)
674 + func didRequestShowCouponSet(_ couponSet: CouponSetItemModel)
648 } 675 }
649 676
650 class MainViewController: UIViewController, WarplyNavigationDelegate { 677 class MainViewController: UIViewController, WarplyNavigationDelegate {
...@@ -658,6 +685,12 @@ class MainViewController: UIViewController, WarplyNavigationDelegate { ...@@ -658,6 +685,12 @@ class MainViewController: UIViewController, WarplyNavigationDelegate {
658 couponVC.coupon = coupon 685 couponVC.coupon = coupon
659 navigationController?.pushViewController(couponVC, animated: true) 686 navigationController?.pushViewController(couponVC, animated: true)
660 } 687 }
688 +
689 + func didRequestShowCouponSet(_ couponSet: CouponSetItemModel) {
690 + let couponsetVC = CouponsetViewController()
691 + couponsetVC.couponset = couponSet
692 + navigationController?.pushViewController(couponsetVC, animated: true)
693 + }
661 } 694 }
662 ``` 695 ```
663 696
......