Showing
1 changed file
with
107 additions
and
0 deletions
| ... | @@ -4277,9 +4277,37 @@ public class swiftApi { | ... | @@ -4277,9 +4277,37 @@ public class swiftApi { |
| 4277 | 4277 | ||
| 4278 | let tempResponse = GenericResponseModel(dictionary: responseDataDictionary) | 4278 | let tempResponse = GenericResponseModel(dictionary: responseDataDictionary) |
| 4279 | 4279 | ||
| 4280 | + if (tempResponse != nil) { | ||
| 4281 | + DispatchQueue.main.async { | ||
| 4282 | + if (tempResponse.getStatus == 1) { | ||
| 4283 | + let dynatraceEvent = swiftApi.LoyaltySDKDynatraceEventModel() | ||
| 4284 | + dynatraceEvent._eventName = "custom_success_customer_state_loyalty" | ||
| 4285 | + dynatraceEvent._parameters = nil | ||
| 4286 | + SwiftEventBus.post("dynatrace", sender: dynatraceEvent) | ||
| 4287 | + | ||
| 4288 | + } else { | ||
| 4289 | + let dynatraceEvent = swiftApi.LoyaltySDKDynatraceEventModel() | ||
| 4290 | + dynatraceEvent._eventName = "custom_error_customer_state_loyalty" | ||
| 4291 | + dynatraceEvent._parameters = nil | ||
| 4292 | + SwiftEventBus.post("dynatrace", sender: dynatraceEvent) | ||
| 4293 | + | ||
| 4294 | + } | ||
| 4295 | + } | ||
| 4296 | + } else { | ||
| 4297 | + let dynatraceEvent = swiftApi.LoyaltySDKDynatraceEventModel() | ||
| 4298 | + dynatraceEvent._eventName = "custom_error_customer_state_loyalty" | ||
| 4299 | + dynatraceEvent._parameters = nil | ||
| 4300 | + SwiftEventBus.post("dynatrace", sender: dynatraceEvent) | ||
| 4301 | + } | ||
| 4302 | + | ||
| 4280 | consumerIntegrationCallback(tempResponse); | 4303 | consumerIntegrationCallback(tempResponse); |
| 4281 | 4304 | ||
| 4282 | } else { | 4305 | } else { |
| 4306 | + let dynatraceEvent = swiftApi.LoyaltySDKDynatraceEventModel() | ||
| 4307 | + dynatraceEvent._eventName = "custom_error_customer_state_loyalty" | ||
| 4308 | + dynatraceEvent._parameters = nil | ||
| 4309 | + SwiftEventBus.post("dynatrace", sender: dynatraceEvent) | ||
| 4310 | + | ||
| 4283 | consumerIntegrationCallback(nil) | 4311 | consumerIntegrationCallback(nil) |
| 4284 | } | 4312 | } |
| 4285 | 4313 | ||
| ... | @@ -4289,6 +4317,11 @@ public class swiftApi { | ... | @@ -4289,6 +4317,11 @@ public class swiftApi { |
| 4289 | print("consumerIntegration error: ") | 4317 | print("consumerIntegration error: ") |
| 4290 | print(error) | 4318 | print(error) |
| 4291 | print("====================") | 4319 | print("====================") |
| 4320 | + | ||
| 4321 | + let dynatraceEvent = swiftApi.LoyaltySDKDynatraceEventModel() | ||
| 4322 | + dynatraceEvent._eventName = "custom_error_customer_state_loyalty" | ||
| 4323 | + dynatraceEvent._parameters = nil | ||
| 4324 | + SwiftEventBus.post("dynatrace", sender: dynatraceEvent) | ||
| 4292 | 4325 | ||
| 4293 | if let error = error as? NSError { | 4326 | if let error = error as? NSError { |
| 4294 | // if (error.code == 401) { | 4327 | // if (error.code == 401) { |
| ... | @@ -4315,9 +4348,37 @@ public class swiftApi { | ... | @@ -4315,9 +4348,37 @@ public class swiftApi { |
| 4315 | 4348 | ||
| 4316 | let tempResponse = GenericResponseModel(dictionary: responseDataDictionary) | 4349 | let tempResponse = GenericResponseModel(dictionary: responseDataDictionary) |
| 4317 | 4350 | ||
| 4351 | + if (tempResponse != nil) { | ||
| 4352 | + DispatchQueue.main.async { | ||
| 4353 | + if (tempResponse.getStatus == 1) { | ||
| 4354 | + let dynatraceEvent = swiftApi.LoyaltySDKDynatraceEventModel() | ||
| 4355 | + dynatraceEvent._eventName = "custom_success_retrieve_coupon_loyalty" | ||
| 4356 | + dynatraceEvent._parameters = nil | ||
| 4357 | + SwiftEventBus.post("dynatrace", sender: dynatraceEvent) | ||
| 4358 | + | ||
| 4359 | + } else { | ||
| 4360 | + let dynatraceEvent = swiftApi.LoyaltySDKDynatraceEventModel() | ||
| 4361 | + dynatraceEvent._eventName = "custom_error_retrieve_coupon_loyalty" | ||
| 4362 | + dynatraceEvent._parameters = nil | ||
| 4363 | + SwiftEventBus.post("dynatrace", sender: dynatraceEvent) | ||
| 4364 | + | ||
| 4365 | + } | ||
| 4366 | + } | ||
| 4367 | + } else { | ||
| 4368 | + let dynatraceEvent = swiftApi.LoyaltySDKDynatraceEventModel() | ||
| 4369 | + dynatraceEvent._eventName = "custom_error_retrieve_coupon_loyalty" | ||
| 4370 | + dynatraceEvent._parameters = nil | ||
| 4371 | + SwiftEventBus.post("dynatrace", sender: dynatraceEvent) | ||
| 4372 | + } | ||
| 4373 | + | ||
| 4318 | redeemCouponSetCallback(tempResponse); | 4374 | redeemCouponSetCallback(tempResponse); |
| 4319 | 4375 | ||
| 4320 | } else { | 4376 | } else { |
| 4377 | + let dynatraceEvent = swiftApi.LoyaltySDKDynatraceEventModel() | ||
| 4378 | + dynatraceEvent._eventName = "custom_error_retrieve_coupon_loyalty" | ||
| 4379 | + dynatraceEvent._parameters = nil | ||
| 4380 | + SwiftEventBus.post("dynatrace", sender: dynatraceEvent) | ||
| 4381 | + | ||
| 4321 | redeemCouponSetCallback(nil) | 4382 | redeemCouponSetCallback(nil) |
| 4322 | } | 4383 | } |
| 4323 | 4384 | ||
| ... | @@ -4327,6 +4388,11 @@ public class swiftApi { | ... | @@ -4327,6 +4388,11 @@ public class swiftApi { |
| 4327 | print("redeemCouponSet error: ") | 4388 | print("redeemCouponSet error: ") |
| 4328 | print(error) | 4389 | print(error) |
| 4329 | print("====================") | 4390 | print("====================") |
| 4391 | + | ||
| 4392 | + let dynatraceEvent = swiftApi.LoyaltySDKDynatraceEventModel() | ||
| 4393 | + dynatraceEvent._eventName = "custom_error_retrieve_coupon_loyalty" | ||
| 4394 | + dynatraceEvent._parameters = nil | ||
| 4395 | + SwiftEventBus.post("dynatrace", sender: dynatraceEvent) | ||
| 4330 | 4396 | ||
| 4331 | if let error = error as? NSError { | 4397 | if let error = error as? NSError { |
| 4332 | // if (error.code == 401) { | 4398 | // if (error.code == 401) { |
| ... | @@ -5069,10 +5135,26 @@ public class swiftApi { | ... | @@ -5069,10 +5135,26 @@ public class swiftApi { |
| 5069 | // self.pacingGoalDialog(controller, tempPacingDetails._msg) | 5135 | // self.pacingGoalDialog(controller, tempPacingDetails._msg) |
| 5070 | // } | 5136 | // } |
| 5071 | 5137 | ||
| 5138 | + let dynatraceEvent = swiftApi.LoyaltySDKDynatraceEventModel() | ||
| 5139 | + dynatraceEvent._eventName = "custom_success_pacing_loyalty" | ||
| 5140 | + dynatraceEvent._parameters = nil | ||
| 5141 | + SwiftEventBus.post("dynatrace", sender: dynatraceEvent) | ||
| 5142 | + | ||
| 5072 | getPacingDetailsCallback(tempPacingDetails); | 5143 | getPacingDetailsCallback(tempPacingDetails); |
| 5144 | + | ||
| 5145 | + } else { | ||
| 5146 | + let dynatraceEvent = swiftApi.LoyaltySDKDynatraceEventModel() | ||
| 5147 | + dynatraceEvent._eventName = "custom_error_pacing_loyalty" | ||
| 5148 | + dynatraceEvent._parameters = nil | ||
| 5149 | + SwiftEventBus.post("dynatrace", sender: dynatraceEvent) | ||
| 5073 | } | 5150 | } |
| 5074 | 5151 | ||
| 5075 | } else { | 5152 | } else { |
| 5153 | + let dynatraceEvent = swiftApi.LoyaltySDKDynatraceEventModel() | ||
| 5154 | + dynatraceEvent._eventName = "custom_error_pacing_loyalty" | ||
| 5155 | + dynatraceEvent._parameters = nil | ||
| 5156 | + SwiftEventBus.post("dynatrace", sender: dynatraceEvent) | ||
| 5157 | + | ||
| 5076 | getPacingDetailsCallback(nil) | 5158 | getPacingDetailsCallback(nil) |
| 5077 | } | 5159 | } |
| 5078 | 5160 | ||
| ... | @@ -5080,6 +5162,11 @@ public class swiftApi { | ... | @@ -5080,6 +5162,11 @@ public class swiftApi { |
| 5080 | 5162 | ||
| 5081 | func pacingFailureCallback(_ error: Error?) -> Void { | 5163 | func pacingFailureCallback(_ error: Error?) -> Void { |
| 5082 | print("getPacingDetails error: ") | 5164 | print("getPacingDetails error: ") |
| 5165 | + | ||
| 5166 | + let dynatraceEvent = swiftApi.LoyaltySDKDynatraceEventModel() | ||
| 5167 | + dynatraceEvent._eventName = "custom_error_pacing_loyalty" | ||
| 5168 | + dynatraceEvent._parameters = nil | ||
| 5169 | + SwiftEventBus.post("dynatrace", sender: dynatraceEvent) | ||
| 5083 | 5170 | ||
| 5084 | if let error = error as? NSError { | 5171 | if let error = error as? NSError { |
| 5085 | // if (error.code == 401) { | 5172 | // if (error.code == 401) { |
| ... | @@ -5130,6 +5217,11 @@ public class swiftApi { | ... | @@ -5130,6 +5217,11 @@ public class swiftApi { |
| 5130 | swiftApi().setSteps(0) | 5217 | swiftApi().setSteps(0) |
| 5131 | 5218 | ||
| 5132 | if let responseDataDictionary = responseData as? [String: Any] { | 5219 | if let responseDataDictionary = responseData as? [String: Any] { |
| 5220 | + | ||
| 5221 | + let dynatraceEvent = swiftApi.LoyaltySDKDynatraceEventModel() | ||
| 5222 | + dynatraceEvent._eventName = "custom_success_save_pacing_loyalty" | ||
| 5223 | + dynatraceEvent._parameters = nil | ||
| 5224 | + SwiftEventBus.post("dynatrace", sender: dynatraceEvent) | ||
| 5133 | 5225 | ||
| 5134 | let tempResponse = GenericResponseModel(dictionary: responseDataDictionary) | 5226 | let tempResponse = GenericResponseModel(dictionary: responseDataDictionary) |
| 5135 | setPacingDetailsCallback(tempResponse); | 5227 | setPacingDetailsCallback(tempResponse); |
| ... | @@ -5139,10 +5231,20 @@ public class swiftApi { | ... | @@ -5139,10 +5231,20 @@ public class swiftApi { |
| 5139 | } | 5231 | } |
| 5140 | 5232 | ||
| 5141 | } else { | 5233 | } else { |
| 5234 | + let dynatraceEvent = swiftApi.LoyaltySDKDynatraceEventModel() | ||
| 5235 | + dynatraceEvent._eventName = "custom_error_save_pacing_loyalty" | ||
| 5236 | + dynatraceEvent._parameters = nil | ||
| 5237 | + SwiftEventBus.post("dynatrace", sender: dynatraceEvent) | ||
| 5238 | + | ||
| 5142 | setPacingDetailsCallback(nil) | 5239 | setPacingDetailsCallback(nil) |
| 5143 | } | 5240 | } |
| 5144 | 5241 | ||
| 5145 | } else { | 5242 | } else { |
| 5243 | + let dynatraceEvent = swiftApi.LoyaltySDKDynatraceEventModel() | ||
| 5244 | + dynatraceEvent._eventName = "custom_error_save_pacing_loyalty" | ||
| 5245 | + dynatraceEvent._parameters = nil | ||
| 5246 | + SwiftEventBus.post("dynatrace", sender: dynatraceEvent) | ||
| 5247 | + | ||
| 5146 | setPacingDetailsCallback(nil) | 5248 | setPacingDetailsCallback(nil) |
| 5147 | } | 5249 | } |
| 5148 | } | 5250 | } |
| ... | @@ -5150,6 +5252,11 @@ public class swiftApi { | ... | @@ -5150,6 +5252,11 @@ public class swiftApi { |
| 5150 | func pacingFailureCallback(_ error: Error?) -> Void { | 5252 | func pacingFailureCallback(_ error: Error?) -> Void { |
| 5151 | print("setPacingDetails error: ") | 5253 | print("setPacingDetails error: ") |
| 5152 | 5254 | ||
| 5255 | + let dynatraceEvent = swiftApi.LoyaltySDKDynatraceEventModel() | ||
| 5256 | + dynatraceEvent._eventName = "custom_error_save_pacing_loyalty" | ||
| 5257 | + dynatraceEvent._parameters = nil | ||
| 5258 | + SwiftEventBus.post("dynatrace", sender: dynatraceEvent) | ||
| 5259 | + | ||
| 5153 | if let error = error as? NSError { | 5260 | if let error = error as? NSError { |
| 5154 | // if (error.code == 401) { | 5261 | // if (error.code == 401) { |
| 5155 | // let sessionEvent = swiftApi.LoyaltySDKSessionExpiredEventModel() | 5262 | // let sessionEvent = swiftApi.LoyaltySDKSessionExpiredEventModel() | ... | ... |
-
Please register or login to post a comment