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
12 months ago
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
eb3078380d42fc0f3f1e5b52f3e86b93cef74713
eb307838
1 parent
92346198
swift_sdk_dev_new_coupons_box
...
cosmote_sm_coupons
cosmote_sm_magento
cosmote_sm_pass
cosmote_sm_pass_accessibility
swift_sdk_dev_new_coupons
0.2.83
0.2.82
0.2.81
0.2.80
0.2.79
0.2.78
0.2.77
0.2.76
0.2.75
0.2.74
0.2.73
0.2.72
0.2.71
0.2.70
0.2.69
0.2.68
0.2.67
0.2.66
0.2.65
0.2.64
0.2.63
0.2.62
0.2.61
0.2.60
0.2.59
0.2.58
0.2.57
0.2.56
0.2.55
0.2.54
Add end_date to CampaignItemModel
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
46 additions
and
0 deletions
SwiftWarplyFramework/SwiftWarplyFramework/swiftApi.swift
SwiftWarplyFramework/SwiftWarplyFramework/swiftApi.swift
View file @
eb30783
...
...
@@ -1190,6 +1190,8 @@ public class swiftApi {
private
var
banner_title
:
String
?
private
var
coupon_availability
:
Int
?
private
var
category_id
:
String
?
private
var
start_date
:
String
?
private
var
end_date
:
String
?
public
init
()
{
self
.
index_url
=
""
...
...
@@ -1218,6 +1220,8 @@ public class swiftApi {
self
.
banner_title
=
""
self
.
coupon_availability
=
nil
self
.
category_id
=
""
self
.
start_date
=
""
self
.
end_date
=
""
}
public
init
(
dictionary
:
[
String
:
Any
])
{
...
...
@@ -1234,6 +1238,30 @@ public class swiftApi {
self
.
sorting
=
dictionary
[
"sorting"
]
as?
Int
?
??
0
self
.
ccms
=
nil
self
.
coupon_availability
=
nil
let
startDateString
=
dictionary
[
"start_date"
]
as?
String
?
??
""
// Example expirationString: "start_date" = "2022-06-29 00:00:00";
let
dateFormatter
=
DateFormatter
()
dateFormatter
.
dateFormat
=
"yyyy-MM-dd HH:mm:ss"
if
let
date
=
dateFormatter
.
date
(
from
:
startDateString
??
""
)
{
dateFormatter
.
dateFormat
=
"dd/MM/yyyy"
let
resultString
=
dateFormatter
.
string
(
from
:
date
)
self
.
start_date
=
resultString
}
else
{
self
.
start_date
=
""
}
let
endDateString
=
dictionary
[
"end_date"
]
as?
String
?
??
""
// Example expirationString: "end_date" = "2024-11-30 12:00:00";
let
dateFormatter2
=
DateFormatter
()
dateFormatter2
.
dateFormat
=
"yyyy-MM-dd HH:mm:ss"
if
let
date
=
dateFormatter2
.
date
(
from
:
endDateString
??
""
)
{
dateFormatter2
.
dateFormat
=
"dd/MM/yyyy"
let
resultString
=
dateFormatter2
.
string
(
from
:
date
)
self
.
end_date
=
resultString
}
else
{
self
.
end_date
=
""
}
// let extra_fields = dictionary["extra_fields"] as? [String: Any]? ?? ["":""]
if
let
extra_fields
=
dictionary
[
"extra_fields"
]
as?
[
String
:
Any
]
{
...
...
@@ -1495,6 +1523,24 @@ public class swiftApi {
self
.
category_id
=
newValue
}
}
public
var
_start_date
:
String
?
{
get
{
// getter
return
self
.
start_date
}
set
(
newValue
)
{
//setter
self
.
start_date
=
newValue
}
}
public
var
_end_date
:
String
?
{
get
{
// getter
return
self
.
end_date
}
set
(
newValue
)
{
//setter
self
.
end_date
=
newValue
}
}
}
public
class
CampaignDataModel
{
...
...
This diff is collapsed. Click to expand it.
Please
register
or
login
to post a comment