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-28 16:55:07 +0300
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
c38749622d8d6fce910f01566cd14554593c1220
c3874962
1 parent
df7854a6
update CampaignItemModel
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
0 deletions
SwiftWarplyFramework/SwiftWarplyFramework/swiftApi.swift
SwiftWarplyFramework/SwiftWarplyFramework/swiftApi.swift
View file @
c387496
...
...
@@ -395,6 +395,8 @@ public class swiftApi {
public
let
subcategory
:
String
?
public
let
is_new
:
Bool
?
public
let
message
:
String
?
public
let
loyaltyCampaignId
:
String
?
public
let
hasExtraFields
:
Bool
?
init
(
dictionary
:
[
String
:
Any
])
{
self
.
index_url
=
dictionary
[
"index_url"
]
as?
String
?
??
""
...
...
@@ -416,12 +418,18 @@ public class swiftApi {
{
extra_fields_parsed
=
jsonArray
;
self
.
subcategory
=
extra_fields_parsed
[
"subcategory"
]
as?
String
?
??
""
self
.
loyaltyCampaignId
=
extra_fields_parsed
[
"loyaltyCampaignId"
]
as?
String
?
??
""
self
.
hasExtraFields
=
true
}
else
{
self
.
subcategory
=
""
self
.
loyaltyCampaignId
=
""
self
.
hasExtraFields
=
false
print
(
"bad json"
)
}
}
catch
let
error
as
NSError
{
self
.
subcategory
=
""
self
.
loyaltyCampaignId
=
""
self
.
hasExtraFields
=
false
print
(
error
)
}
...
...
Please
register
or
login
to post a comment