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-08-11 12:46:01 +0300
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
abc148df65e23fb0698537dab12a5dad3011b4e6
abc148df
1 parent
65852719
add getters setters at ProfileModel
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
361 additions
and
45 deletions
SwiftWarplyFramework/SwiftWarplyFramework.xcworkspace/xcuserdata/manos.xcuserdatad/UserInterfaceState.xcuserstate
SwiftWarplyFramework/SwiftWarplyFramework/ShareViewController.swift
SwiftWarplyFramework/SwiftWarplyFramework/TelcoViewController.swift
SwiftWarplyFramework/SwiftWarplyFramework/WalletViewController.swift
SwiftWarplyFramework/SwiftWarplyFramework/swiftApi.swift
SwiftWarplyFramework/SwiftWarplyFramework.xcworkspace/xcuserdata/manos.xcuserdatad/UserInterfaceState.xcuserstate
View file @
abc148d
No preview for this file type
SwiftWarplyFramework/SwiftWarplyFramework/ShareViewController.swift
View file @
abc148d
...
...
@@ -172,7 +172,7 @@ import UIKit
func
getProfileCallback
(
_
profileData
:
swiftApi
.
ProfileModel
?)
->
Void
{
if
(
profileData
!=
nil
)
{
DispatchQueue
.
main
.
async
{
self
.
numbersList
=
profileData
?
.
msisdnList
??
[]
self
.
numbersList
=
profileData
?
.
_
msisdnList
??
[]
print
(
"========= getProfileRequest SUCCESSSS ========="
)
}
...
...
SwiftWarplyFramework/SwiftWarplyFramework/TelcoViewController.swift
View file @
abc148d
...
...
@@ -114,7 +114,7 @@ import UIKit
func
getProfileCallback
(
_
profileData
:
swiftApi
.
ProfileModel
?)
->
Void
{
if
(
profileData
!=
nil
)
{
DispatchQueue
.
main
.
async
{
self
.
numbersList
=
profileData
?
.
msisdnList
??
[]
self
.
numbersList
=
profileData
?
.
_
msisdnList
??
[]
}
}
else
{
}
...
...
SwiftWarplyFramework/SwiftWarplyFramework/WalletViewController.swift
View file @
abc148d
...
...
@@ -69,15 +69,15 @@ import SwiftEventBus
profileImage
.
layer
.
borderWidth
=
1
profileImage
.
layer
.
borderColor
=
UIColor
(
red
:
0.13
,
green
:
0.66
,
blue
:
0.71
,
alpha
:
1.00
)
.
cgColor
if
(
profile
!=
nil
&&
profile
?
.
image_url
!=
nil
&&
profile
?
.
image_url
!=
""
)
{
profileImage
.
load
(
link
:
profile
?
.
image_url
??
""
,
placeholder
:
UIImage
(),
cache
:
URLCache
())
if
(
profile
!=
nil
&&
profile
?
.
_image_url
!=
nil
&&
profile
?
.
_
image_url
!=
""
)
{
profileImage
.
load
(
link
:
profile
?
.
_
image_url
??
""
,
placeholder
:
UIImage
(),
cache
:
URLCache
())
}
else
{
profileImage
.
image
=
UIImage
(
named
:
"default_profile_image"
,
in
:
Bundle
(
for
:
MyEmptyClass
.
self
),
compatibleWith
:
nil
)
}
print
(
"Profile Name: "
+
(
profile
?
.
firstname
??
""
)
+
" "
+
(
profile
?
.
lastname
??
""
))
print
(
"Profile Name: "
+
(
profile
?
.
_firstname
??
""
)
+
" "
+
(
profile
?
.
_
lastname
??
""
))
profileNameLabel
.
text
=
(
profile
?
.
firstname
??
""
)
+
" "
+
(
profile
?
.
lastname
??
""
)
profileNameLabel
.
text
=
(
profile
?
.
_firstname
??
""
)
+
" "
+
(
profile
?
.
_
lastname
??
""
)
let
userTag
=
swiftApi
()
.
getUserTag
()
print
(
"User tag: "
+
userTag
)
...
...
SwiftWarplyFramework/SwiftWarplyFramework/swiftApi.swift
View file @
abc148d
...
...
@@ -956,7 +956,7 @@ public class swiftApi {
return
(
!
(
isCcmsOffer
||
isTelco
))
}
if
(
swiftApi
()
.
getConsumer
()?
.
answered
==
true
)
{
if
(
swiftApi
()
.
getConsumer
()?
.
_
answered
==
true
)
{
filteredCampaigns
=
filteredCampaigns
.
filter
{
$0
.
offer_category
!=
"questionnaire"
}
}
...
...
@@ -1522,45 +1522,45 @@ public class swiftApi {
public
class
ProfileModel
{
p
ublic
let
ack_optin
:
Bool
?
p
ublic
let
billing_info
:
[
String
:
Any
]?
p
ublic
let
birthday
:
String
?
p
ublic
let
burnt_points
:
Double
?
p
ublic
let
company_name
:
String
?
p
ublic
let
consumer_metadata
:
[
String
:
Any
]?
p
ublic
let
display_name
:
String
?
p
ublic
let
email
:
String
?
p
ublic
let
firstname
:
String
?
p
ublic
let
gender
:
String
?
p
ublic
let
image_url
:
String
?
p
ublic
let
language
:
String
?
p
ublic
let
lastname
:
String
?
p
ublic
let
loyalty_id
:
String
?
p
ublic
let
msisdn
:
String
?
p
ublic
let
nameday
:
String
?
p
ublic
let
nickname
:
String
?
p
ublic
let
password_set
:
Bool
?
p
ublic
let
profile_metadata
:
[
String
:
Any
]?
p
ublic
let
redeemed_points
:
Double
?
p
ublic
let
retrieved_points
:
Double
?
p
ublic
let
salutation
:
String
?
p
ublic
let
subscribe
:
Bool
?
p
ublic
let
tags
:
[
String
:
Any
]?
p
ublic
let
tax_id
:
String
?
p
ublic
let
user_points
:
Double
?
p
ublic
let
uuid
:
String
?
p
ublic
let
verified
:
Bool
?
p
rivate
var
ack_optin
:
Bool
?
p
rivate
var
billing_info
:
[
String
:
Any
]?
p
rivate
var
birthday
:
String
?
p
rivate
var
burnt_points
:
Double
?
p
rivate
var
company_name
:
String
?
p
rivate
var
consumer_metadata
:
[
String
:
Any
]?
p
rivate
var
display_name
:
String
?
p
rivate
var
email
:
String
?
p
rivate
var
firstname
:
String
?
p
rivate
var
gender
:
String
?
p
rivate
var
image_url
:
String
?
p
rivate
var
language
:
String
?
p
rivate
var
lastname
:
String
?
p
rivate
var
loyalty_id
:
String
?
p
rivate
var
msisdn
:
String
?
p
rivate
var
nameday
:
String
?
p
rivate
var
nickname
:
String
?
p
rivate
var
password_set
:
Bool
?
p
rivate
var
profile_metadata
:
[
String
:
Any
]?
p
rivate
var
redeemed_points
:
Double
?
p
rivate
var
retrieved_points
:
Double
?
p
rivate
var
salutation
:
String
?
p
rivate
var
subscribe
:
Bool
?
p
rivate
var
tags
:
[
String
:
Any
]?
p
rivate
var
tax_id
:
String
?
p
rivate
var
user_points
:
Double
?
p
rivate
var
uuid
:
String
?
p
rivate
var
verified
:
Bool
?
// optin
p
ublic
let
optin_newsletter
:
Bool
?
p
ublic
let
optin_sms
:
Bool
?
p
ublic
let
optin_segmentation
:
Bool
?
p
ublic
let
optin_sms_segmentation
:
Bool
?
p
rivate
var
optin_newsletter
:
Bool
?
p
rivate
var
optin_sms
:
Bool
?
p
rivate
var
optin_segmentation
:
Bool
?
p
rivate
var
optin_sms_segmentation
:
Bool
?
// profile_metadata
p
ublic
let
badge
:
String
?
p
ublic
let
msisdnList
:
Array
<
String
>
?
p
ublic
let
answered
:
Bool
?
p
rivate
var
badge
:
String
?
p
rivate
var
msisdnList
:
Array
<
String
>
?
p
rivate
var
answered
:
Bool
?
public
init
()
{
...
...
@@ -1670,6 +1670,322 @@ public class swiftApi {
}
}
public
var
_ack_optin
:
Bool
{
get
{
// getter
return
self
.
ack_optin
??
false
}
set
(
newValue
)
{
//setter
self
.
ack_optin
=
newValue
}
}
public
var
_billing_info
:
[
String
:
Any
]
{
get
{
// getter
return
self
.
billing_info
??
[
String
:
Any
]()
}
set
(
newValue
)
{
//setter
self
.
billing_info
=
newValue
}
}
public
var
_birthday
:
String
{
get
{
// getter
return
self
.
birthday
??
""
}
set
(
newValue
)
{
//setter
self
.
birthday
=
newValue
}
}
public
var
_burnt_points
:
Double
{
get
{
// getter
return
self
.
burnt_points
??
0.0
}
set
(
newValue
)
{
//setter
self
.
burnt_points
=
newValue
}
}
public
var
_company_name
:
String
{
get
{
// getter
return
self
.
company_name
??
""
}
set
(
newValue
)
{
//setter
self
.
company_name
=
newValue
}
}
public
var
_consumer_metadata
:
[
String
:
Any
]
{
get
{
// getter
return
self
.
consumer_metadata
??
[
String
:
Any
]()
}
set
(
newValue
)
{
//setter
self
.
consumer_metadata
=
newValue
}
}
public
var
_display_name
:
String
{
get
{
// getter
return
self
.
display_name
??
""
}
set
(
newValue
)
{
//setter
self
.
display_name
=
newValue
}
}
public
var
_email
:
String
{
get
{
// getter
return
self
.
email
??
""
}
set
(
newValue
)
{
//setter
self
.
email
=
newValue
}
}
public
var
_firstname
:
String
{
get
{
// getter
return
self
.
firstname
??
""
}
set
(
newValue
)
{
//setter
self
.
firstname
=
newValue
}
}
public
var
_gender
:
String
{
get
{
// getter
return
self
.
gender
??
""
}
set
(
newValue
)
{
//setter
self
.
gender
=
newValue
}
}
public
var
_image_url
:
String
{
get
{
// getter
return
self
.
image_url
??
""
}
set
(
newValue
)
{
//setter
self
.
image_url
=
newValue
}
}
public
var
_language
:
String
{
get
{
// getter
return
self
.
language
??
""
}
set
(
newValue
)
{
//setter
self
.
language
=
newValue
}
}
public
var
_lastname
:
String
{
get
{
// getter
return
self
.
lastname
??
""
}
set
(
newValue
)
{
//setter
self
.
lastname
=
newValue
}
}
public
var
_loyalty_id
:
String
{
get
{
// getter
return
self
.
loyalty_id
??
""
}
set
(
newValue
)
{
//setter
self
.
loyalty_id
=
newValue
}
}
public
var
_msisdn
:
String
{
get
{
// getter
return
self
.
msisdn
??
""
}
set
(
newValue
)
{
//setter
self
.
msisdn
=
newValue
}
}
public
var
_nameday
:
String
{
get
{
// getter
return
self
.
nameday
??
""
}
set
(
newValue
)
{
//setter
self
.
nameday
=
newValue
}
}
public
var
_nickname
:
String
{
get
{
// getter
return
self
.
nickname
??
""
}
set
(
newValue
)
{
//setter
self
.
nickname
=
newValue
}
}
public
var
_password_set
:
Bool
{
get
{
// getter
return
self
.
password_set
??
false
}
set
(
newValue
)
{
//setter
self
.
password_set
=
newValue
}
}
public
var
_profile_metadata
:
[
String
:
Any
]
{
get
{
// getter
return
self
.
profile_metadata
??
[
String
:
Any
]()
}
set
(
newValue
)
{
//setter
self
.
profile_metadata
=
newValue
}
}
public
var
_redeemed_points
:
Double
{
get
{
// getter
return
self
.
redeemed_points
??
0.0
}
set
(
newValue
)
{
//setter
self
.
redeemed_points
=
newValue
}
}
public
var
_retrieved_points
:
Double
{
get
{
// getter
return
self
.
retrieved_points
??
0.0
}
set
(
newValue
)
{
//setter
self
.
retrieved_points
=
newValue
}
}
public
var
_salutation
:
String
{
get
{
// getter
return
self
.
salutation
??
""
}
set
(
newValue
)
{
//setter
self
.
salutation
=
newValue
}
}
public
var
_subscribe
:
Bool
{
get
{
// getter
return
self
.
subscribe
??
false
}
set
(
newValue
)
{
//setter
self
.
subscribe
=
newValue
}
}
public
var
_tags
:
[
String
:
Any
]
{
get
{
// getter
return
self
.
tags
??
[
String
:
Any
]()
}
set
(
newValue
)
{
//setter
self
.
tags
=
newValue
}
}
public
var
_tax_id
:
String
{
get
{
// getter
return
self
.
tax_id
??
""
}
set
(
newValue
)
{
//setter
self
.
tax_id
=
newValue
}
}
public
var
_user_points
:
Double
{
get
{
// getter
return
self
.
user_points
??
0.0
}
set
(
newValue
)
{
//setter
self
.
user_points
=
newValue
}
}
public
var
_uuid
:
String
{
get
{
// getter
return
self
.
uuid
??
""
}
set
(
newValue
)
{
//setter
self
.
uuid
=
newValue
}
}
public
var
_verified
:
Bool
{
get
{
// getter
return
self
.
verified
??
false
}
set
(
newValue
)
{
//setter
self
.
verified
=
newValue
}
}
public
var
_optin_newsletter
:
Bool
{
get
{
// getter
return
self
.
optin_newsletter
??
false
}
set
(
newValue
)
{
//setter
self
.
optin_newsletter
=
newValue
}
}
public
var
_optin_sms
:
Bool
{
get
{
// getter
return
self
.
optin_sms
??
false
}
set
(
newValue
)
{
//setter
self
.
optin_sms
=
newValue
}
}
public
var
_optin_segmentation
:
Bool
{
get
{
// getter
return
self
.
optin_segmentation
??
false
}
set
(
newValue
)
{
//setter
self
.
optin_segmentation
=
newValue
}
}
public
var
_optin_sms_segmentation
:
Bool
{
get
{
// getter
return
self
.
optin_sms_segmentation
??
false
}
set
(
newValue
)
{
//setter
self
.
optin_sms_segmentation
=
newValue
}
}
public
var
_badge
:
String
{
get
{
// getter
return
self
.
badge
??
""
}
set
(
newValue
)
{
//setter
self
.
badge
=
newValue
}
}
public
var
_msisdnList
:
Array
<
String
>
{
get
{
// getter
return
self
.
msisdnList
??
[]
}
set
(
newValue
)
{
//setter
self
.
msisdnList
=
newValue
}
}
public
var
_answered
:
Bool
{
get
{
// getter
return
self
.
answered
??
false
}
set
(
newValue
)
{
//setter
self
.
answered
=
newValue
}
}
}
public
class
ProfileDataModel
{
...
...
@@ -1690,7 +2006,7 @@ public class swiftApi {
let
tempProfile
=
ProfileModel
(
dictionary
:
profileDataResult
)
swiftApi
()
.
setConsumer
(
tempProfile
??
swiftApi
.
ProfileModel
())
swiftApi
()
.
setUserTag
(
tempProfile
.
badge
??
""
)
swiftApi
()
.
setUserTag
(
tempProfile
.
_
badge
??
""
)
getProfileCallback
(
tempProfile
);
...
...
@@ -1775,7 +2091,7 @@ public class swiftApi {
if
(
profileData
!=
nil
)
{
DispatchQueue
.
main
.
async
{
swiftApi
()
.
setConsumer
(
profileData
??
swiftApi
.
ProfileModel
())
swiftApi
()
.
setUserTag
(
profileData
?
.
badge
??
""
)
swiftApi
()
.
setUserTag
(
profileData
?
.
_
badge
??
""
)
}
}
else
{
...
...
@@ -3076,7 +3392,7 @@ public class swiftApi {
return
(
!
(
isCcmsOffer
||
isTelco
))
}
if
(
swiftApi
()
.
getConsumer
()?
.
answered
==
true
)
{
if
(
swiftApi
()
.
getConsumer
()?
.
_
answered
==
true
)
{
filteredCampaigns
=
filteredCampaigns
.
filter
{
$0
.
offer_category
!=
"questionnaire"
}
}
...
...
Please
register
or
login
to post a comment