Subversion Repositories SmartDukaan

Rev

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

Rev 22048 Rev 22049
Line 42... Line 42...
42
        thriftObject.id = self.id
42
        thriftObject.id = self.id
43
        thriftObject.amount = self.amount
43
        thriftObject.amount = self.amount
44
        thriftObject.walletId = self.wallet.id
44
        thriftObject.walletId = self.wallet.id
45
        thriftObject.timestamp = to_java_date(self.timestamp)
45
        thriftObject.timestamp = to_java_date(self.timestamp)
46
        thriftObject.referenceNumber = self.reference
46
        thriftObject.referenceNumber = self.reference
47
        thriftObject.referenceType = self.reference_type
47
        thriftObject.referenceType = WalletReferenceType._NAMES_TO_VALUES.get(self.reference_type)
48
        thriftObject.description = WalletReferenceType._NAMES_TO_VALUES.get(self.description)
48
        thriftObject.description = self.description
49
        return thriftObject
49
        return thriftObject
50
    
50
    
51
    def from_thrift_object(self, thriftUserWalletHistory):
51
    def from_thrift_object(self, thriftUserWalletHistory):
52
        self.id = thriftUserWalletHistory.id
52
        self.id = thriftUserWalletHistory.id
53
        self.amount = thriftUserWalletHistory.amount
53
        self.amount = thriftUserWalletHistory.amount