BokaMera.API.Host

<back to all web services

GDPRCustomerQuery

Requires Authentication
Requires any of the roles:bookingsupplier-administrator-write, superadmin, bookingsupplier-administrator-read
The following routes are available for this service:
GET/gdpr/customers/{CustomerId}Get all customer information stored on the customerGet all information stored on the customer
<?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 GDPRCustomerBookingsResponse implements JsonSerializable
{
    public function __construct(
        /** @var string */
        public string $CompanyId='',
        /** @var int */
        public int $Id=0,
        /** @var string */
        public string $CustomerId='',
        /** @var int */
        public int $ServiceId=0,
        /** @var int */
        public int $StatusId=0,
        /** @var DateTime */
        public DateTime $From=new DateTime(),
        /** @var DateTime */
        public DateTime $To=new DateTime(),
        /** @var DateTime|null */
        public ?DateTime $UnbookedOn=null,
        /** @var string|null */
        public ?string $UnbookedComments=null,
        /** @var string|null */
        public ?string $BookedComments=null,
        /** @var string|null */
        public ?string $BookedBy=null,
        /** @var string|null */
        public ?string $Comments=null,
        /** @var string|null */
        public ?string $TextField1=null,
        /** @var string|null */
        public ?string $TextField2=null,
        /** @var string|null */
        public ?string $TextField3=null,
        /** @var string|null */
        public ?string $TextField4=null,
        /** @var string|null */
        public ?string $TextField5=null,
        /** @var string|null */
        public ?string $TextField6=null,
        /** @var string|null */
        public ?string $TextField7=null,
        /** @var string|null */
        public ?string $TextField8=null,
        /** @var string|null */
        public ?string $TextField9=null,
        /** @var string|null */
        public ?string $TextField10=null,
        /** @var string|null */
        public ?string $TextField11=null,
        /** @var string|null */
        public ?string $TextField12=null,
        /** @var string|null */
        public ?string $TextField13=null,
        /** @var string|null */
        public ?string $TextField14=null,
        /** @var string|null */
        public ?string $TextField15=null,
        /** @var string|null */
        public ?string $TextField16=null,
        /** @var string|null */
        public ?string $TextField17=null,
        /** @var string|null */
        public ?string $TextField18=null,
        /** @var string|null */
        public ?string $TextField19=null,
        /** @var string|null */
        public ?string $TextField20=null,
        /** @var DateTime */
        public DateTime $UpdatedDate=new DateTime(),
        /** @var DateTime */
        public DateTime $CreatedDate=new DateTime(),
        /** @var string|null */
        public ?string $CommentsToCustomer=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['CompanyId'])) $this->CompanyId = $o['CompanyId'];
        if (isset($o['Id'])) $this->Id = $o['Id'];
        if (isset($o['CustomerId'])) $this->CustomerId = $o['CustomerId'];
        if (isset($o['ServiceId'])) $this->ServiceId = $o['ServiceId'];
        if (isset($o['StatusId'])) $this->StatusId = $o['StatusId'];
        if (isset($o['From'])) $this->From = JsonConverters::from('DateTime', $o['From']);
        if (isset($o['To'])) $this->To = JsonConverters::from('DateTime', $o['To']);
        if (isset($o['UnbookedOn'])) $this->UnbookedOn = JsonConverters::from('DateTime', $o['UnbookedOn']);
        if (isset($o['UnbookedComments'])) $this->UnbookedComments = $o['UnbookedComments'];
        if (isset($o['BookedComments'])) $this->BookedComments = $o['BookedComments'];
        if (isset($o['BookedBy'])) $this->BookedBy = $o['BookedBy'];
        if (isset($o['Comments'])) $this->Comments = $o['Comments'];
        if (isset($o['TextField1'])) $this->TextField1 = $o['TextField1'];
        if (isset($o['TextField2'])) $this->TextField2 = $o['TextField2'];
        if (isset($o['TextField3'])) $this->TextField3 = $o['TextField3'];
        if (isset($o['TextField4'])) $this->TextField4 = $o['TextField4'];
        if (isset($o['TextField5'])) $this->TextField5 = $o['TextField5'];
        if (isset($o['TextField6'])) $this->TextField6 = $o['TextField6'];
        if (isset($o['TextField7'])) $this->TextField7 = $o['TextField7'];
        if (isset($o['TextField8'])) $this->TextField8 = $o['TextField8'];
        if (isset($o['TextField9'])) $this->TextField9 = $o['TextField9'];
        if (isset($o['TextField10'])) $this->TextField10 = $o['TextField10'];
        if (isset($o['TextField11'])) $this->TextField11 = $o['TextField11'];
        if (isset($o['TextField12'])) $this->TextField12 = $o['TextField12'];
        if (isset($o['TextField13'])) $this->TextField13 = $o['TextField13'];
        if (isset($o['TextField14'])) $this->TextField14 = $o['TextField14'];
        if (isset($o['TextField15'])) $this->TextField15 = $o['TextField15'];
        if (isset($o['TextField16'])) $this->TextField16 = $o['TextField16'];
        if (isset($o['TextField17'])) $this->TextField17 = $o['TextField17'];
        if (isset($o['TextField18'])) $this->TextField18 = $o['TextField18'];
        if (isset($o['TextField19'])) $this->TextField19 = $o['TextField19'];
        if (isset($o['TextField20'])) $this->TextField20 = $o['TextField20'];
        if (isset($o['UpdatedDate'])) $this->UpdatedDate = JsonConverters::from('DateTime', $o['UpdatedDate']);
        if (isset($o['CreatedDate'])) $this->CreatedDate = JsonConverters::from('DateTime', $o['CreatedDate']);
        if (isset($o['CommentsToCustomer'])) $this->CommentsToCustomer = $o['CommentsToCustomer'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->CompanyId)) $o['CompanyId'] = $this->CompanyId;
        if (isset($this->Id)) $o['Id'] = $this->Id;
        if (isset($this->CustomerId)) $o['CustomerId'] = $this->CustomerId;
        if (isset($this->ServiceId)) $o['ServiceId'] = $this->ServiceId;
        if (isset($this->StatusId)) $o['StatusId'] = $this->StatusId;
        if (isset($this->From)) $o['From'] = JsonConverters::to('DateTime', $this->From);
        if (isset($this->To)) $o['To'] = JsonConverters::to('DateTime', $this->To);
        if (isset($this->UnbookedOn)) $o['UnbookedOn'] = JsonConverters::to('DateTime', $this->UnbookedOn);
        if (isset($this->UnbookedComments)) $o['UnbookedComments'] = $this->UnbookedComments;
        if (isset($this->BookedComments)) $o['BookedComments'] = $this->BookedComments;
        if (isset($this->BookedBy)) $o['BookedBy'] = $this->BookedBy;
        if (isset($this->Comments)) $o['Comments'] = $this->Comments;
        if (isset($this->TextField1)) $o['TextField1'] = $this->TextField1;
        if (isset($this->TextField2)) $o['TextField2'] = $this->TextField2;
        if (isset($this->TextField3)) $o['TextField3'] = $this->TextField3;
        if (isset($this->TextField4)) $o['TextField4'] = $this->TextField4;
        if (isset($this->TextField5)) $o['TextField5'] = $this->TextField5;
        if (isset($this->TextField6)) $o['TextField6'] = $this->TextField6;
        if (isset($this->TextField7)) $o['TextField7'] = $this->TextField7;
        if (isset($this->TextField8)) $o['TextField8'] = $this->TextField8;
        if (isset($this->TextField9)) $o['TextField9'] = $this->TextField9;
        if (isset($this->TextField10)) $o['TextField10'] = $this->TextField10;
        if (isset($this->TextField11)) $o['TextField11'] = $this->TextField11;
        if (isset($this->TextField12)) $o['TextField12'] = $this->TextField12;
        if (isset($this->TextField13)) $o['TextField13'] = $this->TextField13;
        if (isset($this->TextField14)) $o['TextField14'] = $this->TextField14;
        if (isset($this->TextField15)) $o['TextField15'] = $this->TextField15;
        if (isset($this->TextField16)) $o['TextField16'] = $this->TextField16;
        if (isset($this->TextField17)) $o['TextField17'] = $this->TextField17;
        if (isset($this->TextField18)) $o['TextField18'] = $this->TextField18;
        if (isset($this->TextField19)) $o['TextField19'] = $this->TextField19;
        if (isset($this->TextField20)) $o['TextField20'] = $this->TextField20;
        if (isset($this->UpdatedDate)) $o['UpdatedDate'] = JsonConverters::to('DateTime', $this->UpdatedDate);
        if (isset($this->CreatedDate)) $o['CreatedDate'] = JsonConverters::to('DateTime', $this->CreatedDate);
        if (isset($this->CommentsToCustomer)) $o['CommentsToCustomer'] = $this->CommentsToCustomer;
        return empty($o) ? new class(){} : $o;
    }
}

