Files
Training-VehicleService-May26/Trenser.VehicleServiceSystem/Trenser.VehicleServiceSystem/services/PaymentManagementService.h
T
joelthomastrenser 9c8d03f356 Clean up legacy code
- Remove FileManager and related file-based persistence logic
- Remove obsolete observer persistence utilities
- Remove unused service APIs and includes
- Delete duplicate DataStore mutex stubs
- Perform general dead-code cleanup
2026-06-14 15:49:25 +05:30

37 lines
1.3 KiB
C++

/*
File: PaymentManagementService.h
Description: Declares the PaymentManagementService class which manages payment operations in the Vehicle Service Management System.
Provides functionality to generate invoices, retrieve customer invoices, complete payments, send payment reminders,
and handle notifications using the Observer pattern.
Author: Trenser
Date: 19-May-2026
*/
#pragma once
#include <string>
#include "Map.h"
#include "NotificationManagementService.h"
#include "Enums.h"
#include "DataStore.h"
class ServiceBooking;
class Invoice;
class PaymentManagementService : public NotificationManagementService
{
private:
DataStore& m_dataStore;
static util::Map<std::string, User*> m_observers;
public:
PaymentManagementService() : m_dataStore(DataStore::getInstance()) {}
void generateInvoice(ServiceBooking* booking);
util::Map<std::string, Invoice*> getInvoices(const std::string& customerID);
void completePayment(const std::string& invoiceID, util::PaymentMode paymentMode);
util::Map<std::string, Invoice*>& getAllInvoices();
void confirmPayment(const std::string& invoiceID);
void sendPaymentReminders();
void sendNotification(User* user, const std::string& title, const std::string& message) override;
void attach(User* user) override;
void detach(User* user) override;
};