Showing
1 changed file
with
395 additions
and
0 deletions
... | @@ -506,6 +506,12 @@ public class swiftApi { | ... | @@ -506,6 +506,12 @@ public class swiftApi { |
506 | couponSets = couponSetsData ?? ["":""] | 506 | couponSets = couponSetsData ?? ["":""] |
507 | 507 | ||
508 | if let myCouponsSetsDictionary = couponSets as? [String : AnyObject] { | 508 | if let myCouponsSetsDictionary = couponSets as? [String : AnyObject] { |
509 | + | ||
510 | + let dynatraceEvent = swiftApi.LoyaltySDKDynatraceEventModel() | ||
511 | + dynatraceEvent._eventName = "custom_success_couponset_loyalty" | ||
512 | + dynatraceEvent._parameters = nil | ||
513 | + SwiftEventBus.post("dynatrace", sender: dynatraceEvent) | ||
514 | + | ||
509 | let couponSetsData = (myCouponsSetsDictionary["MAPP_COUPON"] as! NSArray) | 515 | let couponSetsData = (myCouponsSetsDictionary["MAPP_COUPON"] as! NSArray) |
510 | 516 | ||
511 | for couponset in couponSetsData { | 517 | for couponset in couponSetsData { |
... | @@ -513,6 +519,11 @@ public class swiftApi { | ... | @@ -513,6 +519,11 @@ public class swiftApi { |
513 | couponSetsArray.append(tempCouponset) | 519 | couponSetsArray.append(tempCouponset) |
514 | } | 520 | } |
515 | 521 | ||
522 | + } else { | ||
523 | + let dynatraceEvent = swiftApi.LoyaltySDKDynatraceEventModel() | ||
524 | + dynatraceEvent._eventName = "custom_error_couponset_loyalty" | ||
525 | + dynatraceEvent._parameters = nil | ||
526 | + SwiftEventBus.post("dynatrace", sender: dynatraceEvent) | ||
516 | } | 527 | } |
517 | 528 | ||
518 | swiftApi().setCouponSetList(couponSetsArray) | 529 | swiftApi().setCouponSetList(couponSetsArray) |
... | @@ -521,6 +532,12 @@ public class swiftApi { | ... | @@ -521,6 +532,12 @@ public class swiftApi { |
521 | 532 | ||
522 | func couponSetsFailureCallback(_ error: Error?) -> Void { | 533 | func couponSetsFailureCallback(_ error: Error?) -> Void { |
523 | print("getCouponSets error: ") | 534 | print("getCouponSets error: ") |
535 | + | ||
536 | + let dynatraceEvent = swiftApi.LoyaltySDKDynatraceEventModel() | ||
537 | + dynatraceEvent._eventName = "custom_error_couponset_loyalty" | ||
538 | + dynatraceEvent._parameters = nil | ||
539 | + SwiftEventBus.post("dynatrace", sender: dynatraceEvent) | ||
540 | + | ||
524 | getCouponSetsCallback(nil) | 541 | getCouponSetsCallback(nil) |
525 | } | 542 | } |
526 | 543 | ||
... | @@ -660,6 +677,11 @@ public class swiftApi { | ... | @@ -660,6 +677,11 @@ public class swiftApi { |
660 | 677 | ||
661 | func couponsCallback(_ couponsData: [AnyHashable : Any]?) -> Void { | 678 | func couponsCallback(_ couponsData: [AnyHashable : Any]?) -> Void { |
662 | coupons = couponsData ?? ["":""] | 679 | coupons = couponsData ?? ["":""] |
680 | + | ||
681 | + let dynatraceEvent = swiftApi.LoyaltySDKDynatraceEventModel() | ||
682 | + dynatraceEvent._eventName = "custom_success_user_coupons_loyalty" | ||
683 | + dynatraceEvent._parameters = nil | ||
684 | + SwiftEventBus.post("dynatrace", sender: dynatraceEvent) | ||
663 | 685 | ||
664 | // On Coupons request success, make CouponSets request | 686 | // On Coupons request success, make CouponSets request |
665 | instanceOfMyApi.getCouponsetsAsync(true, andVisible: true, andUuids: nil, couponSetsCallback, failureBlock: couponSetsFailureCallback) | 687 | instanceOfMyApi.getCouponsetsAsync(true, andVisible: true, andUuids: nil, couponSetsCallback, failureBlock: couponSetsFailureCallback) |
... | @@ -667,6 +689,12 @@ public class swiftApi { | ... | @@ -667,6 +689,12 @@ public class swiftApi { |
667 | 689 | ||
668 | func couponsFailureCallback(_ error: Error?) -> Void { | 690 | func couponsFailureCallback(_ error: Error?) -> Void { |
669 | print("getCoupons error: ") | 691 | print("getCoupons error: ") |
692 | + | ||
693 | + let dynatraceEvent = swiftApi.LoyaltySDKDynatraceEventModel() | ||
694 | + dynatraceEvent._eventName = "custom_error_user_coupons_loyalty" | ||
695 | + dynatraceEvent._parameters = nil | ||
696 | + SwiftEventBus.post("dynatrace", sender: dynatraceEvent) | ||
697 | + | ||
670 | getCouponsCallback(nil) | 698 | getCouponsCallback(nil) |
671 | } | 699 | } |
672 | 700 | ||
... | @@ -674,6 +702,11 @@ public class swiftApi { | ... | @@ -674,6 +702,11 @@ public class swiftApi { |
674 | couponSets = couponSetsData ?? ["":""] | 702 | couponSets = couponSetsData ?? ["":""] |
675 | 703 | ||
676 | if let myCouponsSetsDictionary = couponSets as? [String : AnyObject] { | 704 | if let myCouponsSetsDictionary = couponSets as? [String : AnyObject] { |
705 | + let dynatraceEvent = swiftApi.LoyaltySDKDynatraceEventModel() | ||
706 | + dynatraceEvent._eventName = "custom_success_couponset_loyalty" | ||
707 | + dynatraceEvent._parameters = nil | ||
708 | + SwiftEventBus.post("dynatrace", sender: dynatraceEvent) | ||
709 | + | ||
677 | let couponSetsData = (myCouponsSetsDictionary["MAPP_COUPON"] as! NSArray) | 710 | let couponSetsData = (myCouponsSetsDictionary["MAPP_COUPON"] as! NSArray) |
678 | 711 | ||
679 | for couponset in couponSetsData { | 712 | for couponset in couponSetsData { |
... | @@ -681,6 +714,11 @@ public class swiftApi { | ... | @@ -681,6 +714,11 @@ public class swiftApi { |
681 | couponSetsArray.append(tempCouponset) | 714 | couponSetsArray.append(tempCouponset) |
682 | } | 715 | } |
683 | 716 | ||
717 | + } else { | ||
718 | + let dynatraceEvent = swiftApi.LoyaltySDKDynatraceEventModel() | ||
719 | + dynatraceEvent._eventName = "custom_error_couponset_loyalty" | ||
720 | + dynatraceEvent._parameters = nil | ||
721 | + SwiftEventBus.post("dynatrace", sender: dynatraceEvent) | ||
684 | } | 722 | } |
685 | swiftApi().setCouponSetList(couponSetsArray) | 723 | swiftApi().setCouponSetList(couponSetsArray) |
686 | 724 | ||
... | @@ -712,6 +750,12 @@ public class swiftApi { | ... | @@ -712,6 +750,12 @@ public class swiftApi { |
712 | 750 | ||
713 | func couponSetsFailureCallback(_ error: Error?) -> Void { | 751 | func couponSetsFailureCallback(_ error: Error?) -> Void { |
714 | print("getCouponSets error: ") | 752 | print("getCouponSets error: ") |
753 | + | ||
754 | + let dynatraceEvent = swiftApi.LoyaltySDKDynatraceEventModel() | ||
755 | + dynatraceEvent._eventName = "custom_error_couponset_loyalty" | ||
756 | + dynatraceEvent._parameters = nil | ||
757 | + SwiftEventBus.post("dynatrace", sender: dynatraceEvent) | ||
758 | + | ||
715 | getCouponsCallback(nil) | 759 | getCouponsCallback(nil) |
716 | } | 760 | } |
717 | 761 | ||
... | @@ -1145,6 +1189,11 @@ public class swiftApi { | ... | @@ -1145,6 +1189,11 @@ public class swiftApi { |
1145 | if let responseDataDictionary = campaignsData as? [String: AnyObject] { | 1189 | if let responseDataDictionary = campaignsData as? [String: AnyObject] { |
1146 | 1190 | ||
1147 | if (responseDataDictionary["MAPP_CAMPAIGNING-status"] as? Int == 1) { | 1191 | if (responseDataDictionary["MAPP_CAMPAIGNING-status"] as? Int == 1) { |
1192 | + let dynatraceEvent = swiftApi.LoyaltySDKDynatraceEventModel() | ||
1193 | + dynatraceEvent._eventName = "custom_success_campaigns_loyalty" | ||
1194 | + dynatraceEvent._parameters = nil | ||
1195 | + SwiftEventBus.post("dynatrace", sender: dynatraceEvent) | ||
1196 | + | ||
1148 | if let responseDataMapp = responseDataDictionary["MAPP_CAMPAIGNING"] as? [String: Any] { | 1197 | if let responseDataMapp = responseDataDictionary["MAPP_CAMPAIGNING"] as? [String: Any] { |
1149 | if let responseDataCampaigns = responseDataMapp["campaigns"] as? [[String : Any]?] { | 1198 | if let responseDataCampaigns = responseDataMapp["campaigns"] as? [[String : Any]?] { |
1150 | 1199 | ||
... | @@ -1195,10 +1244,20 @@ public class swiftApi { | ... | @@ -1195,10 +1244,20 @@ public class swiftApi { |
1195 | }) | 1244 | }) |
1196 | 1245 | ||
1197 | } else { | 1246 | } else { |
1247 | + let dynatraceEvent = swiftApi.LoyaltySDKDynatraceEventModel() | ||
1248 | + dynatraceEvent._eventName = "custom_error_campaigns_loyalty" | ||
1249 | + dynatraceEvent._parameters = nil | ||
1250 | + SwiftEventBus.post("dynatrace", sender: dynatraceEvent) | ||
1251 | + | ||
1198 | getCampaignsCallback(nil) | 1252 | getCampaignsCallback(nil) |
1199 | } | 1253 | } |
1200 | 1254 | ||
1201 | } else { | 1255 | } else { |
1256 | + let dynatraceEvent = swiftApi.LoyaltySDKDynatraceEventModel() | ||
1257 | + dynatraceEvent._eventName = "custom_error_campaigns_loyalty" | ||
1258 | + dynatraceEvent._parameters = nil | ||
1259 | + SwiftEventBus.post("dynatrace", sender: dynatraceEvent) | ||
1260 | + | ||
1202 | getCampaignsCallback(nil) | 1261 | getCampaignsCallback(nil) |
1203 | } | 1262 | } |
1204 | } | 1263 | } |
... | @@ -1207,6 +1266,12 @@ public class swiftApi { | ... | @@ -1207,6 +1266,12 @@ public class swiftApi { |
1207 | print("getCampaigns error: ") | 1266 | print("getCampaigns error: ") |
1208 | print(error) | 1267 | print(error) |
1209 | print("====================") | 1268 | print("====================") |
1269 | + | ||
1270 | + let dynatraceEvent = swiftApi.LoyaltySDKDynatraceEventModel() | ||
1271 | + dynatraceEvent._eventName = "custom_error_campaigns_loyalty" | ||
1272 | + dynatraceEvent._parameters = nil | ||
1273 | + SwiftEventBus.post("dynatrace", sender: dynatraceEvent) | ||
1274 | + | ||
1210 | getCampaignsCallback(nil) | 1275 | getCampaignsCallback(nil) |
1211 | } | 1276 | } |
1212 | } | 1277 | } |
... | @@ -1223,6 +1288,11 @@ public class swiftApi { | ... | @@ -1223,6 +1288,11 @@ public class swiftApi { |
1223 | if let responseDataDictionary = campaignsData as? [String: AnyObject] { | 1288 | if let responseDataDictionary = campaignsData as? [String: AnyObject] { |
1224 | 1289 | ||
1225 | if (responseDataDictionary["status"] as? Int == 1) { | 1290 | if (responseDataDictionary["status"] as? Int == 1) { |
1291 | + | ||
1292 | + let dynatraceEvent = swiftApi.LoyaltySDKDynatraceEventModel() | ||
1293 | + dynatraceEvent._eventName = "custom_success_campaigns_personalized_loyalty" | ||
1294 | + dynatraceEvent._parameters = nil | ||
1295 | + SwiftEventBus.post("dynatrace", sender: dynatraceEvent) | ||
1226 | 1296 | ||
1227 | if let responseDataContext = responseDataDictionary["context"] as? [String: Any] { | 1297 | if let responseDataContext = responseDataDictionary["context"] as? [String: Any] { |
1228 | 1298 | ||
... | @@ -1252,10 +1322,20 @@ public class swiftApi { | ... | @@ -1252,10 +1322,20 @@ public class swiftApi { |
1252 | getCampaignsCallback(nil) | 1322 | getCampaignsCallback(nil) |
1253 | } | 1323 | } |
1254 | } else { | 1324 | } else { |
1325 | + let dynatraceEvent = swiftApi.LoyaltySDKDynatraceEventModel() | ||
1326 | + dynatraceEvent._eventName = "custom_error_campaigns_personalized_loyalty" | ||
1327 | + dynatraceEvent._parameters = nil | ||
1328 | + SwiftEventBus.post("dynatrace", sender: dynatraceEvent) | ||
1329 | + | ||
1255 | getCampaignsCallback(nil) | 1330 | getCampaignsCallback(nil) |
1256 | } | 1331 | } |
1257 | 1332 | ||
1258 | } else { | 1333 | } else { |
1334 | + let dynatraceEvent = swiftApi.LoyaltySDKDynatraceEventModel() | ||
1335 | + dynatraceEvent._eventName = "custom_error_campaigns_personalized_loyalty" | ||
1336 | + dynatraceEvent._parameters = nil | ||
1337 | + SwiftEventBus.post("dynatrace", sender: dynatraceEvent) | ||
1338 | + | ||
1259 | getCampaignsCallback(nil) | 1339 | getCampaignsCallback(nil) |
1260 | } | 1340 | } |
1261 | } | 1341 | } |
... | @@ -1264,6 +1344,12 @@ public class swiftApi { | ... | @@ -1264,6 +1344,12 @@ public class swiftApi { |
1264 | print("getCampaignsPersonalized error: ") | 1344 | print("getCampaignsPersonalized error: ") |
1265 | print(error) | 1345 | print(error) |
1266 | print("====================") | 1346 | print("====================") |
1347 | + | ||
1348 | + let dynatraceEvent = swiftApi.LoyaltySDKDynatraceEventModel() | ||
1349 | + dynatraceEvent._eventName = "custom_error_campaigns_personalized_loyalty" | ||
1350 | + dynatraceEvent._parameters = nil | ||
1351 | + SwiftEventBus.post("dynatrace", sender: dynatraceEvent) | ||
1352 | + | ||
1267 | getCampaignsCallback(nil) | 1353 | getCampaignsCallback(nil) |
1268 | } | 1354 | } |
1269 | } | 1355 | } |
... | @@ -2260,6 +2346,11 @@ public class swiftApi { | ... | @@ -2260,6 +2346,11 @@ public class swiftApi { |
2260 | func profileCallback(_ profileData: [AnyHashable: Any]?) -> Void { | 2346 | func profileCallback(_ profileData: [AnyHashable: Any]?) -> Void { |
2261 | 2347 | ||
2262 | if let profileDataDictionary = profileData as? [String : AnyObject] { | 2348 | if let profileDataDictionary = profileData as? [String : AnyObject] { |
2349 | + let dynatraceEvent = swiftApi.LoyaltySDKDynatraceEventModel() | ||
2350 | + dynatraceEvent._eventName = "custom_success_profile_loyalty" | ||
2351 | + dynatraceEvent._parameters = nil | ||
2352 | + SwiftEventBus.post("dynatrace", sender: dynatraceEvent) | ||
2353 | + | ||
2263 | let profileDataResult = (profileDataDictionary["result"] as? [String: Any] ?? ["":""]) | 2354 | let profileDataResult = (profileDataDictionary["result"] as? [String: Any] ?? ["":""]) |
2264 | 2355 | ||
2265 | let tempProfile = ProfileModel(dictionary: profileDataResult) | 2356 | let tempProfile = ProfileModel(dictionary: profileDataResult) |
... | @@ -2273,6 +2364,11 @@ public class swiftApi { | ... | @@ -2273,6 +2364,11 @@ public class swiftApi { |
2273 | getProfileCallback(tempProfile); | 2364 | getProfileCallback(tempProfile); |
2274 | 2365 | ||
2275 | } else { | 2366 | } else { |
2367 | + let dynatraceEvent = swiftApi.LoyaltySDKDynatraceEventModel() | ||
2368 | + dynatraceEvent._eventName = "custom_error_profile_loyalty" | ||
2369 | + dynatraceEvent._parameters = nil | ||
2370 | + SwiftEventBus.post("dynatrace", sender: dynatraceEvent) | ||
2371 | + | ||
2276 | getProfileCallback(nil) | 2372 | getProfileCallback(nil) |
2277 | } | 2373 | } |
2278 | 2374 | ||
... | @@ -2280,6 +2376,12 @@ public class swiftApi { | ... | @@ -2280,6 +2376,12 @@ public class swiftApi { |
2280 | 2376 | ||
2281 | func profileFailureCallback(_ error: Error?) -> Void { | 2377 | func profileFailureCallback(_ error: Error?) -> Void { |
2282 | print("getProfile error: ") | 2378 | print("getProfile error: ") |
2379 | + | ||
2380 | + let dynatraceEvent = swiftApi.LoyaltySDKDynatraceEventModel() | ||
2381 | + dynatraceEvent._eventName = "custom_error_profile_loyalty" | ||
2382 | + dynatraceEvent._parameters = nil | ||
2383 | + SwiftEventBus.post("dynatrace", sender: dynatraceEvent) | ||
2384 | + | ||
2283 | getProfileCallback(nil) | 2385 | getProfileCallback(nil) |
2284 | } | 2386 | } |
2285 | 2387 | ||
... | @@ -2329,6 +2431,11 @@ public class swiftApi { | ... | @@ -2329,6 +2431,11 @@ public class swiftApi { |
2329 | func verifyAsyncCallback(_ verifyTicketData: [AnyHashable: Any]?) -> Void { | 2431 | func verifyAsyncCallback(_ verifyTicketData: [AnyHashable: Any]?) -> Void { |
2330 | 2432 | ||
2331 | if let verifyTicketDataDictionary = verifyTicketData as? [String: Any] { | 2433 | if let verifyTicketDataDictionary = verifyTicketData as? [String: Any] { |
2434 | + | ||
2435 | + let dynatraceEvent = swiftApi.LoyaltySDKDynatraceEventModel() | ||
2436 | + dynatraceEvent._eventName = "custom_success_login_loyalty" | ||
2437 | + dynatraceEvent._parameters = nil | ||
2438 | + SwiftEventBus.post("dynatrace", sender: dynatraceEvent) | ||
2332 | 2439 | ||
2333 | let tempResponse = VerifyTicketResponseModel(dictionary: verifyTicketDataDictionary) | 2440 | let tempResponse = VerifyTicketResponseModel(dictionary: verifyTicketDataDictionary) |
2334 | 2441 | ||
... | @@ -2337,6 +2444,11 @@ public class swiftApi { | ... | @@ -2337,6 +2444,11 @@ public class swiftApi { |
2337 | swiftApi().getProfileAsync(getProfileCallback) | 2444 | swiftApi().getProfileAsync(getProfileCallback) |
2338 | 2445 | ||
2339 | } else { | 2446 | } else { |
2447 | + let dynatraceEvent = swiftApi.LoyaltySDKDynatraceEventModel() | ||
2448 | + dynatraceEvent._eventName = "custom_error_login_loyalty" | ||
2449 | + dynatraceEvent._parameters = nil | ||
2450 | + SwiftEventBus.post("dynatrace", sender: dynatraceEvent) | ||
2451 | + | ||
2340 | verifyTicketCallback(nil) | 2452 | verifyTicketCallback(nil) |
2341 | } | 2453 | } |
2342 | 2454 | ||
... | @@ -2346,6 +2458,12 @@ public class swiftApi { | ... | @@ -2346,6 +2458,12 @@ public class swiftApi { |
2346 | print("verifyTicket error: ") | 2458 | print("verifyTicket error: ") |
2347 | print(error) | 2459 | print(error) |
2348 | print("====================") | 2460 | print("====================") |
2461 | + | ||
2462 | + let dynatraceEvent = swiftApi.LoyaltySDKDynatraceEventModel() | ||
2463 | + dynatraceEvent._eventName = "custom_error_login_loyalty" | ||
2464 | + dynatraceEvent._parameters = nil | ||
2465 | + SwiftEventBus.post("dynatrace", sender: dynatraceEvent) | ||
2466 | + | ||
2349 | verifyTicketCallback(nil) | 2467 | verifyTicketCallback(nil) |
2350 | } | 2468 | } |
2351 | 2469 | ||
... | @@ -2740,6 +2858,49 @@ public class swiftApi { | ... | @@ -2740,6 +2858,49 @@ public class swiftApi { |
2740 | } | 2858 | } |
2741 | } | 2859 | } |
2742 | 2860 | ||
2861 | + | ||
2862 | + public class LoyaltySDKDynatraceEventModel { | ||
2863 | + private var eventName: String | ||
2864 | + private var parameters: [String: String]? | ||
2865 | + | ||
2866 | + | ||
2867 | + public init() { | ||
2868 | + self.eventName = "" | ||
2869 | + self.parameters = [String: String]() | ||
2870 | + | ||
2871 | + } | ||
2872 | + | ||
2873 | + public var _eventName: String { | ||
2874 | + get { // getter | ||
2875 | + return self.eventName | ||
2876 | + } | ||
2877 | + set(newValue) { //setter | ||
2878 | + self.eventName = newValue | ||
2879 | + } | ||
2880 | + } | ||
2881 | + | ||
2882 | + public var _parameters: [String: String]? { | ||
2883 | + get { // getter | ||
2884 | + return self.parameters | ||
2885 | + } | ||
2886 | + set(newValue) { //setter | ||
2887 | + self.parameters = newValue | ||
2888 | + } | ||
2889 | + } | ||
2890 | + | ||
2891 | + public var setParameter: (key: String, value: String) { | ||
2892 | + @available(*, unavailable) | ||
2893 | + get { | ||
2894 | +// fatalError("You cannot read from this object.") | ||
2895 | + return (key: "", value: "") | ||
2896 | + } | ||
2897 | + set(newValue) { //setter | ||
2898 | + self.parameters?.updateValue(newValue.1, forKey: newValue.0) | ||
2899 | + | ||
2900 | + } | ||
2901 | + } | ||
2902 | + } | ||
2903 | + | ||
2743 | 2904 | ||
2744 | public func constructCampaignUrl(_ campaign: CampaignItemModel) -> String { | 2905 | public func constructCampaignUrl(_ campaign: CampaignItemModel) -> String { |
2745 | let instanceOfMyApi = MyApi() | 2906 | let instanceOfMyApi = MyApi() |
... | @@ -4627,14 +4788,29 @@ public class swiftApi { | ... | @@ -4627,14 +4788,29 @@ public class swiftApi { |
4627 | if ((responseDataDictionary["status"] as? Int == 1) || (responseDataDictionary["status"] as? Int == 4) || (responseDataDictionary["status"] as? Int == 5) || (responseDataDictionary["status"] as? Int == 7)) { | 4788 | if ((responseDataDictionary["status"] as? Int == 1) || (responseDataDictionary["status"] as? Int == 4) || (responseDataDictionary["status"] as? Int == 5) || (responseDataDictionary["status"] as? Int == 7)) { |
4628 | // let responseDataResult = (responseDataDictionary["result"] as? [String: Any] ?? [String: Any]()) | 4789 | // let responseDataResult = (responseDataDictionary["result"] as? [String: Any] ?? [String: Any]()) |
4629 | 4790 | ||
4791 | + let dynatraceEvent = swiftApi.LoyaltySDKDynatraceEventModel() | ||
4792 | + dynatraceEvent._eventName = "custom_success_sharing_loyalty" | ||
4793 | + dynatraceEvent._parameters = nil | ||
4794 | + SwiftEventBus.post("dynatrace", sender: dynatraceEvent) | ||
4795 | + | ||
4630 | let tempResponse = SharingResponseModel(dictionary: responseDataDictionary) | 4796 | let tempResponse = SharingResponseModel(dictionary: responseDataDictionary) |
4631 | cosmoteSharingCallback(tempResponse); | 4797 | cosmoteSharingCallback(tempResponse); |
4632 | } else { | 4798 | } else { |
4799 | + let dynatraceEvent = swiftApi.LoyaltySDKDynatraceEventModel() | ||
4800 | + dynatraceEvent._eventName = "custom_error_sharing_loyalty" | ||
4801 | + dynatraceEvent._parameters = nil | ||
4802 | + SwiftEventBus.post("dynatrace", sender: dynatraceEvent) | ||
4803 | + | ||
4633 | cosmoteSharingCallback(nil) | 4804 | cosmoteSharingCallback(nil) |
4634 | } | 4805 | } |
4635 | 4806 | ||
4636 | 4807 | ||
4637 | } else { | 4808 | } else { |
4809 | + let dynatraceEvent = swiftApi.LoyaltySDKDynatraceEventModel() | ||
4810 | + dynatraceEvent._eventName = "custom_error_sharing_loyalty" | ||
4811 | + dynatraceEvent._parameters = nil | ||
4812 | + SwiftEventBus.post("dynatrace", sender: dynatraceEvent) | ||
4813 | + | ||
4638 | cosmoteSharingCallback(nil) | 4814 | cosmoteSharingCallback(nil) |
4639 | } | 4815 | } |
4640 | 4816 | ||
... | @@ -4644,6 +4820,12 @@ public class swiftApi { | ... | @@ -4644,6 +4820,12 @@ public class swiftApi { |
4644 | print("cosmoteSharing error: ") | 4820 | print("cosmoteSharing error: ") |
4645 | print(error) | 4821 | print(error) |
4646 | print("====================") | 4822 | print("====================") |
4823 | + | ||
4824 | + let dynatraceEvent = swiftApi.LoyaltySDKDynatraceEventModel() | ||
4825 | + dynatraceEvent._eventName = "custom_error_sharing_loyalty" | ||
4826 | + dynatraceEvent._parameters = nil | ||
4827 | + SwiftEventBus.post("dynatrace", sender: dynatraceEvent) | ||
4828 | + | ||
4647 | cosmoteSharingCallback(nil) | 4829 | cosmoteSharingCallback(nil) |
4648 | } | 4830 | } |
4649 | } | 4831 | } |
... | @@ -4658,6 +4840,12 @@ public class swiftApi { | ... | @@ -4658,6 +4840,12 @@ public class swiftApi { |
4658 | 4840 | ||
4659 | if let responseDataDictionary = responseData as? [String: AnyObject] { | 4841 | if let responseDataDictionary = responseData as? [String: AnyObject] { |
4660 | if (responseDataDictionary["status"] as? Int == 1) { | 4842 | if (responseDataDictionary["status"] as? Int == 1) { |
4843 | + | ||
4844 | + let dynatraceEvent = swiftApi.LoyaltySDKDynatraceEventModel() | ||
4845 | + dynatraceEvent._eventName = "custom_success_retrieve_sharing_loyalty" | ||
4846 | + dynatraceEvent._parameters = nil | ||
4847 | + SwiftEventBus.post("dynatrace", sender: dynatraceEvent) | ||
4848 | + | ||
4661 | if let responseDataDictionary = responseData as? [String: Any] { | 4849 | if let responseDataDictionary = responseData as? [String: Any] { |
4662 | 4850 | ||
4663 | let tempResponse = GenericResponseModel(dictionary: responseDataDictionary) | 4851 | let tempResponse = GenericResponseModel(dictionary: responseDataDictionary) |
... | @@ -4668,10 +4856,20 @@ public class swiftApi { | ... | @@ -4668,10 +4856,20 @@ public class swiftApi { |
4668 | } | 4856 | } |
4669 | 4857 | ||
4670 | } else { | 4858 | } else { |
4859 | + let dynatraceEvent = swiftApi.LoyaltySDKDynatraceEventModel() | ||
4860 | + dynatraceEvent._eventName = "custom_error_retrieve_sharing_loyalty" | ||
4861 | + dynatraceEvent._parameters = nil | ||
4862 | + SwiftEventBus.post("dynatrace", sender: dynatraceEvent) | ||
4863 | + | ||
4671 | cosmoteSharingCallback(nil) | 4864 | cosmoteSharingCallback(nil) |
4672 | } | 4865 | } |
4673 | 4866 | ||
4674 | } else { | 4867 | } else { |
4868 | + let dynatraceEvent = swiftApi.LoyaltySDKDynatraceEventModel() | ||
4869 | + dynatraceEvent._eventName = "custom_error_retrieve_sharing_loyalty" | ||
4870 | + dynatraceEvent._parameters = nil | ||
4871 | + SwiftEventBus.post("dynatrace", sender: dynatraceEvent) | ||
4872 | + | ||
4675 | cosmoteSharingCallback(nil) | 4873 | cosmoteSharingCallback(nil) |
4676 | } | 4874 | } |
4677 | 4875 | ||
... | @@ -4681,6 +4879,12 @@ public class swiftApi { | ... | @@ -4681,6 +4879,12 @@ public class swiftApi { |
4681 | print("cosmoteRetrieveSharing error: ") | 4879 | print("cosmoteRetrieveSharing error: ") |
4682 | print(error) | 4880 | print(error) |
4683 | print("====================") | 4881 | print("====================") |
4882 | + | ||
4883 | + let dynatraceEvent = swiftApi.LoyaltySDKDynatraceEventModel() | ||
4884 | + dynatraceEvent._eventName = "custom_error_retrieve_sharing_loyalty" | ||
4885 | + dynatraceEvent._parameters = nil | ||
4886 | + SwiftEventBus.post("dynatrace", sender: dynatraceEvent) | ||
4887 | + | ||
4684 | cosmoteSharingCallback(nil) | 4888 | cosmoteSharingCallback(nil) |
4685 | } | 4889 | } |
4686 | } | 4890 | } |
... | @@ -4734,9 +4938,37 @@ public class swiftApi { | ... | @@ -4734,9 +4938,37 @@ public class swiftApi { |
4734 | 4938 | ||
4735 | let tempResponse = GenericResponseModel(dictionary: responseDataDictionary) | 4939 | let tempResponse = GenericResponseModel(dictionary: responseDataDictionary) |
4736 | 4940 | ||
4941 | + if (tempResponse != nil) { | ||
4942 | + DispatchQueue.main.async { | ||
4943 | + if (tempResponse.getStatus == 1) { | ||
4944 | + let dynatraceEvent = swiftApi.LoyaltySDKDynatraceEventModel() | ||
4945 | + dynatraceEvent._eventName = "custom_success_coupon_sharing_loyalty" | ||
4946 | + dynatraceEvent._parameters = nil | ||
4947 | + SwiftEventBus.post("dynatrace", sender: dynatraceEvent) | ||
4948 | + | ||
4949 | + } else { | ||
4950 | + let dynatraceEvent = swiftApi.LoyaltySDKDynatraceEventModel() | ||
4951 | + dynatraceEvent._eventName = "custom_error_coupon_sharing_loyalty" | ||
4952 | + dynatraceEvent._parameters = nil | ||
4953 | + SwiftEventBus.post("dynatrace", sender: dynatraceEvent) | ||
4954 | + | ||
4955 | + } | ||
4956 | + } | ||
4957 | + } else { | ||
4958 | + let dynatraceEvent = swiftApi.LoyaltySDKDynatraceEventModel() | ||
4959 | + dynatraceEvent._eventName = "custom_error_coupon_sharing_loyalty" | ||
4960 | + dynatraceEvent._parameters = nil | ||
4961 | + SwiftEventBus.post("dynatrace", sender: dynatraceEvent) | ||
4962 | + } | ||
4963 | + | ||
4737 | couponSharingCallback(tempResponse); | 4964 | couponSharingCallback(tempResponse); |
4738 | 4965 | ||
4739 | } else { | 4966 | } else { |
4967 | + let dynatraceEvent = swiftApi.LoyaltySDKDynatraceEventModel() | ||
4968 | + dynatraceEvent._eventName = "custom_error_coupon_sharing_loyalty" | ||
4969 | + dynatraceEvent._parameters = nil | ||
4970 | + SwiftEventBus.post("dynatrace", sender: dynatraceEvent) | ||
4971 | + | ||
4740 | couponSharingCallback(nil) | 4972 | couponSharingCallback(nil) |
4741 | } | 4973 | } |
4742 | 4974 | ||
... | @@ -4746,6 +4978,12 @@ public class swiftApi { | ... | @@ -4746,6 +4978,12 @@ public class swiftApi { |
4746 | print("cosmoteCouponSharing error: ") | 4978 | print("cosmoteCouponSharing error: ") |
4747 | print(error) | 4979 | print(error) |
4748 | print("====================") | 4980 | print("====================") |
4981 | + | ||
4982 | + let dynatraceEvent = swiftApi.LoyaltySDKDynatraceEventModel() | ||
4983 | + dynatraceEvent._eventName = "custom_error_coupon_sharing_loyalty" | ||
4984 | + dynatraceEvent._parameters = nil | ||
4985 | + SwiftEventBus.post("dynatrace", sender: dynatraceEvent) | ||
4986 | + | ||
4749 | couponSharingCallback(nil) | 4987 | couponSharingCallback(nil) |
4750 | } | 4988 | } |
4751 | } | 4989 | } |
... | @@ -4762,9 +5000,37 @@ public class swiftApi { | ... | @@ -4762,9 +5000,37 @@ public class swiftApi { |
4762 | 5000 | ||
4763 | let tempResponse = GenericResponseModel(dictionary: responseDataDictionary) | 5001 | let tempResponse = GenericResponseModel(dictionary: responseDataDictionary) |
4764 | 5002 | ||
5003 | + if (tempResponse != nil) { | ||
5004 | + DispatchQueue.main.async { | ||
5005 | + if (tempResponse.getStatus == 1) { | ||
5006 | + let dynatraceEvent = swiftApi.LoyaltySDKDynatraceEventModel() | ||
5007 | + dynatraceEvent._eventName = "custom_success_submit_order_loyalty" | ||
5008 | + dynatraceEvent._parameters = nil | ||
5009 | + SwiftEventBus.post("dynatrace", sender: dynatraceEvent) | ||
5010 | + | ||
5011 | + } else { | ||
5012 | + let dynatraceEvent = swiftApi.LoyaltySDKDynatraceEventModel() | ||
5013 | + dynatraceEvent._eventName = "custom_error_submit_order_loyalty" | ||
5014 | + dynatraceEvent._parameters = nil | ||
5015 | + SwiftEventBus.post("dynatrace", sender: dynatraceEvent) | ||
5016 | + | ||
5017 | + } | ||
5018 | + } | ||
5019 | + } else { | ||
5020 | + let dynatraceEvent = swiftApi.LoyaltySDKDynatraceEventModel() | ||
5021 | + dynatraceEvent._eventName = "custom_error_submit_order_loyalty" | ||
5022 | + dynatraceEvent._parameters = nil | ||
5023 | + SwiftEventBus.post("dynatrace", sender: dynatraceEvent) | ||
5024 | + } | ||
5025 | + | ||
4765 | submitOrderCallback(tempResponse); | 5026 | submitOrderCallback(tempResponse); |
4766 | 5027 | ||
4767 | } else { | 5028 | } else { |
5029 | + let dynatraceEvent = swiftApi.LoyaltySDKDynatraceEventModel() | ||
5030 | + dynatraceEvent._eventName = "custom_error_submit_order_loyalty" | ||
5031 | + dynatraceEvent._parameters = nil | ||
5032 | + SwiftEventBus.post("dynatrace", sender: dynatraceEvent) | ||
5033 | + | ||
4768 | submitOrderCallback(nil) | 5034 | submitOrderCallback(nil) |
4769 | } | 5035 | } |
4770 | 5036 | ||
... | @@ -4774,6 +5040,12 @@ public class swiftApi { | ... | @@ -4774,6 +5040,12 @@ public class swiftApi { |
4774 | print("submitOrder error: ") | 5040 | print("submitOrder error: ") |
4775 | print(error) | 5041 | print(error) |
4776 | print("====================") | 5042 | print("====================") |
5043 | + | ||
5044 | + let dynatraceEvent = swiftApi.LoyaltySDKDynatraceEventModel() | ||
5045 | + dynatraceEvent._eventName = "custom_error_submit_order_loyalty" | ||
5046 | + dynatraceEvent._parameters = nil | ||
5047 | + SwiftEventBus.post("dynatrace", sender: dynatraceEvent) | ||
5048 | + | ||
4777 | submitOrderCallback(nil) | 5049 | submitOrderCallback(nil) |
4778 | } | 5050 | } |
4779 | } | 5051 | } |
... | @@ -4790,9 +5062,37 @@ public class swiftApi { | ... | @@ -4790,9 +5062,37 @@ public class swiftApi { |
4790 | 5062 | ||
4791 | let tempResponse = GenericResponseModel(dictionary: responseDataDictionary) | 5063 | let tempResponse = GenericResponseModel(dictionary: responseDataDictionary) |
4792 | 5064 | ||
5065 | + if (tempResponse != nil) { | ||
5066 | + DispatchQueue.main.async { | ||
5067 | + if (tempResponse.getStatus == 1) { | ||
5068 | + let dynatraceEvent = swiftApi.LoyaltySDKDynatraceEventModel() | ||
5069 | + dynatraceEvent._eventName = "custom_success_post_event_loyalty" | ||
5070 | + dynatraceEvent._parameters = nil | ||
5071 | + SwiftEventBus.post("dynatrace", sender: dynatraceEvent) | ||
5072 | + | ||
5073 | + } else { | ||
5074 | + let dynatraceEvent = swiftApi.LoyaltySDKDynatraceEventModel() | ||
5075 | + dynatraceEvent._eventName = "custom_error_post_event_loyalty" | ||
5076 | + dynatraceEvent._parameters = nil | ||
5077 | + SwiftEventBus.post("dynatrace", sender: dynatraceEvent) | ||
5078 | + | ||
5079 | + } | ||
5080 | + } | ||
5081 | + } else { | ||
5082 | + let dynatraceEvent = swiftApi.LoyaltySDKDynatraceEventModel() | ||
5083 | + dynatraceEvent._eventName = "custom_error_post_event_loyalty" | ||
5084 | + dynatraceEvent._parameters = nil | ||
5085 | + SwiftEventBus.post("dynatrace", sender: dynatraceEvent) | ||
5086 | + } | ||
5087 | + | ||
4793 | postEventCallback(tempResponse); | 5088 | postEventCallback(tempResponse); |
4794 | 5089 | ||
4795 | } else { | 5090 | } else { |
5091 | + let dynatraceEvent = swiftApi.LoyaltySDKDynatraceEventModel() | ||
5092 | + dynatraceEvent._eventName = "custom_error_post_event_loyalty" | ||
5093 | + dynatraceEvent._parameters = nil | ||
5094 | + SwiftEventBus.post("dynatrace", sender: dynatraceEvent) | ||
5095 | + | ||
4796 | postEventCallback(nil) | 5096 | postEventCallback(nil) |
4797 | } | 5097 | } |
4798 | 5098 | ||
... | @@ -4802,6 +5102,12 @@ public class swiftApi { | ... | @@ -4802,6 +5102,12 @@ public class swiftApi { |
4802 | print("postEvent error: ") | 5102 | print("postEvent error: ") |
4803 | print(error) | 5103 | print(error) |
4804 | print("====================") | 5104 | print("====================") |
5105 | + | ||
5106 | + let dynatraceEvent = swiftApi.LoyaltySDKDynatraceEventModel() | ||
5107 | + dynatraceEvent._eventName = "custom_error_post_event_loyalty" | ||
5108 | + dynatraceEvent._parameters = nil | ||
5109 | + SwiftEventBus.post("dynatrace", sender: dynatraceEvent) | ||
5110 | + | ||
4805 | postEventCallback(nil) | 5111 | postEventCallback(nil) |
4806 | } | 5112 | } |
4807 | } | 5113 | } |
... | @@ -4976,6 +5282,11 @@ public class swiftApi { | ... | @@ -4976,6 +5282,11 @@ public class swiftApi { |
4976 | if let responseDataDictionary = sharingHistoryData as? [String: AnyObject] { | 5282 | if let responseDataDictionary = sharingHistoryData as? [String: AnyObject] { |
4977 | 5283 | ||
4978 | if (responseDataDictionary["status"] as? Int == 1) { | 5284 | if (responseDataDictionary["status"] as? Int == 1) { |
5285 | + | ||
5286 | + let dynatraceEvent = swiftApi.LoyaltySDKDynatraceEventModel() | ||
5287 | + dynatraceEvent._eventName = "custom_success_sharing_history_loyalty" | ||
5288 | + dynatraceEvent._parameters = nil | ||
5289 | + SwiftEventBus.post("dynatrace", sender: dynatraceEvent) | ||
4979 | 5290 | ||
4980 | if let responseDataResult = responseDataDictionary["result"] as? [[String : Any]?] { | 5291 | if let responseDataResult = responseDataDictionary["result"] as? [[String : Any]?] { |
4981 | 5292 | ||
... | @@ -5001,10 +5312,20 @@ public class swiftApi { | ... | @@ -5001,10 +5312,20 @@ public class swiftApi { |
5001 | } | 5312 | } |
5002 | 5313 | ||
5003 | } else { | 5314 | } else { |
5315 | + let dynatraceEvent = swiftApi.LoyaltySDKDynatraceEventModel() | ||
5316 | + dynatraceEvent._eventName = "custom_error_sharing_history_loyalty" | ||
5317 | + dynatraceEvent._parameters = nil | ||
5318 | + SwiftEventBus.post("dynatrace", sender: dynatraceEvent) | ||
5319 | + | ||
5004 | getSharingHistoryCallback(nil) | 5320 | getSharingHistoryCallback(nil) |
5005 | } | 5321 | } |
5006 | 5322 | ||
5007 | } else { | 5323 | } else { |
5324 | + let dynatraceEvent = swiftApi.LoyaltySDKDynatraceEventModel() | ||
5325 | + dynatraceEvent._eventName = "custom_error_sharing_history_loyalty" | ||
5326 | + dynatraceEvent._parameters = nil | ||
5327 | + SwiftEventBus.post("dynatrace", sender: dynatraceEvent) | ||
5328 | + | ||
5008 | getSharingHistoryCallback(nil) | 5329 | getSharingHistoryCallback(nil) |
5009 | } | 5330 | } |
5010 | } | 5331 | } |
... | @@ -5013,6 +5334,12 @@ public class swiftApi { | ... | @@ -5013,6 +5334,12 @@ public class swiftApi { |
5013 | print("getSharingHistory error: ") | 5334 | print("getSharingHistory error: ") |
5014 | print(error) | 5335 | print(error) |
5015 | print("====================") | 5336 | print("====================") |
5337 | + | ||
5338 | + let dynatraceEvent = swiftApi.LoyaltySDKDynatraceEventModel() | ||
5339 | + dynatraceEvent._eventName = "custom_error_sharing_history_loyalty" | ||
5340 | + dynatraceEvent._parameters = nil | ||
5341 | + SwiftEventBus.post("dynatrace", sender: dynatraceEvent) | ||
5342 | + | ||
5016 | getSharingHistoryCallback(nil) | 5343 | getSharingHistoryCallback(nil) |
5017 | } | 5344 | } |
5018 | } | 5345 | } |
... | @@ -5172,6 +5499,11 @@ public class swiftApi { | ... | @@ -5172,6 +5499,11 @@ public class swiftApi { |
5172 | if let responseDataDictionary = getMerchantsData as? [String: AnyObject] { | 5499 | if let responseDataDictionary = getMerchantsData as? [String: AnyObject] { |
5173 | 5500 | ||
5174 | if (responseDataDictionary["MAPP_SHOPS-status"] as? Int == 1) { | 5501 | if (responseDataDictionary["MAPP_SHOPS-status"] as? Int == 1) { |
5502 | + | ||
5503 | + let dynatraceEvent = swiftApi.LoyaltySDKDynatraceEventModel() | ||
5504 | + dynatraceEvent._eventName = "custom_success_shops_loyalty" | ||
5505 | + dynatraceEvent._parameters = nil | ||
5506 | + SwiftEventBus.post("dynatrace", sender: dynatraceEvent) | ||
5175 | 5507 | ||
5176 | if let responseDataMappShops = responseDataDictionary["MAPP_SHOPS"] as? [String: Any] { | 5508 | if let responseDataMappShops = responseDataDictionary["MAPP_SHOPS"] as? [String: Any] { |
5177 | 5509 | ||
... | @@ -5197,10 +5529,20 @@ public class swiftApi { | ... | @@ -5197,10 +5529,20 @@ public class swiftApi { |
5197 | } | 5529 | } |
5198 | 5530 | ||
5199 | } else { | 5531 | } else { |
5532 | + let dynatraceEvent = swiftApi.LoyaltySDKDynatraceEventModel() | ||
5533 | + dynatraceEvent._eventName = "custom_error_shops_loyalty" | ||
5534 | + dynatraceEvent._parameters = nil | ||
5535 | + SwiftEventBus.post("dynatrace", sender: dynatraceEvent) | ||
5536 | + | ||
5200 | getMerchantsCallback(nil) | 5537 | getMerchantsCallback(nil) |
5201 | } | 5538 | } |
5202 | 5539 | ||
5203 | } else { | 5540 | } else { |
5541 | + let dynatraceEvent = swiftApi.LoyaltySDKDynatraceEventModel() | ||
5542 | + dynatraceEvent._eventName = "custom_error_shops_loyalty" | ||
5543 | + dynatraceEvent._parameters = nil | ||
5544 | + SwiftEventBus.post("dynatrace", sender: dynatraceEvent) | ||
5545 | + | ||
5204 | getMerchantsCallback(nil) | 5546 | getMerchantsCallback(nil) |
5205 | } | 5547 | } |
5206 | } | 5548 | } |
... | @@ -5209,6 +5551,12 @@ public class swiftApi { | ... | @@ -5209,6 +5551,12 @@ public class swiftApi { |
5209 | print("getMultilingualMerchants error: ") | 5551 | print("getMultilingualMerchants error: ") |
5210 | print(error) | 5552 | print(error) |
5211 | print("====================") | 5553 | print("====================") |
5554 | + | ||
5555 | + let dynatraceEvent = swiftApi.LoyaltySDKDynatraceEventModel() | ||
5556 | + dynatraceEvent._eventName = "custom_error_shops_loyalty" | ||
5557 | + dynatraceEvent._parameters = nil | ||
5558 | + SwiftEventBus.post("dynatrace", sender: dynatraceEvent) | ||
5559 | + | ||
5212 | getMerchantsCallback(nil) | 5560 | getMerchantsCallback(nil) |
5213 | } | 5561 | } |
5214 | } | 5562 | } |
... | @@ -5771,13 +6119,29 @@ public class swiftApi { | ... | @@ -5771,13 +6119,29 @@ public class swiftApi { |
5771 | let tempResponse = VerifyTicketResponseModel(dictionary: responseDataDictionary) | 6119 | let tempResponse = VerifyTicketResponseModel(dictionary: responseDataDictionary) |
5772 | 6120 | ||
5773 | if (tempResponse.getStatus == 1) { | 6121 | if (tempResponse.getStatus == 1) { |
6122 | + let dynatraceEvent = swiftApi.LoyaltySDKDynatraceEventModel() | ||
6123 | + dynatraceEvent._eventName = "custom_success_logout_loyalty" | ||
6124 | + dynatraceEvent._parameters = nil | ||
6125 | + SwiftEventBus.post("dynatrace", sender: dynatraceEvent) | ||
6126 | + | ||
5774 | swiftApi().setUserTag("") | 6127 | swiftApi().setUserTag("") |
5775 | swiftApi().setUserNonTelco(false) | 6128 | swiftApi().setUserNonTelco(false) |
6129 | + } else { | ||
6130 | + | ||
6131 | + let dynatraceEvent = swiftApi.LoyaltySDKDynatraceEventModel() | ||
6132 | + dynatraceEvent._eventName = "custom_error_logout_loyalty" | ||
6133 | + dynatraceEvent._parameters = nil | ||
6134 | + SwiftEventBus.post("dynatrace", sender: dynatraceEvent) | ||
5776 | } | 6135 | } |
5777 | 6136 | ||
5778 | logoutCallback(tempResponse); | 6137 | logoutCallback(tempResponse); |
5779 | 6138 | ||
5780 | } else { | 6139 | } else { |
6140 | + let dynatraceEvent = swiftApi.LoyaltySDKDynatraceEventModel() | ||
6141 | + dynatraceEvent._eventName = "custom_error_logout_loyalty" | ||
6142 | + dynatraceEvent._parameters = nil | ||
6143 | + SwiftEventBus.post("dynatrace", sender: dynatraceEvent) | ||
6144 | + | ||
5781 | logoutCallback(nil) | 6145 | logoutCallback(nil) |
5782 | } | 6146 | } |
5783 | } | 6147 | } |
... | @@ -5876,10 +6240,20 @@ public class swiftApi { | ... | @@ -5876,10 +6240,20 @@ public class swiftApi { |
5876 | editProfileCallback(tempResponse); | 6240 | editProfileCallback(tempResponse); |
5877 | 6241 | ||
5878 | if (tempResponse.getStatus == 1) { | 6242 | if (tempResponse.getStatus == 1) { |
6243 | + let dynatraceEvent = swiftApi.LoyaltySDKDynatraceEventModel() | ||
6244 | + dynatraceEvent._eventName = "custom_success_edit_profile_loyalty" | ||
6245 | + dynatraceEvent._parameters = nil | ||
6246 | + SwiftEventBus.post("dynatrace", sender: dynatraceEvent) | ||
6247 | + | ||
5879 | swiftApi().getProfileAsync(getProfileCallback) | 6248 | swiftApi().getProfileAsync(getProfileCallback) |
5880 | } | 6249 | } |
5881 | 6250 | ||
5882 | } else { | 6251 | } else { |
6252 | + let dynatraceEvent = swiftApi.LoyaltySDKDynatraceEventModel() | ||
6253 | + dynatraceEvent._eventName = "custom_error_edit_profile_loyalty" | ||
6254 | + dynatraceEvent._parameters = nil | ||
6255 | + SwiftEventBus.post("dynatrace", sender: dynatraceEvent) | ||
6256 | + | ||
5883 | editProfileCallback(nil) | 6257 | editProfileCallback(nil) |
5884 | } | 6258 | } |
5885 | 6259 | ||
... | @@ -5889,6 +6263,12 @@ public class swiftApi { | ... | @@ -5889,6 +6263,12 @@ public class swiftApi { |
5889 | print("editProfile error: ") | 6263 | print("editProfile error: ") |
5890 | print(error) | 6264 | print(error) |
5891 | print("====================") | 6265 | print("====================") |
6266 | + | ||
6267 | + let dynatraceEvent = swiftApi.LoyaltySDKDynatraceEventModel() | ||
6268 | + dynatraceEvent._eventName = "custom_error_edit_profile_loyalty" | ||
6269 | + dynatraceEvent._parameters = nil | ||
6270 | + SwiftEventBus.post("dynatrace", sender: dynatraceEvent) | ||
6271 | + | ||
5892 | editProfileCallback(nil) | 6272 | editProfileCallback(nil) |
5893 | } | 6273 | } |
5894 | 6274 | ||
... | @@ -5961,9 +6341,18 @@ public class swiftApi { | ... | @@ -5961,9 +6341,18 @@ public class swiftApi { |
5961 | getSingleCampaignCallback(tempResponse); | 6341 | getSingleCampaignCallback(tempResponse); |
5962 | 6342 | ||
5963 | if (tempResponse.getStatus == 1) { | 6343 | if (tempResponse.getStatus == 1) { |
6344 | + let dynatraceEvent = swiftApi.LoyaltySDKDynatraceEventModel() | ||
6345 | + dynatraceEvent._eventName = "custom_success_read_campaign_loyalty" | ||
6346 | + dynatraceEvent._parameters = nil | ||
6347 | + SwiftEventBus.post("dynatrace", sender: dynatraceEvent) | ||
5964 | } | 6348 | } |
5965 | 6349 | ||
5966 | } else { | 6350 | } else { |
6351 | + let dynatraceEvent = swiftApi.LoyaltySDKDynatraceEventModel() | ||
6352 | + dynatraceEvent._eventName = "custom_success_read_campaign_loyalty" // custom_error_read_campaign_loyalty | ||
6353 | + dynatraceEvent._parameters = nil | ||
6354 | + SwiftEventBus.post("dynatrace", sender: dynatraceEvent) | ||
6355 | + | ||
5967 | getSingleCampaignCallback(nil) | 6356 | getSingleCampaignCallback(nil) |
5968 | } | 6357 | } |
5969 | 6358 | ||
... | @@ -5985,6 +6374,12 @@ public class swiftApi { | ... | @@ -5985,6 +6374,12 @@ public class swiftApi { |
5985 | print("getSingleCampaign error: ") | 6374 | print("getSingleCampaign error: ") |
5986 | print(error) | 6375 | print(error) |
5987 | print("====================") | 6376 | print("====================") |
6377 | + | ||
6378 | + let dynatraceEvent = swiftApi.LoyaltySDKDynatraceEventModel() | ||
6379 | + dynatraceEvent._eventName = "custom_success_read_campaign_loyalty" // custom_error_read_campaign_loyalty | ||
6380 | + dynatraceEvent._parameters = nil | ||
6381 | + SwiftEventBus.post("dynatrace", sender: dynatraceEvent) | ||
6382 | + | ||
5988 | getSingleCampaignCallback(nil) | 6383 | getSingleCampaignCallback(nil) |
5989 | } | 6384 | } |
5990 | } | 6385 | } | ... | ... |
-
Please register or login to post a comment