class GDPRCustomerMessageLogResponse implements JsonSerializable
{
    public function __construct(
        /** @var string */
        public string $CompanyId='',
        /** @var int */
        public int $Id=0,
        /** @var int|null */
        public ?int $BookingId=null,
        /** @var string|null */
        public ?string $Receiver=null,
        /** @var string|null */
        public ?string $Sender=null,
        /** @var string|null */
        public ?string $MessageTitle=null,
        /** @var string|null */
        public ?string $MessageBody=null,
        /** @var string|null */
        public ?string $CreatedBy=null,
        /** @var DateTime */
        public DateTime $Created=new DateTime(),
        /** @var bool|null */
        public ?bool $Sent=null,
        /** @var DateTime|null */
        public ?DateTime $SentDate=null,
        /** @var int */
        public int $SendMethodId=0
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['CompanyId'])) $this->CompanyId = $o['CompanyId'];
        if (isset($o['Id'])) $this->Id = $o['Id'];
        if (isset($o['BookingId'])) $this->BookingId = $o['BookingId'];
        if (isset($o['Receiver'])) $this->Receiver = $o['Receiver'];
        if (isset($o['Sender'])) $this->Sender = $o['Sender'];
        if (isset($o['MessageTitle'])) $this->MessageTitle = $o['MessageTitle'];
        if (isset($o['MessageBody'])) $this->MessageBody = $o['MessageBody'];
        if (isset($o['CreatedBy'])) $this->CreatedBy = $o['CreatedBy'];
        if (isset($o['Created'])) $this->Created = JsonConverters::from('DateTime', $o['Created']);
        if (isset($o['Sent'])) $this->Sent = $o['Sent'];
        if (isset($o['SentDate'])) $this->SentDate = JsonConverters::from('DateTime', $o['SentDate']);
        if (isset($o['SendMethodId'])) $this->SendMethodId = $o['SendMethodId'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->CompanyId)) $o['CompanyId'] = $this->CompanyId;
        if (isset($this->Id)) $o['Id'] = $this->Id;
        if (isset($this->BookingId)) $o['BookingId'] = $this->BookingId;
        if (isset($this->Receiver)) $o['Receiver'] = $this->Receiver;
        if (isset($this->Sender)) $o['Sender'] = $this->Sender;
        if (isset($this->MessageTitle)) $o['MessageTitle'] = $this->MessageTitle;
        if (isset($this->MessageBody)) $o['MessageBody'] = $this->MessageBody;
        if (isset($this->CreatedBy)) $o['CreatedBy'] = $this->CreatedBy;
        if (isset($this->Created)) $o['Created'] = JsonConverters::to('DateTime', $this->Created);
        if (isset($this->Sent)) $o['Sent'] = $this->Sent;
        if (isset($this->SentDate)) $o['SentDate'] = JsonConverters::to('DateTime', $this->SentDate);
        if (isset($this->SendMethodId)) $o['SendMethodId'] = $this->SendMethodId;
        return empty($o) ? new class(){} : $o;
    }
}

