diff --git a/build/CoreApi.php b/build/CoreApi.php index 68ee3d1..4a2e03b 100644 --- a/build/CoreApi.php +++ b/build/CoreApi.php @@ -5,12 +5,19 @@ namespace AirLST\SdkPhp; use AirLST\SdkPhp\Resources\BookableGroups; +use AirLST\SdkPhp\Resources\Checkins; use AirLST\SdkPhp\Resources\Company; use AirLST\SdkPhp\Resources\Contacts; use AirLST\SdkPhp\Resources\Documents; use AirLST\SdkPhp\Resources\Emails; use AirLST\SdkPhp\Resources\Events; +use AirLST\SdkPhp\Resources\ExtendedFields; +use AirLST\SdkPhp\Resources\GuestGroups; +use AirLST\SdkPhp\Resources\GuestImport; use AirLST\SdkPhp\Resources\Guests; +use AirLST\SdkPhp\Resources\Orders; +use AirLST\SdkPhp\Resources\SubEvents; +use AirLST\SdkPhp\Resources\Tracking; use Saloon\Http\Connector; use Saloon\Http\Request; use Saloon\PaginationPlugin\Contracts\HasPagination; @@ -46,6 +53,11 @@ public function bookableGroups(): BookableGroups return new BookableGroups($this); } + public function checkins(): Checkins + { + return new Checkins($this); + } + public function company(): Company { return new Company($this); @@ -71,11 +83,41 @@ public function events(): Events return new Events($this); } + public function extendedFields(): ExtendedFields + { + return new ExtendedFields($this); + } + + public function guestGroups(): GuestGroups + { + return new GuestGroups($this); + } + + public function guestImport(): GuestImport + { + return new GuestImport($this); + } + public function guests(): Guests { return new Guests($this); } + public function orders(): Orders + { + return new Orders($this); + } + + public function subEvents(): SubEvents + { + return new SubEvents($this); + } + + public function tracking(): Tracking + { + return new Tracking($this); + } + protected function defaultHeaders(): array { return ['X-Api-Key' => $this->apiKey]; diff --git a/build/Requests/BookableGroups/GetAvailabilities.php b/build/Requests/BookableGroups/GetAvailabilities.php index 2fc63ad..2ad1d5c 100644 --- a/build/Requests/BookableGroups/GetAvailabilities.php +++ b/build/Requests/BookableGroups/GetAvailabilities.php @@ -19,11 +19,12 @@ class GetAvailabilities extends Request implements HasBody protected Method $method = Method::POST; /** - * @param mixed $eventUuid Event UUID - * @param mixed $bookableGroupUuid BookableGroup UUID - * @param mixed $bookableUuid Bookable object UUID - * @param string $startDate Start date - * @param string $endDate End date + * @param mixed $eventUuid Event UUID + * @param mixed $bookableGroupUuid BookableGroup UUID + * @param mixed $bookableUuid Bookable object UUID + * @param string $startDate Start of the window to list availabilities for. An absolute instant: a value without a zone is read as UTC, not as event-local time. + * @param string $endDate End of the window to list availabilities for. An absolute instant: a value without a zone is read as UTC, not as event-local time. + * @param string|null $guestCode Optional guest code used to compute the guest-specific reservations and remaining capacity */ public function __construct( protected mixed $eventUuid, @@ -31,6 +32,7 @@ public function __construct( protected mixed $bookableUuid, protected string $startDate, protected string $endDate, + protected ?string $guestCode = null, ) {} public function resolveEndpoint(): string @@ -40,6 +42,6 @@ public function resolveEndpoint(): string public function defaultBody(): array { - return array_filter(['start_date' => $this->startDate, 'end_date' => $this->endDate]); + return array_filter(['start_date' => $this->startDate, 'end_date' => $this->endDate, 'guest_code' => $this->guestCode]); } } diff --git a/build/Requests/BookableGroups/ListBookableGroups.php b/build/Requests/BookableGroups/ListBookableGroups.php index 4e46837..cfbc9d3 100644 --- a/build/Requests/BookableGroups/ListBookableGroups.php +++ b/build/Requests/BookableGroups/ListBookableGroups.php @@ -6,23 +6,33 @@ use Saloon\Enums\Method; use Saloon\Http\Request; +use Saloon\PaginationPlugin\Contracts\Paginatable; /** * listBookableGroups. */ -class ListBookableGroups extends Request +class ListBookableGroups extends Request implements Paginatable { protected Method $method = Method::GET; /** - * @param mixed $eventUuid Event UUID + * @param mixed $eventUuid Event UUID + * @param int|null $perPage Number of items per page. Defaults to 100. + * @param int|null $page Page number */ public function __construct( protected mixed $eventUuid, + protected ?int $perPage = null, + protected ?int $page = null, ) {} public function resolveEndpoint(): string { return "/api/events/{$this->eventUuid}/bookables/groups"; } + + protected function defaultQuery(): array + { + return array_filter(['perPage' => $this->perPage, 'page' => $this->page]); + } } diff --git a/build/Requests/BookableGroups/ListBookablesForGroup.php b/build/Requests/BookableGroups/ListBookablesForGroup.php index 97292a8..4b25fd9 100644 --- a/build/Requests/BookableGroups/ListBookablesForGroup.php +++ b/build/Requests/BookableGroups/ListBookablesForGroup.php @@ -6,25 +6,35 @@ use Saloon\Enums\Method; use Saloon\Http\Request; +use Saloon\PaginationPlugin\Contracts\Paginatable; /** * listBookablesForGroup. */ -class ListBookablesForGroup extends Request +class ListBookablesForGroup extends Request implements Paginatable { protected Method $method = Method::GET; /** - * @param mixed $eventUuid Event UUID - * @param mixed $bookableGroupUuid BookableGroup UUID + * @param mixed $eventUuid Event UUID + * @param mixed $bookableGroupUuid BookableGroup UUID + * @param int|null $perPage Number of items per page. Defaults to 100. + * @param int|null $page Page number */ public function __construct( protected mixed $eventUuid, protected mixed $bookableGroupUuid, + protected ?int $perPage = null, + protected ?int $page = null, ) {} public function resolveEndpoint(): string { return "/api/events/{$this->eventUuid}/bookables/groups/{$this->bookableGroupUuid}"; } + + protected function defaultQuery(): array + { + return array_filter(['perPage' => $this->perPage, 'page' => $this->page]); + } } diff --git a/build/Requests/Checkins/GetCheckins.php b/build/Requests/Checkins/GetCheckins.php new file mode 100644 index 0000000..3d23488 --- /dev/null +++ b/build/Requests/Checkins/GetCheckins.php @@ -0,0 +1,65 @@ +eventUuid}/guests/checkins"; + } + + protected function defaultQuery(): array + { + return array_filter([ + 'per_page' => $this->perPage, + 'page' => $this->page, + 'search' => $this->search, + 'filters(timestamp*between)' => $this->filtersTimestampbetween, + 'filters(type*eq)' => $this->filtersTypeeq, + 'filters(location*like)' => $this->filtersLocationlike, + 'filters(timestamp*gte)' => $this->filtersTimestampgte, + 'filters(timestamp*lte)' => $this->filtersTimestamplte, + 'sorts(timestamp*0)' => $this->sortsTimestamp0, + ]); + } +} diff --git a/build/Requests/Company/GetCompanyEvents.php b/build/Requests/Company/GetCompanyEvents.php index 0fa4b29..eefe277 100644 --- a/build/Requests/Company/GetCompanyEvents.php +++ b/build/Requests/Company/GetCompanyEvents.php @@ -9,15 +9,73 @@ /** * getCompanyEvents. + * + * Returns the events of the authenticated company, including the event-level custom fields + * (`extended_fields`). An event that is currently being copied is omitted until the copy + * finishes. + * + * **Filtering.** Narrow the list with query parameters in the form + * `filters(field*operator)=value`. The parentheses and the `*` are literal (AWS CloudFront drops the + * standard `filters[...]` bracket syntax, so this API uses `(...)`). Omit `*operator` for an exact + * match. Target a field on the address relation with a `:` separator, for example + * `filters(address:city*eq)=Munich`. + * + * **Operators:** `eq` (equals, default), `neq` (not equals), + * `like` (case-insensitive partial match), `in` (any of), `gt`, `gte`, `lt`, `lte`, `between`, + * `empty`, `nempty`. Pass several values to `in` and the two bounds of `between` separated by `||`, + * for example `filters(starts_at*between)=2026-01-01||2026-12-31`. Date filters accept ISO 8601 + * strings or unix timestamps and are matched in UTC. + * + * **Filterable fields:** `id`, `name`, `category`, + * `timezone`, `centerstage_public_url`, `starts_at`, `ends_at`; the address fields `address:name` (the + * response `location_name`), `address:address_line_1`, `address:address_line_2`, `address:city`, + * `address:zip`, `address:country`; and any event-level custom field via + * `filters(extended_fields->'field_key'*operator)=value`. */ class GetCompanyEvents extends Request { protected Method $method = Method::GET; - public function __construct() {} + /** + * @param string|null $filtersNamelike Filter by event name. Operators: eq, neq, like, in. + * @param string|null $filtersCategoryeq Filter by event category. Operators: eq, neq, in. + * @param string|null $filtersStartsAtbetween Filter by start date. Operators: eq, gt, gte, lt, lte, between. Two ISO 8601 dates or unix timestamps separated by ||, matched in UTC. + * @param string|null $filtersEndsAtlte Filter by end date. Operators: eq, gt, gte, lt, lte, between. ISO 8601 date or unix timestamp, matched in UTC. + * @param string|null $filtersTimezoneeq Filter by IANA timezone. Operators: eq, neq, like, in. + * @param string|null $filtersAddressCitylike Filter by city of the event address. Operators: eq, neq, like, in. + * @param string|null $filtersAddressCountryeq Filter by ISO 3166-1 alpha-2 country code of the event address. Operators: eq, neq, in. + * @param string|null $filtersAddressNamelike Filter by location name (the response `location_name`, stored on the address relation). Operators: eq, neq, like. + * @param string|null $filtersExtendedFieldsFieldKeyeq Filter by an event-level custom field value. Replace field_key with the extended field key (see listExtendedFields). Operators: eq, neq, like, in, gt, gte, lt, lte, empty, nempty. + */ + public function __construct( + protected ?string $filtersNamelike = null, + protected ?string $filtersCategoryeq = null, + protected ?string $filtersStartsAtbetween = null, + protected ?string $filtersEndsAtlte = null, + protected ?string $filtersTimezoneeq = null, + protected ?string $filtersAddressCitylike = null, + protected ?string $filtersAddressCountryeq = null, + protected ?string $filtersAddressNamelike = null, + protected ?string $filtersExtendedFieldsFieldKeyeq = null, + ) {} public function resolveEndpoint(): string { return '/api/companies/events'; } + + protected function defaultQuery(): array + { + return array_filter([ + 'filters(name*like)' => $this->filtersNamelike, + 'filters(category*eq)' => $this->filtersCategoryeq, + 'filters(starts_at*between)' => $this->filtersStartsAtbetween, + 'filters(ends_at*lte)' => $this->filtersEndsAtlte, + 'filters(timezone*eq)' => $this->filtersTimezoneeq, + 'filters(address:city*like)' => $this->filtersAddressCitylike, + 'filters(address:country*eq)' => $this->filtersAddressCountryeq, + 'filters(address:name*like)' => $this->filtersAddressNamelike, + "filters(extended_fields->'field_key'*eq)" => $this->filtersExtendedFieldsFieldKeyeq, + ]); + } } diff --git a/build/Requests/Contacts/UpdateContact.php b/build/Requests/Contacts/UpdateContact.php new file mode 100644 index 0000000..8d1e6f0 --- /dev/null +++ b/build/Requests/Contacts/UpdateContact.php @@ -0,0 +1,35 @@ +contactCode}"; + } + + public function defaultBody(): array + { + return array_filter(['contact' => $this->contact]); + } +} diff --git a/build/Requests/Contacts/ValidateContactCode.php b/build/Requests/Contacts/ValidateContactCode.php index e2fb669..7ccb9d8 100644 --- a/build/Requests/Contacts/ValidateContactCode.php +++ b/build/Requests/Contacts/ValidateContactCode.php @@ -19,10 +19,10 @@ class ValidateContactCode extends Request implements HasBody protected Method $method = Method::POST; /** - * @param string|null $code The contact code + * @param string $code The contact code */ public function __construct( - protected ?string $code = null, + protected string $code, ) {} public function resolveEndpoint(): string diff --git a/build/Requests/Documents/DownloadGuestsDocuments.php b/build/Requests/Documents/DownloadGuestsDocuments.php new file mode 100644 index 0000000..804f495 --- /dev/null +++ b/build/Requests/Documents/DownloadGuestsDocuments.php @@ -0,0 +1,45 @@ +eventUuid}/documents/{$this->documentUuid}/download"; + } + + public function defaultBody(): array + { + return array_filter(['guests' => $this->guests]); + } +} diff --git a/build/Requests/Emails/SendEmailTemplate.php b/build/Requests/Emails/SendEmailTemplate.php new file mode 100644 index 0000000..8d25fb1 --- /dev/null +++ b/build/Requests/Emails/SendEmailTemplate.php @@ -0,0 +1,41 @@ +eventUuid}/emails/email-templates/{$this->emailTemplateUuid}/send"; + } + + public function defaultBody(): array + { + return array_filter(['guests' => $this->guests]); + } +} diff --git a/build/Requests/Events/GetSignedStorageUrl.php b/build/Requests/Events/GetSignedStorageUrl.php index ef4a1ba..ef4d2e0 100644 --- a/build/Requests/Events/GetSignedStorageUrl.php +++ b/build/Requests/Events/GetSignedStorageUrl.php @@ -12,7 +12,7 @@ */ class GetSignedStorageUrl extends Request { - protected Method $method = Method::GET; + protected Method $method = Method::PUT; /** * @param mixed $eventUuid Event UUID diff --git a/build/Requests/ExtendedFields/CreateExtendedField.php b/build/Requests/ExtendedFields/CreateExtendedField.php new file mode 100644 index 0000000..3dce33a --- /dev/null +++ b/build/Requests/ExtendedFields/CreateExtendedField.php @@ -0,0 +1,59 @@ +eventUuid}/extended-fields"; + } + + public function defaultBody(): array + { + return array_filter([ + 'model' => $this->model, + 'key' => $this->key, + 'label' => $this->label, + 'type' => $this->type, + 'default_value' => $this->defaultValue, + 'unique' => $this->unique, + 'options' => $this->options, + ]); + } +} diff --git a/build/Requests/ExtendedFields/CreateExtendedFieldOption.php b/build/Requests/ExtendedFields/CreateExtendedFieldOption.php new file mode 100644 index 0000000..24b58e4 --- /dev/null +++ b/build/Requests/ExtendedFields/CreateExtendedFieldOption.php @@ -0,0 +1,47 @@ +eventUuid}/extended-fields/{$this->fieldKey}/options"; + } + + public function defaultBody(): array + { + return array_filter(['key' => $this->key, 'label' => $this->label, 'order' => $this->order, 'limit' => $this->limit]); + } +} diff --git a/build/Requests/ExtendedFields/DeleteExtendedField.php b/build/Requests/ExtendedFields/DeleteExtendedField.php new file mode 100644 index 0000000..cba7fcd --- /dev/null +++ b/build/Requests/ExtendedFields/DeleteExtendedField.php @@ -0,0 +1,30 @@ +eventUuid}/extended-fields/{$this->fieldKey}"; + } +} diff --git a/build/Requests/ExtendedFields/DeleteExtendedFieldOption.php b/build/Requests/ExtendedFields/DeleteExtendedFieldOption.php new file mode 100644 index 0000000..8afe2eb --- /dev/null +++ b/build/Requests/ExtendedFields/DeleteExtendedFieldOption.php @@ -0,0 +1,32 @@ +eventUuid}/extended-fields/{$this->fieldKey}/options/{$this->optionKey}"; + } +} diff --git a/build/Requests/ExtendedFields/GetExtendedField.php b/build/Requests/ExtendedFields/GetExtendedField.php new file mode 100644 index 0000000..66e6927 --- /dev/null +++ b/build/Requests/ExtendedFields/GetExtendedField.php @@ -0,0 +1,30 @@ +eventUuid}/extended-fields/{$this->fieldKey}"; + } +} diff --git a/build/Requests/ExtendedFields/GetExtendedFieldUsage.php b/build/Requests/ExtendedFields/GetExtendedFieldUsage.php new file mode 100644 index 0000000..4a0b78d --- /dev/null +++ b/build/Requests/ExtendedFields/GetExtendedFieldUsage.php @@ -0,0 +1,30 @@ +eventUuid}/extended-fields/{$this->fieldKey}/usage"; + } +} diff --git a/build/Requests/ExtendedFields/ListExtendedFieldTypes.php b/build/Requests/ExtendedFields/ListExtendedFieldTypes.php new file mode 100644 index 0000000..ed37d45 --- /dev/null +++ b/build/Requests/ExtendedFields/ListExtendedFieldTypes.php @@ -0,0 +1,28 @@ +eventUuid}/extended-field-types"; + } +} diff --git a/build/Requests/ExtendedFields/ListExtendedFields.php b/build/Requests/ExtendedFields/ListExtendedFields.php new file mode 100644 index 0000000..feae4ff --- /dev/null +++ b/build/Requests/ExtendedFields/ListExtendedFields.php @@ -0,0 +1,28 @@ +eventUuid}/extended-fields"; + } +} diff --git a/build/Requests/ExtendedFields/UpdateExtendedField.php b/build/Requests/ExtendedFields/UpdateExtendedField.php new file mode 100644 index 0000000..a6428e1 --- /dev/null +++ b/build/Requests/ExtendedFields/UpdateExtendedField.php @@ -0,0 +1,45 @@ +eventUuid}/extended-fields/{$this->fieldKey}"; + } + + public function defaultBody(): array + { + return array_filter(['label' => $this->label, 'unique' => $this->unique, 'options' => $this->options]); + } +} diff --git a/build/Requests/ExtendedFields/UpdateExtendedFieldOption.php b/build/Requests/ExtendedFields/UpdateExtendedFieldOption.php new file mode 100644 index 0000000..2f82ca1 --- /dev/null +++ b/build/Requests/ExtendedFields/UpdateExtendedFieldOption.php @@ -0,0 +1,47 @@ +eventUuid}/extended-fields/{$this->fieldKey}/options/{$this->optionKey}"; + } + + public function defaultBody(): array + { + return array_filter(['label' => $this->label, 'order' => $this->order, 'limit' => $this->limit]); + } +} diff --git a/build/Requests/GuestGroups/CreateGuestGroupQuotaIncreaseRequest.php b/build/Requests/GuestGroups/CreateGuestGroupQuotaIncreaseRequest.php new file mode 100644 index 0000000..e78d5c8 --- /dev/null +++ b/build/Requests/GuestGroups/CreateGuestGroupQuotaIncreaseRequest.php @@ -0,0 +1,46 @@ +eventUuid}/guest-groups/quota-increase-requests"; + } + + public function defaultBody(): array + { + return array_filter(['guest_manager_id' => $this->guestManagerId, 'amount' => $this->amount]); + } +} diff --git a/build/Requests/GuestGroups/GetGuestGroups.php b/build/Requests/GuestGroups/GetGuestGroups.php new file mode 100644 index 0000000..7159194 --- /dev/null +++ b/build/Requests/GuestGroups/GetGuestGroups.php @@ -0,0 +1,32 @@ +eventUuid}/guest-groups"; + } +} diff --git a/build/Requests/GuestGroups/ListGuestGroupQuotaIncreaseRequests.php b/build/Requests/GuestGroups/ListGuestGroupQuotaIncreaseRequests.php new file mode 100644 index 0000000..7b66bd8 --- /dev/null +++ b/build/Requests/GuestGroups/ListGuestGroupQuotaIncreaseRequests.php @@ -0,0 +1,42 @@ +eventUuid}/guest-groups/quota-increase-requests"; + } + + protected function defaultQuery(): array + { + return array_filter(['guest_group_id' => $this->guestGroupId, 'guest_manager_id' => $this->guestManagerId, 'status' => $this->status]); + } +} diff --git a/build/Requests/GuestImport/GuessGuestImportFields.php b/build/Requests/GuestImport/GuessGuestImportFields.php new file mode 100644 index 0000000..3725f25 --- /dev/null +++ b/build/Requests/GuestImport/GuessGuestImportFields.php @@ -0,0 +1,48 @@ +eventUuid}/guests/import/guess-fields"; + } + + public function defaultBody(): array + { + return array_filter(['file' => $this->file, 'first_row_as_header' => $this->firstRowAsHeader, 'role' => $this->role]); + } +} diff --git a/build/Requests/GuestImport/ProcessGuestImport.php b/build/Requests/GuestImport/ProcessGuestImport.php new file mode 100644 index 0000000..d7ac56f --- /dev/null +++ b/build/Requests/GuestImport/ProcessGuestImport.php @@ -0,0 +1,71 @@ +eventUuid}/guests/import"; + } + + public function defaultBody(): array + { + return array_filter([ + 'file' => $this->file, + 'first_row_as_header' => $this->firstRowAsHeader, + 'mapped_fields' => $this->mappedFields, + 'action' => $this->action, + 'role' => $this->role, + 'defaults' => $this->defaults, + 'required_fields' => $this->requiredFields, + 'marketing_opt_in_setting' => $this->marketingOptInSetting, + ]); + } +} diff --git a/build/Requests/GuestImport/ShowGuestImport.php b/build/Requests/GuestImport/ShowGuestImport.php new file mode 100644 index 0000000..44871dc --- /dev/null +++ b/build/Requests/GuestImport/ShowGuestImport.php @@ -0,0 +1,34 @@ +eventUuid}/guests/import/{$this->guestsImportUuid}"; + } +} diff --git a/build/Requests/Guests/CreateCompanionGuest.php b/build/Requests/Guests/CreateCompanionGuest.php index 07f9e41..f09191c 100644 --- a/build/Requests/Guests/CreateCompanionGuest.php +++ b/build/Requests/Guests/CreateCompanionGuest.php @@ -25,6 +25,9 @@ class CreateCompanionGuest extends Request implements HasBody * @param array|null $extendedFields Extended fields values mapped with their keys * @param array|null $contact Contact details for guest * @param bool|null $sendAutomatedEmail Send automated email to the guest with the booking details + * @param bool|null $marketingOptIn Whether the companion guest opted in to marketing emails + * @param string|null $guestGroupId UUID of the guest group the companion guest should belong to + * @param array|null $guestManagers Array of guest manager UUIDs to assign to the companion guest */ public function __construct( protected mixed $eventUuid, @@ -33,6 +36,9 @@ public function __construct( protected ?array $extendedFields = null, protected ?array $contact = null, protected ?bool $sendAutomatedEmail = null, + protected ?bool $marketingOptIn = null, + protected ?string $guestGroupId = null, + protected ?array $guestManagers = null, ) {} public function resolveEndpoint(): string @@ -47,6 +53,9 @@ public function defaultBody(): array 'extended_fields' => $this->extendedFields, 'contact' => $this->contact, 'send_automated_email' => $this->sendAutomatedEmail, + 'marketing_opt_in' => $this->marketingOptIn, + 'guest_group_id' => $this->guestGroupId, + 'guest_managers' => $this->guestManagers, ]); } } diff --git a/build/Requests/Guests/CreateGuests.php b/build/Requests/Guests/CreateGuests.php index 36ae96a..3a1c9c1 100644 --- a/build/Requests/Guests/CreateGuests.php +++ b/build/Requests/Guests/CreateGuests.php @@ -25,6 +25,15 @@ class CreateGuests extends Request implements HasBody * @param bool|null $sendAutomatedEmail Send automated email to the guest with the booking details * @param array|null $booking Booking details for guest * @param array|null $contact Contact details for guest + * @param string|null $role Role of the created main guest. With guest_manager, companions are prohibited and send_automated_email must be omitted or false. + * @param string|null $code Optional custom guest code. Must be unique within the event. + * @param int|null $maxCompanions Maximum number of companions allowed for this guest + * @param int|null $maxRecommendations Maximum number of recommendations allowed for this guest + * @param bool|null $marketingOptIn Whether the guest opted in to marketing emails + * @param string|null $guestGroupId UUID of the guest group the guest should belong to + * @param string|null $contactId UUID of an existing contact of the event's company to link the guest to, instead of creating a new contact. Mutually exclusive with `contact` - sending both fails validation. To also correct the contact data, update the guest afterwards. The contact must not already have a guest in this event when the event has unique fields configured. + * @param string|null $contactCode Alternative to `contact_id` for callers that only hold the contact code, which is what the company API exposes as the public contact identifier (see getContactDetails). Resolved within the event's company. Mutually exclusive with both `contact` and `contact_id`. + * @param array|null $guestManagers Array of guest manager UUIDs to assign to the guest * @param array|null $companions Array of companions of the main guest */ public function __construct( @@ -34,6 +43,15 @@ public function __construct( protected ?bool $sendAutomatedEmail = null, protected ?array $booking = null, protected ?array $contact = null, + protected ?string $role = null, + protected ?string $code = null, + protected ?int $maxCompanions = null, + protected ?int $maxRecommendations = null, + protected ?bool $marketingOptIn = null, + protected ?string $guestGroupId = null, + protected ?string $contactId = null, + protected ?string $contactCode = null, + protected ?array $guestManagers = null, protected ?array $companions = null, ) {} @@ -50,6 +68,15 @@ public function defaultBody(): array 'send_automated_email' => $this->sendAutomatedEmail, 'booking' => $this->booking, 'contact' => $this->contact, + 'role' => $this->role, + 'code' => $this->code, + 'max_companions' => $this->maxCompanions, + 'max_recommendations' => $this->maxRecommendations, + 'marketing_opt_in' => $this->marketingOptIn, + 'guest_group_id' => $this->guestGroupId, + 'contact_id' => $this->contactId, + 'contact_code' => $this->contactCode, + 'guest_managers' => $this->guestManagers, 'companions' => $this->companions, ]); } diff --git a/build/Requests/Guests/CreateRecommendedGuest.php b/build/Requests/Guests/CreateRecommendedGuest.php index 1185f66..a381d1e 100644 --- a/build/Requests/Guests/CreateRecommendedGuest.php +++ b/build/Requests/Guests/CreateRecommendedGuest.php @@ -19,18 +19,36 @@ class CreateRecommendedGuest extends Request implements HasBody protected Method $method = Method::POST; /** - * @param mixed $eventUuid Event UUID - * @param mixed $mainGuestCode The code of the main guest - * @param string|null $status Recommended guest status - * @param array|null $extendedFields Extended fields values mapped with their keys - * @param array|null $contact Contact details for guest + * @param mixed $eventUuid Event UUID + * @param mixed $mainGuestCode The code of the main guest + * @param string|null $status Recommended guest status + * @param array|null $extendedFields Extended fields values mapped with their keys + * @param array|null $booking Booking details for guest + * @param array|null $contact Contact details for guest + * @param string|null $role Role of the created recommended guest + * @param string|null $code Optional custom guest code. Must be unique within the event. + * @param bool|null $sendAutomatedEmail Send automated email to the guest with the booking details + * @param int|null $maxCompanions Maximum number of companions allowed for this guest + * @param int|null $maxRecommendations Maximum number of recommendations allowed for this guest + * @param bool|null $marketingOptIn Whether the recommended guest opted in to marketing emails + * @param string|null $guestGroupId UUID of the guest group the recommended guest should belong to + * @param array|null $guestManagers Array of guest manager UUIDs to assign to the recommended guest */ public function __construct( protected mixed $eventUuid, protected mixed $mainGuestCode, protected ?string $status = null, protected ?array $extendedFields = null, + protected ?array $booking = null, protected ?array $contact = null, + protected ?string $role = null, + protected ?string $code = null, + protected ?bool $sendAutomatedEmail = null, + protected ?int $maxCompanions = null, + protected ?int $maxRecommendations = null, + protected ?bool $marketingOptIn = null, + protected ?string $guestGroupId = null, + protected ?array $guestManagers = null, ) {} public function resolveEndpoint(): string @@ -40,6 +58,19 @@ public function resolveEndpoint(): string public function defaultBody(): array { - return array_filter(['status' => $this->status, 'extended_fields' => $this->extendedFields, 'contact' => $this->contact]); + return array_filter([ + 'status' => $this->status, + 'extended_fields' => $this->extendedFields, + 'booking' => $this->booking, + 'contact' => $this->contact, + 'role' => $this->role, + 'code' => $this->code, + 'send_automated_email' => $this->sendAutomatedEmail, + 'max_companions' => $this->maxCompanions, + 'max_recommendations' => $this->maxRecommendations, + 'marketing_opt_in' => $this->marketingOptIn, + 'guest_group_id' => $this->guestGroupId, + 'guest_managers' => $this->guestManagers, + ]); } } diff --git a/build/Requests/Guests/CreateTemporaryUpload.php b/build/Requests/Guests/CreateTemporaryUpload.php index 1df927e..84b8854 100644 --- a/build/Requests/Guests/CreateTemporaryUpload.php +++ b/build/Requests/Guests/CreateTemporaryUpload.php @@ -19,18 +19,19 @@ class CreateTemporaryUpload extends Request implements HasBody protected Method $method = Method::POST; /** - * @param mixed $eventUuid Event UUID - * @param mixed $guestCode Guest code + * @param mixed $eventUuid Event UUID + * @param string|null $uuid Optional UUID for the media record. Must be unique within the media table. + * @param array|null $customProperties optional custom properties to store on the media record */ public function __construct( protected mixed $eventUuid, - protected mixed $guestCode, - protected string $uuid, - protected string $key, - protected string $bucket, - protected string $name, - protected int $size, - protected string $contentType, + protected ?string $uuid = null, + protected string $key = '', + protected string $bucket = '', + protected string $name = '', + protected int $size = 0, + protected string $contentType = '', + protected ?array $customProperties = null, ) {} public function resolveEndpoint(): string @@ -47,6 +48,7 @@ public function defaultBody(): array 'name' => $this->name, 'size' => $this->size, 'content_type' => $this->contentType, + 'custom_properties' => $this->customProperties, ]); } } diff --git a/build/Requests/Guests/GetGuest.php b/build/Requests/Guests/GetGuest.php index d11f205..bb093c5 100644 --- a/build/Requests/Guests/GetGuest.php +++ b/build/Requests/Guests/GetGuest.php @@ -9,22 +9,34 @@ /** * getGuest. + * + * Returns the guest resolved by code within the event. When the `sub-events` company module is active, + * the response also contains `sub_event_participations` — the guest's sub-event participations with + * their per-sub-event status (`invited`, `confirmed`, `declined`, `cancelled` or `waitlisted`). + * Without the module the key is absent. */ class GetGuest extends Request { protected Method $method = Method::GET; /** - * @param mixed $eventUuid Event UUID - * @param mixed $guestCode Guest code + * @param mixed $eventUuid Event UUID + * @param mixed $guestCode Guest code + * @param bool|null $includeSeats Include the guest's table-seating assignments (seats) in the response. Defaults to false. */ public function __construct( protected mixed $eventUuid, protected mixed $guestCode, + protected ?bool $includeSeats = null, ) {} public function resolveEndpoint(): string { return "/api/events/{$this->eventUuid}/guests/{$this->guestCode}"; } + + protected function defaultQuery(): array + { + return array_filter(['includeSeats' => $this->includeSeats]); + } } diff --git a/build/Requests/Guests/GetGuests.php b/build/Requests/Guests/GetGuests.php index 0dd2c52..c280187 100644 --- a/build/Requests/Guests/GetGuests.php +++ b/build/Requests/Guests/GetGuests.php @@ -17,12 +17,13 @@ class GetGuests extends Request implements Paginatable /** * @param mixed $eventUuid Event UUID - * @param int|null $perPage Number of items per page + * @param int|null $perPage Number of items per page. Defaults to 25. * @param int|null $page Page number * @param string|null $search Quick search * @param string|null $filtersStatuseq Filter field operator. Template: filters(field*operator)=value. One of: eq (equal), neq (not equal), like, gt (greater than), gte (greater than or equal), lt (less than), lte (less than or equal). If operator is not provided eq will be used as default. If you want to filter by nested fields, use the : separator to indicate nesting levels. For example: filters(contact:sex*eq)=male targets the sex field inside contact. filters(booking:extended_fields->team_name*eq)=Dev targets the team_name field inside the extended_fields object (represented with ->), which is inside booking. * @param string|null $sortsRole0 Sorts array. Template: sorts(field*order)=desc * @param int|null $since Timestamp to get guests updated/deleted since + * @param bool|null $includeSeats Include each guest's table-seating assignments (seats) in the response. Defaults to false. */ public function __construct( protected mixed $eventUuid, @@ -32,6 +33,7 @@ public function __construct( protected ?string $filtersStatuseq = null, protected ?string $sortsRole0 = null, protected ?int $since = null, + protected ?bool $includeSeats = null, ) {} public function resolveEndpoint(): string @@ -48,6 +50,7 @@ protected function defaultQuery(): array 'filters(status*eq)' => $this->filtersStatuseq, 'sorts(role*0)' => $this->sortsRole0, 'since' => $this->since, + 'includeSeats' => $this->includeSeats, ]); } } diff --git a/build/Requests/Guests/UpdateGuest.php b/build/Requests/Guests/UpdateGuest.php index 8ffb031..d5f8e69 100644 --- a/build/Requests/Guests/UpdateGuest.php +++ b/build/Requests/Guests/UpdateGuest.php @@ -22,6 +22,11 @@ class UpdateGuest extends Request * @param bool|null $sendAutomatedEmail Send automated email to the guest with the booking details * @param array|null $booking Booking details for guest * @param array|null $contact Contact details for guest + * @param int|null $maxCompanions Maximum number of companions allowed for this guest + * @param int|null $maxRecommendations Maximum number of recommendations allowed for this guest + * @param bool|null $marketingOptIn Whether the guest opted in to marketing emails + * @param string|null $guestGroupId UUID of the guest group the guest should belong to + * @param array|null $guestManagers Array of guest manager UUIDs to assign to the guest */ public function __construct( protected mixed $eventUuid, @@ -31,6 +36,11 @@ public function __construct( protected ?bool $sendAutomatedEmail = null, protected ?array $booking = null, protected ?array $contact = null, + protected ?int $maxCompanions = null, + protected ?int $maxRecommendations = null, + protected ?bool $marketingOptIn = null, + protected ?string $guestGroupId = null, + protected ?array $guestManagers = null, ) {} public function resolveEndpoint(): string @@ -46,6 +56,11 @@ public function defaultBody(): array 'send_automated_email' => $this->sendAutomatedEmail, 'booking' => $this->booking, 'contact' => $this->contact, + 'max_companions' => $this->maxCompanions, + 'max_recommendations' => $this->maxRecommendations, + 'marketing_opt_in' => $this->marketingOptIn, + 'guest_group_id' => $this->guestGroupId, + 'guest_managers' => $this->guestManagers, ]); } } diff --git a/build/Requests/Guests/UpdateGuests.php b/build/Requests/Guests/UpdateGuests.php new file mode 100644 index 0000000..c71d1dd --- /dev/null +++ b/build/Requests/Guests/UpdateGuests.php @@ -0,0 +1,73 @@ +eventUuid}/guests"; + } + + public function defaultBody(): array + { + return array_filter([ + 'booking' => $this->booking, + 'contact' => $this->contact, + 'guests' => $this->guests, + 'filters' => $this->filters, + 'status' => $this->status, + 'extended_fields' => $this->extendedFields, + 'send_automated_email' => $this->sendAutomatedEmail, + 'max_companions' => $this->maxCompanions, + 'max_recommendations' => $this->maxRecommendations, + 'marketing_opt_in' => $this->marketingOptIn, + 'guest_group_id' => $this->guestGroupId, + 'guest_managers' => $this->guestManagers, + ]); + } +} diff --git a/build/Requests/Guests/ValidateGuestCode.php b/build/Requests/Guests/ValidateGuestCode.php index 9bf67f9..a8e9f91 100644 --- a/build/Requests/Guests/ValidateGuestCode.php +++ b/build/Requests/Guests/ValidateGuestCode.php @@ -19,12 +19,12 @@ class ValidateGuestCode extends Request implements HasBody protected Method $method = Method::POST; /** - * @param mixed $eventUuid Event UUID - * @param string|null $code The guest code + * @param mixed $eventUuid Event UUID + * @param string $code The guest code */ public function __construct( protected mixed $eventUuid, - protected ?string $code = null, + protected string $code, ) {} public function resolveEndpoint(): string diff --git a/build/Requests/Orders/AddBookablesOrderLineItem.php b/build/Requests/Orders/AddBookablesOrderLineItem.php new file mode 100644 index 0000000..b0b7f76 --- /dev/null +++ b/build/Requests/Orders/AddBookablesOrderLineItem.php @@ -0,0 +1,73 @@ +eventUuid}/bookables/orders/{$this->orderUuid}/line-items"; + } + + public function defaultBody(): array + { + return array_filter(['guest_code' => $this->guestCode, 'line_items' => $this->lineItems]); + } +} diff --git a/build/Requests/Orders/BulkAssignBookables.php b/build/Requests/Orders/BulkAssignBookables.php new file mode 100644 index 0000000..b176df2 --- /dev/null +++ b/build/Requests/Orders/BulkAssignBookables.php @@ -0,0 +1,69 @@ +eventUuid}/bookables/assignments"; + } + + public function defaultBody(): array + { + return array_filter([ + 'guests' => $this->guests, + 'filters' => $this->filters, + 'bookable_group_id' => $this->bookableGroupId, + 'selected_bookable_objects' => $this->selectedBookableObjects, + 'selected_slots' => $this->selectedSlots, + 'start_date' => $this->startDate, + 'end_date' => $this->endDate, + ]); + } +} diff --git a/build/Requests/Orders/BulkDeleteBookablesOrderLineItems.php b/build/Requests/Orders/BulkDeleteBookablesOrderLineItems.php new file mode 100644 index 0000000..f296e3f --- /dev/null +++ b/build/Requests/Orders/BulkDeleteBookablesOrderLineItems.php @@ -0,0 +1,59 @@ +eventUuid}/bookables/orders/{$this->orderUuid}/line-items/bulk-delete"; + } + + public function defaultBody(): array + { + return array_filter(['line_item_ids' => $this->lineItemIds]); + } +} diff --git a/build/Requests/Orders/CreateBookablesOrder.php b/build/Requests/Orders/CreateBookablesOrder.php new file mode 100644 index 0000000..5b58784 --- /dev/null +++ b/build/Requests/Orders/CreateBookablesOrder.php @@ -0,0 +1,42 @@ +eventUuid}/bookables/orders"; + } + + public function defaultBody(): array + { + return array_filter(['booking_id' => $this->bookingId]); + } +} diff --git a/build/Requests/Orders/DeleteBookablesOrderLineItem.php b/build/Requests/Orders/DeleteBookablesOrderLineItem.php new file mode 100644 index 0000000..aff675a --- /dev/null +++ b/build/Requests/Orders/DeleteBookablesOrderLineItem.php @@ -0,0 +1,37 @@ +eventUuid}/bookables/orders/{$this->orderUuid}/line-items/{$this->orderLineItemUuid}"; + } +} diff --git a/build/Requests/Orders/ListBookablesOrders.php b/build/Requests/Orders/ListBookablesOrders.php new file mode 100644 index 0000000..b3231fe --- /dev/null +++ b/build/Requests/Orders/ListBookablesOrders.php @@ -0,0 +1,35 @@ +eventUuid}/bookables/orders"; + } + + protected function defaultQuery(): array + { + return array_filter(['booking_id' => $this->bookingId]); + } +} diff --git a/build/Requests/Orders/ShowBookablesOrder.php b/build/Requests/Orders/ShowBookablesOrder.php new file mode 100644 index 0000000..a499dc4 --- /dev/null +++ b/build/Requests/Orders/ShowBookablesOrder.php @@ -0,0 +1,30 @@ +eventUuid}/bookables/orders/{$this->orderUuid}"; + } +} diff --git a/build/Requests/SubEvents/AssignGuestToSubEvents.php b/build/Requests/SubEvents/AssignGuestToSubEvents.php new file mode 100644 index 0000000..9c8f84d --- /dev/null +++ b/build/Requests/SubEvents/AssignGuestToSubEvents.php @@ -0,0 +1,48 @@ +eventUuid}/guests/{$this->guestCode}/sub-events"; + } + + public function defaultBody(): array + { + return array_filter(['sub_event_ids' => $this->subEventIds]); + } +} diff --git a/build/Requests/SubEvents/GetSubEvents.php b/build/Requests/SubEvents/GetSubEvents.php new file mode 100644 index 0000000..e256e13 --- /dev/null +++ b/build/Requests/SubEvents/GetSubEvents.php @@ -0,0 +1,35 @@ +eventUuid}/sub-events"; + } +} diff --git a/build/Requests/Tracking/StoreAppTrackingHeartbeat.php b/build/Requests/Tracking/StoreAppTrackingHeartbeat.php new file mode 100644 index 0000000..f7f20c1 --- /dev/null +++ b/build/Requests/Tracking/StoreAppTrackingHeartbeat.php @@ -0,0 +1,66 @@ +eventUuid}/tracking/heartbeats"; + } + + public function defaultBody(): array + { + return array_filter([ + 'app_tracking_id' => $this->appTrackingId, + 'guest_code' => $this->guestCode, + 'session_id' => $this->sessionId, + 'path' => $this->path, + 'client_timestamp' => $this->clientTimestamp, + 'data' => $this->data, + ]); + } +} diff --git a/build/Resources/BookableGroups.php b/build/Resources/BookableGroups.php index a95077d..6c1c960 100644 --- a/build/Resources/BookableGroups.php +++ b/build/Resources/BookableGroups.php @@ -4,6 +4,7 @@ namespace AirLST\SdkPhp\Resources; +use AirLST\SdkPhp\Paginator; use AirLST\SdkPhp\Requests\BookableGroups\DeleteBookablesReservation; use AirLST\SdkPhp\Requests\BookableGroups\GetAvailabilities; use AirLST\SdkPhp\Requests\BookableGroups\ListBookableGroups; @@ -18,8 +19,9 @@ class BookableGroups extends Resource * @param mixed $eventUuid Event UUID * @param mixed $bookableGroupUuid BookableGroup UUID * @param mixed $bookableUuid Bookable object UUID - * @param string $startDate Start date - * @param string $endDate End date + * @param string $startDate Start of the window to list availabilities for. An absolute instant: a value without a zone is read as UTC, not as event-local time. + * @param string $endDate End of the window to list availabilities for. An absolute instant: a value without a zone is read as UTC, not as event-local time. + * @param string $guestCode Optional guest code used to compute the guest-specific reservations and remaining capacity */ public function getAvailabilities( mixed $eventUuid, @@ -27,8 +29,9 @@ public function getAvailabilities( mixed $bookableUuid, string $startDate, string $endDate, + ?string $guestCode = null, ): Response { - return $this->connector->send(new GetAvailabilities($eventUuid, $bookableGroupUuid, $bookableUuid, $startDate, $endDate)); + return $this->connector->send(new GetAvailabilities($eventUuid, $bookableGroupUuid, $bookableUuid, $startDate, $endDate, $guestCode)); } /** @@ -43,19 +46,27 @@ public function deleteBookablesReservation(mixed $eventUuid, mixed $guestCode, m /** * @param mixed $eventUuid Event UUID + * @param int $perPage Number of items per page. Defaults to 100. + * @param int $page Page number */ - public function listBookableGroups(mixed $eventUuid): Response + public function listBookableGroups(mixed $eventUuid, ?int $perPage = null, ?int $page = null): Paginator { - return $this->connector->send(new ListBookableGroups($eventUuid)); + return $this->connector->paginate(new ListBookableGroups($eventUuid, $perPage, $page)); } /** * @param mixed $eventUuid Event UUID * @param mixed $bookableGroupUuid BookableGroup UUID + * @param int $perPage Number of items per page. Defaults to 100. + * @param int $page Page number */ - public function listBookablesForGroup(mixed $eventUuid, mixed $bookableGroupUuid): Response - { - return $this->connector->send(new ListBookablesForGroup($eventUuid, $bookableGroupUuid)); + public function listBookablesForGroup( + mixed $eventUuid, + mixed $bookableGroupUuid, + ?int $perPage = null, + ?int $page = null, + ): Paginator { + return $this->connector->paginate(new ListBookablesForGroup($eventUuid, $bookableGroupUuid, $perPage, $page)); } /** diff --git a/build/Resources/Checkins.php b/build/Resources/Checkins.php new file mode 100644 index 0000000..2bd4262 --- /dev/null +++ b/build/Resources/Checkins.php @@ -0,0 +1,39 @@ +connector->paginate(new GetCheckins($eventUuid, $perPage, $page, $search, $filtersTimestampbetween, $filtersTypeeq, $filtersLocationlike, $filtersTimestampgte, $filtersTimestamplte, $sortsTimestamp0)); + } +} diff --git a/build/Resources/Company.php b/build/Resources/Company.php index 428801e..2c4cb22 100644 --- a/build/Resources/Company.php +++ b/build/Resources/Company.php @@ -10,8 +10,28 @@ class Company extends Resource { - public function getCompanyEvents(): Response - { - return $this->connector->send(new GetCompanyEvents()); + /** + * @param string $filtersNamelike Filter by event name. Operators: eq, neq, like, in. + * @param string $filtersCategoryeq Filter by event category. Operators: eq, neq, in. + * @param string $filtersStartsAtbetween Filter by start date. Operators: eq, gt, gte, lt, lte, between. Two ISO 8601 dates or unix timestamps separated by ||, matched in UTC. + * @param string $filtersEndsAtlte Filter by end date. Operators: eq, gt, gte, lt, lte, between. ISO 8601 date or unix timestamp, matched in UTC. + * @param string $filtersTimezoneeq Filter by IANA timezone. Operators: eq, neq, like, in. + * @param string $filtersAddressCitylike Filter by city of the event address. Operators: eq, neq, like, in. + * @param string $filtersAddressCountryeq Filter by ISO 3166-1 alpha-2 country code of the event address. Operators: eq, neq, in. + * @param string $filtersAddressNamelike Filter by location name (the response `location_name`, stored on the address relation). Operators: eq, neq, like. + * @param string $filtersExtendedFieldsFieldKeyeq Filter by an event-level custom field value. Replace field_key with the extended field key (see listExtendedFields). Operators: eq, neq, like, in, gt, gte, lt, lte, empty, nempty. + */ + public function getCompanyEvents( + ?string $filtersNamelike = null, + ?string $filtersCategoryeq = null, + ?string $filtersStartsAtbetween = null, + ?string $filtersEndsAtlte = null, + ?string $filtersTimezoneeq = null, + ?string $filtersAddressCitylike = null, + ?string $filtersAddressCountryeq = null, + ?string $filtersAddressNamelike = null, + ?string $filtersExtendedFieldsFieldKeyeq = null, + ): Response { + return $this->connector->send(new GetCompanyEvents($filtersNamelike, $filtersCategoryeq, $filtersStartsAtbetween, $filtersEndsAtlte, $filtersTimezoneeq, $filtersAddressCitylike, $filtersAddressCountryeq, $filtersAddressNamelike, $filtersExtendedFieldsFieldKeyeq)); } } diff --git a/build/Resources/Contacts.php b/build/Resources/Contacts.php index bf5f3d2..131da0f 100644 --- a/build/Resources/Contacts.php +++ b/build/Resources/Contacts.php @@ -6,6 +6,7 @@ use AirLST\SdkPhp\Requests\Contacts\GetContactDetails; use AirLST\SdkPhp\Requests\Contacts\GetContactEvents; +use AirLST\SdkPhp\Requests\Contacts\UpdateContact; use AirLST\SdkPhp\Requests\Contacts\ValidateContactCode; use AirLST\SdkPhp\Resource; use Saloon\Http\Response; @@ -28,10 +29,19 @@ public function getContactDetails(mixed $contactCode): Response return $this->connector->send(new GetContactDetails($contactCode)); } + /** + * @param mixed $contactCode Contact code + * @param array $contact Contact details for guest + */ + public function updateContact(mixed $contactCode, ?array $contact = null): Response + { + return $this->connector->send(new UpdateContact($contactCode, $contact)); + } + /** * @param string $code The contact code */ - public function validateContactCode(?string $code = null): Response + public function validateContactCode(string $code): Response { return $this->connector->send(new ValidateContactCode($code)); } diff --git a/build/Resources/Documents.php b/build/Resources/Documents.php index f0ae7f2..2ccbcc9 100644 --- a/build/Resources/Documents.php +++ b/build/Resources/Documents.php @@ -4,8 +4,8 @@ namespace AirLST\SdkPhp\Resources; +use AirLST\SdkPhp\Requests\Documents\DownloadGuestsDocuments; use AirLST\SdkPhp\Requests\Documents\GetEventDocuments; -use AirLST\SdkPhp\Requests\Documents\GetGuestsDocumentsUrls; use AirLST\SdkPhp\Resource; use Saloon\Http\Response; @@ -14,11 +14,11 @@ class Documents extends Resource /** * @param mixed $eventUuid Event UUID * @param mixed $documentUuid Document UUID - * @param array $guests Array of guest codes to which you want to download their documents + * @param array $guests Array of guest codes to generate the document for */ - public function getGuestsDocumentsUrls(mixed $eventUuid, mixed $documentUuid, ?array $guests = null): Response + public function downloadGuestsDocuments(mixed $eventUuid, mixed $documentUuid, array $guests): Response { - return $this->connector->send(new GetGuestsDocumentsUrls($eventUuid, $documentUuid, $guests)); + return $this->connector->send(new DownloadGuestsDocuments($eventUuid, $documentUuid, $guests)); } /** diff --git a/build/Resources/Emails.php b/build/Resources/Emails.php index 655fa6e..7f98806 100644 --- a/build/Resources/Emails.php +++ b/build/Resources/Emails.php @@ -5,6 +5,7 @@ namespace AirLST\SdkPhp\Resources; use AirLST\SdkPhp\Requests\Emails\GetEmailTemplates; +use AirLST\SdkPhp\Requests\Emails\SendEmailTemplate; use AirLST\SdkPhp\Resource; use Saloon\Http\Response; @@ -17,4 +18,14 @@ public function getEmailTemplates(mixed $eventUuid): Response { return $this->connector->send(new GetEmailTemplates($eventUuid)); } + + /** + * @param mixed $eventUuid Event UUID + * @param mixed $emailTemplateUuid Email Template UUID + * @param array $guests Array of guest codes to which the email will be sent + */ + public function sendEmailTemplate(mixed $eventUuid, mixed $emailTemplateUuid, array $guests): Response + { + return $this->connector->send(new SendEmailTemplate($eventUuid, $emailTemplateUuid, $guests)); + } } diff --git a/build/Resources/Events.php b/build/Resources/Events.php index 856a054..e1d5a76 100644 --- a/build/Resources/Events.php +++ b/build/Resources/Events.php @@ -6,22 +6,11 @@ use AirLST\SdkPhp\Requests\Events\GetEvent; use AirLST\SdkPhp\Requests\Events\GetSignedStorageUrl; -use AirLST\SdkPhp\Requests\Events\SendEmailTemplate; use AirLST\SdkPhp\Resource; use Saloon\Http\Response; class Events extends Resource { - /** - * @param mixed $eventUuid Event UUID - * @param mixed $emailTemplateUuid Email Template UUID - * @param array $guests Array of guest codes to which the email will be sent - */ - public function sendEmailTemplate(mixed $eventUuid, mixed $emailTemplateUuid, ?array $guests = null): Response - { - return $this->connector->send(new SendEmailTemplate($eventUuid, $emailTemplateUuid, $guests)); - } - /** * @param mixed $eventUuid Event UUID */ diff --git a/build/Resources/ExtendedFields.php b/build/Resources/ExtendedFields.php new file mode 100644 index 0000000..f92c288 --- /dev/null +++ b/build/Resources/ExtendedFields.php @@ -0,0 +1,152 @@ +connector->send(new GetExtendedField($eventUuid, $fieldKey)); + } + + /** + * @param mixed $eventUuid Event UUID + * @param mixed $fieldKey Extended field key + */ + public function deleteExtendedField(mixed $eventUuid, mixed $fieldKey): Response + { + return $this->connector->send(new DeleteExtendedField($eventUuid, $fieldKey)); + } + + /** + * @param mixed $eventUuid Event UUID + * @param mixed $fieldKey Extended field key + * @param array $label Translatable label object with locale codes as keys + * @param bool $unique Whether the field value must be unique + * @param array $options Options array for enum/multiselect_enum fields. Existing options must include their id. + */ + public function updateExtendedField( + mixed $eventUuid, + mixed $fieldKey, + ?array $label = null, + ?bool $unique = null, + ?array $options = null, + ): Response { + return $this->connector->send(new UpdateExtendedField($eventUuid, $fieldKey, $label, $unique, $options)); + } + + /** + * @param mixed $eventUuid Event UUID + * @param mixed $fieldKey Extended field key + * @param mixed $optionKey Extended field option key + */ + public function deleteExtendedFieldOption(mixed $eventUuid, mixed $fieldKey, mixed $optionKey): Response + { + return $this->connector->send(new DeleteExtendedFieldOption($eventUuid, $fieldKey, $optionKey)); + } + + /** + * @param mixed $eventUuid Event UUID + * @param mixed $fieldKey Extended field key + * @param mixed $optionKey Extended field option key + * @param array $label Translatable label object + * @param int $order Sort order + * @param int $limit Maximum number of guests that can select this option + */ + public function updateExtendedFieldOption( + mixed $eventUuid, + mixed $fieldKey, + mixed $optionKey, + ?array $label = null, + ?int $order = null, + ?int $limit = null, + ): Response { + return $this->connector->send(new UpdateExtendedFieldOption($eventUuid, $fieldKey, $optionKey, $label, $order, $limit)); + } + + /** + * @param mixed $eventUuid Event UUID + */ + public function listExtendedFieldTypes(mixed $eventUuid): Response + { + return $this->connector->send(new ListExtendedFieldTypes($eventUuid)); + } + + /** + * @param mixed $eventUuid Event UUID + */ + public function listExtendedFields(mixed $eventUuid): Response + { + return $this->connector->send(new ListExtendedFields($eventUuid)); + } + + /** + * @param mixed $eventUuid Event UUID + * @param string $model The model type this field belongs to. "guest", "booking" and "guestManager" are event-scoped; "contact" and "event" are company-scoped (stored on the event's company and shared across its events). + * @param string $key Unique field key (lowercase, underscores only). Must be unique per model within its scope (per event for guest/booking/guestManager, per company for contact/event) and must not collide with a reserved column name. + * @param array $label Translatable label object with locale codes as keys + * @param string $type Field type + * @param string $defaultValue Default value for the field + * @param bool $unique Whether the field value must be unique across guests + * @param array $options Options for enum/multiselect_enum fields (required for these types) + */ + public function createExtendedField( + mixed $eventUuid, + string $model, + string $key, + array $label, + string $type, + ?string $defaultValue = null, + ?bool $unique = null, + ?array $options = null, + ): Response { + return $this->connector->send(new CreateExtendedField($eventUuid, $model, $key, $label, $type, $defaultValue, $unique, $options)); + } + + /** + * @param mixed $eventUuid Event UUID + * @param mixed $fieldKey Extended field key + */ + public function getExtendedFieldUsage(mixed $eventUuid, mixed $fieldKey): Response + { + return $this->connector->send(new GetExtendedFieldUsage($eventUuid, $fieldKey)); + } + + /** + * @param mixed $eventUuid Event UUID + * @param mixed $fieldKey Extended field key + * @param string $key Unique option key (lowercase, underscores only) + * @param array $label Translatable label object + * @param int $order Sort order + * @param int $limit Maximum number of guests that can select this option + */ + public function createExtendedFieldOption( + mixed $eventUuid, + mixed $fieldKey, + string $key, + array $label, + ?int $order = null, + ?int $limit = null, + ): Response { + return $this->connector->send(new CreateExtendedFieldOption($eventUuid, $fieldKey, $key, $label, $order, $limit)); + } +} diff --git a/build/Resources/GuestGroups.php b/build/Resources/GuestGroups.php new file mode 100644 index 0000000..aa9c16a --- /dev/null +++ b/build/Resources/GuestGroups.php @@ -0,0 +1,47 @@ +connector->send(new GetGuestGroups($eventUuid)); + } + + /** + * @param mixed $eventUuid Event UUID + * @param string $guestGroupId Filter by guest group + * @param string $guestManagerId Filter by requesting guest manager + * @param string $status Filter by status + */ + public function listGuestGroupQuotaIncreaseRequests( + mixed $eventUuid, + ?string $guestGroupId = null, + ?string $guestManagerId = null, + ?string $status = null, + ): Response { + return $this->connector->send(new ListGuestGroupQuotaIncreaseRequests($eventUuid, $guestGroupId, $guestManagerId, $status)); + } + + /** + * @param mixed $eventUuid Event UUID + * @param string $guestManagerId Requesting guest manager (must be bound to a guest group of this event) + * @param int $amount Number of additional participants to request (delta added to the current limit) + */ + public function createGuestGroupQuotaIncreaseRequest(mixed $eventUuid, string $guestManagerId, int $amount): Response + { + return $this->connector->send(new CreateGuestGroupQuotaIncreaseRequest($eventUuid, $guestManagerId, $amount)); + } +} diff --git a/build/Resources/GuestImport.php b/build/Resources/GuestImport.php new file mode 100644 index 0000000..f4f82f8 --- /dev/null +++ b/build/Resources/GuestImport.php @@ -0,0 +1,63 @@ +connector->send(new GuessGuestImportFields($eventUuid, $file, $firstRowAsHeader, $role)); + } + + /** + * @param mixed $eventUuid Event UUID + * @param string $file Reference to the guest file to import (CSV or XLSX only). Provide either the S3 key returned by getSignedStorageUrl (recommended: PUT the file bytes to the returned signed URL, then pass the key here — the file stays private and is read server-side with credentials) or a publicly accessible URL that the server fetches. + * @param bool $firstRowAsHeader whether the first row of the file contains column headers + * @param array $mappedFields Ordered list of importable field keys, one per file column. Use null to skip a column. Keys come from the "available_fields" of the preview endpoint (e.g. "contact:first_name", "guest:status", "guest:guest_group_id", "guest:extended_fields:tshirt_size"). A "guest:guest_group_id" column may contain a guest group UUID or its name. + * @param string $action whether to create new guests or update existing ones + * @param string $role Which entity the rows represent. Defaults to "auto" (guests). + * @param array $defaults Default values applied to every imported row, keyed by importable field key. "guest:status" is required and must be a valid, importable status. "guest:guest_managers" (if provided) is an array of guest manager UUIDs belonging to the event. "guest:guest_group_id" (guest group UUID) assigns every imported guest to that group. Any other importable field key (e.g. "contact:city", "guest:extended_fields:tshirt_size") may also be supplied as an additional property to set a default for that field. + * @param array $requiredFields importable field keys that must be non-empty for every row + * @param string $marketingOptInSetting How to set the marketing opt-in for imported guests. "present" opts everyone in, "not_present" opts everyone out, "individual" reads it from the file. + */ + public function processGuestImport( + mixed $eventUuid, + string $file, + bool $firstRowAsHeader, + array $mappedFields, + string $action, + ?string $role = null, + ?array $defaults = null, + ?array $requiredFields = null, + string $marketingOptInSetting = '', + ): Response { + return $this->connector->send(new ProcessGuestImport($eventUuid, $file, $firstRowAsHeader, $mappedFields, $action, $role, $defaults, $requiredFields, $marketingOptInSetting)); + } + + /** + * @param mixed $eventUuid Event UUID + * @param mixed $guestsImportUuid Guests import UUID + */ + public function showGuestImport(mixed $eventUuid, mixed $guestsImportUuid): Response + { + return $this->connector->send(new ShowGuestImport($eventUuid, $guestsImportUuid)); + } +} diff --git a/build/Resources/Guests.php b/build/Resources/Guests.php index e86b86c..7f5a95d 100644 --- a/build/Resources/Guests.php +++ b/build/Resources/Guests.php @@ -19,6 +19,7 @@ use AirLST\SdkPhp\Requests\Guests\RestoreGuest; use AirLST\SdkPhp\Requests\Guests\UpdateGuest; use AirLST\SdkPhp\Requests\Guests\UpdateGuestEmailOptInStatus; +use AirLST\SdkPhp\Requests\Guests\UpdateGuests; use AirLST\SdkPhp\Requests\Guests\ValidateGuestCode; use AirLST\SdkPhp\Resource; use Saloon\Http\Response; @@ -54,12 +55,13 @@ public function checkinGuest( } /** - * @param mixed $eventUuid Event UUID - * @param mixed $guestCode Guest code + * @param mixed $eventUuid Event UUID + * @param mixed $guestCode Guest code + * @param bool $includeSeats Include the guest's table-seating assignments (seats) in the response. Defaults to false. */ - public function getGuest(mixed $eventUuid, mixed $guestCode): Response + public function getGuest(mixed $eventUuid, mixed $guestCode, ?bool $includeSeats = null): Response { - return $this->connector->send(new GetGuest($eventUuid, $guestCode)); + return $this->connector->send(new GetGuest($eventUuid, $guestCode, $includeSeats)); } /** @@ -70,6 +72,11 @@ public function getGuest(mixed $eventUuid, mixed $guestCode): Response * @param bool $sendAutomatedEmail Send automated email to the guest with the booking details * @param array $booking Booking details for guest * @param array $contact Contact details for guest + * @param int $maxCompanions Maximum number of companions allowed for this guest + * @param int $maxRecommendations Maximum number of recommendations allowed for this guest + * @param bool $marketingOptIn Whether the guest opted in to marketing emails + * @param string $guestGroupId UUID of the guest group the guest should belong to + * @param array $guestManagers Array of guest manager UUIDs to assign to the guest */ public function updateGuest( mixed $eventUuid, @@ -79,8 +86,13 @@ public function updateGuest( ?bool $sendAutomatedEmail = null, ?array $booking = null, ?array $contact = null, + ?int $maxCompanions = null, + ?int $maxRecommendations = null, + ?bool $marketingOptIn = null, + ?string $guestGroupId = null, + ?array $guestManagers = null, ): Response { - return $this->connector->send(new UpdateGuest($eventUuid, $guestCode, $status, $extendedFields, $sendAutomatedEmail, $booking, $contact)); + return $this->connector->send(new UpdateGuest($eventUuid, $guestCode, $status, $extendedFields, $sendAutomatedEmail, $booking, $contact, $maxCompanions, $maxRecommendations, $marketingOptIn, $guestGroupId, $guestManagers)); } /** @@ -113,12 +125,13 @@ public function getGuestAttachments(mixed $eventUuid, mixed $guestCode): Respons /** * @param mixed $eventUuid Event UUID - * @param int $perPage Number of items per page + * @param int $perPage Number of items per page. Defaults to 25. * @param int $page Page number * @param string $search Quick search * @param string $filtersStatuseq Filter field operator. Template: filters(field*operator)=value. One of: eq (equal), neq (not equal), like, gt (greater than), gte (greater than or equal), lt (less than), lte (less than or equal). If operator is not provided eq will be used as default. If you want to filter by nested fields, use the : separator to indicate nesting levels. For example: filters(contact:sex*eq)=male targets the sex field inside contact. filters(booking:extended_fields->team_name*eq)=Dev targets the team_name field inside the extended_fields object (represented with ->), which is inside booking. * @param string $sortsRole0 Sorts array. Template: sorts(field*order)=desc * @param int $since Timestamp to get guests updated/deleted since + * @param bool $includeSeats Include each guest's table-seating assignments (seats) in the response. Defaults to false. */ public function getGuests( mixed $eventUuid, @@ -128,8 +141,42 @@ public function getGuests( ?string $filtersStatuseq = null, ?string $sortsRole0 = null, ?int $since = null, + ?bool $includeSeats = null, ): Paginator { - return $this->connector->paginate(new GetGuests($eventUuid, $perPage, $page, $search, $filtersStatuseq, $sortsRole0, $since)); + return $this->connector->paginate(new GetGuests($eventUuid, $perPage, $page, $search, $filtersStatuseq, $sortsRole0, $since, $includeSeats)); + } + + /** + * @param mixed $eventUuid Event UUID + * @param array $booking Booking details for guest + * @param array $contact Contact details for guest + * @param mixed $guests Either the string "all" to target every guest in the event (optionally narrowed by "filters"), or an explicit list of guest codes. The same attribute changes are applied to every targeted guest. + * @param array $filters Optional. Only applied when "guests" is "all"; narrows which guests are targeted. + * @param string $status The guest status to set on all listed guests + * @param array $extendedFields Extended field values mapped with their keys + * @param bool $sendAutomatedEmail Send the status-triggered automated email to every updated guest (defaults to false) + * @param int $maxCompanions Maximum number of companions allowed for each guest + * @param int $maxRecommendations Maximum number of recommendations allowed for each guest + * @param bool $marketingOptIn Whether the guests opted in to marketing emails + * @param string $guestGroupId UUID of the guest group the guests should belong to + * @param array $guestManagers Array of guest manager UUIDs to assign to the guests + */ + public function updateGuests( + mixed $eventUuid, + ?array $booking = null, + ?array $contact = null, + mixed $guests = null, + ?array $filters = null, + ?string $status = null, + ?array $extendedFields = null, + ?bool $sendAutomatedEmail = null, + ?int $maxCompanions = null, + ?int $maxRecommendations = null, + ?bool $marketingOptIn = null, + ?string $guestGroupId = null, + ?array $guestManagers = null, + ): Response { + return $this->connector->send(new UpdateGuests($eventUuid, $booking, $contact, $guests, $filters, $status, $extendedFields, $sendAutomatedEmail, $maxCompanions, $maxRecommendations, $marketingOptIn, $guestGroupId, $guestManagers)); } /** @@ -139,6 +186,15 @@ public function getGuests( * @param bool $sendAutomatedEmail Send automated email to the guest with the booking details * @param array $booking Booking details for guest * @param array $contact Contact details for guest + * @param string $role Role of the created main guest. With guest_manager, companions are prohibited and send_automated_email must be omitted or false. + * @param string $code Optional custom guest code. Must be unique within the event. + * @param int $maxCompanions Maximum number of companions allowed for this guest + * @param int $maxRecommendations Maximum number of recommendations allowed for this guest + * @param bool $marketingOptIn Whether the guest opted in to marketing emails + * @param string $guestGroupId UUID of the guest group the guest should belong to + * @param string $contactId UUID of an existing contact of the event's company to link the guest to, instead of creating a new contact. Mutually exclusive with `contact` - sending both fails validation. To also correct the contact data, update the guest afterwards. The contact must not already have a guest in this event when the event has unique fields configured. + * @param string $contactCode Alternative to `contact_id` for callers that only hold the contact code, which is what the company API exposes as the public contact identifier (see getContactDetails). Resolved within the event's company. Mutually exclusive with both `contact` and `contact_id`. + * @param array $guestManagers Array of guest manager UUIDs to assign to the guest * @param array $companions Array of companions of the main guest */ public function createGuests( @@ -148,9 +204,18 @@ public function createGuests( ?bool $sendAutomatedEmail = null, ?array $booking = null, ?array $contact = null, + ?string $role = null, + ?string $code = null, + ?int $maxCompanions = null, + ?int $maxRecommendations = null, + ?bool $marketingOptIn = null, + ?string $guestGroupId = null, + ?string $contactId = null, + ?string $contactCode = null, + ?array $guestManagers = null, ?array $companions = null, ): Response { - return $this->connector->send(new CreateGuests($eventUuid, $status, $extendedFields, $sendAutomatedEmail, $booking, $contact, $companions)); + return $this->connector->send(new CreateGuests($eventUuid, $status, $extendedFields, $sendAutomatedEmail, $booking, $contact, $role, $code, $maxCompanions, $maxRecommendations, $marketingOptIn, $guestGroupId, $contactId, $contactCode, $guestManagers, $companions)); } /** @@ -169,6 +234,9 @@ public function restoreGuest(mixed $eventUuid, mixed $guestCode): Response * @param array $extendedFields Extended fields values mapped with their keys * @param array $contact Contact details for guest * @param bool $sendAutomatedEmail Send automated email to the guest with the booking details + * @param bool $marketingOptIn Whether the companion guest opted in to marketing emails + * @param string $guestGroupId UUID of the guest group the companion guest should belong to + * @param array $guestManagers Array of guest manager UUIDs to assign to the companion guest */ public function createCompanionGuest( mixed $eventUuid, @@ -177,25 +245,46 @@ public function createCompanionGuest( ?array $extendedFields = null, ?array $contact = null, ?bool $sendAutomatedEmail = null, + ?bool $marketingOptIn = null, + ?string $guestGroupId = null, + ?array $guestManagers = null, ): Response { - return $this->connector->send(new CreateCompanionGuest($eventUuid, $mainGuestCode, $status, $extendedFields, $contact, $sendAutomatedEmail)); + return $this->connector->send(new CreateCompanionGuest($eventUuid, $mainGuestCode, $status, $extendedFields, $contact, $sendAutomatedEmail, $marketingOptIn, $guestGroupId, $guestManagers)); } /** - * @param mixed $eventUuid Event UUID - * @param mixed $mainGuestCode The code of the main guest - * @param string $status Recommended guest status - * @param array $extendedFields Extended fields values mapped with their keys - * @param array $contact Contact details for guest + * @param mixed $eventUuid Event UUID + * @param mixed $mainGuestCode The code of the main guest + * @param string $status Recommended guest status + * @param array $extendedFields Extended fields values mapped with their keys + * @param array $booking Booking details for guest + * @param array $contact Contact details for guest + * @param string $role Role of the created recommended guest + * @param string $code Optional custom guest code. Must be unique within the event. + * @param bool $sendAutomatedEmail Send automated email to the guest with the booking details + * @param int $maxCompanions Maximum number of companions allowed for this guest + * @param int $maxRecommendations Maximum number of recommendations allowed for this guest + * @param bool $marketingOptIn Whether the recommended guest opted in to marketing emails + * @param string $guestGroupId UUID of the guest group the recommended guest should belong to + * @param array $guestManagers Array of guest manager UUIDs to assign to the recommended guest */ public function createRecommendedGuest( mixed $eventUuid, mixed $mainGuestCode, ?string $status = null, ?array $extendedFields = null, + ?array $booking = null, ?array $contact = null, + ?string $role = null, + ?string $code = null, + ?bool $sendAutomatedEmail = null, + ?int $maxCompanions = null, + ?int $maxRecommendations = null, + ?bool $marketingOptIn = null, + ?string $guestGroupId = null, + ?array $guestManagers = null, ): Response { - return $this->connector->send(new CreateRecommendedGuest($eventUuid, $mainGuestCode, $status, $extendedFields, $contact)); + return $this->connector->send(new CreateRecommendedGuest($eventUuid, $mainGuestCode, $status, $extendedFields, $booking, $contact, $role, $code, $sendAutomatedEmail, $maxCompanions, $maxRecommendations, $marketingOptIn, $guestGroupId, $guestManagers)); } /** @@ -212,25 +301,26 @@ public function updateGuestEmailOptInStatus(mixed $eventUuid, mixed $guestCode, * @param mixed $eventUuid Event UUID * @param string $code The guest code */ - public function validateGuestCode(mixed $eventUuid, ?string $code = null): Response + public function validateGuestCode(mixed $eventUuid, string $code): Response { return $this->connector->send(new ValidateGuestCode($eventUuid, $code)); } /** - * @param mixed $eventUuid Event UUID - * @param mixed $guestCode Guest code + * @param mixed $eventUuid Event UUID + * @param string $uuid Optional UUID for the media record. Must be unique within the media table. + * @param array $customProperties optional custom properties to store on the media record */ public function createTemporaryUpload( mixed $eventUuid, - mixed $guestCode, - string $uuid, - string $key, - string $bucket, - string $name, - int $size, - string $contentType, + ?string $uuid = null, + string $key = '', + string $bucket = '', + string $name = '', + int $size = 0, + string $contentType = '', + ?array $customProperties = null, ): Response { - return $this->connector->send(new CreateTemporaryUpload($eventUuid, $guestCode, $uuid, $key, $bucket, $name, $size, $contentType)); + return $this->connector->send(new CreateTemporaryUpload($eventUuid, $uuid, $key, $bucket, $name, $size, $contentType, $customProperties)); } } diff --git a/build/Resources/Orders.php b/build/Resources/Orders.php new file mode 100644 index 0000000..18feed1 --- /dev/null +++ b/build/Resources/Orders.php @@ -0,0 +1,103 @@ +connector->send(new AddBookablesOrderLineItem($eventUuid, $orderUuid, $guestCode, $lineItems)); + } + + /** + * @param mixed $eventUuid Event UUID + * @param mixed $guests either the string "all" to target every guest in the event (optionally narrowed by "filters"), or an explicit list of guest codes + * @param array $filters Optional. Only applied when "guests" is "all"; narrows which guests are targeted. + * @param string $bookableGroupId UUID of the bookable group (add-on category) the selected add-ons belong to + * @param array $selectedBookableObjects UUIDs of the universal bookables (add-ons) to assign. Must include every flexible add-on referenced by "selected_slots". + * @param array $selectedSlots slot selections for FLEXIBLE add-ons; one reservation is created per slot + * @param string $startDate Check-in date. Required when a NIGHTS add-on is selected. + * @param string $endDate Check-out date (excluded; must be after start_date). Required when a NIGHTS add-on is selected. + */ + public function bulkAssignBookables( + mixed $eventUuid, + mixed $guests, + ?array $filters = null, + string $bookableGroupId = '', + array $selectedBookableObjects = [], + ?array $selectedSlots = null, + ?string $startDate = null, + ?string $endDate = null, + ): Response { + return $this->connector->send(new BulkAssignBookables($eventUuid, $guests, $filters, $bookableGroupId, $selectedBookableObjects, $selectedSlots, $startDate, $endDate)); + } + + /** + * @param mixed $eventUuid Event UUID + * @param mixed $orderUuid UUID of an order that belongs to the event + * @param array $lineItemIds The line items to delete, 1–100 unique ids. Every id must belong to this order. + */ + public function bulkDeleteBookablesOrderLineItems(mixed $eventUuid, mixed $orderUuid, array $lineItemIds): Response + { + return $this->connector->send(new BulkDeleteBookablesOrderLineItems($eventUuid, $orderUuid, $lineItemIds)); + } + + /** + * @param mixed $eventUuid Event UUID + * @param mixed $bookingId UUID of a booking that belongs to the event + */ + public function listBookablesOrders(mixed $eventUuid, mixed $bookingId): Response + { + return $this->connector->send(new ListBookablesOrders($eventUuid, $bookingId)); + } + + /** + * @param mixed $eventUuid Event UUID + * @param string $bookingId UUID of a booking that belongs to the event + */ + public function createBookablesOrder(mixed $eventUuid, string $bookingId): Response + { + return $this->connector->send(new CreateBookablesOrder($eventUuid, $bookingId)); + } + + /** + * @param mixed $eventUuid Event UUID + * @param mixed $orderUuid UUID of an order that belongs to the event + * @param mixed $orderLineItemUuid UUID of a line item that belongs to the order + */ + public function deleteBookablesOrderLineItem(mixed $eventUuid, mixed $orderUuid, mixed $orderLineItemUuid): Response + { + return $this->connector->send(new DeleteBookablesOrderLineItem($eventUuid, $orderUuid, $orderLineItemUuid)); + } + + /** + * @param mixed $eventUuid Event UUID + * @param mixed $orderUuid UUID of an order that belongs to the event + */ + public function showBookablesOrder(mixed $eventUuid, mixed $orderUuid): Response + { + return $this->connector->send(new ShowBookablesOrder($eventUuid, $orderUuid)); + } +} diff --git a/build/Resources/SubEvents.php b/build/Resources/SubEvents.php new file mode 100644 index 0000000..138a193 --- /dev/null +++ b/build/Resources/SubEvents.php @@ -0,0 +1,31 @@ +connector->send(new AssignGuestToSubEvents($eventUuid, $guestCode, $subEventIds)); + } + + /** + * @param mixed $eventUuid Event UUID + */ + public function getSubEvents(mixed $eventUuid): Response + { + return $this->connector->send(new GetSubEvents($eventUuid)); + } +} diff --git a/build/Resources/Tracking.php b/build/Resources/Tracking.php new file mode 100644 index 0000000..e6e8c14 --- /dev/null +++ b/build/Resources/Tracking.php @@ -0,0 +1,33 @@ +connector->send(new StoreAppTrackingHeartbeat($eventUuid, $appTrackingId, $guestCode, $sessionId, $path, $clientTimestamp, $data)); + } +} diff --git a/src/Generators/ConnectorGenerator.php b/src/Generators/ConnectorGenerator.php index 2eb5591..6a2b378 100644 --- a/src/Generators/ConnectorGenerator.php +++ b/src/Generators/ConnectorGenerator.php @@ -62,7 +62,7 @@ protected function generateConnectorClass(ApiSpecification $specification): ?Php $classType->addProperty('baseUrl') ->setType('string') ->setProtected() - ->setValue($specification->baseUrl); + ->setValue($specification->baseUrl->url); $classType->addMethod('resolveBaseUrl') ->setReturnType('string')