package com.flightticket.exception;

import java.math.BigDecimal;

/**
 * Exception thrown when room price changes during the booking process
 * Requirements: 11.5, 7.1, 7.2, 7.3
 */
public class PriceChangedException extends Exception {
    
    private final BigDecimal originalPrice;
    private final BigDecimal newPrice;
    private final String currency;
    
    public PriceChangedException(BigDecimal originalPrice, BigDecimal newPrice, String currency) {
        super(String.format(
            "Price changed from %s %s to %s %s. User confirmation required.",
            currency, originalPrice, currency, newPrice
        ));
        this.originalPrice = originalPrice;
        this.newPrice = newPrice;
        this.currency = currency;
    }
    
    public BigDecimal getOriginalPrice() {
        return originalPrice;
    }
    
    public BigDecimal getNewPrice() {
        return newPrice;
    }
    
    public String getCurrency() {
        return currency;
    }
}