class UserProfileResponse implements JsonSerializable
{
    public function __construct(
        /** @var string */
        public string $Id='',
        /** @var string|null */
        public ?string $Firstname=null,
        /** @var string|null */
        public ?string $Lastname=null,
        /** @var string|null */
        public ?string $Phone=null,
        /** @var string|null */
        public ?string $Email=null
    ) {
    }

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

class GDPRCustomerInfoResponse implements JsonSerializable
{
    public function __construct(
        /** @var string */
        public string $UserId='',
        /** @var string|null */
        public ?string $Firstname=null,
        /** @var string|null */
        public ?string $Lastname=null,
        /** @var string|null */
        public ?string $Phone=null,
        /** @var string|null */
        public ?string $Email=null,
        /** @var bool|null */
        public ?bool $Active=null,
        /** @var string|null */
        public ?string $FacebookUsername=null,
        /** @var string|null */
        public ?string $TextField1=null,
        /** @var string|null */
        public ?string $TextField2=null,
        /** @var string|null */
        public ?string $TextField3=null,
        /** @var string|null */
        public ?string $TextField4=null,
        /** @var string|null */
        public ?string $TextField5=null,
        /** @var string|null */
        public ?string $TextField6=null,
        /** @var string|null */
        public ?string $TextField7=null,
        /** @var string|null */
        public ?string $TextField8=null,
        /** @var string|null */
        public ?string $TextField9=null,
        /** @var string|null */
        public ?string $TextField10=null,
        /** @var string|null */
        public ?string $TextField11=null,
        /** @var string|null */
        public ?string $TextField12=null,
        /** @var string|null */
        public ?string $TextField13=null,
        /** @var string|null */
        public ?string $TextField14=null,
        /** @var string|null */
        public ?string $TextField15=null,
        /** @var string|null */
        public ?string $TextField16=null,
        /** @var string|null */
        public ?string $TextField17=null,
        /** @var string|null */
        public ?string $TextField18=null,
        /** @var string|null */
        public ?string $TextField19=null,
        /** @var string|null */
        public ?string $TextField20=null,
        /** @var DateTime */
        public DateTime $Updated=new DateTime(),
        /** @var DateTime */
        public DateTime $Created=new DateTime()
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['UserId'])) $this->UserId = $o['UserId'];
        if (isset($o['Firstname'])) $this->Firstname = $o['Firstname'];
        if (isset($o['Lastname'])) $this->Lastname = $o['Lastname'];
        if (isset($o['Phone'])) $this->Phone = $o['Phone'];
        if (isset($o['Email'])) $this->Email = $o['Email'];
        if (isset($o['Active'])) $this->Active = $o['Active'];
        if (isset($o['FacebookUsername'])) $this->FacebookUsername = $o['FacebookUsername'];
        if (isset($o['TextField1'])) $this->TextField1 = $o['TextField1'];
        if (isset($o['TextField2'])) $this->TextField2 = $o['TextField2'];
        if (isset($o['TextField3'])) $this->TextField3 = $o['TextField3'];
        if (isset($o['TextField4'])) $this->TextField4 = $o['TextField4'];
        if (isset($o['TextField5'])) $this->TextField5 = $o['TextField5'];
        if (isset($o['TextField6'])) $this->TextField6 = $o['TextField6'];
        if (isset($o['TextField7'])) $this->TextField7 = $o['TextField7'];
        if (isset($o['TextField8'])) $this->TextField8 = $o['TextField8'];
        if (isset($o['TextField9'])) $this->TextField9 = $o['TextField9'];
        if (isset($o['TextField10'])) $this->TextField10 = $o['TextField10'];
        if (isset($o['TextField11'])) $this->TextField11 = $o['TextField11'];
        if (isset($o['TextField12'])) $this->TextField12 = $o['TextField12'];
        if (isset($o['TextField13'])) $this->TextField13 = $o['TextField13'];
        if (isset($o['TextField14'])) $this->TextField14 = $o['TextField14'];
        if (isset($o['TextField15'])) $this->TextField15 = $o['TextField15'];
        if (isset($o['TextField16'])) $this->TextField16 = $o['TextField16'];
        if (isset($o['TextField17'])) $this->TextField17 = $o['TextField17'];
        if (isset($o['TextField18'])) $this->TextField18 = $o['TextField18'];
        if (isset($o['TextField19'])) $this->TextField19 = $o['TextField19'];
        if (isset($o['TextField20'])) $this->TextField20 = $o['TextField20'];
        if (isset($o['Updated'])) $this->Updated = JsonConverters::from('DateTime', $o['Updated']);
        if (isset($o['Created'])) $this->Created = JsonConverters::from('DateTime', $o['Created']);
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->UserId)) $o['UserId'] = $this->UserId;
        if (isset($this->Firstname)) $o['Firstname'] = $this->Firstname;
        if (isset($this->Lastname)) $o['Lastname'] = $this->Lastname;
        if (isset($this->Phone)) $o['Phone'] = $this->Phone;
        if (isset($this->Email)) $o['Email'] = $this->Email;
        if (isset($this->Active)) $o['Active'] = $this->Active;
        if (isset($this->FacebookUsername)) $o['FacebookUsername'] = $this->FacebookUsername;
        if (isset($this->TextField1)) $o['TextField1'] = $this->TextField1;
        if (isset($this->TextField2)) $o['TextField2'] = $this->TextField2;
        if (isset($this->TextField3)) $o['TextField3'] = $this->TextField3;
        if (isset($this->TextField4)) $o['TextField4'] = $this->TextField4;
        if (isset($this->TextField5)) $o['TextField5'] = $this->TextField5;
        if (isset($this->TextField6)) $o['TextField6'] = $this->TextField6;
        if (isset($this->TextField7)) $o['TextField7'] = $this->TextField7;
        if (isset($this->TextField8)) $o['TextField8'] = $this->TextField8;
        if (isset($this->TextField9)) $o['TextField9'] = $this->TextField9;
        if (isset($this->TextField10)) $o['TextField10'] = $this->TextField10;
        if (isset($this->TextField11)) $o['TextField11'] = $this->TextField11;
        if (isset($this->TextField12)) $o['TextField12'] = $this->TextField12;
        if (isset($this->TextField13)) $o['TextField13'] = $this->TextField13;
        if (isset($this->TextField14)) $o['TextField14'] = $this->TextField14;
        if (isset($this->TextField15)) $o['TextField15'] = $this->TextField15;
        if (isset($this->TextField16)) $o['TextField16'] = $this->TextField16;
        if (isset($this->TextField17)) $o['TextField17'] = $this->TextField17;
        if (isset($this->TextField18)) $o['TextField18'] = $this->TextField18;
        if (isset($this->TextField19)) $o['TextField19'] = $this->TextField19;
        if (isset($this->TextField20)) $o['TextField20'] = $this->TextField20;
        if (isset($this->Updated)) $o['Updated'] = JsonConverters::to('DateTime', $this->Updated);
        if (isset($this->Created)) $o['Created'] = JsonConverters::to('DateTime', $this->Created);
        return empty($o) ? new class(){} : $o;
    }
}

