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-13 14:10:20 +0300
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
cd1f994cf580b30a49237fea5719e252b29a3a4f
cd1f994c
1 parent
801cfae5
add setCouponSetList at getcoupons request
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
0 deletions
SwiftWarplyFramework/SwiftWarplyFramework/swiftApi.swift
SwiftWarplyFramework/SwiftWarplyFramework/swiftApi.swift
View file @
cd1f994
...
...
@@ -363,6 +363,7 @@ public class swiftApi {
var
coupons
:
[
AnyHashable
:
Any
]?
var
couponSets
:
[
AnyHashable
:
Any
]?
var
couponSetsArray
:
Array
<
CouponSetItemModel
>
=
[]
let
instanceOfMyApi
=
MyApi
()
instanceOfMyApi
.
getCouponsWithSuccessBlock
(
couponsCallback
,
failureBlock
:
(
couponsFailureCallback
))
...
...
@@ -381,6 +382,17 @@ public class swiftApi {
func
couponSetsCallback
(
_
couponSetsData
:
[
AnyHashable
:
Any
]?)
->
Void
{
couponSets
=
couponSetsData
??
[
""
:
""
]
if
let
myCouponsSetsDictionary
=
couponSets
as?
[
String
:
AnyObject
]
{
let
couponSetsData
=
(
myCouponsSetsDictionary
[
"MAPP_COUPON"
]
as!
NSArray
)
for
couponset
in
couponSetsData
{
let
tempCouponset
=
CouponSetItemModel
(
dictionary
:
couponset
as!
[
String
:
Any
])
couponSetsArray
.
append
(
tempCouponset
)
}
}
swiftApi
()
.
setCouponSetList
(
couponSetsArray
)
// On CouponSets request Success, match coupons with couponsets
let
tempCoupons
=
matchCoupons
()
...
...
Please
register
or
login
to post a comment