コード例 #1
0
 def set_account_allocations(self, allocations):
     return self.checkout_session._set('accounts', 'allocations',
                                       Allocations.serialize(allocations))
コード例 #2
0
    def test_serialize(self):
        self.allocations.add('A', D('10.00'))
        self.allocations.add('B', D('12.00'))

        serialized = Allocations.serialize(self.allocations)
        self.assertEqual(serialized, '{"A": "10.00", "B": "12.00"}')
コード例 #3
0
    def test_serialize(self):
        self.allocations.add('A', D('10.00'))
        self.allocations.add('B', D('12.00'))

        serialized = Allocations.serialize(self.allocations)
        self.assertEqual(serialized, '{"A": "10.00", "B": "12.00"}')
コード例 #4
0
 def set_account_allocations(self, allocations):
     return self.checkout_session._set('accounts', 'allocations', Allocations.serialize(allocations))
コード例 #5
0
 def set_account_allocations(self, allocations):
     return self.checkout_session._set("accounts", "allocations",
                                       Allocations.serialize(allocations))