class GDPRCustomerCommentsResponse implements JsonSerializable
{
    public function __construct(
        /** @var string */
        public string $CompanyId='',
        /** @var int */
        public int $Id=0,
        /** @var string */
        public string $CustomerId='',
        /** @var string|null */
        public ?string $Comments=null,
        /** @var DateTime */
        public DateTime $Updated=new DateTime(),
        /** @var DateTime */
        public DateTime $Created=new DateTime(),
        /** @var string|null */
        public ?string $ImageUrl=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['CompanyId'])) $this->CompanyId = $o['CompanyId'];
        if (isset($o['Id'])) $this->Id = $o['Id'];
        if (isset($o['CustomerId'])) $this->CustomerId = $o['CustomerId'];
        if (isset($o['Comments'])) $this->Comments = $o['Comments'];
        if (isset($o['Updated'])) $this->Updated = JsonConverters::from('DateTime', $o['Updated']);
        if (isset($o['Created'])) $this->Created = JsonConverters::from('DateTime', $o['Created']);
        if (isset($o['ImageUrl'])) $this->ImageUrl = JsonConverters::from('string', $o['ImageUrl']);
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->CompanyId)) $o['CompanyId'] = $this->CompanyId;
        if (isset($this->Id)) $o['Id'] = $this->Id;
        if (isset($this->CustomerId)) $o['CustomerId'] = $this->CustomerId;
        if (isset($this->Comments)) $o['Comments'] = $this->Comments;
        if (isset($this->Updated)) $o['Updated'] = JsonConverters::to('DateTime', $this->Updated);
        if (isset($this->Created)) $o['Created'] = JsonConverters::to('DateTime', $this->Created);
        if (isset($this->ImageUrl)) $o['ImageUrl'] = JsonConverters::to('string', $this->ImageUrl);
        return empty($o) ? new class(){} : $o;
    }
}

