-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPayment.h
More file actions
71 lines (57 loc) · 3.33 KB
/
Copy pathPayment.h
File metadata and controls
71 lines (57 loc) · 3.33 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
//Austin Nguyen
#ifndef GATORSTAY_PAYMENT_H
#define GATORSTAY_PAYMENT_H
#include <string>
#include "Reservation.h"
#include "Currency.h"
#include "Discount.h"
#include "room.h"
using namespace std;
// Payment class stores all information related to a completed or pending payment.
// It is tightly connected to a Reservation, Room, Currency, and Discount.
class Payment {
private:
int paymentID; // Unique ID for this payment record
Reservation reservation; // The reservation associated with this payment
int guestID; // Guest making the payment
float totalPrice; // Final amount after all calculations (nights, taxes, currency, discount)
float baseRate; // Base nightly rate for the room (auto-loaded from AvailableRooms)
int paymentDate; // Payment date in integer format (YYYYMMDD or custom)
string paymentMethod; // e.g., "Credit Card", "Cash", "PayPal"
string paymentStatus; // "Completed", "Failed", etc.
string checkInDate; // Check-in date (string format: YYYY-MM-DD)
string checkOutDate; // Check-out date (string format: YYYY-MM-DD)
int roomID; // Room ID being paid for
Currency currency; // Currency conversion used (USD, EUR, JPY, etc.)
Discount discount; // Discount applied to this payment
public:
//Setter
void setPaymentID(int id); // Set unique payment ID
void setReservation(const Reservation& r); // Attach reservation + auto-copy needed values
void setGuestID(int id); // Set guest ID
void setTotalPrice(float total); // Set computed price
void setPaymentDate(int date); // Set payment date
void setPaymentMethod(string m); // Set method used
void setPaymentStatus(string s); // Set status (Completed / Failed / Pending)
void setCurrency(const Currency& u); // Set currency object
void setDiscount(const Discount& d); // Set discount object
void setCheckInDate(const string& date); // Check-in date
void setCheckOutDate(const string& date); // Check-out date
void setRoomID(int id); // Room ID
void setBaseRate(float rate); // Set nightly rate manually (fallback)
//Getter
int getPaymentID() const; // Return payment ID
Reservation getReservation() const; // Return reservation object
int getGuestID() const; // Return guest ID
float getTotalPrice() const; // Return final computed price
float getBaseRate() const; // Return nightly rate
int getPaymentDate() const; // Payment date
string getPaymentMethod() const; // Payment method used
string getPaymentStatus() const; // Completed / Failed / Pending
string getCheckInDate() const; // Return check-in date
string getCheckOutDate() const; // Return check-out date
int getRoomID() const; // Return room ID
Currency getCurrency() const; // Return currency object
Discount getDiscount() const; // Return discount object
};
#endif