BusinessHoursDetail
Top-level response model returned by InAppMessaging.fetchBusinessHoursDetail. Bundles the weekly schedule together with the linked override list and holiday list.
Properties
| Property | Type | Description |
|---|---|---|
businessHours | BusinessHours? | The weekly working-hours schedule. |
overridesDetail | OverridesDetail? | The override list linked to this schedule, or null when none is configured. |
holidaysDetail | HolidaysDetail? | The holiday list linked to this schedule, or null when none is configured. |
Functions
toJson
toJsonConverts the business-hours detail to a JSONObject.
fun toJson(): JSONObject
Returns: The JSONObject representing the business-hours detail.
Companion Functions
fromJson
fromJsonConverts a JSONObject to a BusinessHoursDetail.
fun fromJson(jsonObject: JSONObject): BusinessHoursDetail
Returns: The business-hours detail converted from the JSONObject.
| Parameter | Type | Description |
|---|---|---|
jsonObject | JSONObject | The JSONObject to convert. |
2.2.2 BusinessHours
BusinessHoursThe recurring weekly schedule for a tenant.
Properties
| Property | Type | Description |
|---|---|---|
name | String? | Display name of the schedule. |
description | String? | Description of the schedule. |
aliasId | String? | Alias identifier of the schedule. |
timezone | String? | IANA timezone the schedule is evaluated against, for example Asia/Tokyo. |
overridesId | String? | Identifier of the linked override list, if any. |
holidaysId | String? | Identifier of the linked holiday list, if any. |
workingHours | List<WorkingHour> | The recurring shifts that make up the schedule. |
Functions
toJson
toJsonConverts the business hours to a JSONObject.
fun toJson(): JSONObject
Returns: The JSONObject representing the business hours.
Companion Functions
fromJson
fromJsonConverts a JSONObject to a BusinessHours.
fun fromJson(jsonObject: JSONObject): BusinessHours
Returns: The business hours converted from the JSONObject.
| Parameter | Type | Description |
|---|---|---|
jsonObject | JSONObject | The JSONObject to convert. |
2.2.3 WorkingHour
WorkingHourA single recurring shift inside a schedule, for example Mon-Fri 09:00-17:00.
Properties
| Property | Type | Description |
|---|---|---|
name | String? | Display name of the shift. |
days | List<String> | Days of the week the shift applies to, for example MONDAY, TUESDAY. |
startTime | String? | Shift start time in 24-hour HH:mm format. |
endTime | String? | Shift end time in 24-hour HH:mm format. |
Functions
toJson
toJsonConverts the working hour to a JSONObject.
fun toJson(): JSONObject
Returns: The JSONObject representing the working hour.
Companion Functions
fromJson
fromJsonConverts a JSONObject to a WorkingHour.
fun fromJson(jsonObject: JSONObject): WorkingHour
Returns: The working hour converted from the JSONObject.
| Parameter | Type | Description |
|---|---|---|
jsonObject | JSONObject | The JSONObject to convert. |
2.2.4 OverridesDetail
OverridesDetailNamed collection of one-off override windows that take precedence over the weekly schedule.
Properties
| Property | Type | Description |
|---|---|---|
id | String? | Unique identifier for the override list. |
name | String? | Display name of the override list. |
description | String? | Description of the override list. |
timezone | String? | IANA timezone the override windows are evaluated in. |
createdAt | Date? | The date and time the list was created. |
updatedAt | Date? | The date and time the list was last updated. |
overrides | List<BusinessHoursOverride> | The override windows in this list. |
Functions
toJson
toJsonConverts the overrides detail to a JSONObject.
fun toJson(): JSONObject
Returns: The JSONObject representing the overrides detail.
Companion Functions
fromJson
fromJsonConverts a JSONObject to an OverridesDetail.
fun fromJson(jsonObject: JSONObject): OverridesDetail
Returns: The overrides detail converted from the JSONObject.
| Parameter | Type | Description |
|---|---|---|
jsonObject | JSONObject | The JSONObject to convert. |
2.2.5 BusinessHoursOverride
BusinessHoursOverrideA single override window. The class is named BusinessHoursOverride, rather than Override, to avoid clashing with Kotlin's override soft keyword.
Properties
| Property | Type | Description |
|---|---|---|
name | String? | Display name of the override. |
startDateTime | String? | Start of the override window in ISO 8601 date-time format. |
endDateTime | String? | End of the override window in ISO 8601 date-time format. |
Functions
toJson
toJsonConverts the override to a JSONObject.
fun toJson(): JSONObject
Returns: The JSONObject representing the override.
Companion Functions
fromJson
fromJsonConverts a JSONObject to a BusinessHoursOverride.
fun fromJson(jsonObject: JSONObject): BusinessHoursOverride
Returns: The override converted from the JSONObject.
| Parameter | Type | Description |
|---|---|---|
jsonObject | JSONObject | The JSONObject to convert. |
2.2.6 HolidaysDetail
HolidaysDetailNamed collection of holidays.
Properties
| Property | Type | Description |
|---|---|---|
id | String? | Unique identifier for the holiday list. |
name | String? | Display name of the holiday list. |
description | String? | Description of the holiday list. |
createdAt | Date? | The date and time the list was created. |
updatedAt | Date? | The date and time the list was last updated. |
holidays | List<Holiday> | The holidays in this list. |
Functions
toJson
toJsonConverts the holidays detail to a JSONObject.
fun toJson(): JSONObject
Returns: The JSONObject representing the holidays detail.
Companion Functions
fromJson
fromJsonConverts a JSONObject to a HolidaysDetail.
fun fromJson(jsonObject: JSONObject): HolidaysDetail
Returns: The holidays detail converted from the JSONObject.
| Parameter | Type | Description |
|---|---|---|
jsonObject | JSONObject | The JSONObject to convert. |
2.2.7 Holiday
HolidayA single holiday entry.
Properties
| Property | Type | Description |
|---|---|---|
name | String? | Display name of the holiday. |
startDate | String? | Start date of the holiday in ISO 8601 date format. |
endDate | String? | End date of the holiday in ISO 8601 date format. |
Functions
toJson
toJsonConverts the holiday to a JSONObject.
fun toJson(): JSONObject
Returns: The JSONObject representing the holiday.
Companion Functions
fromJson
fromJsonConverts a JSONObject to a Holiday.
fun fromJson(jsonObject: JSONObject): Holiday
Returns: The holiday converted from the JSONObject.
| Parameter | Type | Description |
|---|---|---|
jsonObject | JSONObject | The JSONObject to convert. |
2.2.8 BusinessAvailability
BusinessAvailabilityTop-level response model returned by InAppMessaging.fetchBusinessAvailability. Describes the slot the server resolved the current time to, plus details of the active slot.
Properties
| Property | Type | Description |
|---|---|---|
type | BusinessAvailabilityType? | The slot kind the current time resolved to. |
activeWorkingHour | WorkingHour? | Populated when type is WORKING_HOURS; the matching shift. |
activeHoliday | Holiday? | Populated when type is HOLIDAY; the matching holiday entry. |
activeOverride | BusinessHoursOverride? | Populated when type is OVERRIDE; the matching override window. |
Functions
toJson
toJsonConverts the business availability to a JSONObject.
fun toJson(): JSONObject
Returns: The JSONObject representing the business availability.
Companion Functions
fromJson
fromJsonConverts a JSONObject to a BusinessAvailability.
fun fromJson(jsonObject: JSONObject): BusinessAvailability
Returns: The business availability converted from the JSONObject.
| Parameter | Type | Description |
|---|---|---|
jsonObject | JSONObject | The JSONObject to convert. |
2.2.9 BusinessAvailabilityType
BusinessAvailabilityTypeEnum describing which slot the current time resolved to in a BusinessAvailability response.
Enum Values
| Value | Wire value | Description |
|---|---|---|
WORKING_HOURS | working_hours | The current time falls within configured working hours. |
HOLIDAY | holiday | The current time falls on a configured holiday. |
OVERRIDE | override | The current time falls within a configured override window. |
NO_MATCH | no_match | The current time does not match any configured slot. |
ERROR | error | An error occurred while evaluating the business availability. |
Properties
| Property | Type | Description |
|---|---|---|
value | String | The wire-format string used by the server. |
Companion Functions
fromValue
fromValueReturns 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.
| Parameter | Type | Description |
|---|---|---|
value | String | The string value to match. |
Updated about 1 month ago
