Manos Chorianopoulos

add dynatrace events

......@@ -506,6 +506,12 @@ public class swiftApi {
couponSets = couponSetsData ?? ["":""]
if let myCouponsSetsDictionary = couponSets as? [String : AnyObject] {
let dynatraceEvent = swiftApi.LoyaltySDKDynatraceEventModel()
dynatraceEvent._eventName = "custom_success_couponset_loyalty"
dynatraceEvent._parameters = nil
SwiftEventBus.post("dynatrace", sender: dynatraceEvent)
let couponSetsData = (myCouponsSetsDictionary["MAPP_COUPON"] as! NSArray)
for couponset in couponSetsData {
......@@ -513,6 +519,11 @@ public class swiftApi {
couponSetsArray.append(tempCouponset)
}
} else {
let dynatraceEvent = swiftApi.LoyaltySDKDynatraceEventModel()
dynatraceEvent._eventName = "custom_error_couponset_loyalty"
dynatraceEvent._parameters = nil
SwiftEventBus.post("dynatrace", sender: dynatraceEvent)
}
swiftApi().setCouponSetList(couponSetsArray)
......@@ -521,6 +532,12 @@ public class swiftApi {
func couponSetsFailureCallback(_ error: Error?) -> Void {
print("getCouponSets error: ")
let dynatraceEvent = swiftApi.LoyaltySDKDynatraceEventModel()
dynatraceEvent._eventName = "custom_error_couponset_loyalty"
dynatraceEvent._parameters = nil
SwiftEventBus.post("dynatrace", sender: dynatraceEvent)
getCouponSetsCallback(nil)
}
......@@ -661,12 +678,23 @@ public class swiftApi {
func couponsCallback(_ couponsData: [AnyHashable : Any]?) -> Void {
coupons = couponsData ?? ["":""]
let dynatraceEvent = swiftApi.LoyaltySDKDynatraceEventModel()
dynatraceEvent._eventName = "custom_success_user_coupons_loyalty"
dynatraceEvent._parameters = nil
SwiftEventBus.post("dynatrace", sender: dynatraceEvent)
// On Coupons request success, make CouponSets request
instanceOfMyApi.getCouponsetsAsync(true, andVisible: true, andUuids: nil, couponSetsCallback, failureBlock: couponSetsFailureCallback)
}
func couponsFailureCallback(_ error: Error?) -> Void {
print("getCoupons error: ")
let dynatraceEvent = swiftApi.LoyaltySDKDynatraceEventModel()
dynatraceEvent._eventName = "custom_error_user_coupons_loyalty"
dynatraceEvent._parameters = nil
SwiftEventBus.post("dynatrace", sender: dynatraceEvent)
getCouponsCallback(nil)
}
......@@ -674,6 +702,11 @@ public class swiftApi {
couponSets = couponSetsData ?? ["":""]
if let myCouponsSetsDictionary = couponSets as? [String : AnyObject] {
let dynatraceEvent = swiftApi.LoyaltySDKDynatraceEventModel()
dynatraceEvent._eventName = "custom_success_couponset_loyalty"
dynatraceEvent._parameters = nil
SwiftEventBus.post("dynatrace", sender: dynatraceEvent)
let couponSetsData = (myCouponsSetsDictionary["MAPP_COUPON"] as! NSArray)
for couponset in couponSetsData {
......@@ -681,6 +714,11 @@ public class swiftApi {
couponSetsArray.append(tempCouponset)
}
} else {
let dynatraceEvent = swiftApi.LoyaltySDKDynatraceEventModel()
dynatraceEvent._eventName = "custom_error_couponset_loyalty"
dynatraceEvent._parameters = nil
SwiftEventBus.post("dynatrace", sender: dynatraceEvent)
}
swiftApi().setCouponSetList(couponSetsArray)
......@@ -712,6 +750,12 @@ public class swiftApi {
func couponSetsFailureCallback(_ error: Error?) -> Void {
print("getCouponSets error: ")
let dynatraceEvent = swiftApi.LoyaltySDKDynatraceEventModel()
dynatraceEvent._eventName = "custom_error_couponset_loyalty"
dynatraceEvent._parameters = nil
SwiftEventBus.post("dynatrace", sender: dynatraceEvent)
getCouponsCallback(nil)
}
......@@ -1145,6 +1189,11 @@ public class swiftApi {
if let responseDataDictionary = campaignsData as? [String: AnyObject] {
if (responseDataDictionary["MAPP_CAMPAIGNING-status"] as? Int == 1) {
let dynatraceEvent = swiftApi.LoyaltySDKDynatraceEventModel()
dynatraceEvent._eventName = "custom_success_campaigns_loyalty"
dynatraceEvent._parameters = nil
SwiftEventBus.post("dynatrace", sender: dynatraceEvent)
if let responseDataMapp = responseDataDictionary["MAPP_CAMPAIGNING"] as? [String: Any] {
if let responseDataCampaigns = responseDataMapp["campaigns"] as? [[String : Any]?] {
......@@ -1195,10 +1244,20 @@ public class swiftApi {
})
} else {
let dynatraceEvent = swiftApi.LoyaltySDKDynatraceEventModel()
dynatraceEvent._eventName = "custom_error_campaigns_loyalty"
dynatraceEvent._parameters = nil
SwiftEventBus.post("dynatrace", sender: dynatraceEvent)
getCampaignsCallback(nil)
}
} else {
let dynatraceEvent = swiftApi.LoyaltySDKDynatraceEventModel()
dynatraceEvent._eventName = "custom_error_campaigns_loyalty"
dynatraceEvent._parameters = nil
SwiftEventBus.post("dynatrace", sender: dynatraceEvent)
getCampaignsCallback(nil)
}
}
......@@ -1207,6 +1266,12 @@ public class swiftApi {
print("getCampaigns error: ")
print(error)
print("====================")
let dynatraceEvent = swiftApi.LoyaltySDKDynatraceEventModel()
dynatraceEvent._eventName = "custom_error_campaigns_loyalty"
dynatraceEvent._parameters = nil
SwiftEventBus.post("dynatrace", sender: dynatraceEvent)
getCampaignsCallback(nil)
}
}
......@@ -1224,6 +1289,11 @@ public class swiftApi {
if (responseDataDictionary["status"] as? Int == 1) {
let dynatraceEvent = swiftApi.LoyaltySDKDynatraceEventModel()
dynatraceEvent._eventName = "custom_success_campaigns_personalized_loyalty"
dynatraceEvent._parameters = nil
SwiftEventBus.post("dynatrace", sender: dynatraceEvent)
if let responseDataContext = responseDataDictionary["context"] as? [String: Any] {
if (responseDataContext["MAPP_CAMPAIGNING-status"] as? Int == 1) {
......@@ -1252,10 +1322,20 @@ public class swiftApi {
getCampaignsCallback(nil)
}
} else {
let dynatraceEvent = swiftApi.LoyaltySDKDynatraceEventModel()
dynatraceEvent._eventName = "custom_error_campaigns_personalized_loyalty"
dynatraceEvent._parameters = nil
SwiftEventBus.post("dynatrace", sender: dynatraceEvent)
getCampaignsCallback(nil)
}
} else {
let dynatraceEvent = swiftApi.LoyaltySDKDynatraceEventModel()
dynatraceEvent._eventName = "custom_error_campaigns_personalized_loyalty"
dynatraceEvent._parameters = nil
SwiftEventBus.post("dynatrace", sender: dynatraceEvent)
getCampaignsCallback(nil)
}
}
......@@ -1264,6 +1344,12 @@ public class swiftApi {
print("getCampaignsPersonalized error: ")
print(error)
print("====================")
let dynatraceEvent = swiftApi.LoyaltySDKDynatraceEventModel()
dynatraceEvent._eventName = "custom_error_campaigns_personalized_loyalty"
dynatraceEvent._parameters = nil
SwiftEventBus.post("dynatrace", sender: dynatraceEvent)
getCampaignsCallback(nil)
}
}
......@@ -2260,6 +2346,11 @@ public class swiftApi {
func profileCallback(_ profileData: [AnyHashable: Any]?) -> Void {
if let profileDataDictionary = profileData as? [String : AnyObject] {
let dynatraceEvent = swiftApi.LoyaltySDKDynatraceEventModel()
dynatraceEvent._eventName = "custom_success_profile_loyalty"
dynatraceEvent._parameters = nil
SwiftEventBus.post("dynatrace", sender: dynatraceEvent)
let profileDataResult = (profileDataDictionary["result"] as? [String: Any] ?? ["":""])
let tempProfile = ProfileModel(dictionary: profileDataResult)
......@@ -2273,6 +2364,11 @@ public class swiftApi {
getProfileCallback(tempProfile);
} else {
let dynatraceEvent = swiftApi.LoyaltySDKDynatraceEventModel()
dynatraceEvent._eventName = "custom_error_profile_loyalty"
dynatraceEvent._parameters = nil
SwiftEventBus.post("dynatrace", sender: dynatraceEvent)
getProfileCallback(nil)
}
......@@ -2280,6 +2376,12 @@ public class swiftApi {
func profileFailureCallback(_ error: Error?) -> Void {
print("getProfile error: ")
let dynatraceEvent = swiftApi.LoyaltySDKDynatraceEventModel()
dynatraceEvent._eventName = "custom_error_profile_loyalty"
dynatraceEvent._parameters = nil
SwiftEventBus.post("dynatrace", sender: dynatraceEvent)
getProfileCallback(nil)
}
......@@ -2330,6 +2432,11 @@ public class swiftApi {
if let verifyTicketDataDictionary = verifyTicketData as? [String: Any] {
let dynatraceEvent = swiftApi.LoyaltySDKDynatraceEventModel()
dynatraceEvent._eventName = "custom_success_login_loyalty"
dynatraceEvent._parameters = nil
SwiftEventBus.post("dynatrace", sender: dynatraceEvent)
let tempResponse = VerifyTicketResponseModel(dictionary: verifyTicketDataDictionary)
verifyTicketCallback(tempResponse);
......@@ -2337,6 +2444,11 @@ public class swiftApi {
swiftApi().getProfileAsync(getProfileCallback)
} else {
let dynatraceEvent = swiftApi.LoyaltySDKDynatraceEventModel()
dynatraceEvent._eventName = "custom_error_login_loyalty"
dynatraceEvent._parameters = nil
SwiftEventBus.post("dynatrace", sender: dynatraceEvent)
verifyTicketCallback(nil)
}
......@@ -2346,6 +2458,12 @@ public class swiftApi {
print("verifyTicket error: ")
print(error)
print("====================")
let dynatraceEvent = swiftApi.LoyaltySDKDynatraceEventModel()
dynatraceEvent._eventName = "custom_error_login_loyalty"
dynatraceEvent._parameters = nil
SwiftEventBus.post("dynatrace", sender: dynatraceEvent)
verifyTicketCallback(nil)
}
......@@ -2741,6 +2859,49 @@ public class swiftApi {
}
public class LoyaltySDKDynatraceEventModel {
private var eventName: String
private var parameters: [String: String]?
public init() {
self.eventName = ""
self.parameters = [String: String]()
}
public var _eventName: String {
get { // getter
return self.eventName
}
set(newValue) { //setter
self.eventName = newValue
}
}
public var _parameters: [String: String]? {
get { // getter
return self.parameters
}
set(newValue) { //setter
self.parameters = newValue
}
}
public var setParameter: (key: String, value: String) {
@available(*, unavailable)
get {
// fatalError("You cannot read from this object.")
return (key: "", value: "")
}
set(newValue) { //setter
self.parameters?.updateValue(newValue.1, forKey: newValue.0)
}
}
}
public func constructCampaignUrl(_ campaign: CampaignItemModel) -> String {
let instanceOfMyApi = MyApi()
let campaignInfo = instanceOfMyApi.provideInfoForCampaign()
......@@ -4627,14 +4788,29 @@ public class swiftApi {
if ((responseDataDictionary["status"] as? Int == 1) || (responseDataDictionary["status"] as? Int == 4) || (responseDataDictionary["status"] as? Int == 5) || (responseDataDictionary["status"] as? Int == 7)) {
// let responseDataResult = (responseDataDictionary["result"] as? [String: Any] ?? [String: Any]())
let dynatraceEvent = swiftApi.LoyaltySDKDynatraceEventModel()
dynatraceEvent._eventName = "custom_success_sharing_loyalty"
dynatraceEvent._parameters = nil
SwiftEventBus.post("dynatrace", sender: dynatraceEvent)
let tempResponse = SharingResponseModel(dictionary: responseDataDictionary)
cosmoteSharingCallback(tempResponse);
} else {
let dynatraceEvent = swiftApi.LoyaltySDKDynatraceEventModel()
dynatraceEvent._eventName = "custom_error_sharing_loyalty"
dynatraceEvent._parameters = nil
SwiftEventBus.post("dynatrace", sender: dynatraceEvent)
cosmoteSharingCallback(nil)
}
} else {
let dynatraceEvent = swiftApi.LoyaltySDKDynatraceEventModel()
dynatraceEvent._eventName = "custom_error_sharing_loyalty"
dynatraceEvent._parameters = nil
SwiftEventBus.post("dynatrace", sender: dynatraceEvent)
cosmoteSharingCallback(nil)
}
......@@ -4644,6 +4820,12 @@ public class swiftApi {
print("cosmoteSharing error: ")
print(error)
print("====================")
let dynatraceEvent = swiftApi.LoyaltySDKDynatraceEventModel()
dynatraceEvent._eventName = "custom_error_sharing_loyalty"
dynatraceEvent._parameters = nil
SwiftEventBus.post("dynatrace", sender: dynatraceEvent)
cosmoteSharingCallback(nil)
}
}
......@@ -4658,6 +4840,12 @@ public class swiftApi {
if let responseDataDictionary = responseData as? [String: AnyObject] {
if (responseDataDictionary["status"] as? Int == 1) {
let dynatraceEvent = swiftApi.LoyaltySDKDynatraceEventModel()
dynatraceEvent._eventName = "custom_success_retrieve_sharing_loyalty"
dynatraceEvent._parameters = nil
SwiftEventBus.post("dynatrace", sender: dynatraceEvent)
if let responseDataDictionary = responseData as? [String: Any] {
let tempResponse = GenericResponseModel(dictionary: responseDataDictionary)
......@@ -4668,10 +4856,20 @@ public class swiftApi {
}
} else {
let dynatraceEvent = swiftApi.LoyaltySDKDynatraceEventModel()
dynatraceEvent._eventName = "custom_error_retrieve_sharing_loyalty"
dynatraceEvent._parameters = nil
SwiftEventBus.post("dynatrace", sender: dynatraceEvent)
cosmoteSharingCallback(nil)
}
} else {
let dynatraceEvent = swiftApi.LoyaltySDKDynatraceEventModel()
dynatraceEvent._eventName = "custom_error_retrieve_sharing_loyalty"
dynatraceEvent._parameters = nil
SwiftEventBus.post("dynatrace", sender: dynatraceEvent)
cosmoteSharingCallback(nil)
}
......@@ -4681,6 +4879,12 @@ public class swiftApi {
print("cosmoteRetrieveSharing error: ")
print(error)
print("====================")
let dynatraceEvent = swiftApi.LoyaltySDKDynatraceEventModel()
dynatraceEvent._eventName = "custom_error_retrieve_sharing_loyalty"
dynatraceEvent._parameters = nil
SwiftEventBus.post("dynatrace", sender: dynatraceEvent)
cosmoteSharingCallback(nil)
}
}
......@@ -4734,9 +4938,37 @@ public class swiftApi {
let tempResponse = GenericResponseModel(dictionary: responseDataDictionary)
if (tempResponse != nil) {
DispatchQueue.main.async {
if (tempResponse.getStatus == 1) {
let dynatraceEvent = swiftApi.LoyaltySDKDynatraceEventModel()
dynatraceEvent._eventName = "custom_success_coupon_sharing_loyalty"
dynatraceEvent._parameters = nil
SwiftEventBus.post("dynatrace", sender: dynatraceEvent)
} else {
let dynatraceEvent = swiftApi.LoyaltySDKDynatraceEventModel()
dynatraceEvent._eventName = "custom_error_coupon_sharing_loyalty"
dynatraceEvent._parameters = nil
SwiftEventBus.post("dynatrace", sender: dynatraceEvent)
}
}
} else {
let dynatraceEvent = swiftApi.LoyaltySDKDynatraceEventModel()
dynatraceEvent._eventName = "custom_error_coupon_sharing_loyalty"
dynatraceEvent._parameters = nil
SwiftEventBus.post("dynatrace", sender: dynatraceEvent)
}
couponSharingCallback(tempResponse);
} else {
let dynatraceEvent = swiftApi.LoyaltySDKDynatraceEventModel()
dynatraceEvent._eventName = "custom_error_coupon_sharing_loyalty"
dynatraceEvent._parameters = nil
SwiftEventBus.post("dynatrace", sender: dynatraceEvent)
couponSharingCallback(nil)
}
......@@ -4746,6 +4978,12 @@ public class swiftApi {
print("cosmoteCouponSharing error: ")
print(error)
print("====================")
let dynatraceEvent = swiftApi.LoyaltySDKDynatraceEventModel()
dynatraceEvent._eventName = "custom_error_coupon_sharing_loyalty"
dynatraceEvent._parameters = nil
SwiftEventBus.post("dynatrace", sender: dynatraceEvent)
couponSharingCallback(nil)
}
}
......@@ -4762,9 +5000,37 @@ public class swiftApi {
let tempResponse = GenericResponseModel(dictionary: responseDataDictionary)
if (tempResponse != nil) {
DispatchQueue.main.async {
if (tempResponse.getStatus == 1) {
let dynatraceEvent = swiftApi.LoyaltySDKDynatraceEventModel()
dynatraceEvent._eventName = "custom_success_submit_order_loyalty"
dynatraceEvent._parameters = nil
SwiftEventBus.post("dynatrace", sender: dynatraceEvent)
} else {
let dynatraceEvent = swiftApi.LoyaltySDKDynatraceEventModel()
dynatraceEvent._eventName = "custom_error_submit_order_loyalty"
dynatraceEvent._parameters = nil
SwiftEventBus.post("dynatrace", sender: dynatraceEvent)
}
}
} else {
let dynatraceEvent = swiftApi.LoyaltySDKDynatraceEventModel()
dynatraceEvent._eventName = "custom_error_submit_order_loyalty"
dynatraceEvent._parameters = nil
SwiftEventBus.post("dynatrace", sender: dynatraceEvent)
}
submitOrderCallback(tempResponse);
} else {
let dynatraceEvent = swiftApi.LoyaltySDKDynatraceEventModel()
dynatraceEvent._eventName = "custom_error_submit_order_loyalty"
dynatraceEvent._parameters = nil
SwiftEventBus.post("dynatrace", sender: dynatraceEvent)
submitOrderCallback(nil)
}
......@@ -4774,6 +5040,12 @@ public class swiftApi {
print("submitOrder error: ")
print(error)
print("====================")
let dynatraceEvent = swiftApi.LoyaltySDKDynatraceEventModel()
dynatraceEvent._eventName = "custom_error_submit_order_loyalty"
dynatraceEvent._parameters = nil
SwiftEventBus.post("dynatrace", sender: dynatraceEvent)
submitOrderCallback(nil)
}
}
......@@ -4790,9 +5062,37 @@ public class swiftApi {
let tempResponse = GenericResponseModel(dictionary: responseDataDictionary)
if (tempResponse != nil) {
DispatchQueue.main.async {
if (tempResponse.getStatus == 1) {
let dynatraceEvent = swiftApi.LoyaltySDKDynatraceEventModel()
dynatraceEvent._eventName = "custom_success_post_event_loyalty"
dynatraceEvent._parameters = nil
SwiftEventBus.post("dynatrace", sender: dynatraceEvent)
} else {
let dynatraceEvent = swiftApi.LoyaltySDKDynatraceEventModel()
dynatraceEvent._eventName = "custom_error_post_event_loyalty"
dynatraceEvent._parameters = nil
SwiftEventBus.post("dynatrace", sender: dynatraceEvent)
}
}
} else {
let dynatraceEvent = swiftApi.LoyaltySDKDynatraceEventModel()
dynatraceEvent._eventName = "custom_error_post_event_loyalty"
dynatraceEvent._parameters = nil
SwiftEventBus.post("dynatrace", sender: dynatraceEvent)
}
postEventCallback(tempResponse);
} else {
let dynatraceEvent = swiftApi.LoyaltySDKDynatraceEventModel()
dynatraceEvent._eventName = "custom_error_post_event_loyalty"
dynatraceEvent._parameters = nil
SwiftEventBus.post("dynatrace", sender: dynatraceEvent)
postEventCallback(nil)
}
......@@ -4802,6 +5102,12 @@ public class swiftApi {
print("postEvent error: ")
print(error)
print("====================")
let dynatraceEvent = swiftApi.LoyaltySDKDynatraceEventModel()
dynatraceEvent._eventName = "custom_error_post_event_loyalty"
dynatraceEvent._parameters = nil
SwiftEventBus.post("dynatrace", sender: dynatraceEvent)
postEventCallback(nil)
}
}
......@@ -4977,6 +5283,11 @@ public class swiftApi {
if (responseDataDictionary["status"] as? Int == 1) {
let dynatraceEvent = swiftApi.LoyaltySDKDynatraceEventModel()
dynatraceEvent._eventName = "custom_success_sharing_history_loyalty"
dynatraceEvent._parameters = nil
SwiftEventBus.post("dynatrace", sender: dynatraceEvent)
if let responseDataResult = responseDataDictionary["result"] as? [[String : Any]?] {
for item in responseDataResult {
......@@ -5001,10 +5312,20 @@ public class swiftApi {
}
} else {
let dynatraceEvent = swiftApi.LoyaltySDKDynatraceEventModel()
dynatraceEvent._eventName = "custom_error_sharing_history_loyalty"
dynatraceEvent._parameters = nil
SwiftEventBus.post("dynatrace", sender: dynatraceEvent)
getSharingHistoryCallback(nil)
}
} else {
let dynatraceEvent = swiftApi.LoyaltySDKDynatraceEventModel()
dynatraceEvent._eventName = "custom_error_sharing_history_loyalty"
dynatraceEvent._parameters = nil
SwiftEventBus.post("dynatrace", sender: dynatraceEvent)
getSharingHistoryCallback(nil)
}
}
......@@ -5013,6 +5334,12 @@ public class swiftApi {
print("getSharingHistory error: ")
print(error)
print("====================")
let dynatraceEvent = swiftApi.LoyaltySDKDynatraceEventModel()
dynatraceEvent._eventName = "custom_error_sharing_history_loyalty"
dynatraceEvent._parameters = nil
SwiftEventBus.post("dynatrace", sender: dynatraceEvent)
getSharingHistoryCallback(nil)
}
}
......@@ -5173,6 +5500,11 @@ public class swiftApi {
if (responseDataDictionary["MAPP_SHOPS-status"] as? Int == 1) {
let dynatraceEvent = swiftApi.LoyaltySDKDynatraceEventModel()
dynatraceEvent._eventName = "custom_success_shops_loyalty"
dynatraceEvent._parameters = nil
SwiftEventBus.post("dynatrace", sender: dynatraceEvent)
if let responseDataMappShops = responseDataDictionary["MAPP_SHOPS"] as? [String: Any] {
if let responseDataResult = responseDataMappShops["result"] as? [[String: Any]?] {
......@@ -5197,10 +5529,20 @@ public class swiftApi {
}
} else {
let dynatraceEvent = swiftApi.LoyaltySDKDynatraceEventModel()
dynatraceEvent._eventName = "custom_error_shops_loyalty"
dynatraceEvent._parameters = nil
SwiftEventBus.post("dynatrace", sender: dynatraceEvent)
getMerchantsCallback(nil)
}
} else {
let dynatraceEvent = swiftApi.LoyaltySDKDynatraceEventModel()
dynatraceEvent._eventName = "custom_error_shops_loyalty"
dynatraceEvent._parameters = nil
SwiftEventBus.post("dynatrace", sender: dynatraceEvent)
getMerchantsCallback(nil)
}
}
......@@ -5209,6 +5551,12 @@ public class swiftApi {
print("getMultilingualMerchants error: ")
print(error)
print("====================")
let dynatraceEvent = swiftApi.LoyaltySDKDynatraceEventModel()
dynatraceEvent._eventName = "custom_error_shops_loyalty"
dynatraceEvent._parameters = nil
SwiftEventBus.post("dynatrace", sender: dynatraceEvent)
getMerchantsCallback(nil)
}
}
......@@ -5771,13 +6119,29 @@ public class swiftApi {
let tempResponse = VerifyTicketResponseModel(dictionary: responseDataDictionary)
if (tempResponse.getStatus == 1) {
let dynatraceEvent = swiftApi.LoyaltySDKDynatraceEventModel()
dynatraceEvent._eventName = "custom_success_logout_loyalty"
dynatraceEvent._parameters = nil
SwiftEventBus.post("dynatrace", sender: dynatraceEvent)
swiftApi().setUserTag("")
swiftApi().setUserNonTelco(false)
} else {
let dynatraceEvent = swiftApi.LoyaltySDKDynatraceEventModel()
dynatraceEvent._eventName = "custom_error_logout_loyalty"
dynatraceEvent._parameters = nil
SwiftEventBus.post("dynatrace", sender: dynatraceEvent)
}
logoutCallback(tempResponse);
} else {
let dynatraceEvent = swiftApi.LoyaltySDKDynatraceEventModel()
dynatraceEvent._eventName = "custom_error_logout_loyalty"
dynatraceEvent._parameters = nil
SwiftEventBus.post("dynatrace", sender: dynatraceEvent)
logoutCallback(nil)
}
}
......@@ -5876,10 +6240,20 @@ public class swiftApi {
editProfileCallback(tempResponse);
if (tempResponse.getStatus == 1) {
let dynatraceEvent = swiftApi.LoyaltySDKDynatraceEventModel()
dynatraceEvent._eventName = "custom_success_edit_profile_loyalty"
dynatraceEvent._parameters = nil
SwiftEventBus.post("dynatrace", sender: dynatraceEvent)
swiftApi().getProfileAsync(getProfileCallback)
}
} else {
let dynatraceEvent = swiftApi.LoyaltySDKDynatraceEventModel()
dynatraceEvent._eventName = "custom_error_edit_profile_loyalty"
dynatraceEvent._parameters = nil
SwiftEventBus.post("dynatrace", sender: dynatraceEvent)
editProfileCallback(nil)
}
......@@ -5889,6 +6263,12 @@ public class swiftApi {
print("editProfile error: ")
print(error)
print("====================")
let dynatraceEvent = swiftApi.LoyaltySDKDynatraceEventModel()
dynatraceEvent._eventName = "custom_error_edit_profile_loyalty"
dynatraceEvent._parameters = nil
SwiftEventBus.post("dynatrace", sender: dynatraceEvent)
editProfileCallback(nil)
}
......@@ -5961,9 +6341,18 @@ public class swiftApi {
getSingleCampaignCallback(tempResponse);
if (tempResponse.getStatus == 1) {
let dynatraceEvent = swiftApi.LoyaltySDKDynatraceEventModel()
dynatraceEvent._eventName = "custom_success_read_campaign_loyalty"
dynatraceEvent._parameters = nil
SwiftEventBus.post("dynatrace", sender: dynatraceEvent)
}
} else {
let dynatraceEvent = swiftApi.LoyaltySDKDynatraceEventModel()
dynatraceEvent._eventName = "custom_success_read_campaign_loyalty" // custom_error_read_campaign_loyalty
dynatraceEvent._parameters = nil
SwiftEventBus.post("dynatrace", sender: dynatraceEvent)
getSingleCampaignCallback(nil)
}
......@@ -5985,6 +6374,12 @@ public class swiftApi {
print("getSingleCampaign error: ")
print(error)
print("====================")
let dynatraceEvent = swiftApi.LoyaltySDKDynatraceEventModel()
dynatraceEvent._eventName = "custom_success_read_campaign_loyalty" // custom_error_read_campaign_loyalty
dynatraceEvent._parameters = nil
SwiftEventBus.post("dynatrace", sender: dynatraceEvent)
getSingleCampaignCallback(nil)
}
}
......