Manos Chorianopoulos

update Client Documentation

......@@ -295,6 +295,7 @@ The SwiftWarplyFramework provides ready-to-use view controllers that you can int
| `MyRewardsViewController` | Main rewards screen | Displays campaigns, offers, and banners |
| `ProfileViewController` | User profile & coupons | Shows user profile and coupon management |
| `CouponViewController` | Individual coupon details | Displays detailed coupon information |
| `CouponsetViewController` | Coupon set details | Displays detailed coupon set information with expandable description, terms, store locator, and website link |
#### **Basic Integration Example**
......@@ -318,6 +319,15 @@ class MainViewController: UIViewController {
// Push onto navigation stack
navigationController?.pushViewController(profileVC, animated: true)
}
func showCouponSetDetails(_ couponSet: CouponSetItemModel) {
// Create the coupon set detail view controller
let couponsetVC = CouponsetViewController()
couponsetVC.couponset = couponSet
// Push onto navigation stack
navigationController?.pushViewController(couponsetVC, animated: true)
}
}
```
......@@ -431,6 +441,12 @@ class WarplyFlowCoordinator {
navigationController?.pushViewController(couponVC, animated: true)
}
func showCouponSetDetails(with couponSet: CouponSetItemModel) {
let couponsetVC = CouponsetViewController()
couponsetVC.couponset = couponSet
navigationController?.pushViewController(couponsetVC, animated: true)
}
func dismissToRoot() {
navigationController?.popToRootViewController(animated: true)
}
......@@ -517,6 +533,10 @@ class MainViewController: UIViewController {
if let couponId = navigationData["coupon_id"] as? String {
showCouponDetails(couponId: couponId)
}
case "couponset_details":
if let couponSet = navigationData["coupon_set"] as? CouponSetItemModel {
showCouponSetDetails(couponSet: couponSet)
}
default:
break
}
......@@ -533,6 +553,12 @@ class MainViewController: UIViewController {
// Configure with coupon ID
navigationController?.pushViewController(couponVC, animated: true)
}
private func showCouponSetDetails(couponSet: CouponSetItemModel) {
let couponsetVC = CouponsetViewController()
couponsetVC.couponset = couponSet
navigationController?.pushViewController(couponsetVC, animated: true)
}
}
```
......@@ -645,6 +671,7 @@ class AppCoordinator {
protocol WarplyNavigationDelegate: AnyObject {
func didRequestShowProfile()
func didRequestShowCoupon(_ coupon: OfferModel)
func didRequestShowCouponSet(_ couponSet: CouponSetItemModel)
}
class MainViewController: UIViewController, WarplyNavigationDelegate {
......@@ -658,6 +685,12 @@ class MainViewController: UIViewController, WarplyNavigationDelegate {
couponVC.coupon = coupon
navigationController?.pushViewController(couponVC, animated: true)
}
func didRequestShowCouponSet(_ couponSet: CouponSetItemModel) {
let couponsetVC = CouponsetViewController()
couponsetVC.couponset = couponSet
navigationController?.pushViewController(couponsetVC, animated: true)
}
}
```
......