s2-tools
Version:
A collection of geospatial tools primarily designed for WGS84, Web Mercator, and S2.
48 lines • 1.48 kB
TypeScript
/**
* # Fare Products
*
* **Optional**
* Describes different fare products riders can purchase.
* Used by GTFS-Fares V2 to model fare product costs, media, and potential discounts for multi-leg journeys.
*
* Multiple rows with the same `fare_product_id` can exist, each paired with a different `fare_media_id`.
*/
export declare class GTFSFareProduct {
/**
* **Required**
* Identifies a fare product or set of fare products.
*/
id: string;
/**
* **Optional**
* The name of the fare product as displayed to riders.
*/
fareProductName?: string;
/**
* **Optional**
* Identifies a fare media (`fare_media.fare_media_id`) that can be employed to use this fare product.
* When empty, the fare media is unknown.
*/
fareMediaId?: string;
/**
* **Required**
* The cost of the fare product. May be:
* - Negative: Transfer discount
* - Zero: Free fare
* - Positive: Standard fare cost
*/
amount: number;
/**
* **Required**
* Currency code (e.g., "USD", "EUR") for the cost of this product.
*/
currency: string;
/** @param data - the parsed GTFS CSV data */
constructor(data: Record<string, string>);
}
/**
* @param input - the input string to parse from
* @returns - an array of GTFSFareProducts
*/
export declare function parseGTFSFareProducts(input: string): Record<string, GTFSFareProduct>;
//# sourceMappingURL=fareProducts.d.ts.map