Class TicketRefund
java.lang.Object
passport.domain.contexts.purchases.TicketRefund
-
Constructor Summary
ConstructorDescriptionTicketRefund
(EmailService service, Events events, Users users, LocalDate currentDay) Constructor with specified email service.TicketRefund
(Events events, Users users, LocalDate currentDay) Constructor with default email service. -
Method Summary
Modifier and TypeMethodDescriptionSets the ticket to be refunded.void
refund()
Executes the refund process.Sets the customer who will receive the refund.via
(PaymentMethod paymentMethod) Sets the payment method for the refund.
-
Constructor Details
-
TicketRefund
-
TicketRefund
Constructor with specified email service.- Parameters:
service
- the email serviceevents
- the events repositoryusers
- the users repository
-
-
Method Details
-
to
Sets the customer who will receive the refund.- Parameters:
customerId
- the user ID of the customer- Returns:
- the updated TicketRefund object
-
owning
Sets the ticket to be refunded.- Parameters:
ticket
- the ticket to be refunded- Returns:
- the updated TicketRefund object
- Throws:
InvalidRefundDueToInactiveEvent
-
via
Sets the payment method for the refund.- Parameters:
paymentMethod
- the payment method- Returns:
- the updated TicketRefund object
-
refund
public void refund()Executes the refund process.
-