class GDPRCustomerNewsletterLogResponse implements JsonSerializable
{
    public function __construct(
        /** @var string */
        public string $CompanyId='',
        /** @var int */
        public int $Id=0,
        /** @var int|null */
        public ?int $NewslettersId=null,
        /** @var string|null */
        public ?string $Receiver=null,
        /** @var string|null */
        public ?string $Sender=null,
        /** @var string|null */
        public ?string $MessageTitle=null,
        /** @var string|null */
        public ?string $MessageBody=null,
        /** @var bool|null */
        public ?bool $Sent=null,
        /** @var DateTime */
        public DateTime $Created=new DateTime()
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['CompanyId'])) $this->CompanyId = $o['CompanyId'];
        if (isset($o['Id'])) $this->Id = $o['Id'];
        if (isset($o['NewslettersId'])) $this->NewslettersId = $o['NewslettersId'];
        if (isset($o['Receiver'])) $this->Receiver = $o['Receiver'];
        if (isset($o['Sender'])) $this->Sender = $o['Sender'];
        if (isset($o['MessageTitle'])) $this->MessageTitle = $o['MessageTitle'];
        if (isset($o['MessageBody'])) $this->MessageBody = $o['MessageBody'];
        if (isset($o['Sent'])) $this->Sent = $o['Sent'];
        if (isset($o['Created'])) $this->Created = JsonConverters::from('DateTime', $o['Created']);
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->CompanyId)) $o['CompanyId'] = $this->CompanyId;
        if (isset($this->Id)) $o['Id'] = $this->Id;
        if (isset($this->NewslettersId)) $o['NewslettersId'] = $this->NewslettersId;
        if (isset($this->Receiver)) $o['Receiver'] = $this->Receiver;
        if (isset($this->Sender)) $o['Sender'] = $this->Sender;
        if (isset($this->MessageTitle)) $o['MessageTitle'] = $this->MessageTitle;
        if (isset($this->MessageBody)) $o['MessageBody'] = $this->MessageBody;
        if (isset($this->Sent)) $o['Sent'] = $this->Sent;
        if (isset($this->Created)) $o['Created'] = JsonConverters::to('DateTime', $this->Created);
        return empty($o) ? new class(){} : $o;
    }
}

