Link Search Menu Expand Document

Package Step

object

Represents a creator-defined step along a package booking journey.


Attributes

package_step.id

string

The database id of the step.

package_step.name

string

The name given to the step.

package_step.tagline

string

The description given to the step.

package_step.path

URL

URL pointing to the step’s page in the package booking journey.

package_step.package

Package

The related package.

package_step.product_groups

Array of Package Products

Each step contains a creator-selected number of bookable elements. Those selections are exposed to Liquid templates as an array of Package Products, where each provides:

  • the subset of variants that the creator chose to belong to the package
  • and the product which those chosen variants are part of

package_step.required_start_date

Date

Creators may specify that customers must book accommodation dates which include a specific date range. This will return the start date of that range.

package_step.required_end_date

Date

Creators may specify that customers must book accommodation dates which include a specific date range. This will return the end date of that range.

package_step.earliest_check_in_date

Date

If an accommodation step has required dates, the creator can specify a certain number of additional nights the customer can book. This method will return the earliest possible check in date. It will return nil if any number of additional nights can be booked, or if it’s a fixed-date package. It will return the required start date if there are no additional nights available before check-in.

This method is only applicable to accommodation steps within a multi-date package.

package_step.latest_check_out_date

Date

If an accommodation step has required dates, the creator can specify a certain number of additional nights the customer can book. This method will return the latest possible check out date. It will return nil if any number of additional nights can be booked, or if it’s a fixed-date package. It will return the required end date if there are no additional nights available after check-out.

This method is only applicable to accommodation steps within a multi-date package.

package_step.next_page_path

URL

URL pointing to the next page of the booking journey. Navigating to this URL is only possible if the customer has added enough/the correct elements to the cart to honour the requirements set by the creator for this step.

package_step.auto_progress?

boolean

Whether or not this package step has been configured by the creator to auto-progress to the next step when the customer has added enough items to their cart to satisfy its requirements.

package_step.step_valid?

boolean

This will return false if the customer has not added enough elements to the cart to honour the requirements set by the creator for this step, and true if they have.

package_step.validation_errors

Array of strings

If the customer has not added enough elements to the cart to honour the requirements set by the creator for this step, will contain an explanation of the fact.

package_step.accommodated_adult_count

Integer

The total guests that have been selected so far for this package step.

package_step.min_guests_required

Integer

If the package step requires a specific guest count equal to the package adult count, then we return the package adult count.

If we don’t require the guest count to equal the package adult count, but the step has required dates, the minimum will be 1.

Otherwise, this will be 0.

package_step.max_guests_required

Integer

This is the package adult count.


Table of contents