Panagiotis Triantafyllou

minor fixes and additions

...@@ -2,7 +2,7 @@ apply plugin: 'com.android.library' ...@@ -2,7 +2,7 @@ apply plugin: 'com.android.library'
2 2
3 ext { 3 ext {
4 PUBLISH_GROUP_ID = 'ly.warp' 4 PUBLISH_GROUP_ID = 'ly.warp'
5 - PUBLISH_VERSION = '4.5.4-cosbeta31i' 5 + PUBLISH_VERSION = '4.5.4-cosbeta32'
6 PUBLISH_ARTIFACT_ID = 'warply-android-sdk' 6 PUBLISH_ARTIFACT_ID = 'warply-android-sdk'
7 } 7 }
8 8
......
...@@ -479,474 +479,474 @@ public enum Warply { ...@@ -479,474 +479,474 @@ public enum Warply {
479 public void onSuccess(CampaignList result) { 479 public void onSuccess(CampaignList result) {
480 WarplyManagerHelper.setCampaignList(result); 480 WarplyManagerHelper.setCampaignList(result);
481 481
482 - ArrayList<LoyaltyContextualOfferModel> list = new ArrayList<>(); 482 +// ArrayList<LoyaltyContextualOfferModel> list = new ArrayList<>();
483 - JSONArray jArray = null; 483 +// JSONArray jArray = null;
484 - try { 484 +// try {
485 - jArray = new JSONArray("[\n" + 485 +// jArray = new JSONArray("[\n" +
486 - " {\n" + 486 +// " {\n" +
487 - " \"UACIOfferTrackingCode\": \"5166.e07.fffffffffa10663a.ffffffffda30c76a\",\n" + 487 +// " \"UACIOfferTrackingCode\": \"5166.e07.fffffffffa10663a.ffffffffda30c76a\",\n" +
488 - " \"businessAdditionalId\": \"\",\n" + 488 +// " \"businessAdditionalId\": \"\",\n" +
489 - " \"dataCategory\": \"Data\",\n" + 489 +// " \"dataCategory\": \"Data\",\n" +
490 - " \"dataValue\": \"None\",\n" + 490 +// " \"dataValue\": \"None\",\n" +
491 - " \"discount\": \"None\",\n" + 491 +// " \"discount\": \"None\",\n" +
492 - " \"eligibleAssets\": [\n" + 492 +// " \"eligibleAssets\": [\n" +
493 - " \"306945218770\",\n" + 493 +// " \"306945218770\",\n" +
494 - " \"306944333488\",\n" + 494 +// " \"306944333488\",\n" +
495 - " \"306932222490\",\n" + 495 +// " \"306932222490\",\n" +
496 - " \"306996824010\",\n" + 496 +// " \"306996824010\",\n" +
497 - " \"306972713201\",\n" + 497 +// " \"306972713201\",\n" +
498 - " \"306942496252\",\n" + 498 +// " \"306942496252\",\n" +
499 - " \"306977316716\",\n" + 499 +// " \"306977316716\",\n" +
500 - " \"306945433100\",\n" + 500 +// " \"306945433100\",\n" +
501 - " \"306977403986\",\n" + 501 +// " \"306977403986\",\n" +
502 - " \"306936581495\",\n" + 502 +// " \"306936581495\",\n" +
503 - " \"306980689662\",\n" + 503 +// " \"306980689662\",\n" +
504 - " \"306970101490\",\n" + 504 +// " \"306970101490\",\n" +
505 - " \"306973396329\",\n" + 505 +// " \"306973396329\",\n" +
506 - " \"306972577064\",\n" + 506 +// " \"306972577064\",\n" +
507 - " \"306974923219\",\n" + 507 +// " \"306974923219\",\n" +
508 - " \"306977513761\",\n" + 508 +// " \"306977513761\",\n" +
509 - " \"306984220987\",\n" + 509 +// " \"306984220987\",\n" +
510 - " \"306979949205\",\n" + 510 +// " \"306979949205\",\n" +
511 - " \"306943134127\",\n" + 511 +// " \"306943134127\",\n" +
512 - " \"306970437794\",\n" + 512 +// " \"306970437794\",\n" +
513 - " \"306932535319\",\n" + 513 +// " \"306932535319\",\n" +
514 - " \"306974063133\",\n" + 514 +// " \"306974063133\",\n" +
515 - " \"306932520323\",\n" + 515 +// " \"306932520323\",\n" +
516 - " \"306978733823\",\n" + 516 +// " \"306978733823\",\n" +
517 - " \"306985995420\",\n" + 517 +// " \"306985995420\",\n" +
518 - " \"306983879555\",\n" + 518 +// " \"306983879555\",\n" +
519 - " ],\n" + 519 +// " ],\n" +
520 - " \"id\": \"000003590\",\n" + 520 +// " \"id\": \"000003590\",\n" +
521 - " \"loyaltyCampaignId\": \"NA\",\n" + 521 +// " \"loyaltyCampaignId\": \"NA\",\n" +
522 - " \"minsValue\": \"None\",\n" + 522 +// " \"minsValue\": \"None\",\n" +
523 - " \"noOfRecurrance\": \"None\",\n" + 523 +// " \"noOfRecurrance\": \"None\",\n" +
524 - " \"notificationMessage\": \"None\",\n" + 524 +// " \"notificationMessage\": \"None\",\n" +
525 - " \"offerAudienceLevel\": \"msisdn\",\n" + 525 +// " \"offerAudienceLevel\": \"msisdn\",\n" +
526 - " \"offerCode1\": \"000003590\",\n" + 526 +// " \"offerCode1\": \"000003590\",\n" +
527 - " \"offerName\": \"CCMS loyalty white label\",\n" + 527 +// " \"offerName\": \"CCMS loyalty white label\",\n" +
528 - " \"price\": \"None\",\n" + 528 +// " \"price\": \"None\",\n" +
529 - " \"productType\": \"White Label\",\n" + 529 +// " \"productType\": \"White Label\",\n" +
530 - " \"provDuration\": \"0.0\",\n" + 530 +// " \"provDuration\": \"0.0\",\n" +
531 - " \"provStepValueMins\": \"None\",\n" + 531 +// " \"provStepValueMins\": \"None\",\n" +
532 - " \"score\": \"50\",\n" + 532 +// " \"score\": \"50\",\n" +
533 - " \"treatmentCode\": \"5166.e07.fffffffffa10663a.ffffffffda30c76a\",\n" + 533 +// " \"treatmentCode\": \"5166.e07.fffffffffa10663a.ffffffffda30c76a\",\n" +
534 - " \"validity\": \"0\",\n" + 534 +// " \"validity\": \"0\",\n" +
535 - " \"voiceCategory\": \"None\",\n" + 535 +// " \"voiceCategory\": \"None\",\n" +
536 - " \"wave\": \"1\",\n" + 536 +// " \"wave\": \"1\",\n" +
537 - " \"zone\": \"COSMOTE_APP_LOYALTY_PROMO\"\n" + 537 +// " \"zone\": \"COSMOTE_APP_LOYALTY_PROMO\"\n" +
538 - " },\n" + 538 +// " },\n" +
539 - " {\n" + 539 +// " {\n" +
540 - " \"UACIOfferTrackingCode\": \"51ed.e10.2c006f18.71e96d08\",\n" + 540 +// " \"UACIOfferTrackingCode\": \"51ed.e10.2c006f18.71e96d08\",\n" +
541 - " \"businessAdditionalId\": \"\",\n" + 541 +// " \"businessAdditionalId\": \"\",\n" +
542 - " \"dataCategory\": \"Data\",\n" + 542 +// " \"dataCategory\": \"Data\",\n" +
543 - " \"dataValue\": \"None\",\n" + 543 +// " \"dataValue\": \"None\",\n" +
544 - " \"discount\": \"None\",\n" + 544 +// " \"discount\": \"None\",\n" +
545 - " \"eligibleAssets\": [\n" + 545 +// " \"eligibleAssets\": [\n" +
546 - " \"306945218770\",\n" + 546 +// " \"306945218770\",\n" +
547 - " \"306944333488\",\n" + 547 +// " \"306944333488\",\n" +
548 - " \"306932222490\",\n" + 548 +// " \"306932222490\",\n" +
549 - " \"306996824010\",\n" + 549 +// " \"306996824010\",\n" +
550 - " \"306972713201\",\n" + 550 +// " \"306972713201\",\n" +
551 - " \"306942496252\",\n" + 551 +// " \"306942496252\",\n" +
552 - " \"306977316716\",\n" + 552 +// " \"306977316716\",\n" +
553 - " \"306945433100\",\n" + 553 +// " \"306945433100\",\n" +
554 - " \"306977403986\",\n" + 554 +// " \"306977403986\",\n" +
555 - " \"306936581495\",\n" + 555 +// " \"306936581495\",\n" +
556 - " \"306980689662\",\n" + 556 +// " \"306980689662\",\n" +
557 - " \"306970101490\",\n" + 557 +// " \"306970101490\",\n" +
558 - " \"306973396329\",\n" + 558 +// " \"306973396329\",\n" +
559 - " \"306972577064\",\n" + 559 +// " \"306972577064\",\n" +
560 - " \"306974923219\",\n" + 560 +// " \"306974923219\",\n" +
561 - " \"306977513761\",\n" + 561 +// " \"306977513761\",\n" +
562 - " \"306984220987\",\n" + 562 +// " \"306984220987\",\n" +
563 - " \"306979949205\",\n" + 563 +// " \"306979949205\",\n" +
564 - " \"306943134127\",\n" + 564 +// " \"306943134127\",\n" +
565 - " \"306970437794\",\n" + 565 +// " \"306970437794\",\n" +
566 - " \"306932535319\",\n" + 566 +// " \"306932535319\",\n" +
567 - " \"306974063133\",\n" + 567 +// " \"306974063133\",\n" +
568 - " \"306932520323\",\n" + 568 +// " \"306932520323\",\n" +
569 - " \"306978733823\",\n" + 569 +// " \"306978733823\",\n" +
570 - " \"306985995420\",\n" + 570 +// " \"306985995420\",\n" +
571 - " \"306983879555\",\n" + 571 +// " \"306983879555\",\n" +
572 - " ],\n" + 572 +// " ],\n" +
573 - " \"id\": \"000003599\",\n" + 573 +// " \"id\": \"000003599\",\n" +
574 - " \"loyaltyCampaignId\": \"c5cc5f4f65624f47a580b720233fa60d\",\n" + 574 +// " \"loyaltyCampaignId\": \"c5cc5f4f65624f47a580b720233fa60d\",\n" +
575 - " \"minsValue\": \"None\",\n" + 575 +// " \"minsValue\": \"None\",\n" +
576 - " \"noOfRecurrance\": \"None\",\n" + 576 +// " \"noOfRecurrance\": \"None\",\n" +
577 - " \"notificationMessage\": \"None\",\n" + 577 +// " \"notificationMessage\": \"None\",\n" +
578 - " \"offerAudienceLevel\": \"msisdn\",\n" + 578 +// " \"offerAudienceLevel\": \"msisdn\",\n" +
579 - " \"offerCode1\": \"000003599\",\n" + 579 +// " \"offerCode1\": \"000003599\",\n" +
580 - " \"offerName\": \"CCMS loyalty white label with campaignId\",\n" + 580 +// " \"offerName\": \"CCMS loyalty white label with campaignId\",\n" +
581 - " \"price\": \"None\",\n" + 581 +// " \"price\": \"None\",\n" +
582 - " \"productType\": \"White Label\",\n" + 582 +// " \"productType\": \"White Label\",\n" +
583 - " \"provDuration\": \"0.0\",\n" + 583 +// " \"provDuration\": \"0.0\",\n" +
584 - " \"provStepValueMins\": \"None\",\n" + 584 +// " \"provStepValueMins\": \"None\",\n" +
585 - " \"score\": \"50\",\n" + 585 +// " \"score\": \"50\",\n" +
586 - " \"treatmentCode\": \"51ed.e10.2c006f18.71e96d08\",\n" + 586 +// " \"treatmentCode\": \"51ed.e10.2c006f18.71e96d08\",\n" +
587 - " \"validity\": \"0\",\n" + 587 +// " \"validity\": \"0\",\n" +
588 - " \"voiceCategory\": \"None\",\n" + 588 +// " \"voiceCategory\": \"None\",\n" +
589 - " \"wave\": \"1\",\n" + 589 +// " \"wave\": \"1\",\n" +
590 - " \"zone\": \"COSMOTE_APP_LOYALTY_PROMO\"\n" + 590 +// " \"zone\": \"COSMOTE_APP_LOYALTY_PROMO\"\n" +
591 - " },\n" + 591 +// " },\n" +
592 - " {\n" + 592 +// " {\n" +
593 - " \"UACIOfferTrackingCode\": \"516c.e05.ffffffffa943695b.79ff470b\",\n" + 593 +// " \"UACIOfferTrackingCode\": \"516c.e05.ffffffffa943695b.79ff470b\",\n" +
594 - " \"businessAdditionalId\": \"\",\n" + 594 +// " \"businessAdditionalId\": \"\",\n" +
595 - " \"businessService\": \"0.0\",\n" + 595 +// " \"businessService\": \"0.0\",\n" +
596 - " \"eligibleAssets\": [\n" + 596 +// " \"eligibleAssets\": [\n" +
597 - " \"306945218770\",\n" + 597 +// " \"306945218770\",\n" +
598 - " \"306944333488\",\n" + 598 +// " \"306944333488\",\n" +
599 - " \"306932222490\",\n" + 599 +// " \"306932222490\",\n" +
600 - " \"306996824010\",\n" + 600 +// " \"306996824010\",\n" +
601 - " \"306972713201\",\n" + 601 +// " \"306972713201\",\n" +
602 - " \"306942496252\",\n" + 602 +// " \"306942496252\",\n" +
603 - " \"306977316716\",\n" + 603 +// " \"306977316716\",\n" +
604 - " \"306945433100\",\n" + 604 +// " \"306945433100\",\n" +
605 - " \"306977403986\",\n" + 605 +// " \"306977403986\",\n" +
606 - " \"306936581495\",\n" + 606 +// " \"306936581495\",\n" +
607 - " \"306980689662\",\n" + 607 +// " \"306980689662\",\n" +
608 - " \"306970101490\",\n" + 608 +// " \"306970101490\",\n" +
609 - " \"306973396329\",\n" + 609 +// " \"306973396329\",\n" +
610 - " \"306972577064\",\n" + 610 +// " \"306972577064\",\n" +
611 - " \"306974923219\",\n" + 611 +// " \"306974923219\",\n" +
612 - " \"306977513761\",\n" + 612 +// " \"306977513761\",\n" +
613 - " \"306984220987\",\n" + 613 +// " \"306984220987\",\n" +
614 - " \"306979949205\",\n" + 614 +// " \"306979949205\",\n" +
615 - " \"306943134127\",\n" + 615 +// " \"306943134127\",\n" +
616 - " \"306970437794\",\n" + 616 +// " \"306970437794\",\n" +
617 - " \"306932535319\",\n" + 617 +// " \"306932535319\",\n" +
618 - " \"306974063133\",\n" + 618 +// " \"306974063133\",\n" +
619 - " \"306932520323\",\n" + 619 +// " \"306932520323\",\n" +
620 - " \"306978733823\",\n" + 620 +// " \"306978733823\",\n" +
621 - " \"306985995420\",\n" + 621 +// " \"306985995420\",\n" +
622 - " \"306983879555\",\n" + 622 +// " \"306983879555\",\n" +
623 - " ],\n" + 623 +// " ],\n" +
624 - " \"id\": \"000003588\",\n" + 624 +// " \"id\": \"000003588\",\n" +
625 - " \"loyaltyCampaignId\": \"NA\",\n" + 625 +// " \"loyaltyCampaignId\": \"NA\",\n" +
626 - " \"noOfRecurrance\": \"0\",\n" + 626 +// " \"noOfRecurrance\": \"0\",\n" +
627 - " \"notificationMessage\": \"None\",\n" + 627 +// " \"notificationMessage\": \"None\",\n" +
628 - " \"offerAudienceLevel\": \"msisdn\",\n" + 628 +// " \"offerAudienceLevel\": \"msisdn\",\n" +
629 - " \"offerCode1\": \"000003588\",\n" + 629 +// " \"offerCode1\": \"000003588\",\n" +
630 - " \"offerName\": \"CCMS loyalty postpay addon\",\n" + 630 +// " \"offerName\": \"CCMS loyalty postpay addon\",\n" +
631 - " \"postpayProduct\": \"0.0\",\n" + 631 +// " \"postpayProduct\": \"0.0\",\n" +
632 - " \"price\": \"None\",\n" + 632 +// " \"price\": \"None\",\n" +
633 - " \"productType\": \"MOBILE ADDON\",\n" + 633 +// " \"productType\": \"MOBILE ADDON\",\n" +
634 - " \"provDuration\": \"0.0\",\n" + 634 +// " \"provDuration\": \"0.0\",\n" +
635 - " \"score\": \"50\",\n" + 635 +// " \"score\": \"50\",\n" +
636 - " \"treatmentCode\": \"516c.e05.ffffffffa943695b.79ff470b\",\n" + 636 +// " \"treatmentCode\": \"516c.e05.ffffffffa943695b.79ff470b\",\n" +
637 - " \"validity\": \"0\",\n" + 637 +// " \"validity\": \"0\",\n" +
638 - " \"wave\": \"1\",\n" + 638 +// " \"wave\": \"1\",\n" +
639 - " \"zone\": \"COSMOTE_APP_LOYALTY_PROMO\"\n" + 639 +// " \"zone\": \"COSMOTE_APP_LOYALTY_PROMO\"\n" +
640 - " },\n" + 640 +// " },\n" +
641 - " {\n" + 641 +// " {\n" +
642 - " \"UACIOfferTrackingCode\": \"5224.e19.30e2f27b.ffffffffeb22b0db\",\n" + 642 +// " \"UACIOfferTrackingCode\": \"5224.e19.30e2f27b.ffffffffeb22b0db\",\n" +
643 - " \"businessAdditionalId\": \"\",\n" + 643 +// " \"businessAdditionalId\": \"\",\n" +
644 - " \"dataCategory\": \"Data\",\n" + 644 +// " \"dataCategory\": \"Data\",\n" +
645 - " \"dataValue\": \"None\",\n" + 645 +// " \"dataValue\": \"None\",\n" +
646 - " \"discount\": \"None\",\n" + 646 +// " \"discount\": \"None\",\n" +
647 - " \"eligibleAssets\": [\n" + 647 +// " \"eligibleAssets\": [\n" +
648 - " \"306945218770\",\n" + 648 +// " \"306945218770\",\n" +
649 - " \"306944333488\",\n" + 649 +// " \"306944333488\",\n" +
650 - " \"306932222490\",\n" + 650 +// " \"306932222490\",\n" +
651 - " \"306996824010\",\n" + 651 +// " \"306996824010\",\n" +
652 - " \"306972713201\",\n" + 652 +// " \"306972713201\",\n" +
653 - " \"306942496252\",\n" + 653 +// " \"306942496252\",\n" +
654 - " \"306977316716\",\n" + 654 +// " \"306977316716\",\n" +
655 - " \"306945433100\",\n" + 655 +// " \"306945433100\",\n" +
656 - " \"306977403986\",\n" + 656 +// " \"306977403986\",\n" +
657 - " \"306936581495\",\n" + 657 +// " \"306936581495\",\n" +
658 - " \"306980689662\",\n" + 658 +// " \"306980689662\",\n" +
659 - " \"306970101490\",\n" + 659 +// " \"306970101490\",\n" +
660 - " \"306973396329\",\n" + 660 +// " \"306973396329\",\n" +
661 - " \"306972577064\",\n" + 661 +// " \"306972577064\",\n" +
662 - " \"306974923219\",\n" + 662 +// " \"306974923219\",\n" +
663 - " \"306977513761\",\n" + 663 +// " \"306977513761\",\n" +
664 - " \"306984220987\",\n" + 664 +// " \"306984220987\",\n" +
665 - " \"306979949205\",\n" + 665 +// " \"306979949205\",\n" +
666 - " \"306943134127\",\n" + 666 +// " \"306943134127\",\n" +
667 - " \"306970437794\",\n" + 667 +// " \"306970437794\",\n" +
668 - " \"306932535319\",\n" + 668 +// " \"306932535319\",\n" +
669 - " \"306974063133\",\n" + 669 +// " \"306974063133\",\n" +
670 - " \"306932520323\",\n" + 670 +// " \"306932520323\",\n" +
671 - " \"306978733823\",\n" + 671 +// " \"306978733823\",\n" +
672 - " \"306985995420\",\n" + 672 +// " \"306985995420\",\n" +
673 - " \"306983879555\",\n" + 673 +// " \"306983879555\",\n" +
674 - " ],\n" + 674 +// " ],\n" +
675 - " \"id\": \"000003608\",\n" + 675 +// " \"id\": \"000003608\",\n" +
676 - " \"loyaltyCampaignId\": \"c134cdeb8a924f8eac38e261acb9caf5\",\n" + 676 +// " \"loyaltyCampaignId\": \"c134cdeb8a924f8eac38e261acb9caf5\",\n" +
677 - " \"minsValue\": \"None\",\n" + 677 +// " \"minsValue\": \"None\",\n" +
678 - " \"noOfRecurrance\": \"None\",\n" + 678 +// " \"noOfRecurrance\": \"None\",\n" +
679 - " \"notificationMessage\": \"None\",\n" + 679 +// " \"notificationMessage\": \"None\",\n" +
680 - " \"offerAudienceLevel\": \"msisdn\",\n" + 680 +// " \"offerAudienceLevel\": \"msisdn\",\n" +
681 - " \"offerCode1\": \"000003608\",\n" + 681 +// " \"offerCode1\": \"000003608\",\n" +
682 - " \"offerName\": \"CCMS loyalty gifts4u v1\",\n" + 682 +// " \"offerName\": \"CCMS loyalty gifts4u v1\",\n" +
683 - " \"price\": \"None\",\n" + 683 +// " \"price\": \"None\",\n" +
684 - " \"productType\": \"White Label\",\n" + 684 +// " \"productType\": \"White Label\",\n" +
685 - " \"provDuration\": \"0.0\",\n" + 685 +// " \"provDuration\": \"0.0\",\n" +
686 - " \"provStepValueMins\": \"None\",\n" + 686 +// " \"provStepValueMins\": \"None\",\n" +
687 - " \"score\": \"50\",\n" + 687 +// " \"score\": \"50\",\n" +
688 - " \"treatmentCode\": \"5224.e19.30e2f27b.ffffffffeb22b0db\",\n" + 688 +// " \"treatmentCode\": \"5224.e19.30e2f27b.ffffffffeb22b0db\",\n" +
689 - " \"validity\": \"0\",\n" + 689 +// " \"validity\": \"0\",\n" +
690 - " \"voiceCategory\": \"None\",\n" + 690 +// " \"voiceCategory\": \"None\",\n" +
691 - " \"wave\": \"1\",\n" + 691 +// " \"wave\": \"1\",\n" +
692 - " \"zone\": \"COSMOTE_APP_GIFTS4U\"\n" + 692 +// " \"zone\": \"COSMOTE_APP_GIFTS4U\"\n" +
693 - " },\n" + 693 +// " },\n" +
694 - " {\n" + 694 +// " {\n" +
695 - " \"UACIOfferTrackingCode\": \"5228.e1d.38378e61.750186c1\",\n" + 695 +// " \"UACIOfferTrackingCode\": \"5228.e1d.38378e61.750186c1\",\n" +
696 - " \"businessAdditionalId\": \"\",\n" + 696 +// " \"businessAdditionalId\": \"\",\n" +
697 - " \"businessService\": \"0.0\",\n" + 697 +// " \"businessService\": \"0.0\",\n" +
698 - " \"eligibleAssets\": [\n" + 698 +// " \"eligibleAssets\": [\n" +
699 - " \"306945218770\",\n" + 699 +// " \"306945218770\",\n" +
700 - " \"306944333488\",\n" + 700 +// " \"306944333488\",\n" +
701 - " \"306932222490\",\n" + 701 +// " \"306932222490\",\n" +
702 - " \"306996824010\",\n" + 702 +// " \"306996824010\",\n" +
703 - " \"306972713201\",\n" + 703 +// " \"306972713201\",\n" +
704 - " \"306942496252\",\n" + 704 +// " \"306942496252\",\n" +
705 - " \"306977316716\",\n" + 705 +// " \"306977316716\",\n" +
706 - " \"306945433100\",\n" + 706 +// " \"306945433100\",\n" +
707 - " \"306977403986\",\n" + 707 +// " \"306977403986\",\n" +
708 - " \"306936581495\",\n" + 708 +// " \"306936581495\",\n" +
709 - " \"306980689662\",\n" + 709 +// " \"306980689662\",\n" +
710 - " \"306970101490\",\n" + 710 +// " \"306970101490\",\n" +
711 - " \"306973396329\",\n" + 711 +// " \"306973396329\",\n" +
712 - " \"306972577064\",\n" + 712 +// " \"306972577064\",\n" +
713 - " \"306974923219\",\n" + 713 +// " \"306974923219\",\n" +
714 - " \"306977513761\",\n" + 714 +// " \"306977513761\",\n" +
715 - " \"306984220987\",\n" + 715 +// " \"306984220987\",\n" +
716 - " \"306979949205\",\n" + 716 +// " \"306979949205\",\n" +
717 - " \"306943134127\",\n" + 717 +// " \"306943134127\",\n" +
718 - " \"306970437794\",\n" + 718 +// " \"306970437794\",\n" +
719 - " \"306932535319\",\n" + 719 +// " \"306932535319\",\n" +
720 - " \"306974063133\",\n" + 720 +// " \"306974063133\",\n" +
721 - " \"306932520323\",\n" + 721 +// " \"306932520323\",\n" +
722 - " \"306978733823\",\n" + 722 +// " \"306978733823\",\n" +
723 - " \"306985995420\",\n" + 723 +// " \"306985995420\",\n" +
724 - " \"306983879555\",\n" + 724 +// " \"306983879555\",\n" +
725 - " ],\n" + 725 +// " ],\n" +
726 - " \"id\": \"000003612\",\n" + 726 +// " \"id\": \"000003612\",\n" +
727 - " \"loyaltyCampaignId\": \"8eb71c4ceaff409c896e2d1f6f1c20f3\",\n" + 727 +// " \"loyaltyCampaignId\": \"8eb71c4ceaff409c896e2d1f6f1c20f3\",\n" +
728 - " \"noOfRecurrance\": \"0\",\n" + 728 +// " \"noOfRecurrance\": \"0\",\n" +
729 - " \"notificationMessage\": \"None\",\n" + 729 +// " \"notificationMessage\": \"None\",\n" +
730 - " \"offerAudienceLevel\": \"msisdn\",\n" + 730 +// " \"offerAudienceLevel\": \"msisdn\",\n" +
731 - " \"offerCode1\": \"000003612\",\n" + 731 +// " \"offerCode1\": \"000003612\",\n" +
732 - " \"offerName\": \"CCMS loyalty - postpay addon gifts4u\",\n" + 732 +// " \"offerName\": \"CCMS loyalty - postpay addon gifts4u\",\n" +
733 - " \"postpayProduct\": \"0.0\",\n" + 733 +// " \"postpayProduct\": \"0.0\",\n" +
734 - " \"price\": \"None\",\n" + 734 +// " \"price\": \"None\",\n" +
735 - " \"productType\": \"MOBILE ADDON\",\n" + 735 +// " \"productType\": \"MOBILE ADDON\",\n" +
736 - " \"provDuration\": \"0.0\",\n" + 736 +// " \"provDuration\": \"0.0\",\n" +
737 - " \"score\": \"50\",\n" + 737 +// " \"score\": \"50\",\n" +
738 - " \"treatmentCode\": \"5228.e1d.38378e61.750186c1\",\n" + 738 +// " \"treatmentCode\": \"5228.e1d.38378e61.750186c1\",\n" +
739 - " \"validity\": \"0\",\n" + 739 +// " \"validity\": \"0\",\n" +
740 - " \"wave\": \"1\",\n" + 740 +// " \"wave\": \"1\",\n" +
741 - " \"zone\": \"COSMOTE_APP_GIFTS4U\"\n" + 741 +// " \"zone\": \"COSMOTE_APP_GIFTS4U\"\n" +
742 - " },\n" + 742 +// " },\n" +
743 - " {\n" + 743 +// " {\n" +
744 - " \"UACIOfferTrackingCode\": \"5222.e1b.ffffffffe725d1b3.ffffffffed6d8723\",\n" + 744 +// " \"UACIOfferTrackingCode\": \"5222.e1b.ffffffffe725d1b3.ffffffffed6d8723\",\n" +
745 - " \"businessAdditionalId\": \"\",\n" + 745 +// " \"businessAdditionalId\": \"\",\n" +
746 - " \"dataCategory\": \"Data\",\n" + 746 +// " \"dataCategory\": \"Data\",\n" +
747 - " \"dataValue\": \"None\",\n" + 747 +// " \"dataValue\": \"None\",\n" +
748 - " \"discount\": \"None\",\n" + 748 +// " \"discount\": \"None\",\n" +
749 - " \"eligibleAssets\": [\n" + 749 +// " \"eligibleAssets\": [\n" +
750 - " \"306945218770\",\n" + 750 +// " \"306945218770\",\n" +
751 - " \"306944333488\",\n" + 751 +// " \"306944333488\",\n" +
752 - " \"306932222490\",\n" + 752 +// " \"306932222490\",\n" +
753 - " \"306996824010\",\n" + 753 +// " \"306996824010\",\n" +
754 - " \"306972713201\",\n" + 754 +// " \"306972713201\",\n" +
755 - " \"306942496252\",\n" + 755 +// " \"306942496252\",\n" +
756 - " \"306977316716\",\n" + 756 +// " \"306977316716\",\n" +
757 - " \"306945433100\",\n" + 757 +// " \"306945433100\",\n" +
758 - " \"306977403986\",\n" + 758 +// " \"306977403986\",\n" +
759 - " \"306936581495\",\n" + 759 +// " \"306936581495\",\n" +
760 - " \"306980689662\",\n" + 760 +// " \"306980689662\",\n" +
761 - " \"306970101490\",\n" + 761 +// " \"306970101490\",\n" +
762 - " \"306973396329\",\n" + 762 +// " \"306973396329\",\n" +
763 - " \"306972577064\",\n" + 763 +// " \"306972577064\",\n" +
764 - " \"306974923219\",\n" + 764 +// " \"306974923219\",\n" +
765 - " \"306977513761\",\n" + 765 +// " \"306977513761\",\n" +
766 - " \"306984220987\",\n" + 766 +// " \"306984220987\",\n" +
767 - " \"306979949205\",\n" + 767 +// " \"306979949205\",\n" +
768 - " \"306943134127\",\n" + 768 +// " \"306943134127\",\n" +
769 - " \"306970437794\",\n" + 769 +// " \"306970437794\",\n" +
770 - " \"306932535319\",\n" + 770 +// " \"306932535319\",\n" +
771 - " \"306974063133\",\n" + 771 +// " \"306974063133\",\n" +
772 - " \"306932520323\",\n" + 772 +// " \"306932520323\",\n" +
773 - " \"306978733823\",\n" + 773 +// " \"306978733823\",\n" +
774 - " \"306985995420\",\n" + 774 +// " \"306985995420\",\n" +
775 - " \"306983879555\",\n" + 775 +// " \"306983879555\",\n" +
776 - " ],\n" + 776 +// " ],\n" +
777 - " \"id\": \"000003610\",\n" + 777 +// " \"id\": \"000003610\",\n" +
778 - " \"loyaltyCampaignId\": \"8e2c88ec94c948d8b51577324ed9a4d5\",\n" + 778 +// " \"loyaltyCampaignId\": \"8e2c88ec94c948d8b51577324ed9a4d5\",\n" +
779 - " \"minsValue\": \"None\",\n" + 779 +// " \"minsValue\": \"None\",\n" +
780 - " \"noOfRecurrance\": \"None\",\n" + 780 +// " \"noOfRecurrance\": \"None\",\n" +
781 - " \"notificationMessage\": \"None\",\n" + 781 +// " \"notificationMessage\": \"None\",\n" +
782 - " \"offerAudienceLevel\": \"msisdn\",\n" + 782 +// " \"offerAudienceLevel\": \"msisdn\",\n" +
783 - " \"offerCode1\": \"000003610\",\n" + 783 +// " \"offerCode1\": \"000003610\",\n" +
784 - " \"offerName\": \"CCMS loyalty more4u v1\",\n" + 784 +// " \"offerName\": \"CCMS loyalty more4u v1\",\n" +
785 - " \"price\": \"20\",\n" + 785 +// " \"price\": \"20\",\n" +
786 - " \"productType\": \"White Label\",\n" + 786 +// " \"productType\": \"White Label\",\n" +
787 - " \"provDuration\": \"7.0\",\n" + 787 +// " \"provDuration\": \"7.0\",\n" +
788 - " \"provStepValueMins\": \"None\",\n" + 788 +// " \"provStepValueMins\": \"None\",\n" +
789 - " \"score\": \"60\",\n" + 789 +// " \"score\": \"60\",\n" +
790 - " \"treatmentCode\": \"5222.e1b.ffffffffe725d1b3.ffffffffed6d8723\",\n" + 790 +// " \"treatmentCode\": \"5222.e1b.ffffffffe725d1b3.ffffffffed6d8723\",\n" +
791 - " \"validity\": \"0\",\n" + 791 +// " \"validity\": \"0\",\n" +
792 - " \"voiceCategory\": \"None\",\n" + 792 +// " \"voiceCategory\": \"None\",\n" +
793 - " \"wave\": \"1\",\n" + 793 +// " \"wave\": \"1\",\n" +
794 - " \"zone\": \"COSMOTE_APP_MORE4U\"\n" + 794 +// " \"zone\": \"COSMOTE_APP_MORE4U\"\n" +
795 - " },\n" + 795 +// " },\n" +
796 - " {\n" + 796 +// " {\n" +
797 - " \"UACIOfferTrackingCode\": \"5226.e1f.728b68c6.ffffffffa6c7b10e\",\n" + 797 +// " \"UACIOfferTrackingCode\": \"5226.e1f.728b68c6.ffffffffa6c7b10e\",\n" +
798 - " \"businessAdditionalId\": \"\",\n" + 798 +// " \"businessAdditionalId\": \"\",\n" +
799 - " \"businessService\": \"0.0\",\n" + 799 +// " \"businessService\": \"0.0\",\n" +
800 - " \"eligibleAssets\": [\n" + 800 +// " \"eligibleAssets\": [\n" +
801 - " \"306945218770\",\n" + 801 +// " \"306945218770\",\n" +
802 - " \"306944333488\",\n" + 802 +// " \"306944333488\",\n" +
803 - " \"306932222490\",\n" + 803 +// " \"306932222490\",\n" +
804 - " \"306996824010\",\n" + 804 +// " \"306996824010\",\n" +
805 - " \"306972713201\",\n" + 805 +// " \"306972713201\",\n" +
806 - " \"306942496252\",\n" + 806 +// " \"306942496252\",\n" +
807 - " \"306977316716\",\n" + 807 +// " \"306977316716\",\n" +
808 - " \"306945433100\",\n" + 808 +// " \"306945433100\",\n" +
809 - " \"306977403986\",\n" + 809 +// " \"306977403986\",\n" +
810 - " \"306936581495\",\n" + 810 +// " \"306936581495\",\n" +
811 - " \"306980689662\",\n" + 811 +// " \"306980689662\",\n" +
812 - " \"306970101490\",\n" + 812 +// " \"306970101490\",\n" +
813 - " \"306973396329\",\n" + 813 +// " \"306973396329\",\n" +
814 - " \"306972577064\",\n" + 814 +// " \"306972577064\",\n" +
815 - " \"306974923219\",\n" + 815 +// " \"306974923219\",\n" +
816 - " \"306977513761\",\n" + 816 +// " \"306977513761\",\n" +
817 - " \"306984220987\",\n" + 817 +// " \"306984220987\",\n" +
818 - " \"306979949205\",\n" + 818 +// " \"306979949205\",\n" +
819 - " \"306943134127\",\n" + 819 +// " \"306943134127\",\n" +
820 - " \"306970437794\",\n" + 820 +// " \"306970437794\",\n" +
821 - " \"306932535319\",\n" + 821 +// " \"306932535319\",\n" +
822 - " \"306974063133\",\n" + 822 +// " \"306974063133\",\n" +
823 - " \"306932520323\",\n" + 823 +// " \"306932520323\",\n" +
824 - " \"306978733823\",\n" + 824 +// " \"306978733823\",\n" +
825 - " \"306985995420\",\n" + 825 +// " \"306985995420\",\n" +
826 - " \"306983879555\",\n" + 826 +// " \"306983879555\",\n" +
827 - " ],\n" + 827 +// " ],\n" +
828 - " \"id\": \"000003614\",\n" + 828 +// " \"id\": \"000003614\",\n" +
829 - " \"loyaltyCampaignId\": \"aaf4022194584f02bb84c7b283c7c51e\",\n" + 829 +// " \"loyaltyCampaignId\": \"aaf4022194584f02bb84c7b283c7c51e\",\n" +
830 - " \"noOfRecurrance\": \"0\",\n" + 830 +// " \"noOfRecurrance\": \"0\",\n" +
831 - " \"notificationMessage\": \"None\",\n" + 831 +// " \"notificationMessage\": \"None\",\n" +
832 - " \"offerAudienceLevel\": \"msisdn\",\n" + 832 +// " \"offerAudienceLevel\": \"msisdn\",\n" +
833 - " \"offerCode1\": \"000003614\",\n" + 833 +// " \"offerCode1\": \"000003614\",\n" +
834 - " \"offerName\": \"CCMS loyalty - postpay addon more4u\",\n" + 834 +// " \"offerName\": \"CCMS loyalty - postpay addon more4u\",\n" +
835 - " \"postpayProduct\": \"0.0\",\n" + 835 +// " \"postpayProduct\": \"0.0\",\n" +
836 - " \"price\": \"None\",\n" + 836 +// " \"price\": \"None\",\n" +
837 - " \"productType\": \"MOBILE ADDON\",\n" + 837 +// " \"productType\": \"MOBILE ADDON\",\n" +
838 - " \"provDuration\": \"0.0\",\n" + 838 +// " \"provDuration\": \"0.0\",\n" +
839 - " \"score\": \"50\",\n" + 839 +// " \"score\": \"50\",\n" +
840 - " \"treatmentCode\": \"5226.e1f.728b68c6.ffffffffa6c7b10e\",\n" + 840 +// " \"treatmentCode\": \"5226.e1f.728b68c6.ffffffffa6c7b10e\",\n" +
841 - " \"validity\": \"0\",\n" + 841 +// " \"validity\": \"0\",\n" +
842 - " \"wave\": \"1\",\n" + 842 +// " \"wave\": \"1\",\n" +
843 - " \"zone\": \"COSMOTE_APP_MORE4U\"\n" + 843 +// " \"zone\": \"COSMOTE_APP_MORE4U\"\n" +
844 - " },\n" + 844 +// " },\n" +
845 - " {\n" + 845 +// " {\n" +
846 - " \"UACIOfferTrackingCode\": \"5154.e03.ffffffffeebc476a.ffffffffc5b96f6a\",\n" + 846 +// " \"UACIOfferTrackingCode\": \"5154.e03.ffffffffeebc476a.ffffffffc5b96f6a\",\n" +
847 - " \"businessAdditionalId\": \"\",\n" + 847 +// " \"businessAdditionalId\": \"\",\n" +
848 - " \"eligibleAssets\": [],\n" + 848 +// " \"eligibleAssets\": [],\n" +
849 - " \"id\": \"000003586\",\n" + 849 +// " \"id\": \"000003586\",\n" +
850 - " \"loyaltyCampaignId\": \"NA\",\n" + 850 +// " \"loyaltyCampaignId\": \"NA\",\n" +
851 - " \"offerAudienceLevel\": \"guid\",\n" + 851 +// " \"offerAudienceLevel\": \"guid\",\n" +
852 - " \"offerCode1\": \"000003586\",\n" + 852 +// " \"offerCode1\": \"000003586\",\n" +
853 - " \"offerName\": \"CCMS loyalty offer 6\",\n" + 853 +// " \"offerName\": \"CCMS loyalty offer 6\",\n" +
854 - " \"productType\": \"GENERIC\",\n" + 854 +// " \"productType\": \"GENERIC\",\n" +
855 - " \"score\": \"50\",\n" + 855 +// " \"score\": \"50\",\n" +
856 - " \"treatmentCode\": \"5154.e03.ffffffffeebc476a.ffffffffc5b96f6a\",\n" + 856 +// " \"treatmentCode\": \"5154.e03.ffffffffeebc476a.ffffffffc5b96f6a\",\n" +
857 - " \"validity\": \"0\",\n" + 857 +// " \"validity\": \"0\",\n" +
858 - " \"zone\": \"COSMOTE_APP_LOYALTY_PROMO\"\n" + 858 +// " \"zone\": \"COSMOTE_APP_LOYALTY_PROMO\"\n" +
859 - " },\n" + 859 +// " },\n" +
860 - " {\n" + 860 +// " {\n" +
861 - " \"UACIOfferTrackingCode\": \"51d2.e0c.291f49d9.40d5a689\",\n" + 861 +// " \"UACIOfferTrackingCode\": \"51d2.e0c.291f49d9.40d5a689\",\n" +
862 - " \"businessAdditionalId\": \"\",\n" + 862 +// " \"businessAdditionalId\": \"\",\n" +
863 - " \"eligibleAssets\": [],\n" + 863 +// " \"eligibleAssets\": [],\n" +
864 - " \"id\": \"000003595\",\n" + 864 +// " \"id\": \"000003595\",\n" +
865 - " \"loyaltyCampaignId\": \"c5cc5f4f65624f47a580b720233fa60d\",\n" + 865 +// " \"loyaltyCampaignId\": \"c5cc5f4f65624f47a580b720233fa60d\",\n" +
866 - " \"offerAudienceLevel\": \"guid\",\n" + 866 +// " \"offerAudienceLevel\": \"guid\",\n" +
867 - " \"offerCode1\": \"000003595\",\n" + 867 +// " \"offerCode1\": \"000003595\",\n" +
868 - " \"offerName\": \"CCMS Loyal offer campaignId\",\n" + 868 +// " \"offerName\": \"CCMS Loyal offer campaignId\",\n" +
869 - " \"productType\": \"GENERIC\",\n" + 869 +// " \"productType\": \"GENERIC\",\n" +
870 - " \"score\": \"50\",\n" + 870 +// " \"score\": \"50\",\n" +
871 - " \"treatmentCode\": \"51d2.e0c.291f49d9.40d5a689\",\n" + 871 +// " \"treatmentCode\": \"51d2.e0c.291f49d9.40d5a689\",\n" +
872 - " \"validity\": \"0\",\n" + 872 +// " \"validity\": \"0\",\n" +
873 - " \"zone\": \"COSMOTE_APP_LOYALTY_PROMO\"\n" + 873 +// " \"zone\": \"COSMOTE_APP_LOYALTY_PROMO\"\n" +
874 - " },\n" + 874 +// " },\n" +
875 - " {\n" + 875 +// " {\n" +
876 - " \"UACIOfferTrackingCode\": \"51d6.e0c.291f49d9.40d5a689\",\n" + 876 +// " \"UACIOfferTrackingCode\": \"51d6.e0c.291f49d9.40d5a689\",\n" +
877 - " \"businessAdditionalId\": \"\",\n" + 877 +// " \"businessAdditionalId\": \"\",\n" +
878 - " \"eligibleAssets\": [],\n" + 878 +// " \"eligibleAssets\": [],\n" +
879 - " \"id\": \"000003595\",\n" + 879 +// " \"id\": \"000003595\",\n" +
880 - " \"loyaltyCampaignId\": \"c5cc5f4f65624f47a580b720233fa60d\",\n" + 880 +// " \"loyaltyCampaignId\": \"c5cc5f4f65624f47a580b720233fa60d\",\n" +
881 - " \"offerAudienceLevel\": \"guid\",\n" + 881 +// " \"offerAudienceLevel\": \"guid\",\n" +
882 - " \"offerCode1\": \"000003595\",\n" + 882 +// " \"offerCode1\": \"000003595\",\n" +
883 - " \"offerName\": \"CCMS Loyal offer campaignId\",\n" + 883 +// " \"offerName\": \"CCMS Loyal offer campaignId\",\n" +
884 - " \"productType\": \"GENERIC\",\n" + 884 +// " \"productType\": \"GENERIC\",\n" +
885 - " \"score\": \"50\",\n" + 885 +// " \"score\": \"50\",\n" +
886 - " \"treatmentCode\": \"51d6.e0c.291f49d9.40d5a689\",\n" + 886 +// " \"treatmentCode\": \"51d6.e0c.291f49d9.40d5a689\",\n" +
887 - " \"validity\": \"0\",\n" + 887 +// " \"validity\": \"0\",\n" +
888 - " \"zone\": \"COSMOTE_APP_GIFTS4U\"\n" + 888 +// " \"zone\": \"COSMOTE_APP_GIFTS4U\"\n" +
889 - " },\n" + 889 +// " },\n" +
890 - " {\n" + 890 +// " {\n" +
891 - " \"UACIOfferTrackingCode\": \"5150.e03.ffffffffeebc476a.ffffffffc5b96f6a\",\n" + 891 +// " \"UACIOfferTrackingCode\": \"5150.e03.ffffffffeebc476a.ffffffffc5b96f6a\",\n" +
892 - " \"businessAdditionalId\": \"\",\n" + 892 +// " \"businessAdditionalId\": \"\",\n" +
893 - " \"eligibleAssets\": [],\n" + 893 +// " \"eligibleAssets\": [],\n" +
894 - " \"id\": \"000003586\",\n" + 894 +// " \"id\": \"000003586\",\n" +
895 - " \"loyaltyCampaignId\": \"NA\",\n" + 895 +// " \"loyaltyCampaignId\": \"NA\",\n" +
896 - " \"offerAudienceLevel\": \"guid\",\n" + 896 +// " \"offerAudienceLevel\": \"guid\",\n" +
897 - " \"offerCode1\": \"000003586\",\n" + 897 +// " \"offerCode1\": \"000003586\",\n" +
898 - " \"offerName\": \"CCMS loyalty offer 6\",\n" + 898 +// " \"offerName\": \"CCMS loyalty offer 6\",\n" +
899 - " \"productType\": \"GENERIC\",\n" + 899 +// " \"productType\": \"GENERIC\",\n" +
900 - " \"score\": \"50\",\n" + 900 +// " \"score\": \"50\",\n" +
901 - " \"treatmentCode\": \"5150.e03.ffffffffeebc476a.ffffffffc5b96f6a\",\n" + 901 +// " \"treatmentCode\": \"5150.e03.ffffffffeebc476a.ffffffffc5b96f6a\",\n" +
902 - " \"validity\": \"0\",\n" + 902 +// " \"validity\": \"0\",\n" +
903 - " \"zone\": \"COSMOTE_APP_GIFTS4U\"\n" + 903 +// " \"zone\": \"COSMOTE_APP_GIFTS4U\"\n" +
904 - " },\n" + 904 +// " },\n" +
905 - " {\n" + 905 +// " {\n" +
906 - " \"UACIOfferTrackingCode\": \"5152.e03.ffffffffeebc476a.ffffffffc5b96f6a\",\n" + 906 +// " \"UACIOfferTrackingCode\": \"5152.e03.ffffffffeebc476a.ffffffffc5b96f6a\",\n" +
907 - " \"businessAdditionalId\": \"\",\n" + 907 +// " \"businessAdditionalId\": \"\",\n" +
908 - " \"eligibleAssets\": [],\n" + 908 +// " \"eligibleAssets\": [],\n" +
909 - " \"id\": \"000003586\",\n" + 909 +// " \"id\": \"000003586\",\n" +
910 - " \"loyaltyCampaignId\": \"NA\",\n" + 910 +// " \"loyaltyCampaignId\": \"NA\",\n" +
911 - " \"offerAudienceLevel\": \"guid\",\n" + 911 +// " \"offerAudienceLevel\": \"guid\",\n" +
912 - " \"offerCode1\": \"000003586\",\n" + 912 +// " \"offerCode1\": \"000003586\",\n" +
913 - " \"offerName\": \"CCMS loyalty offer 6\",\n" + 913 +// " \"offerName\": \"CCMS loyalty offer 6\",\n" +
914 - " \"productType\": \"GENERIC\",\n" + 914 +// " \"productType\": \"GENERIC\",\n" +
915 - " \"score\": \"50\",\n" + 915 +// " \"score\": \"50\",\n" +
916 - " \"treatmentCode\": \"5152.e03.ffffffffeebc476a.ffffffffc5b96f6a\",\n" + 916 +// " \"treatmentCode\": \"5152.e03.ffffffffeebc476a.ffffffffc5b96f6a\",\n" +
917 - " \"validity\": \"0\",\n" + 917 +// " \"validity\": \"0\",\n" +
918 - " \"zone\": \"COSMOTE_APP_MORE4U\"\n" + 918 +// " \"zone\": \"COSMOTE_APP_MORE4U\"\n" +
919 - " },\n" + 919 +// " },\n" +
920 - " {\n" + 920 +// " {\n" +
921 - " \"UACIOfferTrackingCode\": \"51d4.e0c.291f49d9.40d5a689\",\n" + 921 +// " \"UACIOfferTrackingCode\": \"51d4.e0c.291f49d9.40d5a689\",\n" +
922 - " \"businessAdditionalId\": \"\",\n" + 922 +// " \"businessAdditionalId\": \"\",\n" +
923 - " \"eligibleAssets\": [],\n" + 923 +// " \"eligibleAssets\": [],\n" +
924 - " \"id\": \"000003595\",\n" + 924 +// " \"id\": \"000003595\",\n" +
925 - " \"loyaltyCampaignId\": \"c5cc5f4f65624f47a580b720233fa60d\",\n" + 925 +// " \"loyaltyCampaignId\": \"c5cc5f4f65624f47a580b720233fa60d\",\n" +
926 - " \"offerAudienceLevel\": \"guid\",\n" + 926 +// " \"offerAudienceLevel\": \"guid\",\n" +
927 - " \"offerCode1\": \"000003595\",\n" + 927 +// " \"offerCode1\": \"000003595\",\n" +
928 - " \"offerName\": \"CCMS Loyal offer campaignId\",\n" + 928 +// " \"offerName\": \"CCMS Loyal offer campaignId\",\n" +
929 - " \"productType\": \"GENERIC\",\n" + 929 +// " \"productType\": \"GENERIC\",\n" +
930 - " \"score\": \"50\",\n" + 930 +// " \"score\": \"50\",\n" +
931 - " \"treatmentCode\": \"51d4.e0c.291f49d9.40d5a689\",\n" + 931 +// " \"treatmentCode\": \"51d4.e0c.291f49d9.40d5a689\",\n" +
932 - " \"validity\": \"0\",\n" + 932 +// " \"validity\": \"0\",\n" +
933 - " \"zone\": \"COSMOTE_APP_MORE4U\"\n" + 933 +// " \"zone\": \"COSMOTE_APP_MORE4U\"\n" +
934 - " }\n" + 934 +// " }\n" +
935 - " ]"); 935 +// " ]");
936 - } catch (JSONException e) { 936 +// } catch (JSONException e) {
937 - e.printStackTrace(); 937 +// e.printStackTrace();
938 - } 938 +// }
939 - if (jArray != null && jArray.length() > 0) { 939 +// if (jArray != null && jArray.length() > 0) {
940 - for (int i = 0; i < jArray.length(); i++) { 940 +// for (int i = 0; i < jArray.length(); i++) {
941 - JSONObject jobj = new JSONObject(); 941 +// JSONObject jobj = new JSONObject();
942 - jobj = jArray.optJSONObject(i); 942 +// jobj = jArray.optJSONObject(i);
943 - if (jobj != null) { 943 +// if (jobj != null) {
944 - LoyaltyContextualOfferModel model = new LoyaltyContextualOfferModel(jobj); 944 +// LoyaltyContextualOfferModel model = new LoyaltyContextualOfferModel(jobj);
945 - list.add(model); 945 +// list.add(model);
946 - } 946 +// }
947 - } 947 +// }
948 - } 948 +// }
949 - WarplyManagerHelper.setCCMSLoyaltyCampaigns(list); 949 +// WarplyManagerHelper.setCCMSLoyaltyCampaigns(list);
950 if (result.size() >= 0) { 950 if (result.size() >= 0) {
951 objectSerializer.serialize(result, File.separator + requestSignature); 951 objectSerializer.serialize(result, File.separator + requestSignature);
952 warplyPreferences.saveInboxLastCachedTimeStamp(requestSignature, System.currentTimeMillis()); 952 warplyPreferences.saveInboxLastCachedTimeStamp(requestSignature, System.currentTimeMillis());
...@@ -1913,6 +1913,8 @@ public enum Warply { ...@@ -1913,6 +1913,8 @@ public enum Warply {
1913 url = buildWarplyAuthRequestUrl(path, true); 1913 url = buildWarplyAuthRequestUrl(path, true);
1914 else if (path.equals("campaigns")) 1914 else if (path.equals("campaigns"))
1915 url = buildWarplyRequestUrl(null); 1915 url = buildWarplyRequestUrl(null);
1916 + else if(path.equals("campaignsPersonalized"))
1917 + url = buildWarplyRequestUrl(null, true);
1916 else 1918 else
1917 url = buildWarplyAuthRequestUrl(path, false); 1919 url = buildWarplyAuthRequestUrl(path, false);
1918 requestToServerInternal(Method.POST, url, data, listener, tag, hasAuthHeaders); 1920 requestToServerInternal(Method.POST, url, data, listener, tag, hasAuthHeaders);
...@@ -1955,6 +1957,15 @@ public enum Warply { ...@@ -1955,6 +1957,15 @@ public enum Warply {
1955 return sb.toString(); 1957 return sb.toString();
1956 } 1958 }
1957 1959
1960 + private String buildWarplyRequestUrl(String warplyPath, boolean personalized) {
1961 + StringBuilder sb = new StringBuilder(WarplyProperty.getBaseUrl(mContext.get()) + WarpConstants.BASE_URL_AUTH);
1962 + sb.append(WarplyProperty.getAppUuid(mContext.get())).append("/")
1963 + .append(WarpConstants.PATH_CONTEXT);
1964 + if (warplyPath != null)
1965 + sb.append("?path=").append(warplyPath);
1966 + return sb.toString();
1967 + }
1968 +
1958 private String buildWarplyAuthRequestUrl(String warplyPath, boolean isUserPath) { 1969 private String buildWarplyAuthRequestUrl(String warplyPath, boolean isUserPath) {
1959 StringBuilder sb; 1970 StringBuilder sb;
1960 if (isUserPath) 1971 if (isUserPath)
......
...@@ -29,7 +29,9 @@ import ly.warp.sdk.io.models.CampaignList; ...@@ -29,7 +29,9 @@ import ly.warp.sdk.io.models.CampaignList;
29 import ly.warp.sdk.io.models.Consumer; 29 import ly.warp.sdk.io.models.Consumer;
30 import ly.warp.sdk.io.models.CouponList; 30 import ly.warp.sdk.io.models.CouponList;
31 import ly.warp.sdk.io.models.CouponsetsList; 31 import ly.warp.sdk.io.models.CouponsetsList;
32 +import ly.warp.sdk.io.models.NewCampaignList;
32 import ly.warp.sdk.io.request.WarplyConsumerRequest; 33 import ly.warp.sdk.io.request.WarplyConsumerRequest;
34 +import ly.warp.sdk.io.request.WarplyGetCampaignsRequest;
33 import ly.warp.sdk.io.request.WarplyGetCouponsetsRequest; 35 import ly.warp.sdk.io.request.WarplyGetCouponsetsRequest;
34 import ly.warp.sdk.io.request.WarplyInboxRequest; 36 import ly.warp.sdk.io.request.WarplyInboxRequest;
35 import ly.warp.sdk.io.request.WarplyUserCouponsRequest; 37 import ly.warp.sdk.io.request.WarplyUserCouponsRequest;
...@@ -69,6 +71,7 @@ public class BaseFragmentActivity extends FragmentActivity implements Navigation ...@@ -69,6 +71,7 @@ public class BaseFragmentActivity extends FragmentActivity implements Navigation
69 if (!Thread.currentThread().isInterrupted()) { 71 if (!Thread.currentThread().isInterrupted()) {
70 // WarplyManager.getConsumer(new WarplyConsumerRequest(), mConsumerReceiver); 72 // WarplyManager.getConsumer(new WarplyConsumerRequest(), mConsumerReceiver);
71 Warply.getInbox(new WarplyInboxRequest().setUseCache(false), mInboxReceiver); 73 Warply.getInbox(new WarplyInboxRequest().setUseCache(false), mInboxReceiver);
74 +// WarplyManager.getCampaigns(new WarplyGetCampaignsRequest().setLanguage("el"), mCampaignsCallback);
72 } 75 }
73 }).start(); 76 }).start();
74 } 77 }
...@@ -204,6 +207,18 @@ public class BaseFragmentActivity extends FragmentActivity implements Navigation ...@@ -204,6 +207,18 @@ public class BaseFragmentActivity extends FragmentActivity implements Navigation
204 } 207 }
205 }; 208 };
206 209
210 + private CallbackReceiver<NewCampaignList> mCampaignsCallback = new CallbackReceiver<NewCampaignList>() {
211 + @Override
212 + public void onSuccess(NewCampaignList result) {
213 + WarplyManager.getUserCouponsWithCouponsets(new WarplyUserCouponsRequest(), mUserCouponsReceiver);
214 + }
215 +
216 + @Override
217 + public void onFailure(int errorCode) {
218 + Thread.currentThread().interrupt();
219 + }
220 + };
221 +
207 222
208 private final CallbackReceiver<CouponList> mUserCouponsReceiver = new CallbackReceiver<CouponList>() { 223 private final CallbackReceiver<CouponList> mUserCouponsReceiver = new CallbackReceiver<CouponList>() {
209 @Override 224 @Override
......
...@@ -182,6 +182,7 @@ public class GiftsForYouActivity extends Activity implements View.OnClickListene ...@@ -182,6 +182,7 @@ public class GiftsForYouActivity extends Activity implements View.OnClickListene
182 if (extraFields.has("ccms_offer") && extraFields.optString("ccms_offer").equals("true")) { 182 if (extraFields.has("ccms_offer") && extraFields.optString("ccms_offer").equals("true")) {
183 for (LoyaltyContextualOfferModel ccms : WarplyManagerHelper.getCCMSLoyaltyCampaigns()) { 183 for (LoyaltyContextualOfferModel ccms : WarplyManagerHelper.getCCMSLoyaltyCampaigns()) {
184 if (ccms.getLoyaltyCampaignId().equals(dataItem.getCampaign().getSessionUUID())) { 184 if (ccms.getLoyaltyCampaignId().equals(dataItem.getCampaign().getSessionUUID())) {
185 + WarpUtils.log("CCMS_CLICK " + ccms.toString());
185 startActivity(WarpViewActivity.createIntentFromURL(this, WarplyManagerHelper.constructCcmsUrl(dataItem.getCampaign(), ccms))); 186 startActivity(WarpViewActivity.createIntentFromURL(this, WarplyManagerHelper.constructCcmsUrl(dataItem.getCampaign(), ccms)));
186 break; 187 break;
187 } 188 }
......
...@@ -73,30 +73,30 @@ public class Campaign implements Parcelable, Serializable { ...@@ -73,30 +73,30 @@ public class Campaign implements Parcelable, Serializable {
73 73
74 /* Member variables of the Campaign object */ 74 /* Member variables of the Campaign object */
75 75
76 - private final int action; 76 + private int action;
77 - private final double delivered; 77 + private double delivered;
78 private double expires; 78 private double expires;
79 - private final String message; 79 + private String message;
80 private String offerCategory; 80 private String offerCategory;
81 - private final String offerMessage; 81 + private String offerMessage;
82 - private final String sessionUUID; 82 + private String sessionUUID;
83 - private final double starts; 83 + private double starts;
84 - private final String subtitle; 84 + private String subtitle;
85 - private final String title; 85 + private String title;
86 - private final int sorting; 86 + private int sorting;
87 - private final int opened; 87 + private int opened;
88 private boolean isNew; 88 private boolean isNew;
89 - private final String logoUrl; 89 + private String logoUrl;
90 - private final String extraFields; 90 + private String extraFields;
91 - private final String type; 91 + private String type;
92 - private final boolean expired; 92 + private boolean expired;
93 private boolean show; 93 private boolean show;
94 private String deliveryMethod; 94 private String deliveryMethod;
95 private String displayType; 95 private String displayType;
96 private String indexUrl; 96 private String indexUrl;
97 private String busId; 97 private String busId;
98 private ArrayList<CampaignAction> actions = new ArrayList<>(); 98 private ArrayList<CampaignAction> actions = new ArrayList<>();
99 - private final String campaignTypeSettings; 99 + private String campaignTypeSettings;
100 100
101 /** 101 /**
102 * Basic constructor used to create an object from a String, representing a 102 * Basic constructor used to create an object from a String, representing a
...@@ -109,6 +109,33 @@ public class Campaign implements Parcelable, Serializable { ...@@ -109,6 +109,33 @@ public class Campaign implements Parcelable, Serializable {
109 this(new JSONObject(json)); 109 this(new JSONObject(json));
110 } 110 }
111 111
112 + public Campaign() {
113 + this.action = 0;
114 + this.delivered = 0.0d;
115 + this.expires = 0.0d;
116 + this.message = "";
117 + this.offerCategory = "";
118 + this.offerMessage = "";
119 + this.sessionUUID = "";
120 + this.starts = 0.0d;
121 + this.subtitle = "";
122 + this.title = "";
123 + this.sorting = 0;
124 + this.opened = 0;
125 + this.isNew = true;
126 + this.logoUrl = "";
127 + this.extraFields = "";
128 + this.type = "";
129 + this.expired = false;
130 + this.show = true;
131 + this.deliveryMethod = "";
132 + this.displayType = "";
133 + this.indexUrl = "";
134 + this.busId = "";
135 + this.actions = new ArrayList<>();
136 + this.campaignTypeSettings = "";
137 + }
138 +
112 /** 139 /**
113 * Constructor used to create an Object from a given JSON Object 140 * Constructor used to create an Object from a given JSON Object
114 * 141 *
...@@ -475,6 +502,94 @@ public class Campaign implements Parcelable, Serializable { ...@@ -475,6 +502,94 @@ public class Campaign implements Parcelable, Serializable {
475 return campaignTypeSettings; 502 return campaignTypeSettings;
476 } 503 }
477 504
505 + public void setExpires(double expires) {
506 + this.expires = expires;
507 + }
508 +
509 + public void setOfferCategory(String offerCategory) {
510 + this.offerCategory = offerCategory;
511 + }
512 +
513 + public void setShow(boolean show) {
514 + this.show = show;
515 + }
516 +
517 + public void setDeliveryMethod(String deliveryMethod) {
518 + this.deliveryMethod = deliveryMethod;
519 + }
520 +
521 + public void setDisplayType(String displayType) {
522 + this.displayType = displayType;
523 + }
524 +
525 + public void setIndexUrl(String indexUrl) {
526 + this.indexUrl = indexUrl;
527 + }
528 +
529 + public void setActions(ArrayList<CampaignAction> actions) {
530 + this.actions = actions;
531 + }
532 +
533 + public void setAction(int action) {
534 + this.action = action;
535 + }
536 +
537 + public void setDelivered(double delivered) {
538 + this.delivered = delivered;
539 + }
540 +
541 + public void setMessage(String message) {
542 + this.message = message;
543 + }
544 +
545 + public void setOfferMessage(String offerMessage) {
546 + this.offerMessage = offerMessage;
547 + }
548 +
549 + public void setSessionUUID(String sessionUUID) {
550 + this.sessionUUID = sessionUUID;
551 + }
552 +
553 + public void setStarts(double starts) {
554 + this.starts = starts;
555 + }
556 +
557 + public void setSubtitle(String subtitle) {
558 + this.subtitle = subtitle;
559 + }
560 +
561 + public void setTitle(String title) {
562 + this.title = title;
563 + }
564 +
565 + public void setSorting(int sorting) {
566 + this.sorting = sorting;
567 + }
568 +
569 + public void setOpened(int opened) {
570 + this.opened = opened;
571 + }
572 +
573 + public void setLogoUrl(String logoUrl) {
574 + this.logoUrl = logoUrl;
575 + }
576 +
577 + public void setExtraFields(String extraFields) {
578 + this.extraFields = extraFields;
579 + }
580 +
581 + public void setType(String type) {
582 + this.type = type;
583 + }
584 +
585 + public void setExpired(boolean expired) {
586 + this.expired = expired;
587 + }
588 +
589 + public void setCampaignTypeSettings(String campaignTypeSettings) {
590 + this.campaignTypeSettings = campaignTypeSettings;
591 + }
592 +
478 @Override 593 @Override
479 public int describeContents() { 594 public int describeContents() {
480 return 0; 595 return 0;
......
...@@ -69,12 +69,12 @@ public class NewCampaign implements Parcelable, Serializable { ...@@ -69,12 +69,12 @@ public class NewCampaign implements Parcelable, Serializable {
69 69
70 /* Member variables of the Campaign object */ 70 /* Member variables of the Campaign object */
71 private final String campaignType; 71 private final String campaignType;
72 - private final String settings; 72 + private JSONObject settings = new JSONObject();
73 private final String audience; 73 private final String audience;
74 private final String deliveryMethod; 74 private final String deliveryMethod;
75 private final String displayType; 75 private final String displayType;
76 - private final String extraFields; 76 + private JSONObject extraFields = new JSONObject();
77 - private final String workflowSettings; 77 + private JSONObject workflowSettings = new JSONObject();
78 private final String category; 78 private final String category;
79 private final int sorting; 79 private final int sorting;
80 private final String indexUrl; 80 private final String indexUrl;
...@@ -115,13 +115,13 @@ public class NewCampaign implements Parcelable, Serializable { ...@@ -115,13 +115,13 @@ public class NewCampaign implements Parcelable, Serializable {
115 this.category = json.optString(CATEGORY); 115 this.category = json.optString(CATEGORY);
116 this.title = json.optString(TITLE); 116 this.title = json.optString(TITLE);
117 this.sorting = json.optInt(SORTING); 117 this.sorting = json.optInt(SORTING);
118 - this.extraFields = json.optString(EXTRA_FIELDS); 118 + this.extraFields = json.optJSONObject(EXTRA_FIELDS);
119 this.campaignType = json.optString(CAMPAIGN_TYPE); 119 this.campaignType = json.optString(CAMPAIGN_TYPE);
120 this.deliveryMethod = json.optString(DELIVERY_METHOD); 120 this.deliveryMethod = json.optString(DELIVERY_METHOD);
121 this.displayType = json.optString(DISPLAY_TYPE); 121 this.displayType = json.optString(DISPLAY_TYPE);
122 - this.settings = json.optString(SETTINGS); 122 + this.settings = json.optJSONObject(SETTINGS);
123 this.audience = json.optString(AUDIENCE); 123 this.audience = json.optString(AUDIENCE);
124 - this.workflowSettings = json.optString(WORKFLOW_SETTINGS); 124 + this.workflowSettings = json.optJSONObject(WORKFLOW_SETTINGS);
125 this.description = json.optString(DESCRIPTION); 125 this.description = json.optString(DESCRIPTION);
126 this.startDate = json.optString(START_DATE); 126 this.startDate = json.optString(START_DATE);
127 this.endDate = json.optString(END_DATE); 127 this.endDate = json.optString(END_DATE);
...@@ -140,12 +140,12 @@ public class NewCampaign implements Parcelable, Serializable { ...@@ -140,12 +140,12 @@ public class NewCampaign implements Parcelable, Serializable {
140 this.sorting = source.readInt(); 140 this.sorting = source.readInt();
141 this.isNew = source.readByte() != 0; 141 this.isNew = source.readByte() != 0;
142 this.logoUrl = source.readString(); 142 this.logoUrl = source.readString();
143 - this.extraFields = source.readString(); 143 +// this.extraFields = source.readString();
144 this.deliveryMethod = source.readString(); 144 this.deliveryMethod = source.readString();
145 this.displayType = source.readString(); 145 this.displayType = source.readString();
146 - this.settings = source.readString(); 146 +// this.settings = source.readString();
147 this.audience = source.readString(); 147 this.audience = source.readString();
148 - this.workflowSettings = source.readString(); 148 +// this.workflowSettings = source.readString();
149 this.description = source.readString(); 149 this.description = source.readString();
150 this.startDate = source.readString(); 150 this.startDate = source.readString();
151 this.endDate = source.readString(); 151 this.endDate = source.readString();
...@@ -164,12 +164,12 @@ public class NewCampaign implements Parcelable, Serializable { ...@@ -164,12 +164,12 @@ public class NewCampaign implements Parcelable, Serializable {
164 dest.writeInt(this.sorting); 164 dest.writeInt(this.sorting);
165 dest.writeInt(this.isNew ? 1 : 0); 165 dest.writeInt(this.isNew ? 1 : 0);
166 dest.writeString(this.logoUrl); 166 dest.writeString(this.logoUrl);
167 - dest.writeString(extraFields); 167 +// dest.writeString(extraFields);
168 dest.writeString(deliveryMethod); 168 dest.writeString(deliveryMethod);
169 dest.writeString(displayType); 169 dest.writeString(displayType);
170 - dest.writeString(this.settings); 170 +// dest.writeString(this.settings);
171 dest.writeString(this.audience); 171 dest.writeString(this.audience);
172 - dest.writeString(this.workflowSettings); 172 +// dest.writeString(this.workflowSettings);
173 dest.writeString(this.description); 173 dest.writeString(this.description);
174 dest.writeString(this.startDate); 174 dest.writeString(this.startDate);
175 dest.writeString(this.endDate); 175 dest.writeString(this.endDate);
...@@ -295,10 +295,6 @@ public class NewCampaign implements Parcelable, Serializable { ...@@ -295,10 +295,6 @@ public class NewCampaign implements Parcelable, Serializable {
295 return indexUrl; 295 return indexUrl;
296 } 296 }
297 297
298 - public String getExtraFields() {
299 - return extraFields;
300 - }
301 -
302 public String getDeliveryMethod() { 298 public String getDeliveryMethod() {
303 return deliveryMethod; 299 return deliveryMethod;
304 } 300 }
...@@ -311,18 +307,10 @@ public class NewCampaign implements Parcelable, Serializable { ...@@ -311,18 +307,10 @@ public class NewCampaign implements Parcelable, Serializable {
311 return campaignType; 307 return campaignType;
312 } 308 }
313 309
314 - public String getSettings() {
315 - return settings;
316 - }
317 -
318 public String getAudience() { 310 public String getAudience() {
319 return audience; 311 return audience;
320 } 312 }
321 313
322 - public String getWorkflowSettings() {
323 - return workflowSettings;
324 - }
325 -
326 public String getCategory() { 314 public String getCategory() {
327 return category; 315 return category;
328 } 316 }
...@@ -355,6 +343,18 @@ public class NewCampaign implements Parcelable, Serializable { ...@@ -355,6 +343,18 @@ public class NewCampaign implements Parcelable, Serializable {
355 return isNew; 343 return isNew;
356 } 344 }
357 345
346 + public JSONObject getSettings() {
347 + return settings;
348 + }
349 +
350 + public JSONObject getExtraFields() {
351 + return extraFields;
352 + }
353 +
354 + public JSONObject getWorkflowSettings() {
355 + return workflowSettings;
356 + }
357 +
358 @Override 358 @Override
359 public int describeContents() { 359 public int describeContents() {
360 return 0; 360 return 0;
......
...@@ -28,6 +28,8 @@ package ly.warp.sdk.utils.managers; ...@@ -28,6 +28,8 @@ package ly.warp.sdk.utils.managers;
28 import org.json.JSONException; 28 import org.json.JSONException;
29 import org.json.JSONObject; 29 import org.json.JSONObject;
30 30
31 +import java.util.ArrayList;
32 +
31 import ly.warp.sdk.Warply; 33 import ly.warp.sdk.Warply;
32 import ly.warp.sdk.activities.BaseFragmentActivity; 34 import ly.warp.sdk.activities.BaseFragmentActivity;
33 import ly.warp.sdk.db.WarplyDBHelper; 35 import ly.warp.sdk.db.WarplyDBHelper;
...@@ -48,6 +50,8 @@ import ly.warp.sdk.io.callbacks.TagsCategoriesHook; ...@@ -48,6 +50,8 @@ import ly.warp.sdk.io.callbacks.TagsCategoriesHook;
48 import ly.warp.sdk.io.callbacks.TagsHook; 50 import ly.warp.sdk.io.callbacks.TagsHook;
49 import ly.warp.sdk.io.callbacks.TransactionsHook; 51 import ly.warp.sdk.io.callbacks.TransactionsHook;
50 import ly.warp.sdk.io.models.AddressList; 52 import ly.warp.sdk.io.models.AddressList;
53 +import ly.warp.sdk.io.models.Campaign;
54 +import ly.warp.sdk.io.models.CampaignList;
51 import ly.warp.sdk.io.models.Card; 55 import ly.warp.sdk.io.models.Card;
52 import ly.warp.sdk.io.models.CardList; 56 import ly.warp.sdk.io.models.CardList;
53 import ly.warp.sdk.io.models.Consumer; 57 import ly.warp.sdk.io.models.Consumer;
...@@ -58,6 +62,7 @@ import ly.warp.sdk.io.models.Couponset; ...@@ -58,6 +62,7 @@ import ly.warp.sdk.io.models.Couponset;
58 import ly.warp.sdk.io.models.CouponsetsList; 62 import ly.warp.sdk.io.models.CouponsetsList;
59 import ly.warp.sdk.io.models.MerchantCategoriesList; 63 import ly.warp.sdk.io.models.MerchantCategoriesList;
60 import ly.warp.sdk.io.models.MerchantList; 64 import ly.warp.sdk.io.models.MerchantList;
65 +import ly.warp.sdk.io.models.NewCampaign;
61 import ly.warp.sdk.io.models.NewCampaignList; 66 import ly.warp.sdk.io.models.NewCampaignList;
62 import ly.warp.sdk.io.models.PacingDetails; 67 import ly.warp.sdk.io.models.PacingDetails;
63 import ly.warp.sdk.io.models.PointsList; 68 import ly.warp.sdk.io.models.PointsList;
...@@ -118,6 +123,7 @@ import ly.warp.sdk.utils.constants.WarpConstants; ...@@ -118,6 +123,7 @@ import ly.warp.sdk.utils.constants.WarpConstants;
118 */ 123 */
119 124
120 public class WarplyManager { 125 public class WarplyManager {
126 + private static NewCampaignList mNewCampaignList = new NewCampaignList();
121 127
122 public static void getProducts(WarplyProductsRequest request, final CallbackReceiver<ProductList> receiver) { 128 public static void getProducts(WarplyProductsRequest request, final CallbackReceiver<ProductList> receiver) {
123 // String productCategory = ""; 129 // String productCategory = "";
...@@ -1318,38 +1324,97 @@ public class WarplyManager { ...@@ -1318,38 +1324,97 @@ public class WarplyManager {
1318 }); 1324 });
1319 } 1325 }
1320 1326
1321 - public static void getCampaigns(WarplyGetCampaignsRequest request, boolean auth, final CallbackReceiver<NewCampaignList> receiver) { 1327 + public static void getCampaigns(WarplyGetCampaignsRequest request, final CallbackReceiver<NewCampaignList> receiver) {
1328 + WarpUtils.log("************* WARPLY Get Campaigns Request ********************");
1329 + WarpUtils.log("[WARP Trace] WARPLY Get Campaigns Request is active");
1330 + WarpUtils.log("**************************************************");
1331 +
1332 + Warply.postReceiveMicroappData(WarpConstants.MICROAPP_NEW_CAMPAIGNS, false, "campaigns", request.toJson(), new NewCampaignsHook(new CallbackReceiver<NewCampaignList>() {
1333 + @Override
1334 + public void onSuccess(NewCampaignList result) {
1335 +// receiver.onSuccess(result);
1336 + mNewCampaignList.clear();
1337 + mNewCampaignList.addAll(result);
1338 + getCampaignsPersonalized(request, new CallbackReceiver<NewCampaignList>() {
1339 + @Override
1340 + public void onSuccess(NewCampaignList resultPersonalized) {
1341 + receiver.onSuccess(resultPersonalized);
1342 + }
1343 +
1344 + @Override
1345 + public void onFailure(int errorCode) {
1346 + receiver.onFailure(errorCode);
1347 + }
1348 + });
1349 + }
1350 +
1351 + @Override
1352 + public void onFailure(int errorCode) {
1353 + receiver.onFailure(errorCode);
1354 + }
1355 + },
1356 + request.getSignature()));
1357 + }
1358 +
1359 + public static void getCampaignsPersonalized(WarplyGetCampaignsRequest request, final CallbackReceiver<NewCampaignList> receiver) {
1322 WarpUtils.log("************* WARPLY Get Campaigns Request ********************"); 1360 WarpUtils.log("************* WARPLY Get Campaigns Request ********************");
1323 WarpUtils.log("[WARP Trace] WARPLY Get Campaigns Request is active"); 1361 WarpUtils.log("[WARP Trace] WARPLY Get Campaigns Request is active");
1324 WarpUtils.log("**************************************************"); 1362 WarpUtils.log("**************************************************");
1325 1363
1326 - Warply.postReceiveMicroappData(WarpConstants.MICROAPP_NEW_CAMPAIGNS, auth, "campaigns", request.toJson(), new NewCampaignsHook(new CallbackReceiver<NewCampaignList>() { 1364 + Warply.postReceiveMicroappData(WarpConstants.MICROAPP_NEW_CAMPAIGNS, true, "campaignsPersonalized", request.toJson(), new NewCampaignsHook(new CallbackReceiver<NewCampaignList>() {
1327 @Override 1365 @Override
1328 public void onSuccess(NewCampaignList result) { 1366 public void onSuccess(NewCampaignList result) {
1367 + mNewCampaignList.addAll(result);
1368 + CampaignList tempCampaigns = new CampaignList();
1369 + for (NewCampaign newCamp : mNewCampaignList) {
1370 + Campaign camp = new Campaign();
1371 + camp.setIndexUrl(newCamp.getIndexUrl());
1372 + camp.setLogoUrl(newCamp.getLogoUrl());
1373 + camp.setMessage(newCamp.getMessage());
1374 + camp.setOfferCategory(newCamp.getCommunicationCategory());
1375 + camp.setSessionUUID(newCamp.getCommunicationUUID());
1376 + camp.setTitle(newCamp.getTitle());
1377 + camp.setSubtitle(newCamp.getSubtitle());
1378 + camp.setSorting(newCamp.getSorting());
1379 + camp.setNew(newCamp.getIsNew());
1380 + camp.setType(newCamp.getCampaignType());
1381 + try {
1382 + camp.setExtraFields(newCamp.getExtraFields().toString());
1383 + } catch (NullPointerException e) {
1384 + camp.setExtraFields("");
1385 + e.printStackTrace();
1386 + }
1387 +
1388 + try {
1389 + camp.setCampaignTypeSettings(newCamp.getSettings().toString());
1390 + } catch (NullPointerException e) {
1391 + camp.setCampaignTypeSettings("");
1392 + e.printStackTrace();
1393 + }
1394 + tempCampaigns.add(camp);
1395 + }
1396 + WarplyManagerHelper.setCampaignList(tempCampaigns);
1329 receiver.onSuccess(result); 1397 receiver.onSuccess(result);
1330 } 1398 }
1331 1399
1332 @Override 1400 @Override
1333 public void onFailure(int errorCode) { 1401 public void onFailure(int errorCode) {
1334 - if (auth) { 1402 + if (errorCode == 401) {
1335 - if (errorCode == 401) { 1403 + refreshToken(new WarplyRefreshTokenRequest(), new CallbackReceiver<JSONObject>() {
1336 - refreshToken(new WarplyRefreshTokenRequest(), new CallbackReceiver<JSONObject>() { 1404 + @Override
1337 - @Override 1405 + public void onSuccess(JSONObject result) {
1338 - public void onSuccess(JSONObject result) { 1406 + int status = result.optInt("status", 2);
1339 - int status = result.optInt("status", 2); 1407 + if (status == 1)
1340 - if (status == 1) 1408 + getCampaignsPersonalized(request, receiver);
1341 - getCampaigns(request, auth, receiver); 1409 + else
1342 - else 1410 + receiver.onFailure(status);
1343 - receiver.onFailure(status); 1411 + }
1344 - }
1345 1412
1346 - @Override 1413 + @Override
1347 - public void onFailure(int errorCode) { 1414 + public void onFailure(int errorCode) {
1348 - receiver.onFailure(errorCode); 1415 + receiver.onFailure(errorCode);
1349 - } 1416 + }
1350 - }); 1417 + });
1351 - } else
1352 - receiver.onFailure(errorCode);
1353 } else 1418 } else
1354 receiver.onFailure(errorCode); 1419 receiver.onFailure(errorCode);
1355 } 1420 }
...@@ -1554,7 +1619,7 @@ public class WarplyManager { ...@@ -1554,7 +1619,7 @@ public class WarplyManager {
1554 WarpUtils.log("[WARP Trace] WARPLY User Coupons Request is active"); 1619 WarpUtils.log("[WARP Trace] WARPLY User Coupons Request is active");
1555 WarpUtils.log("**************************************************"); 1620 WarpUtils.log("**************************************************");
1556 1621
1557 - WarplyManager.getCouponsets(new WarplyGetCouponsetsRequest() 1622 + getCouponsets(new WarplyGetCouponsetsRequest()
1558 .setLanguage(WarplyProperty.getLanguage(Warply.getWarplyContext())), new CallbackReceiver<CouponsetsList>() { 1623 .setLanguage(WarplyProperty.getLanguage(Warply.getWarplyContext())), new CallbackReceiver<CouponsetsList>() {
1559 @Override 1624 @Override
1560 public void onSuccess(CouponsetsList result) { 1625 public void onSuccess(CouponsetsList result) {
......
...@@ -383,19 +383,6 @@ public class WarpView extends WebView { ...@@ -383,19 +383,6 @@ public class WarpView extends WebView {
383 questionnaireEvent.setName(parts[1]); 383 questionnaireEvent.setName(parts[1]);
384 EventBus.getDefault().post(new WarplyEventBusManager(questionnaireEvent)); 384 EventBus.getDefault().post(new WarplyEventBusManager(questionnaireEvent));
385 } else if (parts[1].equals("userAnswered")) { 385 } else if (parts[1].equals("userAnswered")) {
386 - QuestionnaireEventModel questionnaireEvent = new QuestionnaireEventModel();
387 - try {
388 - questionnaireEvent.setName(parts[1]);
389 - questionnaireEvent.setParameter(parts[2]);
390 - WarpUtils.setUserTag(Warply.getWarplyContext(), parts[2]);
391 - EventBus.getDefault().post(new WarplyEventBusManager(questionnaireEvent));
392 - } catch (IndexOutOfBoundsException e) {
393 - questionnaireEvent.setName(parts[1]);
394 - questionnaireEvent.setParameter("");
395 - WarpUtils.setUserTag(Warply.getWarplyContext(), "");
396 - EventBus.getDefault().post(new WarplyEventBusManager(questionnaireEvent));
397 - }
398 - } else if (parts[1].equals("addUserTag")) {
399 // QuestionnaireEventModel questionnaireEvent = new QuestionnaireEventModel(); 386 // QuestionnaireEventModel questionnaireEvent = new QuestionnaireEventModel();
400 try { 387 try {
401 // questionnaireEvent.setName(parts[1]); 388 // questionnaireEvent.setName(parts[1]);
...@@ -408,6 +395,19 @@ public class WarpView extends WebView { ...@@ -408,6 +395,19 @@ public class WarpView extends WebView {
408 WarpUtils.setUserTag(Warply.getWarplyContext(), ""); 395 WarpUtils.setUserTag(Warply.getWarplyContext(), "");
409 // EventBus.getDefault().post(new WarplyEventBusManager(questionnaireEvent)); 396 // EventBus.getDefault().post(new WarplyEventBusManager(questionnaireEvent));
410 } 397 }
398 + } else if (parts[1].equals("addUserTag")) {
399 + QuestionnaireEventModel questionnaireEvent = new QuestionnaireEventModel();
400 + try {
401 + questionnaireEvent.setName(parts[1]);
402 + questionnaireEvent.setParameter(parts[2]);
403 + WarpUtils.setUserTag(Warply.getWarplyContext(), parts[2]);
404 + EventBus.getDefault().post(new WarplyEventBusManager(questionnaireEvent));
405 + } catch (IndexOutOfBoundsException e) {
406 + questionnaireEvent.setName(parts[1]);
407 + questionnaireEvent.setParameter("");
408 + WarpUtils.setUserTag(Warply.getWarplyContext(), "");
409 + EventBus.getDefault().post(new WarplyEventBusManager(questionnaireEvent));
410 + }
411 } else if (parts[1].equals("couponRetrieved")) { 411 } else if (parts[1].equals("couponRetrieved")) {
412 EventBus.getDefault().post(new WarplyEventBusManager(new CouponEventModel())); 412 EventBus.getDefault().post(new WarplyEventBusManager(new CouponEventModel()));
413 } else if (parts[1].equals("couponShared")) { 413 } else if (parts[1].equals("couponShared")) {
......