@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, hasDate, setDate
equals, hashCode, isNew
public 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)
@Generated(value="lombok") public OrderIdentifier getOrderIdentifier()
OrderIdentifier
which this ProductPaymentEntry
refers to.@Generated(value="lombok") public UserAccount getUserAccount()
UserAccount
which this ProductPaymentEntry
refers to.@Generated(value="lombok") public PaymentMethod getPaymentMethod()
PaymentMethod
chosen for the order belonging to this ProductPaymentEntry
@Generated(value="lombok") public String toString()
toString
in class AccountancyEntry
Copyright © 2018 Pivotal Software, Inc.. All rights reserved.