class GDPRCustomerQueryResponse implements JsonSerializable
{
    public function __construct(
        /** @var array<GDPRCustomerBookingsResponse>|null */
        public ?array $Bookings=null,
        /** @var array<GDPRCustomerMessageLogResponse>|null */
        public ?array $MessageLog=null,
        /** @var UserProfileResponse|null */
        public ?UserProfileResponse $UserProfile=null,
        /** @var GDPRCustomerInfoResponse|null */
        public ?GDPRCustomerInfoResponse $Customer=null,
        /** @var array<GDPRCustomerCommentsResponse>|null */
        public ?array $CustomerComment=null,
        /** @var array<GDPRCustomerNewsletterLogResponse>|null */
        public ?array $NewsletterLog=null,
        /** @var ResponseStatus|null */
        public ?ResponseStatus $ResponseStatus=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['Bookings'])) $this->Bookings = JsonConverters::fromArray('GDPRCustomerBookingsResponse', $o['Bookings']);
        if (isset($o['MessageLog'])) $this->MessageLog = JsonConverters::fromArray('GDPRCustomerMessageLogResponse', $o['MessageLog']);
        if (isset($o['UserProfile'])) $this->UserProfile = JsonConverters::from('UserProfileResponse', $o['UserProfile']);
        if (isset($o['Customer'])) $this->Customer = JsonConverters::from('GDPRCustomerInfoResponse', $o['Customer']);
        if (isset($o['CustomerComment'])) $this->CustomerComment = JsonConverters::fromArray('GDPRCustomerCommentsResponse', $o['CustomerComment']);
        if (isset($o['NewsletterLog'])) $this->NewsletterLog = JsonConverters::fromArray('GDPRCustomerNewsletterLogResponse', $o['NewsletterLog']);
        if (isset($o['ResponseStatus'])) $this->ResponseStatus = JsonConverters::from('ResponseStatus', $o['ResponseStatus']);
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->Bookings)) $o['Bookings'] = JsonConverters::toArray('GDPRCustomerBookingsResponse', $this->Bookings);
        if (isset($this->MessageLog)) $o['MessageLog'] = JsonConverters::toArray('GDPRCustomerMessageLogResponse', $this->MessageLog);
        if (isset($this->UserProfile)) $o['UserProfile'] = JsonConverters::to('UserProfileResponse', $this->UserProfile);
        if (isset($this->Customer)) $o['Customer'] = JsonConverters::to('GDPRCustomerInfoResponse', $this->Customer);
        if (isset($this->CustomerComment)) $o['CustomerComment'] = JsonConverters::toArray('GDPRCustomerCommentsResponse', $this->CustomerComment);
        if (isset($this->NewsletterLog)) $o['NewsletterLog'] = JsonConverters::toArray('GDPRCustomerNewsletterLogResponse', $this->NewsletterLog);
        if (isset($this->ResponseStatus)) $o['ResponseStatus'] = JsonConverters::to('ResponseStatus', $this->ResponseStatus);
        return empty($o) ? new class(){} : $o;
    }
}

