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-03-06 11:34:31 +0200
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
c325302e3c481bfd8f04ba0b3690cb2d9e2034df
c325302e
1 parent
485220e7
fix CouponItemModel parsing part 1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
1 deletions
SwiftWarplyFramework/SwiftWarplyFramework/swiftApi.swift
SwiftWarplyFramework/SwiftWarplyFramework/swiftApi.swift
View file @
c325302
...
...
@@ -775,7 +775,17 @@ public class swiftApi {
self
.
short_description
=
dictionary
[
"short_description"
]
as?
String
?
??
""
self
.
terms
=
dictionary
[
"terms"
]
as?
String
?
??
""
if
let
couponSetData
=
dictionary
[
"couponset_data"
]
as?
[
String
:
Any
]?
??
[
""
:
""
]
{
// TODO: DELETE
// if let couponSetData = dictionary["couponset_data"] as? [String: Any]? ?? ["":""] {
//
// let tempCouponset = CouponSetItemModel(dictionary: couponSetData)
//
// self.couponset_data = tempCouponset
// } else {
// self.couponset_data = nil
// }
if
let
couponSetData
=
dictionary
[
"couponset_data"
]
as?
[
String
:
Any
]
{
let
tempCouponset
=
CouponSetItemModel
(
dictionary
:
couponSetData
)
...
...
@@ -784,6 +794,15 @@ public class swiftApi {
self
.
couponset_data
=
nil
}
if
let
couponSetDetails
=
dictionary
[
"couponset_details"
]
as?
[
String
:
Any
]
{
let
tempCouponset
=
CouponSetItemModel
(
dictionary
:
couponSetDetails
)
self
.
couponset_data
=
tempCouponset
}
else
{
self
.
couponset_data
=
nil
}
let
expirationString
=
dictionary
[
"expiration"
]
as?
String
?
??
""
// Example expirationString: Optional(2022-12-05 01:55)
...
...
Please
register
or
login
to post a comment