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
2025-07-17 13:05:11 +0300
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
e46b41a63ef3f489c919e90919a1be8f7f7ef6d1
e46b41a6
1 parent
dd6c3007
getCoupons fixes
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
SwiftWarplyFramework/SwiftWarplyFramework/Core/WarplySDK.swift
SwiftWarplyFramework/SwiftWarplyFramework/Core/WarplySDK.swift
View file @
e46b41a
...
...
@@ -1939,14 +1939,19 @@ public final class WarplySDK {
// Get coupon sets using pure Swift implementation
getCouponSets
{
couponSetsArray
in
// Coupon sets already handled by getCouponSets method
}
failureCallback
:
{
error
in
print
(
"=== getCouponSets error: "
,
error
)
}
}
/// Get universal coupons
public
func
getCouponsUniversal
(
language
:
String
,
_
completion
:
@escaping
([
CouponItemModel
]?)
->
Void
,
failureCallback
:
@escaping
(
Int
)
->
Void
)
{
public
func
getCouponsUniversal
(
language
:
String
?
=
nil
,
_
completion
:
@escaping
([
CouponItemModel
]?)
->
Void
,
failureCallback
:
@escaping
(
Int
)
->
Void
)
{
// Handle language default inside the method
let
finalLanguage
=
language
??
self
.
applicationLocale
Task
{
do
{
let
endpoint
=
Endpoint
.
getCoupons
(
language
:
l
anguage
,
couponsetType
:
""
)
let
endpoint
=
Endpoint
.
getCoupons
(
language
:
finalL
anguage
,
couponsetType
:
""
)
let
response
=
try
await
networkService
.
requestRaw
(
endpoint
)
var
couponsArray
:
[
CouponItemModel
]
=
[]
...
...
Please
register
or
login
to post a comment