Repository navigation
5.5.0
Release/5.5.0 - Airline and accommodation sub-tree model alignment (#468)
This release updates the documentation and test cases for airline and accommodation data objects across multiple payment API endpoints, clarifying the differences in their accepted shapes, especially regarding the passenger field and address formats. The changes also improve test data to match the updated API field names and expected structures.
API Documentation and Behavior Clarifications:
Added detailed documentation for airline_data and accommodation_data fields in all payment-related endpoints (Payments, HostedPayments, PaymentLinks, PaymentSessions, PaymentContexts), specifying the required and optional fields, and clarifying which endpoints accept a single passenger object vs. an array. This includes a summary table of endpoint behaviors and advice for defensive coding when reading responses. [[1]](https://github.com/checkout/checkout-sdk-node/pull/465/files#diff-76578f44aeabef26fcd3c9e30dd28b350638ccfd14e2f8e027903d4543dc103bR81-R126) [[2]](https://github.com/checkout/checkout-sdk-node/pull/465/files#diff-76578f44aeabef26fcd3c9e30dd28b350638ccfd14e2f8e027903d4543dc103bR168-R172) [[3]](https://github.com/checkout/checkout-sdk-node/pull/465/files#diff-76578f44aeabef26fcd3c9e30dd28b350638ccfd14e2f8e027903d4543dc103bR208-R228) [[4]](https://github.com/checkout/checkout-sdk-node/pull/465/files#diff-85bd78abffa389dbea5f6766f8828567611980703de2f9612cff55e545639e5dR31-R48) [[5]](https://github.com/checkout/checkout-sdk-node/pull/465/files#diff-4a03b92adc23934e550253d4e4f0462248d9229860dd84b42cf71d576b563857R32-R49) [[6]](https://github.com/checkout/checkout-sdk-node/pull/465/files#diff-2b4d77715704a0b6567e52f52d77a970cb22da3119595db73cb218a99ef42aa1R35-R51) [[7]](https://github.com/checkout/checkout-sdk-node/pull/465/files#diff-2b4d77715704a0b6567e52f52d77a970cb22da3119595db73cb218a99ef42aa1R121-R127) [[8]](https://github.com/checkout/checkout-sdk-node/pull/465/files#diff-1805c66253fb18216ac51ceef961007303a3338e76e7e987860351d65ef40f7dR22-R44) [[9]](https://github.com/checkout/checkout-sdk-node/pull/465/files#diff-1805c66253fb18216ac51ceef961007303a3338e76e7e987860351d65ef40f7dR74-R85)
For PaymentContexts, explicitly documented that the stop_over_code field in flight_leg_details should not be sent, as it is rejected by the API, and clarified the difference in the AccommodationData schema compared to other endpoints.
Test Case Updates:
Updated test data in payment-setups-unit.js to use the correct field names (address_line1 instead of address_line_1), to use ISO country codes, and to match the updated array/object structures for airline and accommodation data. [[1]](https://github.com/checkout/checkout-sdk-node/pull/465/files#diff-ddab7c1168be8fa8283ceb4fda260cbec9c09656f8b53953f5d5e75796362dd2L467-R467) [[2]](https://github.com/checkout/checkout-sdk-node/pull/465/files#diff-ddab7c1168be8fa8283ceb4fda260cbec9c09656f8b53953f5d5e75796362dd2L484-R485) [[3]](https://github.com/checkout/checkout-sdk-node/pull/465/files#diff-ddab7c1168be8fa8283ceb4fda260cbec9c09656f8b53953f5d5e75796362dd2L516-R529) [[4]](https://github.com/checkout/checkout-sdk-node/pull/465/files#diff-ddab7c1168be8fa8283ceb4fda260cbec9c09656f8b53953f5d5e75796362dd2L655-R656) [[5]](https://github.com/checkout/checkout-sdk-node/pull/465/files#diff-ddab7c1168be8fa8283ceb4fda260cbec9c09656f8b53953f5d5e75796362dd2L672-R674) [[6]](https://github.com/checkout/checkout-sdk-node/pull/465/files#diff-ddab7c1168be8fa8283ceb4fda260cbec9c09656f8b53953f5d5e75796362dd2L704-R718)
Schema and Field Description Improvements:
Improved inline documentation for flight_leg_details in PaymentSetups to clarify field names, expected formats, and historical inconsistencies in SDKs.
These changes ensure developers are aware of endpoint-specific requirements and quirks, reducing integration errors and making the codebase more maintainable.