Trendsic Platform Service

<back to all web services

EventRegistrationMenuRequest

Requires Authentication
Requires any of the roles:Worker, Agent, Administrator
The following routes are available for this service:
GET/v1/EventRegistrationMenu
<?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 EventRegistration implements JsonSerializable
{
    public function __construct(
        /** @var string */
        public string $EventRegistrationId='',
        /** @var string|null */
        public ?string $Description=null,
        /** @var string|null */
        public ?string $Summary=null,
        /** @var string|null */
        public ?string $PageContent=null,
        /** @var DateTime */
        public DateTime $RegistrationStart=new DateTime(),
        /** @var DateTime */
        public DateTime $RegistrationEnd=new DateTime(),
        /** @var int */
        public int $RegistrationCount=0,
        /** @var bool|null */
        public ?bool $Active=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['EventRegistrationId'])) $this->EventRegistrationId = $o['EventRegistrationId'];
        if (isset($o['Description'])) $this->Description = $o['Description'];
        if (isset($o['Summary'])) $this->Summary = $o['Summary'];
        if (isset($o['PageContent'])) $this->PageContent = $o['PageContent'];
        if (isset($o['RegistrationStart'])) $this->RegistrationStart = JsonConverters::from('DateTime', $o['RegistrationStart']);
        if (isset($o['RegistrationEnd'])) $this->RegistrationEnd = JsonConverters::from('DateTime', $o['RegistrationEnd']);
        if (isset($o['RegistrationCount'])) $this->RegistrationCount = $o['RegistrationCount'];
        if (isset($o['Active'])) $this->Active = $o['Active'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->EventRegistrationId)) $o['EventRegistrationId'] = $this->EventRegistrationId;
        if (isset($this->Description)) $o['Description'] = $this->Description;
        if (isset($this->Summary)) $o['Summary'] = $this->Summary;
        if (isset($this->PageContent)) $o['PageContent'] = $this->PageContent;
        if (isset($this->RegistrationStart)) $o['RegistrationStart'] = JsonConverters::to('DateTime', $this->RegistrationStart);
        if (isset($this->RegistrationEnd)) $o['RegistrationEnd'] = JsonConverters::to('DateTime', $this->RegistrationEnd);
        if (isset($this->RegistrationCount)) $o['RegistrationCount'] = $this->RegistrationCount;
        if (isset($this->Active)) $o['Active'] = $this->Active;
        return empty($o) ? new class(){} : $o;
    }
}

class EventRegistrationResponse implements JsonSerializable
{
    public function __construct(
        /** @var ResponseStatus|null */
        public ?ResponseStatus $ResponseStatus=null,
        /** @var array<EventRegistration>|null */
        public ?array $EventRegistration=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['ResponseStatus'])) $this->ResponseStatus = JsonConverters::from('ResponseStatus', $o['ResponseStatus']);
        if (isset($o['EventRegistration'])) $this->EventRegistration = JsonConverters::fromArray('EventRegistration', $o['EventRegistration']);
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->ResponseStatus)) $o['ResponseStatus'] = JsonConverters::to('ResponseStatus', $this->ResponseStatus);
        if (isset($this->EventRegistration)) $o['EventRegistration'] = JsonConverters::toArray('EventRegistration', $this->EventRegistration);
        return empty($o) ? new class(){} : $o;
    }
}

class EventRegistrationMenuRequest implements JsonSerializable
{
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        return empty($o) ? new class(){} : $o;
    }
}

PHP EventRegistrationMenuRequest 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 /v1/EventRegistrationMenu HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<EventRegistrationResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
  <EventRegistration>
    <EventRegistration>
      <Active>false</Active>
      <Description>String</Description>
      <EventRegistrationId>00000000-0000-0000-0000-000000000000</EventRegistrationId>
      <PageContent>String</PageContent>
      <RegistrationCount>0</RegistrationCount>
      <RegistrationEnd>0001-01-01T00:00:00</RegistrationEnd>
      <RegistrationStart>0001-01-01T00:00:00</RegistrationStart>
      <Summary>String</Summary>
    </EventRegistration>
  </EventRegistration>
  <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>
</EventRegistrationResponse>