Deprecations
Fields that still work but are on their way out, and what to read instead. Move off them as soon as you can.
comfortClass
comfortClass on admission and reservation parts is deprecated. It carried a different thing for different operators, and each now has a field of its own:
What comfortClass held |
Read it from |
|---|---|
| The class ("1st class", "2nd class") | travelClass on the part |
| A class, tier or brand label ("Première", "Eurostar Plus", "2nd class Calm") | travelClass for the class, and the admission's product.name for the tier or brand |
| A compartment or zone ("Private 4 person couchette cabin") | the reservation's accommodation.subType |
| The ticket's name ("Off-Peak Day Single") | product.name on the admission part |
If you read first or second class off serviceClass (BEST and HIGH as first), switch to travelClass as well: a service tier never says which class a ticket is.
Renamed accommodation sub types
accommodation.subType is now the AccommodationSubType enum instead of a free string, with the values it already carries. Some of those were renamed in place earlier, when the operators' mapping changed (a new string on a string field is not a breaking change). For offers mapped since then:
| Place | Before | Now |
|---|---|---|
| Nightjet seating compartment bought whole | PRIVATE |
PRIVATE_COMPARTMENT |
| Nightjet three-bed sleeper, one bed | TRIPLE |
TOURIST_SLEEPER_3 |
| SNCF Optimum Plus | PREMIUM |
null: Optimum Plus is a fare upgrade, not a place |
| SJ private second-class sleeper | PRIVATE_TRIPLE |
PRIVATE_TOURIST_SLEEPER_3 |
| SJ shared second-class sleeper, one bed | TRIPLE or DOUBLE |
TOURIST_SLEEPER_3 |
| SJ first-class sleeper for one | SINGLE |
PRIVATE_DOUBLE: SJ's two-bed first-class compartment, bought whole |
Unchanged, and private: Vy's sleeper stays PRIVATE_DOUBLE, because it is priced per compartment, so the compartment is bought whole and its product carries PRIVATE_COMPARTMENT.
Places that had no sub type may now have one, such as SILENCE on SJ's Lugn and BUSINESS on Eurostar Premier, and a compartment code we have not mapped reads UNKNOWN where it used to read null.
A booking reads the sub type it was stored with, so a booking made before these renames keeps its old reading where the old value is still a value: stored PREMIUM, DOUBLE, SINGLE and PRIVATE_DOUBLE load unchanged. Names that are no longer values load under their current name: BERTH_4, BERTH_5 and BERTH_6 as COUCHETTE_4, COUCHETTE_5 and COUCHETTE_6 (and their PRIVATE_BERTH_ forms as the PRIVATE_COUCHETTE_ ones); SLEEPER and SLEEPER_1 as SINGLE; SLEEPER_2 as DOUBLE; SLEEPER_3 and TRIPLE as TOURIST_SLEEPER_3; MINI_CABIN as MINI_SUITE; SILENT as SILENCE; PRIVATE as PRIVATE_COMPARTMENT; and PRIVATE_TRIPLE as PRIVATE_TOURIST_SLEEPER_3.