@entur/create-offer-configurations-from-offer-to-buy
Advanced tools
Changelog
4.0.0 (2023-05-15)
createOfferConfigurationsFromOfferToBuy
now only supports Offers v2. If you
are using Offers v1, you must upgrade to Offers v2 (or continue to use the old
version of this package).Changelog
3.1.2 (2023-05-11)
Changed from Offers 2.0 beta to release swagger url
Changelog
3.0.0 (2022-02-17)
createOfferConfigurationsFromOfferToBuy
will now throw an
error if offerToBuy.withUpgradeProducts
contains at least 1 item (i.e.
some product that has to be mapped to a selectableId
) and you have either
supplied no offer or an offer whose ID does not match the ID of the
offerToBuy.selectableProductIds
field in the configuration in such cases. Because
these products are mandatory, you would probably receive an error when
supplying the offer configuration to reserve-offers
.selectableProductIds
itself. We therefore no longer
have to map the IDs in withUpgradeProducts
to the selectableIds.Changelog
2.0.0 (2022-01-21)
The function createOfferConfigurationsFromOfferToBuy
now adds the products
specified by the withUpgradeProducts
key in the offer configuration to the
selectableProductIds
array in the offer configurations it outputs. In order to
map these product IDs from their Netex ID to their selectableProductId
, the
function now requires a second parameter. This must be either the referred Offer
(if you are using
Offers v1) or
OptionalProduct (if you are using
Offers v2).