Skip to main content
Skip table of contents

ReservationBlueprints

Allows you to generate the possible reservation collections based on a reservation blueprint

Methods

createReservationsFromBlueprint
Description

This method takes a blueprint name, a date range, and a prototype Reservation. It will return a list of Reservation Collections that matches the blueprint definition.

Signature
JAVA
global static B25.ReservationBlueprints.Result createReservationsFromBlueprint(B25.ReservationBlueprints.Context context)
Parameters
JAVA
B25.ReservationBlueprints.Context

An instance of B25.ReservationBlueprints.Context. This class wraps the input parameters, such as the blueprint name, a date range, and a prototype Reservation.

Return Type
JAVA
B25.ReservationBlueprints.Result

An instance of B25.ReservationBlueprints.Result. This contains a list of Reservation Collections that matches the blueprint definition.

Inner Classes

Context
Description

This class wraps the input parameters, such as the blueprint name, a date range, and a prototype Reservation.

Properties
JAVA
String blueprintName

Name of the blueprint to use.

JAVA
B25__Reservation__c prototype

Reservation with values to use for the ‘copy from parent reservation', ’Child of Parent Resource', and 'Available at Parent Resource' blueprint options.

JAVA
Date rangeStartDate

Start of the date range used with the 'Available at Parent Resource' blueprint option. It is used to determine the active MDA records to find the correct dimension records.

JAVA
Date rangeEndDate

End of the date range used with the 'Available at Parent Resource' blueprint option. It is used to determine the active MDA records to find the correct dimension records.

Result
Description

An instance of B25.ReservationBlueprints.Result. This contains a list of Reservation Collections that matches the blueprint definition.

Properties
JAVA
List<B25.ReservationCollection> collections

List of Reservation collections matching the blueprint provided. If no options for multiple values like: ’Child of Parent Resource', and 'Available at Parent Resource' are were on the blueprint this will have one collection. Otherwise all permutations will be present.

Example

This example shows how you can use the class in your own code.

JAVA
// Generate possibilities
B25.ReservationBlueprints.Context blueprintContext = new B25.ReservationBlueprints.Context();
blueprintContext.blueprintName = 'Treatment Appointment';
blueprintContext.prototype = new B25__Reservation__c(
    B25__Resource__c = 'RESOURCEID'
);
blueprintContext.rangeStartDate = Date.newInstance(2024, 01, 01);
blueprintContext.rangeEndDate = Date.newInstance(2024, 01, 07);

B25.ReservationBlueprints.Result result = B25.ReservationBlueprints.createReservationsFromBlueprint(blueprintContext);
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.