Toggle navigation
Toggle navigation
This project
Loading...
Sign in
open-source
/
warply_sdk_framework
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Network
Create a new issue
Commits
Issue Boards
Authored by
Manos Chorianopoulos
2023-10-04 13:52:54 +0300
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
4d7c417e61ffd6f0a9111102369c034b4497ba38
4d7c417e
1 parent
b1234122
add dynatraceEvents part 3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
107 additions
and
0 deletions
SwiftWarplyFramework/SwiftWarplyFramework/swiftApi.swift
SwiftWarplyFramework/SwiftWarplyFramework/swiftApi.swift
View file @
4d7c417
...
...
@@ -4277,9 +4277,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_customer_state_loyalty"
dynatraceEvent
.
_parameters
=
nil
SwiftEventBus
.
post
(
"dynatrace"
,
sender
:
dynatraceEvent
)
}
else
{
let
dynatraceEvent
=
swiftApi
.
LoyaltySDKDynatraceEventModel
()
dynatraceEvent
.
_eventName
=
"custom_error_customer_state_loyalty"
dynatraceEvent
.
_parameters
=
nil
SwiftEventBus
.
post
(
"dynatrace"
,
sender
:
dynatraceEvent
)
}
}
}
else
{
let
dynatraceEvent
=
swiftApi
.
LoyaltySDKDynatraceEventModel
()
dynatraceEvent
.
_eventName
=
"custom_error_customer_state_loyalty"
dynatraceEvent
.
_parameters
=
nil
SwiftEventBus
.
post
(
"dynatrace"
,
sender
:
dynatraceEvent
)
}
consumerIntegrationCallback
(
tempResponse
);
}
else
{
let
dynatraceEvent
=
swiftApi
.
LoyaltySDKDynatraceEventModel
()
dynatraceEvent
.
_eventName
=
"custom_error_customer_state_loyalty"
dynatraceEvent
.
_parameters
=
nil
SwiftEventBus
.
post
(
"dynatrace"
,
sender
:
dynatraceEvent
)
consumerIntegrationCallback
(
nil
)
}
...
...
@@ -4289,6 +4317,11 @@ public class swiftApi {
print
(
"consumerIntegration error: "
)
print
(
error
)
print
(
"===================="
)
let
dynatraceEvent
=
swiftApi
.
LoyaltySDKDynatraceEventModel
()
dynatraceEvent
.
_eventName
=
"custom_error_customer_state_loyalty"
dynatraceEvent
.
_parameters
=
nil
SwiftEventBus
.
post
(
"dynatrace"
,
sender
:
dynatraceEvent
)
if
let
error
=
error
as?
NSError
{
// if (error.code == 401) {
...
...
@@ -4315,9 +4348,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_retrieve_coupon_loyalty"
dynatraceEvent
.
_parameters
=
nil
SwiftEventBus
.
post
(
"dynatrace"
,
sender
:
dynatraceEvent
)
}
else
{
let
dynatraceEvent
=
swiftApi
.
LoyaltySDKDynatraceEventModel
()
dynatraceEvent
.
_eventName
=
"custom_error_retrieve_coupon_loyalty"
dynatraceEvent
.
_parameters
=
nil
SwiftEventBus
.
post
(
"dynatrace"
,
sender
:
dynatraceEvent
)
}
}
}
else
{
let
dynatraceEvent
=
swiftApi
.
LoyaltySDKDynatraceEventModel
()
dynatraceEvent
.
_eventName
=
"custom_error_retrieve_coupon_loyalty"
dynatraceEvent
.
_parameters
=
nil
SwiftEventBus
.
post
(
"dynatrace"
,
sender
:
dynatraceEvent
)
}
redeemCouponSetCallback
(
tempResponse
);
}
else
{
let
dynatraceEvent
=
swiftApi
.
LoyaltySDKDynatraceEventModel
()
dynatraceEvent
.
_eventName
=
"custom_error_retrieve_coupon_loyalty"
dynatraceEvent
.
_parameters
=
nil
SwiftEventBus
.
post
(
"dynatrace"
,
sender
:
dynatraceEvent
)
redeemCouponSetCallback
(
nil
)
}
...
...
@@ -4327,6 +4388,11 @@ public class swiftApi {
print
(
"redeemCouponSet error: "
)
print
(
error
)
print
(
"===================="
)
let
dynatraceEvent
=
swiftApi
.
LoyaltySDKDynatraceEventModel
()
dynatraceEvent
.
_eventName
=
"custom_error_retrieve_coupon_loyalty"
dynatraceEvent
.
_parameters
=
nil
SwiftEventBus
.
post
(
"dynatrace"
,
sender
:
dynatraceEvent
)
if
let
error
=
error
as?
NSError
{
// if (error.code == 401) {
...
...
@@ -5069,10 +5135,26 @@ public class swiftApi {
// self.pacingGoalDialog(controller, tempPacingDetails._msg)
// }
let
dynatraceEvent
=
swiftApi
.
LoyaltySDKDynatraceEventModel
()
dynatraceEvent
.
_eventName
=
"custom_success_pacing_loyalty"
dynatraceEvent
.
_parameters
=
nil
SwiftEventBus
.
post
(
"dynatrace"
,
sender
:
dynatraceEvent
)
getPacingDetailsCallback
(
tempPacingDetails
);
}
else
{
let
dynatraceEvent
=
swiftApi
.
LoyaltySDKDynatraceEventModel
()
dynatraceEvent
.
_eventName
=
"custom_error_pacing_loyalty"
dynatraceEvent
.
_parameters
=
nil
SwiftEventBus
.
post
(
"dynatrace"
,
sender
:
dynatraceEvent
)
}
}
else
{
let
dynatraceEvent
=
swiftApi
.
LoyaltySDKDynatraceEventModel
()
dynatraceEvent
.
_eventName
=
"custom_error_pacing_loyalty"
dynatraceEvent
.
_parameters
=
nil
SwiftEventBus
.
post
(
"dynatrace"
,
sender
:
dynatraceEvent
)
getPacingDetailsCallback
(
nil
)
}
...
...
@@ -5080,6 +5162,11 @@ public class swiftApi {
func
pacingFailureCallback
(
_
error
:
Error
?)
->
Void
{
print
(
"getPacingDetails error: "
)
let
dynatraceEvent
=
swiftApi
.
LoyaltySDKDynatraceEventModel
()
dynatraceEvent
.
_eventName
=
"custom_error_pacing_loyalty"
dynatraceEvent
.
_parameters
=
nil
SwiftEventBus
.
post
(
"dynatrace"
,
sender
:
dynatraceEvent
)
if
let
error
=
error
as?
NSError
{
// if (error.code == 401) {
...
...
@@ -5130,6 +5217,11 @@ public class swiftApi {
swiftApi
()
.
setSteps
(
0
)
if
let
responseDataDictionary
=
responseData
as?
[
String
:
Any
]
{
let
dynatraceEvent
=
swiftApi
.
LoyaltySDKDynatraceEventModel
()
dynatraceEvent
.
_eventName
=
"custom_success_save_pacing_loyalty"
dynatraceEvent
.
_parameters
=
nil
SwiftEventBus
.
post
(
"dynatrace"
,
sender
:
dynatraceEvent
)
let
tempResponse
=
GenericResponseModel
(
dictionary
:
responseDataDictionary
)
setPacingDetailsCallback
(
tempResponse
);
...
...
@@ -5139,10 +5231,20 @@ public class swiftApi {
}
}
else
{
let
dynatraceEvent
=
swiftApi
.
LoyaltySDKDynatraceEventModel
()
dynatraceEvent
.
_eventName
=
"custom_error_save_pacing_loyalty"
dynatraceEvent
.
_parameters
=
nil
SwiftEventBus
.
post
(
"dynatrace"
,
sender
:
dynatraceEvent
)
setPacingDetailsCallback
(
nil
)
}
}
else
{
let
dynatraceEvent
=
swiftApi
.
LoyaltySDKDynatraceEventModel
()
dynatraceEvent
.
_eventName
=
"custom_error_save_pacing_loyalty"
dynatraceEvent
.
_parameters
=
nil
SwiftEventBus
.
post
(
"dynatrace"
,
sender
:
dynatraceEvent
)
setPacingDetailsCallback
(
nil
)
}
}
...
...
@@ -5150,6 +5252,11 @@ public class swiftApi {
func
pacingFailureCallback
(
_
error
:
Error
?)
->
Void
{
print
(
"setPacingDetails error: "
)
let
dynatraceEvent
=
swiftApi
.
LoyaltySDKDynatraceEventModel
()
dynatraceEvent
.
_eventName
=
"custom_error_save_pacing_loyalty"
dynatraceEvent
.
_parameters
=
nil
SwiftEventBus
.
post
(
"dynatrace"
,
sender
:
dynatraceEvent
)
if
let
error
=
error
as?
NSError
{
// if (error.code == 401) {
// let sessionEvent = swiftApi.LoyaltySDKSessionExpiredEventModel()
...
...
Please
register
or
login
to post a comment