@Entity public class ProductPaymentEntry extends AccountancyEntry
ProductPaymentEntry is used to store information of payments of orders.| Constructor and Description |
|---|
ProductPaymentEntry(OrderIdentifier orderIdentifier,
UserAccount userAccount,
javax.money.MonetaryAmount amount,
String description,
PaymentMethod paymentMethod)
A
ProductPaymentEntry is constructed for a specific OrderIdentifier attached to it. |
| Modifier and Type | Method and Description |
|---|---|
OrderIdentifier |
getOrderIdentifier()
The
OrderIdentifier which this ProductPaymentEntry refers to. |
PaymentMethod |
getPaymentMethod()
The
PaymentMethod chosen for the order belonging to this ProductPaymentEntry |
UserAccount |
getUserAccount()
The
UserAccount which this ProductPaymentEntry refers to. |
static ProductPaymentEntry |
of(Order order,
String description) |
String |
toString() |
getDate, getDescription, getId, getValue, hasDateequals, hashCode, isNewpublic ProductPaymentEntry(OrderIdentifier orderIdentifier, UserAccount userAccount, javax.money.MonetaryAmount amount, String description, PaymentMethod paymentMethod)
ProductPaymentEntry is constructed for a specific OrderIdentifier attached to it. This entry
saves also the UserAccountIdentifier and the specified amount that was paid.orderIdentifier - the OrderIdentifier to which this ProductPaymentEntry will refer to, must
not be null.userAccount - the UserAccount to which this ProductPaymentEntry will refer to, must not be
null.amount - the MonetaryAmount that was paid, must not be null.description - textual description of the payment entry, must not be null.paymentMethod - must not be null.public static ProductPaymentEntry of(Order order, String description)
public OrderIdentifier getOrderIdentifier()
OrderIdentifier which this ProductPaymentEntry refers to.public UserAccount getUserAccount()
UserAccount which this ProductPaymentEntry refers to.public PaymentMethod getPaymentMethod()
PaymentMethod chosen for the order belonging to this ProductPaymentEntrypublic String toString()
toString in class AccountancyEntryCopyright © 2018. All rights reserved.