Bumping version for release.
[PyCIM.git] / CIM14 / IEC61968 / PaymentMetering / Cheque.py
blob1ece84587026a59797aa5c2f3b0cd03adbc5ff74
1 # Copyright (C) 2010 Richard Lincoln
3 # This library is free software; you can redistribute it and/or
4 # modify it under the terms of the GNU Lesser General Public
5 # License as published by the Free Software Foundation; either
6 # version 2.1 of the License, or (at your option) any later version.
8 # This library is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 # Lesser General Public License for more details.
13 # You should have received a copy of the GNU Lesser General Public
14 # License along with this library; if not, write to the Free Software
15 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA, USA
17 from CIM14.Element import Element
19 class Cheque(Element):
20 """The actual tender when it is a type of cheque.
21 """
23 def __init__(self, kind="other", micrNumber='', date='', chequeNumber='', Tender=None, bankAccountDetail=None, *args, **kw_args):
24 """Initialises a new 'Cheque' instance.
26 @param kind: Kind of cheque. Values are: "other", "postalOrder", "bankOrder"
27 @param micrNumber: The magnetic ink character recognition number printed on the cheque.
28 @param date: Date when cheque becomes valid.
29 @param chequeNumber: Cheque reference number as printed on the cheque.
30 @param Tender: Payment tender the cheque is being used for.
31 @param bankAccountDetail: Details of the account holder and bank.
32 """
33 #: Kind of cheque. Values are: "other", "postalOrder", "bankOrder"
34 self.kind = kind
36 #: The magnetic ink character recognition number printed on the cheque.
37 self.micrNumber = micrNumber
39 #: Date when cheque becomes valid.
40 self.date = date
42 #: Cheque reference number as printed on the cheque.
43 self.chequeNumber = chequeNumber
45 self._Tender = None
46 self.Tender = Tender
48 self.bankAccountDetail = bankAccountDetail
50 super(Cheque, self).__init__(*args, **kw_args)
52 _attrs = ["kind", "micrNumber", "date", "chequeNumber"]
53 _attr_types = {"kind": str, "micrNumber": str, "date": str, "chequeNumber": str}
54 _defaults = {"kind": "other", "micrNumber": '', "date": '', "chequeNumber": ''}
55 _enums = {"kind": "ChequeKind"}
56 _refs = ["Tender", "bankAccountDetail"]
57 _many_refs = []
59 def getTender(self):
60 """Payment tender the cheque is being used for.
61 """
62 return self._Tender
64 def setTender(self, value):
65 if self._Tender is not None:
66 self._Tender._Cheque = None
68 self._Tender = value
69 if self._Tender is not None:
70 self._Tender.Cheque = None
71 self._Tender._Cheque = self
73 Tender = property(getTender, setTender)
75 # Details of the account holder and bank.
76 bankAccountDetail = None