BusinessHoursDetail

Top-level response model returned by InAppMessaging.fetchBusinessHoursDetail. Bundles the weekly schedule together with the linked override list and holiday list.

Properties

PropertyTypeDescription
businessHoursBusinessHours?The weekly working-hours schedule.
overridesDetailOverridesDetail?The override list linked to this schedule, or null when none is configured.
holidaysDetailHolidaysDetail?The holiday list linked to this schedule, or null when none is configured.

Functions

toJson

Converts the business-hours detail to a JSONObject.

fun toJson(): JSONObject

Returns: The JSONObject representing the business-hours detail.

Companion Functions

fromJson

Converts a JSONObject to a BusinessHoursDetail.

fun fromJson(jsonObject: JSONObject): BusinessHoursDetail

Returns: The business-hours detail converted from the JSONObject.

ParameterTypeDescription
jsonObjectJSONObjectThe JSONObject to convert.

2.2.2 BusinessHours

The recurring weekly schedule for a tenant.

Properties

PropertyTypeDescription
nameString?Display name of the schedule.
descriptionString?Description of the schedule.
aliasIdString?Alias identifier of the schedule.
timezoneString?IANA timezone the schedule is evaluated against, for example Asia/Tokyo.
overridesIdString?Identifier of the linked override list, if any.
holidaysIdString?Identifier of the linked holiday list, if any.
workingHoursList<WorkingHour>The recurring shifts that make up the schedule.

Functions

toJson

Converts the business hours to a JSONObject.

fun toJson(): JSONObject

Returns: The JSONObject representing the business hours.

Companion Functions

fromJson

Converts a JSONObject to a BusinessHours.

fun fromJson(jsonObject: JSONObject): BusinessHours

Returns: The business hours converted from the JSONObject.

ParameterTypeDescription
jsonObjectJSONObjectThe JSONObject to convert.

2.2.3 WorkingHour

A single recurring shift inside a schedule, for example Mon-Fri 09:00-17:00.

Properties

PropertyTypeDescription
nameString?Display name of the shift.
daysList<String>Days of the week the shift applies to, for example MONDAY, TUESDAY.
startTimeString?Shift start time in 24-hour HH:mm format.
endTimeString?Shift end time in 24-hour HH:mm format.

Functions

toJson

Converts the working hour to a JSONObject.

fun toJson(): JSONObject

Returns: The JSONObject representing the working hour.

Companion Functions

fromJson

Converts a JSONObject to a WorkingHour.

fun fromJson(jsonObject: JSONObject): WorkingHour

Returns: The working hour converted from the JSONObject.

ParameterTypeDescription
jsonObjectJSONObjectThe JSONObject to convert.

2.2.4 OverridesDetail

Named collection of one-off override windows that take precedence over the weekly schedule.

Properties

PropertyTypeDescription
idString?Unique identifier for the override list.
nameString?Display name of the override list.
descriptionString?Description of the override list.
timezoneString?IANA timezone the override windows are evaluated in.
createdAtDate?The date and time the list was created.
updatedAtDate?The date and time the list was last updated.
overridesList<BusinessHoursOverride>The override windows in this list.

Functions

toJson

Converts the overrides detail to a JSONObject.

fun toJson(): JSONObject

Returns: The JSONObject representing the overrides detail.

Companion Functions

fromJson

Converts a JSONObject to an OverridesDetail.

fun fromJson(jsonObject: JSONObject): OverridesDetail

Returns: The overrides detail converted from the JSONObject.

ParameterTypeDescription
jsonObjectJSONObjectThe JSONObject to convert.

2.2.5 BusinessHoursOverride

A single override window. The class is named BusinessHoursOverride, rather than Override, to avoid clashing with Kotlin's override soft keyword.

Properties

PropertyTypeDescription
nameString?Display name of the override.
startDateTimeString?Start of the override window in ISO 8601 date-time format.
endDateTimeString?End of the override window in ISO 8601 date-time format.

Functions

toJson

Converts the override to a JSONObject.

fun toJson(): JSONObject

Returns: The JSONObject representing the override.

Companion Functions

fromJson

Converts a JSONObject to a BusinessHoursOverride.

fun fromJson(jsonObject: JSONObject): BusinessHoursOverride

Returns: The override converted from the JSONObject.

ParameterTypeDescription
jsonObjectJSONObjectThe JSONObject to convert.

2.2.6 HolidaysDetail

Named collection of holidays.

Properties

PropertyTypeDescription
idString?Unique identifier for the holiday list.
nameString?Display name of the holiday list.
descriptionString?Description of the holiday list.
createdAtDate?The date and time the list was created.
updatedAtDate?The date and time the list was last updated.
holidaysList<Holiday>The holidays in this list.

Functions

toJson

Converts the holidays detail to a JSONObject.

fun toJson(): JSONObject

Returns: The JSONObject representing the holidays detail.

Companion Functions

fromJson

Converts a JSONObject to a HolidaysDetail.

fun fromJson(jsonObject: JSONObject): HolidaysDetail

Returns: The holidays detail converted from the JSONObject.

ParameterTypeDescription
jsonObjectJSONObjectThe JSONObject to convert.

2.2.7 Holiday

A single holiday entry.

Properties

PropertyTypeDescription
nameString?Display name of the holiday.
startDateString?Start date of the holiday in ISO 8601 date format.
endDateString?End date of the holiday in ISO 8601 date format.

Functions

toJson

Converts the holiday to a JSONObject.

fun toJson(): JSONObject

Returns: The JSONObject representing the holiday.

Companion Functions

fromJson

Converts a JSONObject to a Holiday.

fun fromJson(jsonObject: JSONObject): Holiday

Returns: The holiday converted from the JSONObject.

ParameterTypeDescription
jsonObjectJSONObjectThe JSONObject to convert.

2.2.8 BusinessAvailability

Top-level response model returned by InAppMessaging.fetchBusinessAvailability. Describes the slot the server resolved the current time to, plus details of the active slot.

Properties

PropertyTypeDescription
typeBusinessAvailabilityType?The slot kind the current time resolved to.
activeWorkingHourWorkingHour?Populated when type is WORKING_HOURS; the matching shift.
activeHolidayHoliday?Populated when type is HOLIDAY; the matching holiday entry.
activeOverrideBusinessHoursOverride?Populated when type is OVERRIDE; the matching override window.

Functions

toJson

Converts the business availability to a JSONObject.

fun toJson(): JSONObject

Returns: The JSONObject representing the business availability.

Companion Functions

fromJson

Converts a JSONObject to a BusinessAvailability.

fun fromJson(jsonObject: JSONObject): BusinessAvailability

Returns: The business availability converted from the JSONObject.

ParameterTypeDescription
jsonObjectJSONObjectThe JSONObject to convert.

2.2.9 BusinessAvailabilityType

Enum describing which slot the current time resolved to in a BusinessAvailability response.

Enum Values

ValueWire valueDescription
WORKING_HOURSworking_hoursThe current time falls within configured working hours.
HOLIDAYholidayThe current time falls on a configured holiday.
OVERRIDEoverrideThe current time falls within a configured override window.
NO_MATCHno_matchThe current time does not match any configured slot.
ERRORerrorAn error occurred while evaluating the business availability.

Properties

PropertyTypeDescription
valueStringThe wire-format string used by the server.

Companion Functions

fromValue

Returns the BusinessAvailabilityType matching the given wire value, or null if no match is found.

fun fromValue(value: String): BusinessAvailabilityType?

Returns: The matching BusinessAvailabilityType, or null.

ParameterTypeDescription
valueStringThe string value to match.