Manos Chorianopoulos

add postEvent functionality at telcoVC

......@@ -129,6 +129,7 @@ import UIKit
DispatchQueue.main.async {
if (response?.getStatus == 1) {
self.showDialog("Το αίτημά σου ολοκληρώθηκε επιτυχώς!","Θα ενημερωθείς άμεσα για την ενεργοποίηση του πακέτου σου.")
self.postEventRequest()
} else {
self.showDialog("Αποτυχία","Κάτι πήγε στραβά")
......@@ -139,6 +140,22 @@ import UIKit
}
}
func postEventRequest() {
swiftApi().postEventAsync(Session_ID: (campaign?.session_uuid ?? ""), OfferAudienceLevel: (ccms?._offerAudienceLevel ?? ""), msisdn: self.selectedNumber, UACIOfferTrackingCode: (ccms?._uaciOfferTrackingCode ?? ""), OFFERCODE1: (ccms?._offerCode1 ?? ""), SCORE: (ccms?._score ?? ""), ZONE: (ccms?._zone ?? ""), WAVE: (ccms?._wave ?? ""), VALIDITY: (ccms?._validity ?? ""), TREATMENT_CODE: (ccms?._treatmentCode ?? ""), postEventCallback)
}
func postEventCallback (_ response: swiftApi.GenericResponseModel?) -> Void {
if (response != nil) {
DispatchQueue.main.async {
if (response?.getStatus == 1) {
} else {
}
}
} else {
}
}
// MARK: - Actions
@IBAction func activateButtomAction(_ sender: Any) {
self.numbersPopupTapped(sender)
......