Requires any of the roles: | bookingsupplier-administrator-write, superadmin, bookingsupplier-administrator-read |
GET | /gdpr/customers/{CustomerId} | Get all customer information stored on the customer | Get 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;
}
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other
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: text/jsonl
HTTP/1.1 200 OK Content-Type: text/jsonl Content-Length: length {"Bookings":[{"Id":0,"ServiceId":0,"StatusId":0,"UnbookedOn":"0001-01-01T00:00:00","UnbookedComments":"String","BookedComments":"String","BookedBy":"String","Comments":"String","TextField1":"String","TextField2":"String","TextField3":"String","TextField4":"String","TextField5":"String","TextField6":"String","TextField7":"String","TextField8":"String","TextField9":"String","TextField10":"String","TextField11":"String","TextField12":"String","TextField13":"String","TextField14":"String","TextField15":"String","TextField16":"String","TextField17":"String","TextField18":"String","TextField19":"String","TextField20":"String","CommentsToCustomer":"String"}],"MessageLog":[{"Id":0,"BookingId":0,"Receiver":"String","Sender":"String","MessageTitle":"String","MessageBody":"String","CreatedBy":"String","Sent":false,"SentDate":"0001-01-01T00:00:00","SendMethodId":0}],"UserProfile":{"Firstname":"String","Lastname":"String","Phone":"String","Email":"String"},"Customer":{"Firstname":"String","Lastname":"String","Phone":"String","Email":"String","Active":false,"FacebookUsername":"String","TextField1":"String","TextField2":"String","TextField3":"String","TextField4":"String","TextField5":"String","TextField6":"String","TextField7":"String","TextField8":"String","TextField9":"String","TextField10":"String","TextField11":"String","TextField12":"String","TextField13":"String","TextField14":"String","TextField15":"String","TextField16":"String","TextField17":"String","TextField18":"String","TextField19":"String","TextField20":"String"},"CustomerComment":[{"Id":0,"Comments":"String"}],"NewsletterLog":[{"Id":0,"NewslettersId":0,"Receiver":"String","Sender":"String","MessageTitle":"String","MessageBody":"String","Sent":false}],"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}}}