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
2022-07-08 11:55:03 +0300
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
dc2e136a0e4f1f000cc81541351e518dde6b81c3
dc2e136a
1 parent
af569cd2
add WarplyPacingEventModel and fix pacing events
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
26 deletions
SwiftWarplyFramework/SwiftWarplyFramework/CampaignViewController.swift
SwiftWarplyFramework/SwiftWarplyFramework/swiftApi.swift
SwiftWarplyFramework/SwiftWarplyFramework/CampaignViewController.swift
View file @
dc2e136
...
...
@@ -59,24 +59,24 @@ import SwiftEventBus
SwiftEventBus
.
post
(
"coupon_retrieved"
,
sender
:
couponEvent
)
}
else
if
(
eventArray
[
2
]
==
"serviceDisabled"
)
{
let
pacingService
=
swiftApi
.
WarplyPacing
CardServiceEnabled
Model
()
let
pacingService
=
swiftApi
.
WarplyPacing
Event
Model
()
pacingService
.
_isEnabled
=
false
SwiftEventBus
.
post
(
"pacing
_service
"
,
sender
:
pacingService
)
SwiftEventBus
.
post
(
"pacing"
,
sender
:
pacingService
)
}
else
if
(
eventArray
[
2
]
==
"serviceEnabled"
)
{
let
pacingService
=
swiftApi
.
WarplyPacing
CardServiceEnabled
Model
()
let
pacingService
=
swiftApi
.
WarplyPacing
Event
Model
()
pacingService
.
_isEnabled
=
true
SwiftEventBus
.
post
(
"pacing
_service
"
,
sender
:
pacingService
)
SwiftEventBus
.
post
(
"pacing"
,
sender
:
pacingService
)
}
else
if
(
eventArray
[
2
]
==
"shortcutEnabled"
)
{
let
pacingEvent
=
swiftApi
.
WarplyPacing
Card
EventModel
()
let
pacingEvent
=
swiftApi
.
WarplyPacingEventModel
()
pacingEvent
.
_isVisible
=
true
SwiftEventBus
.
post
(
"pacing
_visible
"
,
sender
:
pacingEvent
)
SwiftEventBus
.
post
(
"pacing"
,
sender
:
pacingEvent
)
}
else
if
(
eventArray
[
2
]
==
"shortcutDisabled"
)
{
let
pacingEvent
=
swiftApi
.
WarplyPacing
Card
EventModel
()
let
pacingEvent
=
swiftApi
.
WarplyPacingEventModel
()
pacingEvent
.
_isVisible
=
false
SwiftEventBus
.
post
(
"pacing
_visible
"
,
sender
:
pacingEvent
)
SwiftEventBus
.
post
(
"pacing"
,
sender
:
pacingEvent
)
}
else
if
(
eventArray
[
1
]
==
"request"
||
eventArray
[
1
]
==
"response"
)
{
print
(
"**************** WARPLY Webview Log START *****************"
)
...
...
SwiftWarplyFramework/SwiftWarplyFramework/swiftApi.swift
View file @
dc2e136
...
...
@@ -2034,39 +2034,30 @@ public class swiftApi {
}
public
class
WarplyPacingCardEventModel
{
public
class
WarplyPacingEventModel
{
private
var
isEnabled
:
Bool
private
var
isVisible
:
Bool
public
init
()
{
self
.
isEnabled
=
false
self
.
isVisible
=
false
}
public
var
_is
Visible
:
Bool
{
public
var
_is
Enabled
:
Bool
{
get
{
// getter
return
self
.
is
Visible
return
self
.
is
Enabled
}
set
(
newValue
)
{
//setter
self
.
is
Visible
=
newValue
self
.
is
Enabled
=
newValue
}
}
}
public
class
WarplyPacingCardServiceEnabledModel
{
private
var
isEnabled
:
Bool
public
init
()
{
self
.
isEnabled
=
false
}
public
var
_isEnabled
:
Bool
{
public
var
_isVisible
:
Bool
{
get
{
// getter
return
self
.
is
Enabled
return
self
.
is
Visible
}
set
(
newValue
)
{
//setter
self
.
is
Enabled
=
newValue
self
.
is
Visible
=
newValue
}
}
}
...
...
Please
register
or
login
to post a comment