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-05 15:11:33 +0300
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
b9c584cc9032933c454d0cb8778b6406c68c34d7
b9c584cc
1 parent
b7fedeed
update CampaignItemModel
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
0 deletions
SwiftWarplyFramework/SwiftWarplyFramework/swiftApi.swift
SwiftWarplyFramework/SwiftWarplyFramework/swiftApi.swift
View file @
b9c584c
...
...
@@ -441,6 +441,7 @@ public class swiftApi {
public
let
hasExtraFields
:
Bool
?
public
let
ccms_offer
:
String
?
public
var
loyaltyPackageId
:
String
?
public
var
badge
:
String
?
public
init
()
{
self
.
index_url
=
""
...
...
@@ -456,6 +457,7 @@ public class swiftApi {
self
.
hasExtraFields
=
false
self
.
ccms_offer
=
"false"
self
.
loyaltyPackageId
=
""
self
.
badge
=
""
}
public
init
(
dictionary
:
[
String
:
Any
])
{
...
...
@@ -482,11 +484,13 @@ public class swiftApi {
self
.
loyaltyCampaignId
=
extra_fields_parsed
[
"loyaltyCampaignId"
]
as?
String
?
??
""
self
.
hasExtraFields
=
true
self
.
ccms_offer
=
extra_fields_parsed
[
"ccms_offer"
]
as?
String
?
??
"false"
self
.
badge
=
extra_fields_parsed
[
"badge"
]
as?
String
?
??
""
}
else
{
self
.
subcategory
=
""
self
.
loyaltyCampaignId
=
""
self
.
hasExtraFields
=
false
self
.
ccms_offer
=
"false"
self
.
badge
=
""
print
(
"bad json"
)
}
}
catch
let
error
as
NSError
{
...
...
@@ -494,6 +498,7 @@ public class swiftApi {
self
.
loyaltyCampaignId
=
""
self
.
hasExtraFields
=
false
self
.
ccms_offer
=
"false"
self
.
badge
=
""
print
(
error
)
}
}
...
...
@@ -524,6 +529,15 @@ public class swiftApi {
self
.
loyaltyPackageId
=
newValue
}
}
public
var
_badge
:
String
?
{
get
{
// getter
return
self
.
badge
}
set
(
newValue
)
{
//setter
self
.
badge
=
newValue
}
}
}
public
class
CampaignDataModel
{
...
...
Please
register
or
login
to post a comment