// @ValidateRequest(Validator="IsAuthenticated")
class GDPRCustomerQuery implements ICompany, JsonSerializable
{
    public function __construct(
        /** @description Enter the company and id you want to see the information for a resource, if blank company id and you are an admin, your company id will be used. If blank id, all resources will be shown  */
        // @ApiMember(Description="Enter the company and id you want to see the information for a resource, if blank company id and you are an admin, your company id will be used. If blank id, all resources will be shown ", IsRequired=true, ParameterType="query")
        /** @var string */
        public string $CompanyId='',

        /** @description Id of the customer */
        // @ApiMember(Description="Id of the customer", IsRequired=true, ParameterType="path")
        /** @var string */
        public string $CustomerId=''
    ) {
    }

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

PHP GDPRCustomerQuery DTOs

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

HTTP + XML

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

GET /gdpr/customers/{CustomerId} HTTP/1.1 
Host: testapi.bokamera.se 
Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<GDPRCustomerQueryResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/BokaMera.API.ServiceModel.Dtos">
  <Bookings>
    <GDPRCustomerBookingsResponse>
      <BookedBy>String</BookedBy>
      <BookedComments>String</BookedComments>
      <Comments>String</Comments>
      <CommentsToCustomer>String</CommentsToCustomer>
      <CompanyId>00000000-0000-0000-0000-000000000000</CompanyId>
      <CreatedDate>0001-01-01T00:00:00</CreatedDate>
      <CustomerId>00000000-0000-0000-0000-000000000000</CustomerId>
      <From>0001-01-01T00:00:00</From>
      <Id>0</Id>
      <ServiceId>0</ServiceId>
      <StatusId>0</StatusId>
      <TextField1>String</TextField1>
      <TextField10>String</TextField10>
      <TextField11>String</TextField11>
      <TextField12>String</TextField12>
      <TextField13>String</TextField13>
      <TextField14>String</TextField14>
      <TextField15>String</TextField15>
      <TextField16>String</TextField16>
      <TextField17>String</TextField17>
      <TextField18>String</TextField18>
      <TextField19>String</TextField19>
      <TextField2>String</TextField2>
      <TextField20>String</TextField20>
      <TextField3>String</TextField3>
      <TextField4>String</TextField4>
      <TextField5>String</TextField5>
      <TextField6>String</TextField6>
      <TextField7>String</TextField7>
      <TextField8>String</TextField8>
      <TextField9>String</TextField9>
      <To>0001-01-01T00:00:00</To>
      <UnbookedComments>String</UnbookedComments>
      <UnbookedOn>0001-01-01T00:00:00</UnbookedOn>
      <UpdatedDate>0001-01-01T00:00:00</UpdatedDate>
    </GDPRCustomerBookingsResponse>
  </Bookings>
  <Customer>
    <Active>false</Active>
    <Created>0001-01-01T00:00:00</Created>
    <Email>String</Email>
    <FacebookUsername>String</FacebookUsername>
    <Firstname>String</Firstname>
    <Lastname>String</Lastname>
    <Phone>String</Phone>
    <TextField1>String</TextField1>
    <TextField10>String</TextField10>
    <TextField11>String</TextField11>
    <TextField12>String</TextField12>
    <TextField13>String</TextField13>
    <TextField14>String</TextField14>
    <TextField15>String</TextField15>
    <TextField16>String</TextField16>
    <TextField17>String</TextField17>
    <TextField18>String</TextField18>
    <TextField19>String</TextField19>
    <TextField2>String</TextField2>
    <TextField20>String</TextField20>
    <TextField3>String</TextField3>
    <TextField4>String</TextField4>
    <TextField5>String</TextField5>
    <TextField6>String</TextField6>
    <TextField7>String</TextField7>
    <TextField8>String</TextField8>
    <TextField9>String</TextField9>
    <Updated>0001-01-01T00:00:00</Updated>
    <UserId>00000000-0000-0000-0000-000000000000</UserId>
  </Customer>
  <CustomerComment>
    <GDPRCustomerCommentsResponse>
      <Comments>String</Comments>
      <CompanyId>00000000-0000-0000-0000-000000000000</CompanyId>
      <Created>0001-01-01T00:00:00</Created>
      <CustomerId>00000000-0000-0000-0000-000000000000</CustomerId>
      <Id>0</Id>
      <ImageUrl i:nil="true" />
      <Updated>0001-01-01T00:00:00</Updated>
    </GDPRCustomerCommentsResponse>
  </CustomerComment>
  <MessageLog>
    <GDPRCustomerMessageLogResponse>
      <BookingId>0</BookingId>
      <CompanyId>00000000-0000-0000-0000-000000000000</CompanyId>
      <Created>0001-01-01T00:00:00</Created>
      <CreatedBy>String</CreatedBy>
      <Id>0</Id>
      <MessageBody>String</MessageBody>
      <MessageTitle>String</MessageTitle>
      <Receiver>String</Receiver>
      <SendMethodId>0</SendMethodId>
      <Sender>String</Sender>
      <Sent>false</Sent>
      <SentDate>0001-01-01T00:00:00</SentDate>
    </GDPRCustomerMessageLogResponse>
  </MessageLog>
  <NewsletterLog>
    <GDPRCustomerNewsletterLogResponse>
      <CompanyId>00000000-0000-0000-0000-000000000000</CompanyId>
      <Created>0001-01-01T00:00:00</Created>
      <Id>0</Id>
      <MessageBody>String</MessageBody>
      <MessageTitle>String</MessageTitle>
      <NewslettersId>0</NewslettersId>
      <Receiver>String</Receiver>
      <Sender>String</Sender>
      <Sent>false</Sent>
    </GDPRCustomerNewsletterLogResponse>
  </NewsletterLog>
  <ResponseStatus xmlns:d2p1="http://schemas.servicestack.net/types">
    <d2p1:ErrorCode>String</d2p1:ErrorCode>
    <d2p1:Message>String</d2p1:Message>
    <d2p1:StackTrace>String</d2p1:StackTrace>
    <d2p1:Errors>
      <d2p1:ResponseError>
        <d2p1:ErrorCode>String</d2p1:ErrorCode>
        <d2p1:FieldName>String</d2p1:FieldName>
        <d2p1:Message>String</d2p1:Message>
        <d2p1:Meta xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
          <d5p1:KeyValueOfstringstring>
            <d5p1:Key>String</d5p1:Key>
            <d5p1:Value>String</d5p1:Value>
          </d5p1:KeyValueOfstringstring>
        </d2p1:Meta>
      </d2p1:ResponseError>
    </d2p1:Errors>
    <d2p1:Meta xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
      <d3p1:KeyValueOfstringstring>
        <d3p1:Key>String</d3p1:Key>
        <d3p1:Value>String</d3p1:Value>
      </d3p1:KeyValueOfstringstring>
    </d2p1:Meta>
  </ResponseStatus>
  <UserProfile>
    <Email>String</Email>
    <Firstname>String</Firstname>
    <Id>00000000-0000-0000-0000-000000000000</Id>
    <Lastname>String</Lastname>
    <Phone>String</Phone>
  </UserProfile>
</GDPRCustomerQueryResponse>