Subversion Repositories SmartDukaan

Rev

Rev 1845 | Rev 1891 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1845 Rev 1859
Line 573... Line 573...
573
        try:
573
        try:
574
            return [to_t_user_communication(user_communication) for user_communication in get_all_user_communications()]
574
            return [to_t_user_communication(user_communication) for user_communication in get_all_user_communications()]
575
        finally:
575
        finally:
576
            UserDataAccessors.close_session()
576
            UserDataAccessors.close_session()
577
 
577
 
578
    def createMasterAffiliate(self, name):
578
    def createMasterAffiliate(self, name, addedOn):
579
        """
579
        """
580
        Parameters
580
        Parameters
581
         - name
581
         - name
582
         - url
582
         - addedOn
583
        """
583
        """
584
        try:
584
        try:
585
            return to_t_master_affiliate(create_master_affiliate(name))
585
            return to_t_master_affiliate(create_master_affiliate(name, addedOn))
586
        finally:
586
        finally:
587
            UserDataAccessors.close_session()
587
            UserDataAccessors.close_session()
588
    
588
    
589
    def getMasterAffiliateById(self, id):
589
    def getMasterAffiliateById(self, id):
590
        """
590
        """
Line 604... Line 604...
604
        try:
604
        try:
605
            return to_t_master_affiliate(get_master_affiliate_by_name(name))
605
            return to_t_master_affiliate(get_master_affiliate_by_name(name))
606
        finally:
606
        finally:
607
            UserDataAccessors.close_session()
607
            UserDataAccessors.close_session()
608
    
608
    
609
    def createAffiliate(self, name, url, master_affiliate_id):
609
    def createAffiliate(self, name, url, masterAffiliateId, addedOn):
610
        """
610
        """
611
        Parameters
611
        Parameters
612
         - name
612
         - name
613
         - url
613
         - url
-
 
614
         - masterAffiliateId
-
 
615
         - addedOn
614
        """
616
        """
615
        try:
617
        try:
616
            return to_t_affiliate(create_affiliate(name, url, master_affiliate_id))
618
            return to_t_affiliate(create_affiliate(name, url, masterAffiliateId, addedOn))
617
        finally:
619
        finally:
618
            UserDataAccessors.close_session()
620
            UserDataAccessors.close_session()
619
    
621
    
620
    def getAffiliateById(self, id):
622
    def getAffiliateById(self, id):
621
        """
623
        """
Line 645... Line 647...
645
        try:
647
        try:
646
            return [to_t_affiliate(affiliate) for affiliate in get_affiliates_by_master_affiliate(master_affiliate_id)]
648
            return [to_t_affiliate(affiliate) for affiliate in get_affiliates_by_master_affiliate(master_affiliate_id)]
647
        finally:
649
        finally:
648
            UserDataAccessors.close_session()
650
            UserDataAccessors.close_session()
649
            
651
            
650
    def createTracker(self, affilateId):
652
    def createTracker(self, affilateId, addedOn):
651
        """
653
        """
652
        Parameters
654
        Parameters
653
         - affiliateId
655
         - affiliateId
-
 
656
         - addedOn
654
        """
657
        """
655
        try:
658
        try:
656
            return to_t_tracker(create_tracker(affilateId))
659
            return to_t_tracker(create_tracker(affilateId, addedOn))
657
        finally:
660
        finally:
658
            UserDataAccessors.close_session()
661
            UserDataAccessors.close_session()
659
    
662
    
660
    def getTrackerById(self, id):
663
    def getTrackerById(self, id):
661
        """
664
        """
Line 675... Line 678...
675
        try:
678
        try:
676
            return [to_t_tracker(tracker) for tracker in get_trackers_by_affiliate(affiliateId)]
679
            return [to_t_tracker(tracker) for tracker in get_trackers_by_affiliate(affiliateId)]
677
        finally:
680
        finally:
678
            UserDataAccessors.close_session()
681
            UserDataAccessors.close_session()
679
    
682
    
680
    def addTrackLog(self, trackerId, userId, event, url, data):
683
    def addTrackLog(self, trackerId, userId, event, url, data, addedOn):
681
        """
684
        """
682
        Parameter
685
        Parameter
683
         - trackerId
686
         - trackerId
684
         - userId
687
         - userId
685
         - event
688
         - event
686
         - url
689
         - url
687
         - data
690
         - data
-
 
691
         - addedOn
688
        """
692
        """
689
        try:
693
        try:
690
            return add_track_log(trackerId, userId, event, url, data)
694
            return add_track_log(trackerId, userId, event, url, data, addedOn)
691
        finally:
695
        finally:
692
            UserDataAccessors.close_session()
696
            UserDataAccessors.close_session()
693
    
697
    
694
    def getTrackLogById(self, id):
698
    def getTrackLogById(self, id):
695
        """
699
        """