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
Vasilis
2022-02-07 13:37:54 +0200
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
d2a4bf8ccc4ad00e6dff969fd3b9ae2943d44c71
d2a4bf8c
1 parent
edce497b
several fixes
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
5 deletions
WarplySDKFrameworkIOS/Warply/Warply.h
WarplySDKFrameworkIOS/Warply/Warply.m
WarplySDKFrameworkIOS/WarplySDKFrameworkIOS.xcworkspace/xcuserdata/billskouras.xcuserdatad/UserInterfaceState.xcuserstate
WarplySDKFrameworkIOS/WarplySDKFrameworkIOS/MyApi.m
WarplySDKFrameworkIOS/Warply/Warply.h
View file @
d2a4bf8
...
...
@@ -358,7 +358,7 @@ WL_VERSION_INTERFACE()
-
(
void
)
redeemCouponSetsWithSuccessBlock
:(
NSString
*
)
uuid
:
(
void
(
^
)(
NSDictionary
*
response
))
success
failureBlock
:(
void
(
^
)(
NSError
*
error
))
failure
;
-
(
void
)
validateCoupoWithSuccessBlock
:(
NSString
*
)
coupon
:
(
void
(
^
)(
NSDictionary
*
response
))
success
failureBlock
:(
void
(
^
)(
NSError
*
error
))
failure
;
-
(
void
)
validateCoupo
n
WithSuccessBlock
:(
NSString
*
)
coupon
:
(
void
(
^
)(
NSDictionary
*
response
))
success
failureBlock
:(
void
(
^
)(
NSError
*
error
))
failure
;
/*!
@abstract Get the full page add accordint to the display_type of a campaign.
...
...
WarplySDKFrameworkIOS/Warply/Warply.m
View file @
d2a4bf8
...
...
@@ -1548,8 +1548,18 @@ WL_VERSION_IMPLEMENTATION(WL_VERSION)
-
(
void
)
getCouponSetsWithSuccessBlock
:
(
NSNumber
*
)
active
andVisible
:
(
NSNumber
*
)
visible
andUuids
:
(
NSArray
*
)
uuids
:
(
void
(
^
)(
NSDictionary
*
response
))
success
failureBlock
:
(
void
(
^
)(
NSError
*
error
))
failure
{
NSDictionary
*
postDictionary
=
@{
@"coupon"
:
@{
@"action"
:
@"retrieve_multilingual"
,
@"language"
:
LANG
,
@"active"
:
active
,
@"visible"
:
visible
,
@"language"
:
LANG
,
@"uuids"
:
uuids
}};
NSData
*
jsonData
=
[
NSJSONSerialization
dataWithJSONObject
:
postDictionary
options
:
0
error
:
NULL
];
NSMutableDictionary
*
data
=
[[
NSMutableDictionary
alloc
]
init
];
[
data
setValue
:
active
forKey
:
@"active"
];
[
data
setValue
:
@"retrieve_multilingual"
forKey
:
@"action"
];
[
data
setValue
:
visible
forKey
:
@"visible"
];
[
data
setValue
:
LANG
forKey
:
@"language"
];
if
(
uuids
&&
[
uuids
count
]
>
0
)
{
[
data
setValue
:
uuids
forKey
:
@"uuids"
];
}
NSMutableDictionary
*
dataCoupons
=
[[
NSMutableDictionary
alloc
]
init
];
[
dataCoupons
setValue
:
data
forKey
:
@"coupon"
];
NSData
*
jsonData
=
[
NSJSONSerialization
dataWithJSONObject
:
dataCoupons
options
:
0
error
:
NULL
];
[
self
sendContext
:
jsonData
successBlock
:
^
(
NSDictionary
*
contextResponse
)
{
if
(
success
)
{
success
(
contextResponse
);
...
...
@@ -1599,7 +1609,7 @@ WL_VERSION_IMPLEMENTATION(WL_VERSION)
}];
}
-
(
void
)
validateCoupoWithSuccessBlock
:
(
NSString
*
)
coupon
:
(
void
(
^
)(
NSDictionary
*
response
))
success
failureBlock
:
(
void
(
^
)(
NSError
*
error
))
failure
-
(
void
)
validateCoupo
n
WithSuccessBlock
:
(
NSString
*
)
coupon
:
(
void
(
^
)(
NSDictionary
*
response
))
success
failureBlock
:
(
void
(
^
)(
NSError
*
error
))
failure
{
NSDictionary
*
postDictionary
=
@{
@"coupon"
:
@{
@"action"
:
@"validate"
,
@"coupon"
:
coupon
}};
NSData
*
jsonData
=
[
NSJSONSerialization
dataWithJSONObject
:
postDictionary
options
:
0
error
:
NULL
];
...
...
WarplySDKFrameworkIOS/WarplySDKFrameworkIOS.xcworkspace/xcuserdata/billskouras.xcuserdatad/UserInterfaceState.xcuserstate
View file @
d2a4bf8
No preview for this file type
WarplySDKFrameworkIOS/WarplySDKFrameworkIOS/MyApi.m
View file @
d2a4bf8
...
...
@@ -1088,7 +1088,7 @@ NSString *LANG;
__block
NSDictionary
*
resp
=
[
NSDictionary
alloc
];
__block
BOOL
isRunLoopNested
=
NO
;
__block
BOOL
isOperationCompleted
=
NO
;
[[
Warply
sharedService
]
validateCoupoWithSuccessBlock
:
coupon
:
^
(
NSDictionary
*
response
)
{
[[
Warply
sharedService
]
validateCoupo
n
WithSuccessBlock
:
coupon
:
^
(
NSDictionary
*
response
)
{
resp
=
response
;
isOperationCompleted
=
YES
;
if
(
isRunLoopNested
)
{
...
...
Please
register
or
login
to post a comment