Skip to content

Fare

adjusted_price instance-attribute

adjusted_price: float

adv_purch instance-attribute

adv_purch: int

booking_class instance-attribute

booking_class: str

cabin instance-attribute

cabin: str

carrier instance-attribute

carrier: Carrier | None

category instance-attribute

category: Any

dest instance-attribute

dest: str

fare_id instance-attribute

fare_id: int

gt_revenue instance-attribute

gt_revenue: float

gt_sold instance-attribute

gt_sold: int

orig instance-attribute

orig: str

price instance-attribute

price: float

price_lower_bound instance-attribute

price_lower_bound: float

price_upper_bound instance-attribute

price_upper_bound: float

sold instance-attribute

sold: int

sold_business instance-attribute

sold_business: int

__init__

__init__(
    carrier: Carrier | None,
    orig: str,
    dest: str,
    booking_class: str,
    price: float,
)

add_restriction

add_restriction(restriction: int) -> None

Add a restriction code to this Fare.

adjust_price

adjust_price(dcp_index: int, adjusted_price: float)

Set the adjusted price. The dcp_index is only used for tracking and reporting

get_adjusted_by_dcp

get_adjusted_by_dcp(dcp_index: int) -> float

Return the average adjusted fare for this DCP index. Will return 0.0 if the DCP index was not found

get_restriction

get_restriction(n: int) -> str

Get the n-th restriction code on this Fare

get_sales_by_dcp

get_sales_by_dcp(dcp: int) -> int

Get the sales by specified DCP

get_sales_by_dcp2

get_sales_by_dcp2(dcp: int) -> int

Get the sales by specified DCP

get_sales_by_segment

get_sales_by_segment(seg: str) -> int

Get the sales by demand segment DCP

num_restrictions

num_restrictions() -> int

How many restrictions do we have on this fare?