ReservationContactsRequest - gomeddo/js-sdk GitHub Wiki

Object that allows you to add different filters before sending a request to fetch reservations contacts to the GoMeddo Salesforce Rest API.

Example

const reservationContactsResult = gm.buildReservationContactsRequest()
   .withReservation("a0jWy0000003CxVIAU")
   .getResults()

withReservation

Syntax

withReservation(sfId)

Parameters:

  • sfId The Id of the reservation you want to filter the reservation contacts with.

Return value: The updated reservation contacts request.

Description

Only return reservations contacts with the specified reservation Id.


includeAdditionalField

Syntax

includeAdditionalField(fieldName)

Parameters:

  • fieldName The fieldName of a field in salesforce on reservation contact you want to be returned from the request.

Return value: The updated reservation contacts request.

Description

Add this field to the list of fields requested from the Salesforce endpoint.


includeAdditionalFields

Syntax

includeAdditionalFields(fieldNameList)

Parameters:

  • fieldNameList The fieldnames of fields in Salesforce on reservation contact you want to be returned from the request.

Return value: The updated reservation contacts request.

Description

Add these fields to the list of fields requested from the Salesforce endpoint.


getResults

Syntax

await getResults()

Return value: A ReservationContactsResult object with the reservation contacts matching the request.

Description

async Calls the GoMeddo APIs to construct the requested reservation contacts.