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-06-27 12:26:57 +0300
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
4c0de9610902a6371a8ffb699414052804c308b7
4c0de961
1 parent
39a7a906
add ActiveDFYCouponModel, set get ActiveDFYCoupons
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
47 additions
and
5 deletions
SwiftWarplyFramework/SwiftWarplyFramework/swiftApi.swift
SwiftWarplyFramework/SwiftWarplyFramework/swiftApi.swift
View file @
4c0de96
...
...
@@ -12,6 +12,7 @@ public struct GlobalVariables {
static
var
campaigns
:
Array
<
swiftApi
.
CampaignItemModel
>
=
[]
static
var
customerState
:
swiftApi
.
CustomerStateModel
?
static
var
userTag
:
String
=
""
static
var
dfyCoupons
:
Array
<
swiftApi
.
ActiveDFYCouponModel
>
=
[]
}
public
class
swiftApi
{
...
...
@@ -50,8 +51,8 @@ public class swiftApi {
}
}
public
func
setActiveDFYCoupons
(
campaignIds
:
Array
<
String
>
)
{
activeDFYCoupons
.
init
(
campaignIds
:
campaignIds
)
public
func
setActiveDFYCoupons
(
dfyCoupons
:
Array
<
ActiveDFYCouponModel
>
)
{
GlobalVariables
.
dfyCoupons
=
dfyCoupons
}
public
class
CCMSLoyaltyCampaigns
{
...
...
@@ -66,9 +67,8 @@ public class swiftApi {
let
ccmsCampaign
:
Array
<
LoyaltyContextualOfferModel
>
=
campaigns
}
public
func
getActiveDFYCoupons
()
->
Array
<
String
>
{
let
array
:
Array
<
String
>
=
[]
return
array
public
func
getActiveDFYCoupons
()
->
Array
<
ActiveDFYCouponModel
>
{
return
GlobalVariables
.
dfyCoupons
}
...
...
@@ -1670,5 +1670,47 @@ public class swiftApi {
}
}
}
public
class
ActiveDFYCouponModel
{
private
var
value
:
String
private
var
date
:
String
private
var
code
:
String
public
init
()
{
self
.
value
=
""
self
.
date
=
""
self
.
code
=
""
}
public
var
_value
:
String
{
get
{
// getter
return
self
.
value
}
set
(
newValue
)
{
//setter
self
.
value
=
newValue
}
}
public
var
_date
:
String
{
get
{
// getter
return
self
.
date
}
set
(
newValue
)
{
//setter
self
.
date
=
newValue
}
}
public
var
_code
:
String
{
get
{
// getter
return
self
.
code
}
set
(
newValue
)
{
//setter
self
.
code
=
newValue
}
}
}
}
...
...
Please
register
or
login
to post a comment