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
2024-02-23 13:31:11 +0200
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
0fb0f2b8dcf111508fc5a98da8d34b5480ed3cf3
0fb0f2b8
1 parent
702ccd68
Added UnifiedCampaignModel
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
382 additions
and
1 deletions
SwiftWarplyFramework/SwiftWarplyFramework/swiftApi.swift
SwiftWarplyFramework/SwiftWarplyFramework/swiftApi.swift
View file @
0fb0f2b
...
...
@@ -1105,6 +1105,7 @@ public class swiftApi {
private
var
category_title
:
String
?
private
var
banner_img
:
String
?
private
var
banner_title
:
String
?
private
var
unifiedCampaign
:
UnifiedCampaignModel
?
public
init
()
{
self
.
index_url
=
""
...
...
@@ -1131,6 +1132,7 @@ public class swiftApi {
self
.
category_title
=
""
self
.
banner_img
=
""
self
.
banner_title
=
""
self
.
unifiedCampaign
=
swiftApi
.
UnifiedCampaignModel
()
}
public
init
(
dictionary
:
[
String
:
Any
])
{
...
...
@@ -1146,6 +1148,7 @@ public class swiftApi {
self
.
campaign_type
=
dictionary
[
"campaign_type"
]
as?
String
?
??
""
self
.
sorting
=
dictionary
[
"sorting"
]
as?
Int
?
??
0
self
.
ccms
=
nil
self
.
unifiedCampaign
=
swiftApi
.
UnifiedCampaignModel
()
// let extra_fields = dictionary["extra_fields"] as? [String: Any]? ?? ["":""]
if
let
extra_fields
=
dictionary
[
"extra_fields"
]
as?
[
String
:
Any
]
{
...
...
@@ -1352,7 +1355,7 @@ public class swiftApi {
self
.
ccms
=
newValue
}
}
public
var
_carousel
:
String
?
{
get
{
// getter
return
self
.
carousel
...
...
@@ -1388,6 +1391,15 @@ public class swiftApi {
self
.
banner_title
=
newValue
}
}
public
var
_unifiedCampaign
:
UnifiedCampaignModel
?
{
get
{
// getter
return
self
.
unifiedCampaign
}
set
(
newValue
)
{
//setter
self
.
unifiedCampaign
=
newValue
}
}
}
public
class
CampaignDataModel
{
...
...
@@ -2105,6 +2117,375 @@ public class swiftApi {
}
}
public
class
UnifiedCampaignModel
:
Codable
{
private
var
id
:
String
?
private
var
title
:
String
?
private
var
position
:
Int
?
private
var
affiliatedId
:
String
?
private
var
shortDescription
:
String
?
private
var
longDescription
:
String
?
private
var
isHot
:
Bool
?
private
var
logoImagePath
:
String
?
private
var
bigLogoImagePath
:
String
?
private
var
days
:
Int
?
private
var
dayText
:
String
?
private
var
imagePath
:
String
?
private
var
bigImagePath
:
String
?
private
var
markerImagePath
:
String
?
private
var
details
:
String
?
private
var
locations
:
Array
<
UnifiedCampaignLocation
>
?
public
init
()
{
self
.
id
=
""
self
.
title
=
""
self
.
position
=
0
self
.
affiliatedId
=
""
self
.
shortDescription
=
""
self
.
longDescription
=
""
self
.
isHot
=
false
self
.
logoImagePath
=
""
self
.
bigLogoImagePath
=
""
self
.
days
=
0
self
.
dayText
=
""
self
.
imagePath
=
""
self
.
bigImagePath
=
""
self
.
markerImagePath
=
""
self
.
details
=
""
self
.
locations
=
[]
}
public
init
(
dictionary
:
[
String
:
Any
])
{
self
.
id
=
dictionary
[
"id"
]
as?
String
?
??
""
self
.
title
=
dictionary
[
"title"
]
as?
String
?
??
""
self
.
position
=
dictionary
[
"position"
]
as?
Int
?
??
0
self
.
affiliatedId
=
dictionary
[
"affiliatedId"
]
as?
String
?
??
""
self
.
shortDescription
=
dictionary
[
"shortDescription"
]
as?
String
?
??
""
self
.
longDescription
=
dictionary
[
"longDescription"
]
as?
String
?
??
""
self
.
isHot
=
dictionary
[
"isHot"
]
as?
Bool
?
??
false
self
.
logoImagePath
=
dictionary
[
"logoImagePath"
]
as?
String
?
??
""
self
.
bigLogoImagePath
=
dictionary
[
"bigLogoImagePath"
]
as?
String
?
??
""
self
.
days
=
dictionary
[
"days"
]
as?
Int
?
??
0
self
.
dayText
=
dictionary
[
"dayText"
]
as?
String
?
??
""
self
.
imagePath
=
dictionary
[
"imagePath"
]
as?
String
?
??
""
self
.
bigImagePath
=
dictionary
[
"bigImagePath"
]
as?
String
?
??
""
self
.
markerImagePath
=
dictionary
[
"markerImagePath"
]
as?
String
?
??
""
self
.
details
=
dictionary
[
"details"
]
as?
String
?
??
""
if
let
locationsData
=
dictionary
[
"locations"
]
as?
[[
String
:
Any
]?]
{
var
locationsArray
:
Array
<
UnifiedCampaignLocation
>
=
[]
for
item
in
locationsData
{
if
let
itemDictionary
=
item
{
let
tempLocation
=
UnifiedCampaignLocation
(
dictionary
:
itemDictionary
)
locationsArray
.
append
(
tempLocation
)
}
}
self
.
locations
=
locationsArray
}
else
{
self
.
locations
=
[]
}
}
public
var
_id
:
String
{
get
{
// getter
return
self
.
id
??
""
}
set
(
newValue
)
{
//setter
self
.
id
=
newValue
}
}
public
var
_title
:
String
{
get
{
// getter
return
self
.
title
??
""
}
set
(
newValue
)
{
//setter
self
.
title
=
newValue
}
}
public
var
_position
:
Int
{
get
{
// getter
return
self
.
position
??
0
}
set
(
newValue
)
{
//setter
self
.
position
=
newValue
}
}
public
var
_affiliatedId
:
String
{
get
{
// getter
return
self
.
affiliatedId
??
""
}
set
(
newValue
)
{
//setter
self
.
affiliatedId
=
newValue
}
}
public
var
_shortDescription
:
String
{
get
{
// getter
return
self
.
shortDescription
??
""
}
set
(
newValue
)
{
//setter
self
.
shortDescription
=
newValue
}
}
public
var
_longDescription
:
String
{
get
{
// getter
return
self
.
longDescription
??
""
}
set
(
newValue
)
{
//setter
self
.
longDescription
=
newValue
}
}
public
var
_isHot
:
Bool
{
get
{
// getter
return
self
.
isHot
??
false
}
set
(
newValue
)
{
//setter
self
.
isHot
=
newValue
}
}
public
var
_logoImagePath
:
String
{
get
{
// getter
return
self
.
logoImagePath
??
""
}
set
(
newValue
)
{
//setter
self
.
logoImagePath
=
newValue
}
}
public
var
_bigLogoImagePath
:
String
{
get
{
// getter
return
self
.
bigLogoImagePath
??
""
}
set
(
newValue
)
{
//setter
self
.
bigLogoImagePath
=
newValue
}
}
public
var
_days
:
Int
{
get
{
// getter
return
self
.
days
??
0
}
set
(
newValue
)
{
//setter
self
.
days
=
newValue
}
}
public
var
_dayText
:
String
{
get
{
// getter
return
self
.
dayText
??
""
}
set
(
newValue
)
{
//setter
self
.
dayText
=
newValue
}
}
public
var
_imagePath
:
String
{
get
{
// getter
return
self
.
imagePath
??
""
}
set
(
newValue
)
{
//setter
self
.
imagePath
=
newValue
}
}
public
var
_bigImagePath
:
String
{
get
{
// getter
return
self
.
bigImagePath
??
""
}
set
(
newValue
)
{
//setter
self
.
bigImagePath
=
newValue
}
}
public
var
_markerImagePath
:
String
{
get
{
// getter
return
self
.
markerImagePath
??
""
}
set
(
newValue
)
{
//setter
self
.
markerImagePath
=
newValue
}
}
public
var
_details
:
String
{
get
{
// getter
return
self
.
details
??
""
}
set
(
newValue
)
{
//setter
self
.
details
=
newValue
}
}
public
var
_locations
:
Array
<
UnifiedCampaignLocation
>
{
get
{
// getter
return
self
.
locations
??
[]
}
set
(
newValue
)
{
//setter
self
.
locations
=
newValue
}
}
}
public
class
UnifiedCampaignLocation
:
Codable
{
private
var
id
:
String
?
private
var
title
:
String
?
private
var
address
:
String
?
private
var
roadNumber
:
Int
?
private
var
municipality
:
String
?
private
var
telephone
:
String
?
private
var
latitude
:
Double
?
private
var
longitude
:
Double
?
private
var
afiliateId
:
String
?
private
var
url
:
String
?
private
var
logoImage
:
String
?
private
var
pinLogoImage
:
String
?
public
init
()
{
self
.
id
=
""
self
.
title
=
""
self
.
address
=
""
self
.
roadNumber
=
0
self
.
municipality
=
""
self
.
telephone
=
""
self
.
latitude
=
0.0
self
.
longitude
=
0.0
self
.
afiliateId
=
""
self
.
url
=
""
self
.
logoImage
=
""
self
.
pinLogoImage
=
""
}
public
init
(
dictionary
:
[
String
:
Any
])
{
self
.
id
=
dictionary
[
"id"
]
as?
String
?
??
""
self
.
title
=
dictionary
[
"title"
]
as?
String
?
??
""
self
.
address
=
dictionary
[
"address"
]
as?
String
?
??
""
self
.
roadNumber
=
dictionary
[
"roadNumber"
]
as?
Int
?
??
0
self
.
municipality
=
dictionary
[
"municipality"
]
as?
String
?
??
""
self
.
telephone
=
dictionary
[
"telephone"
]
as?
String
?
??
""
self
.
latitude
=
dictionary
[
"latitude"
]
as?
Double
?
??
0.0
self
.
longitude
=
dictionary
[
"longitude"
]
as?
Double
?
??
0.0
self
.
afiliateId
=
dictionary
[
"afiliateId"
]
as?
String
?
??
""
self
.
url
=
dictionary
[
"url"
]
as?
String
?
??
""
self
.
logoImage
=
dictionary
[
"logoImage"
]
as?
String
?
??
""
self
.
pinLogoImage
=
dictionary
[
"pinLogoImage"
]
as?
String
?
??
""
}
public
var
_id
:
String
{
get
{
// getter
return
self
.
id
??
""
}
set
(
newValue
)
{
//setter
self
.
id
=
newValue
}
}
public
var
_title
:
String
{
get
{
// getter
return
self
.
title
??
""
}
set
(
newValue
)
{
//setter
self
.
title
=
newValue
}
}
public
var
_address
:
String
{
get
{
// getter
return
self
.
address
??
""
}
set
(
newValue
)
{
//setter
self
.
address
=
newValue
}
}
public
var
_roadNumber
:
Int
{
get
{
// getter
return
self
.
roadNumber
??
0
}
set
(
newValue
)
{
//setter
self
.
roadNumber
=
newValue
}
}
public
var
_municipality
:
String
{
get
{
// getter
return
self
.
municipality
??
""
}
set
(
newValue
)
{
//setter
self
.
municipality
=
newValue
}
}
public
var
_telephone
:
String
{
get
{
// getter
return
self
.
telephone
??
""
}
set
(
newValue
)
{
//setter
self
.
telephone
=
newValue
}
}
public
var
_latitude
:
Double
{
get
{
// getter
return
self
.
latitude
??
0.0
}
set
(
newValue
)
{
//setter
self
.
latitude
=
newValue
}
}
public
var
_longitude
:
Double
{
get
{
// getter
return
self
.
longitude
??
0.0
}
set
(
newValue
)
{
//setter
self
.
longitude
=
newValue
}
}
public
var
_afiliateId
:
String
{
get
{
// getter
return
self
.
afiliateId
??
""
}
set
(
newValue
)
{
//setter
self
.
afiliateId
=
newValue
}
}
public
var
_url
:
String
{
get
{
// getter
return
self
.
url
??
""
}
set
(
newValue
)
{
//setter
self
.
url
=
newValue
}
}
public
var
_logoImage
:
String
{
get
{
// getter
return
self
.
logoImage
??
""
}
set
(
newValue
)
{
//setter
self
.
logoImage
=
newValue
}
}
public
var
_pinLogoImage
:
String
{
get
{
// getter
return
self
.
pinLogoImage
??
""
}
set
(
newValue
)
{
//setter
self
.
pinLogoImage
=
newValue
}
}
}
// public func openCoupon(parent: UIView, coupon: CouponSetItemModel) -> UIViewController {
// return UIHostingController(rootView: CouponView(parentView: parent, coupon: coupon))
...
...
Please
register
or
login
to post a comment