Showing
6 changed files
with
44 additions
and
23 deletions
... | @@ -89,7 +89,7 @@ | ... | @@ -89,7 +89,7 @@ |
89 | - (void)cosmoteRetrieveSharingAsync:(NSString*)sharingId :(NSNumber*)accept :(void(^)(NSDictionary *response))success failureBlock:(void(^)(NSError *error))failure; | 89 | - (void)cosmoteRetrieveSharingAsync:(NSString*)sharingId :(NSNumber*)accept :(void(^)(NSDictionary *response))success failureBlock:(void(^)(NSError *error))failure; |
90 | - (void)getCosmoteUserAsync:(NSString*)guid :(void(^)(NSDictionary *response))success failureBlock:(void(^)(NSError *error))failure; | 90 | - (void)getCosmoteUserAsync:(NSString*)guid :(void(^)(NSDictionary *response))success failureBlock:(void(^)(NSError *error))failure; |
91 | - (void)cosmoteCouponSharingAsync:(NSString*) coupon :(NSString*)sender :(NSString*)receiver :(void(^)(NSDictionary *response))success failureBlock:(void(^)(NSError *error))failure; | 91 | - (void)cosmoteCouponSharingAsync:(NSString*) coupon :(NSString*)sender :(NSString*)receiver :(void(^)(NSDictionary *response))success failureBlock:(void(^)(NSError *error))failure; |
92 | -- (void)submitOrderAsync:(NSString*) campaign_session_uuid :(NSString*)user_msisdn :(NSString*)businessService :(NSString*)offerName :(NSString*)productType :(NSString*)provDuration :(NSString*)noOfRecurrance :(NSString*)price :(NSString*)discount :(NSString*)voiceCategory :(NSString*)dataCategory :(NSString*)minsValue :(NSString*)dataValue :(NSString*)provStepValueMins :(void(^)(NSDictionary *response))success failureBlock:(void(^)(NSError *error))failure; | 92 | +- (void)submitOrderAsync:(NSString*) campaign_session_uuid :(NSString*)user_msisdn :(NSString*)businessService :(NSString*)offerName :(NSString*)productType :(NSString*)provDuration :(NSString*)noOfRecurrance :(NSString*)price :(NSString*)discount :(NSString*)voiceCategory :(NSString*)dataCategory :(NSString*)minsValue :(NSString*)dataValue :(NSString*)provStepValueMins :(NSString*)OfferAudienceLevel :(NSString*)UACIOfferTrackingCode :(NSString*)OFFERCODE1 :(NSString*)SCORE :(NSString*)ZONE :(NSString*)WAVE :(NSString*)VALIDITY :(NSString*)TREATMENT_CODE :(void(^)(NSDictionary *response))success failureBlock:(void(^)(NSError *error))failure; |
93 | - (void)postEventAsync:(NSString*)Session_ID :(NSString*)OfferAudienceLevel :(NSString*)msisdn :(NSString*)UACIOfferTrackingCode :(NSString*)OFFERCODE1 :(NSString*)SCORE :(NSString*)ZONE :(NSString*)WAVE :(NSString*)VALIDITY :(NSString*)TREATMENT_CODE :(void(^)(NSDictionary *response))success failureBlock:(void(^)(NSError *error))failure; | 93 | - (void)postEventAsync:(NSString*)Session_ID :(NSString*)OfferAudienceLevel :(NSString*)msisdn :(NSString*)UACIOfferTrackingCode :(NSString*)OFFERCODE1 :(NSString*)SCORE :(NSString*)ZONE :(NSString*)WAVE :(NSString*)VALIDITY :(NSString*)TREATMENT_CODE :(void(^)(NSDictionary *response))success failureBlock:(void(^)(NSError *error))failure; |
94 | - (void)getCampaignsAsyncNew:(NSString*)language :(NSDictionary*)filters :(void (^)(NSDictionary *response))success failureBlock:(void (^)(NSError *error))failure; | 94 | - (void)getCampaignsAsyncNew:(NSString*)language :(NSDictionary*)filters :(void (^)(NSDictionary *response))success failureBlock:(void (^)(NSError *error))failure; |
95 | - (void)getCampaignsPersonalizedAsync:(NSString*)language :(NSDictionary*)filters :(void (^)(NSDictionary *response))success failureBlock:(void (^)(NSError *error))failure; | 95 | - (void)getCampaignsPersonalizedAsync:(NSString*)language :(NSDictionary*)filters :(void (^)(NSDictionary *response))success failureBlock:(void (^)(NSError *error))failure; | ... | ... |
... | @@ -1473,9 +1473,9 @@ NSString *VERIFY_URL = @"/partners/cosmote/verify"; | ... | @@ -1473,9 +1473,9 @@ NSString *VERIFY_URL = @"/partners/cosmote/verify"; |
1473 | }]; | 1473 | }]; |
1474 | } | 1474 | } |
1475 | 1475 | ||
1476 | -- (void)submitOrderAsync:(NSString*) campaign_session_uuid :(NSString*)user_msisdn :(NSString*)businessService :(NSString*)offerName :(NSString*)productType :(NSString*)provDuration :(NSString*)noOfRecurrance :(NSString*)price :(NSString*)discount :(NSString*)voiceCategory :(NSString*)dataCategory :(NSString*)minsValue :(NSString*)dataValue :(NSString*)provStepValueMins :(void(^)(NSDictionary *response))success failureBlock:(void(^)(NSError *error))failure | 1476 | +- (void)submitOrderAsync:(NSString*) campaign_session_uuid :(NSString*)user_msisdn :(NSString*)businessService :(NSString*)offerName :(NSString*)productType :(NSString*)provDuration :(NSString*)noOfRecurrance :(NSString*)price :(NSString*)discount :(NSString*)voiceCategory :(NSString*)dataCategory :(NSString*)minsValue :(NSString*)dataValue :(NSString*)provStepValueMins :(NSString*)OfferAudienceLevel :(NSString*)UACIOfferTrackingCode :(NSString*)OFFERCODE1 :(NSString*)SCORE :(NSString*)ZONE :(NSString*)WAVE :(NSString*)VALIDITY :(NSString*)TREATMENT_CODE :(void(^)(NSDictionary *response))success failureBlock:(void(^)(NSError *error))failure |
1477 | { | 1477 | { |
1478 | - [[Warply sharedService] submitOrderWithSuccessBlock:campaign_session_uuid :user_msisdn :businessService :offerName :productType :provDuration :noOfRecurrance :price :discount :voiceCategory :dataCategory :minsValue :dataValue :provStepValueMins :^(NSDictionary *response) { | 1478 | + [[Warply sharedService] submitOrderWithSuccessBlock:campaign_session_uuid :user_msisdn :businessService :offerName :productType :provDuration :noOfRecurrance :price :discount :voiceCategory :dataCategory :minsValue :dataValue :provStepValueMins :OfferAudienceLevel :UACIOfferTrackingCode :OFFERCODE1 :SCORE :ZONE :WAVE :VALIDITY :TREATMENT_CODE :^(NSDictionary *response) { |
1479 | if (success) { | 1479 | if (success) { |
1480 | success(response); | 1480 | success(response); |
1481 | } | 1481 | } | ... | ... |
... | @@ -121,7 +121,9 @@ import UIKit | ... | @@ -121,7 +121,9 @@ import UIKit |
121 | } | 121 | } |
122 | 122 | ||
123 | func submitOrderRequest() { | 123 | func submitOrderRequest() { |
124 | - swiftApi().submitOrderAsync(campaign_session_uuid: (campaign?.session_uuid ?? ""), user_msisdn: self.selectedNumber, businessService: (ccms?._businessService ?? ""), offerName: (ccms?._offerName ?? ""), productType: (ccms?._productType ?? ""), provDuration: (ccms?._provDuration ?? ""), noOfRecurrance: (ccms?._noOfRecurrance ?? ""), price: (ccms?._price ?? ""), discount: (ccms?._discount ?? ""), voiceCategory: (ccms?._voiceCategory ?? ""), dataCategory: (ccms?._dataCategory ?? ""), minsValue: (ccms?._minsValue ?? ""), dataValue: (ccms?._dataValue ?? ""), provStepValueMins: (ccms?._provStepValueMins ?? ""), submitOrderCallback) | 124 | + swiftApi().submitOrderAsync(campaign_session_uuid: (campaign?.session_uuid ?? ""), user_msisdn: self.selectedNumber, businessService: (ccms?._businessService ?? ""), offerName: (ccms?._offerName ?? ""), productType: (ccms?._productType ?? ""), provDuration: (ccms?._provDuration ?? ""), noOfRecurrance: (ccms?._noOfRecurrance ?? ""), price: (ccms?._price ?? ""), discount: (ccms?._discount ?? ""), voiceCategory: (ccms?._voiceCategory ?? ""), dataCategory: (ccms?._dataCategory ?? ""), minsValue: (ccms?._minsValue ?? ""), dataValue: (ccms?._dataValue ?? ""), provStepValueMins: (ccms?._provStepValueMins ?? ""), |
125 | + OfferAudienceLevel: (ccms?._offerAudienceLevel ?? ""), UACIOfferTrackingCode: (ccms?._uaciOfferTrackingCode ?? ""), OFFERCODE1: (ccms?._offerCode1 ?? ""), SCORE: (ccms?._score ?? ""), ZONE: (ccms?._zone ?? ""), WAVE: (ccms?._wave ?? ""), VALIDITY: (ccms?._validity ?? ""), TREATMENT_CODE: (ccms?._treatmentCode ?? ""), | ||
126 | + submitOrderCallback) | ||
125 | } | 127 | } |
126 | 128 | ||
127 | func submitOrderCallback (_ response: swiftApi.GenericResponseModel?) -> Void { | 129 | func submitOrderCallback (_ response: swiftApi.GenericResponseModel?) -> Void { |
... | @@ -129,7 +131,7 @@ import UIKit | ... | @@ -129,7 +131,7 @@ import UIKit |
129 | DispatchQueue.main.async { | 131 | DispatchQueue.main.async { |
130 | if (response?.getStatus == 1) { | 132 | if (response?.getStatus == 1) { |
131 | self.showDialog("Το αίτημά σου ολοκληρώθηκε επιτυχώς!","Θα ενημερωθείς άμεσα για την ενεργοποίηση του πακέτου σου.") | 133 | self.showDialog("Το αίτημά σου ολοκληρώθηκε επιτυχώς!","Θα ενημερωθείς άμεσα για την ενεργοποίηση του πακέτου σου.") |
132 | - self.postEventRequest() | 134 | + // self.postEventRequest() |
133 | 135 | ||
134 | } else { | 136 | } else { |
135 | self.showDialog("Αποτυχία","Κάτι πήγε στραβά") | 137 | self.showDialog("Αποτυχία","Κάτι πήγε στραβά") |
... | @@ -140,21 +142,21 @@ import UIKit | ... | @@ -140,21 +142,21 @@ import UIKit |
140 | } | 142 | } |
141 | } | 143 | } |
142 | 144 | ||
143 | - func postEventRequest() { | 145 | + // func postEventRequest() { |
144 | - 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) | 146 | + // 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) |
145 | - } | 147 | + // } |
146 | 148 | ||
147 | - func postEventCallback (_ response: swiftApi.GenericResponseModel?) -> Void { | 149 | + // func postEventCallback (_ response: swiftApi.GenericResponseModel?) -> Void { |
148 | - if (response != nil) { | 150 | + // if (response != nil) { |
149 | - DispatchQueue.main.async { | 151 | + // DispatchQueue.main.async { |
150 | - if (response?.getStatus == 1) { | 152 | + // if (response?.getStatus == 1) { |
151 | 153 | ||
152 | - } else { | 154 | + // } else { |
153 | - } | 155 | + // } |
154 | - } | 156 | + // } |
155 | - } else { | 157 | + // } else { |
156 | - } | 158 | + // } |
157 | - } | 159 | + // } |
158 | 160 | ||
159 | // MARK: - Actions | 161 | // MARK: - Actions |
160 | @IBAction func activateButtomAction(_ sender: Any) { | 162 | @IBAction func activateButtomAction(_ sender: Any) { | ... | ... |
... | @@ -393,7 +393,7 @@ WL_VERSION_INTERFACE() | ... | @@ -393,7 +393,7 @@ WL_VERSION_INTERFACE() |
393 | 393 | ||
394 | - (void) cosmoteRetrieveSharingWithSuccessBlock:(NSString*) sharingId :(NSNumber*)accept :(void(^)(NSDictionary *response))success failureBlock:(void(^)(NSError *error))failure; | 394 | - (void) cosmoteRetrieveSharingWithSuccessBlock:(NSString*) sharingId :(NSNumber*)accept :(void(^)(NSDictionary *response))success failureBlock:(void(^)(NSError *error))failure; |
395 | 395 | ||
396 | -- (void) submitOrderWithSuccessBlock:(NSString*) campaign_session_uuid :(NSString*)user_msisdn :(NSString*)businessService :(NSString*)offerName :(NSString*)productType :(NSString*)provDuration :(NSString*)noOfRecurrance :(NSString*)price :(NSString*)discount :(NSString*)voiceCategory :(NSString*)dataCategory :(NSString*)minsValue :(NSString*)dataValue :(NSString*)provStepValueMins :(void(^)(NSDictionary *response))success failureBlock:(void(^)(NSError *error))failure; | 396 | +- (void) submitOrderWithSuccessBlock:(NSString*) campaign_session_uuid :(NSString*)user_msisdn :(NSString*)businessService :(NSString*)offerName :(NSString*)productType :(NSString*)provDuration :(NSString*)noOfRecurrance :(NSString*)price :(NSString*)discount :(NSString*)voiceCategory :(NSString*)dataCategory :(NSString*)minsValue :(NSString*)dataValue :(NSString*)provStepValueMins :(NSString*)OfferAudienceLevel :(NSString*)UACIOfferTrackingCode :(NSString*)OFFERCODE1 :(NSString*)SCORE :(NSString*)ZONE :(NSString*)WAVE :(NSString*)VALIDITY :(NSString*)TREATMENT_CODE :(void(^)(NSDictionary *response))success failureBlock:(void(^)(NSError *error))failure; |
397 | 397 | ||
398 | - (void) validateCouponWithSuccessBlock:(NSString*) coupon :(void(^)(NSDictionary *response))success failureBlock:(void(^)(NSError *error))failure; | 398 | - (void) validateCouponWithSuccessBlock:(NSString*) coupon :(void(^)(NSDictionary *response))success failureBlock:(void(^)(NSError *error))failure; |
399 | 399 | ... | ... |
... | @@ -2246,9 +2246,28 @@ WL_VERSION_IMPLEMENTATION(WL_VERSION) | ... | @@ -2246,9 +2246,28 @@ WL_VERSION_IMPLEMENTATION(WL_VERSION) |
2246 | }]; | 2246 | }]; |
2247 | } | 2247 | } |
2248 | 2248 | ||
2249 | -- (void) submitOrderWithSuccessBlock:(NSString*) campaign_session_uuid :(NSString*)user_msisdn :(NSString*)businessService :(NSString*)offerName :(NSString*)productType :(NSString*)provDuration :(NSString*)noOfRecurrance :(NSString*)price :(NSString*)discount :(NSString*)voiceCategory :(NSString*)dataCategory :(NSString*)minsValue :(NSString*)dataValue :(NSString*)provStepValueMins :(void(^)(NSDictionary *response))success failureBlock:(void(^)(NSError *error))failure | 2249 | +- (void) submitOrderWithSuccessBlock:(NSString*) campaign_session_uuid :(NSString*)user_msisdn :(NSString*)businessService :(NSString*)offerName :(NSString*)productType :(NSString*)provDuration :(NSString*)noOfRecurrance :(NSString*)price :(NSString*)discount :(NSString*)voiceCategory :(NSString*)dataCategory :(NSString*)minsValue :(NSString*)dataValue :(NSString*)provStepValueMins :(NSString*)OfferAudienceLevel :(NSString*)UACIOfferTrackingCode :(NSString*)OFFERCODE1 :(NSString*)SCORE :(NSString*)ZONE :(NSString*)WAVE :(NSString*)VALIDITY :(NSString*)TREATMENT_CODE :(void(^)(NSDictionary *response))success failureBlock:(void(^)(NSError *error))failure |
2250 | { | 2250 | { |
2251 | - NSDictionary *postDictionary = @{@"wallet": @{@"action": @"add_product", @"product_uuid": @"011d21908d984e3cbecbdfd2920a5d3b", @"communication_uuid": campaign_session_uuid, @"extra_data": @{@"user_msisdn": user_msisdn, @"businessService": businessService, @"offerName": offerName, @"productType": productType, @"provDuration": provDuration, @"noOfRecurrance": noOfRecurrance, @"price": price, @"discount": discount, @"voiceCategory": voiceCategory, @"dataCategory": dataCategory, @"minsValue": minsValue, @"dataValue": dataValue, @"provStepValueMins": provStepValueMins}}}; | 2251 | + NSDictionary *postDictionary = @{@"wallet": @{@"action": @"add_product", @"product_uuid": @"011d21908d984e3cbecbdfd2920a5d3b", @"communication_uuid": campaign_session_uuid, @"extra_data": @{@"user_msisdn": user_msisdn, @"businessService": businessService, @"offerName": offerName, @"productType": productType, @"provDuration": provDuration, @"noOfRecurrance": noOfRecurrance, @"price": price, @"discount": discount, @"voiceCategory": voiceCategory, @"dataCategory": dataCategory, @"minsValue": minsValue, @"dataValue": dataValue, @"provStepValueMins": provStepValueMins, @"InteractiveChannel": @"COSMOTE_OMNI", @"InteractionPoint": ZONE, @"Session_ID": campaign_session_uuid, @"OfferAudienceLevel": OfferAudienceLevel, @"MSISDN": user_msisdn, @"GUID": @"", @"parameters": @[ |
2252 | + @{@"Name": @"UACIOfferTrackingCode", @"Value": UACIOfferTrackingCode, @"Type": @"string"}, | ||
2253 | + @{@"Name": @"UACICustomLoggerTableName", @"Value": @"VW_WHITELIST", @"Type": @"string"}, | ||
2254 | + @{@"Name": @"MSISDN", @"Value": user_msisdn, @"Type": @"string"}, | ||
2255 | + @{@"Name": @"OFFERCODE1", @"Value": OFFERCODE1, @"Type": @"string"}, | ||
2256 | + @{@"Name": @"SCORE", @"Value": SCORE, @"Type": @"INT"}, | ||
2257 | + @{@"Name": @"PREDICATE", @"Value": @"0", @"Type": @"string"}, | ||
2258 | + @{@"Name": @"ZONE", @"Value": ZONE, @"Type": @"string"}, | ||
2259 | + @{@"Name": @"APPLICATIONNAME", @"Value": ZONE, @"Type": @"string"}, | ||
2260 | + @{@"Name": @"Session_ID", @"Value": campaign_session_uuid, @"Type": @"string"}, | ||
2261 | + @{@"Name": @"CAMPAIGN_CODE", @"Value": @"MCC_00006", @"Type": @"string"}, | ||
2262 | + @{@"Name": @"CAMPAIGN_TYPE", @"Value": @"Inbound", @"Type": @"string"}, | ||
2263 | + @{@"Name": @"UACIResponseTypeCode", @"Value": @"CON", @"Type": @"string"}, | ||
2264 | + @{@"Name": @"CHANNEL", @"Value": @"ONE_APP", @"Type": @"string"}, | ||
2265 | + @{@"Name": @"WAVE", @"Value": WAVE, @"Type": @"string"}, | ||
2266 | + @{@"Name": @"RESPONSECHANNEL", @"Value": @"ONE_APP", @"Type": @"string"}, | ||
2267 | + @{@"Name": @"VALIDITY", @"Value": VALIDITY, @"Type": @"INT"}, | ||
2268 | + @{@"Name": @"TREATMENT_CODE", @"Value": TREATMENT_CODE, @"Type": @"string"}, | ||
2269 | + @{@"Name": @"EventName", @"Value": @"INTEREST_P", @"Type": @"string"} | ||
2270 | + ]}}}; | ||
2252 | NSData *jsonData = [NSJSONSerialization dataWithJSONObject:postDictionary options:0 error:NULL]; | 2271 | NSData *jsonData = [NSJSONSerialization dataWithJSONObject:postDictionary options:0 error:NULL]; |
2253 | [self sendContext8:jsonData successBlock:^(NSDictionary *contextResponse) { | 2272 | [self sendContext8:jsonData successBlock:^(NSDictionary *contextResponse) { |
2254 | if (success) { | 2273 | if (success) { | ... | ... |
... | @@ -3611,10 +3611,10 @@ public class swiftApi { | ... | @@ -3611,10 +3611,10 @@ public class swiftApi { |
3611 | } | 3611 | } |
3612 | 3612 | ||
3613 | 3613 | ||
3614 | - public func submitOrderAsync(campaign_session_uuid: String, user_msisdn: String, businessService: String, offerName: String, productType: String, provDuration: String, noOfRecurrance: String, price: String, discount: String, voiceCategory: String, dataCategory: String, minsValue: String, dataValue: String, provStepValueMins: String, _ submitOrderCallback: @escaping (_ responseData: GenericResponseModel?) -> Void) -> Void { | 3614 | + public func submitOrderAsync(campaign_session_uuid: String, user_msisdn: String, businessService: String, offerName: String, productType: String, provDuration: String, noOfRecurrance: String, price: String, discount: String, voiceCategory: String, dataCategory: String, minsValue: String, dataValue: String, provStepValueMins: String, OfferAudienceLevel: String, UACIOfferTrackingCode: String, OFFERCODE1: String, SCORE: String, ZONE: String, WAVE: String, VALIDITY: String, TREATMENT_CODE: String, _ submitOrderCallback: @escaping (_ responseData: GenericResponseModel?) -> Void) -> Void { |
3615 | 3615 | ||
3616 | let instanceOfMyApi = MyApi() | 3616 | let instanceOfMyApi = MyApi() |
3617 | - instanceOfMyApi.submitOrderAsync(campaign_session_uuid, user_msisdn, businessService, offerName, productType, provDuration, noOfRecurrance, price, discount, voiceCategory, dataCategory, minsValue, dataValue, provStepValueMins, requestCallback, failureBlock: requestFailureCallback) | 3617 | + instanceOfMyApi.submitOrderAsync(campaign_session_uuid, user_msisdn, businessService, offerName, productType, provDuration, noOfRecurrance, price, discount, voiceCategory, dataCategory, minsValue, dataValue, provStepValueMins, OfferAudienceLevel, UACIOfferTrackingCode, OFFERCODE1, SCORE, ZONE, WAVE, VALIDITY, TREATMENT_CODE, requestCallback, failureBlock: requestFailureCallback) |
3618 | 3618 | ||
3619 | func requestCallback(_ responseData: [AnyHashable: Any]?) -> Void { | 3619 | func requestCallback(_ responseData: [AnyHashable: Any]?) -> Void { |
3620 | 3620 | ... | ... |
-
Please register or login to post a comment