Class Purchase
java.lang.Object
passport.domain.contexts.purchases.internal.Purchase
Represents a purchase transaction, including buying and refunding tickets.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Makes a purchase of a specified amount of tickets.void
refund()
Refunds the purchased ticket.void
Ensures that the purchase is sellable.void
Ensures that the ticket has been sold.void
Ensures that the buyer owns the ticket.
-
Field Details
-
buyer
-
ticket
-
event
-
-
Constructor Details
-
Purchase
public Purchase()
-
-
Method Details
-
makeOf
-
refund
public void refund()Refunds the purchased ticket. -
shouldBeSold
public void shouldBeSold()Ensures that the ticket has been sold. -
shouldBeSellable
public void shouldBeSellable()Ensures that the purchase is sellable. -
shouldOwnTicket
public void shouldOwnTicket()Ensures that the buyer owns the ticket.
-