Package org.salespointframework.payment
Class Cheque
java.lang.Object
org.salespointframework.payment.PaymentMethod
org.salespointframework.payment.Cheque
- All Implemented Interfaces:
Serializable
,org.jmolecules.ddd.types.ValueObject
A is a written bill of exchange (or draft), a written order by the drawer (the writer of the cheque) to the drawee
(usually the bank), to pay a specified amount of money to a payee. The class
Cheque
represents such a
written order of payment in a digital form.- Author:
- Hannes Weisbach, Oliver Gierke
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
boolean
Name of the account holder.Number of the account on which the cheque is drawn.Address of the bank, that issued the cheque.Unique identification number of this bank.Name of the bank, that issued the cheque.Number uniquely identifying this cheque.Date on which the cheque was written.getPayee()
Name of the payee.int
hashCode()
toString()
-
Constructor Details
-
Cheque
public Cheque(String accountName, String accountNumber, String chequeNumber, String payee, LocalDateTime dateWritten, String bankName, String bankAddress, String bankIdentificationNumber) Instantiate a newCheque
instance.- Parameters:
accountName
- Name of the account holder.accountNumber
- Number of this account on which the cheque is drawn.chequeNumber
- Number of this cheque. This is a number uniquely identifying a cheque.payee
- Name of the party which receives the cheque.dateWritten
-LocalDateTime
object representing the date on which the cheque was written,bankName
- Name of the bank that issued the cheque,bankAddress
- Address of the bank that issued the cheque.bankIdentificationNumber
- Unique identifier of the bank that issued the cheque. Also known as the bank routing number.
-
-
Method Details
-
toString
- Overrides:
toString
in classPaymentMethod
-
getAccountName
Name of the account holder. -
getAccountNumber
Number of the account on which the cheque is drawn. -
getChequeNumber
Number uniquely identifying this cheque. -
getPayee
Name of the payee. -
getDateWritten
Date on which the cheque was written. -
getBankName
Name of the bank, that issued the cheque. -
getBankAddress
Address of the bank, that issued the cheque. -
getBankIdentificationNumber
Unique identification number of this bank. Also known as routing number. -
equals
- Overrides:
equals
in classPaymentMethod
-
canEqual
- Overrides:
canEqual
in classPaymentMethod
-
hashCode
public int hashCode()- Overrides:
hashCode
in classPaymentMethod
-