BokaMera.API.Host

<back to all web services

GetGoogleMeetStatus

Requires Authentication
Requires any of the roles:bookingsupplier-administrator-write, superadmin
The following routes are available for this service:
GET/google/meet/status/{ResourceId}Get Google Meet connection status for a resourceReturns whether the resource has a connected Google account for Google Meet and its details.
<?php namespace dtos;

use DateTime;
use Exception;
use DateInterval;
use JsonSerializable;
use ServiceStack\{IReturn,IReturnVoid,IGet,IPost,IPut,IDelete,IPatch,IMeta,IHasSessionId,IHasBearerToken,IHasVersion};
use ServiceStack\{ICrud,ICreateDb,IUpdateDb,IPatchDb,IDeleteDb,ISaveDb,AuditBase,QueryDb,QueryDb2,QueryData,QueryData2,QueryResponse};
use ServiceStack\{ResponseStatus,ResponseError,EmptyResponse,IdResponse,ArrayList,KeyValuePair2,StringResponse,StringsResponse,Tuple2,Tuple3,ByteArray};
use ServiceStack\{JsonConverters,Returns,TypeContext};


class GoogleMeetStatusResponse implements JsonSerializable
{
    public function __construct(
        /** @var bool|null */
        public ?bool $Connected=null,
        /** @var string */
        public string $GoogleAccountEmail='',
        /** @var string */
        public string $CalendarId='',
        /** @var DateTime|null */
        public ?DateTime $ConnectedSince=null,
        /** @var bool|null */
        public ?bool $NeedsReauth=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['Connected'])) $this->Connected = $o['Connected'];
        if (isset($o['GoogleAccountEmail'])) $this->GoogleAccountEmail = $o['GoogleAccountEmail'];
        if (isset($o['CalendarId'])) $this->CalendarId = $o['CalendarId'];
        if (isset($o['ConnectedSince'])) $this->ConnectedSince = JsonConverters::from('DateTime', $o['ConnectedSince']);
        if (isset($o['NeedsReauth'])) $this->NeedsReauth = $o['NeedsReauth'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->Connected)) $o['Connected'] = $this->Connected;
        if (isset($this->GoogleAccountEmail)) $o['GoogleAccountEmail'] = $this->GoogleAccountEmail;
        if (isset($this->CalendarId)) $o['CalendarId'] = $this->CalendarId;
        if (isset($this->ConnectedSince)) $o['ConnectedSince'] = JsonConverters::to('DateTime', $this->ConnectedSince);
        if (isset($this->NeedsReauth)) $o['NeedsReauth'] = $this->NeedsReauth;
        return empty($o) ? new class(){} : $o;
    }
}

// @ValidateRequest(Validator="IsAuthenticated")
class GetGoogleMeetStatus implements ICompany, JsonSerializable
{
    public function __construct(
        /** @description The company id, if empty will use the company id for the user you are logged in with. */
        // @ApiMember(Description="The company id, if empty will use the company id for the user you are logged in with.")
        /** @var string|null */
        public ?string $CompanyId=null,

        /** @description The resource id to check status for. Use 0 for company-wide default. */
        // @ApiMember(Description="The resource id to check status for. Use 0 for company-wide default.", IsRequired=true, ParameterType="path")
        /** @var int */
        public int $ResourceId=0
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['CompanyId'])) $this->CompanyId = $o['CompanyId'];
        if (isset($o['ResourceId'])) $this->ResourceId = $o['ResourceId'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->CompanyId)) $o['CompanyId'] = $this->CompanyId;
        if (isset($this->ResourceId)) $o['ResourceId'] = $this->ResourceId;
        return empty($o) ? new class(){} : $o;
    }
}

PHP GetGoogleMeetStatus DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv

HTTP + CSV

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

GET /google/meet/status/{ResourceId} HTTP/1.1 
Host: api.bookmore.com 
Accept: text/csv
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length

{"Connected":false,"GoogleAccountEmail":"String","CalendarId":"String","ConnectedSince":"0001-01-01T00:00:00","NeedsReauth":false}