Trendsic Platform Service

<back to all web services

ConferenceRegistrationRequest

Requires Authentication
Requires any of the roles:Agent, Administrator, Agent, Administrator
The following routes are available for this service:
GET,/v1/ConferenceRegistration/{ConferenceId}
POST,OPTIONS/v1/ConferenceRegistration
GET/v1/ConferenceRegistration/{ConferenceId}/{UserId}
<?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 ConferenceRegistration implements JsonSerializable
{
    public function __construct(
        /** @var string */
        public string $ConferenceRegistrationId='',
        /** @var string */
        public string $ConferenceId='',
        /** @var string */
        public string $UserId='',
        /** @var string|null */
        public ?string $ConferencePackage=null,
        /** @var string|null */
        public ?string $PaymentMethod=null,
        /** @var float */
        public float $TotalCost=0.0,
        /** @var float */
        public float $TotalEditCost=0.0,
        /** @var string|null */
        public ?string $StripeChargeId=null,
        /** @var DateTime */
        public DateTime $DateCreated=new DateTime(),
        /** @var string|null */
        public ?string $RegName=null,
        /** @var int */
        public int $IsAF=0,
        /** @var string|null */
        public ?string $afTitle=null,
        /** @var string */
        public string $ConferenceRegistrationDetailId=''
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['ConferenceRegistrationId'])) $this->ConferenceRegistrationId = $o['ConferenceRegistrationId'];
        if (isset($o['ConferenceId'])) $this->ConferenceId = $o['ConferenceId'];
        if (isset($o['UserId'])) $this->UserId = $o['UserId'];
        if (isset($o['ConferencePackage'])) $this->ConferencePackage = $o['ConferencePackage'];
        if (isset($o['PaymentMethod'])) $this->PaymentMethod = $o['PaymentMethod'];
        if (isset($o['TotalCost'])) $this->TotalCost = $o['TotalCost'];
        if (isset($o['TotalEditCost'])) $this->TotalEditCost = $o['TotalEditCost'];
        if (isset($o['StripeChargeId'])) $this->StripeChargeId = $o['StripeChargeId'];
        if (isset($o['DateCreated'])) $this->DateCreated = JsonConverters::from('DateTime', $o['DateCreated']);
        if (isset($o['RegName'])) $this->RegName = $o['RegName'];
        if (isset($o['IsAF'])) $this->IsAF = $o['IsAF'];
        if (isset($o['afTitle'])) $this->afTitle = $o['afTitle'];
        if (isset($o['ConferenceRegistrationDetailId'])) $this->ConferenceRegistrationDetailId = $o['ConferenceRegistrationDetailId'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->ConferenceRegistrationId)) $o['ConferenceRegistrationId'] = $this->ConferenceRegistrationId;
        if (isset($this->ConferenceId)) $o['ConferenceId'] = $this->ConferenceId;
        if (isset($this->UserId)) $o['UserId'] = $this->UserId;
        if (isset($this->ConferencePackage)) $o['ConferencePackage'] = $this->ConferencePackage;
        if (isset($this->PaymentMethod)) $o['PaymentMethod'] = $this->PaymentMethod;
        if (isset($this->TotalCost)) $o['TotalCost'] = $this->TotalCost;
        if (isset($this->TotalEditCost)) $o['TotalEditCost'] = $this->TotalEditCost;
        if (isset($this->StripeChargeId)) $o['StripeChargeId'] = $this->StripeChargeId;
        if (isset($this->DateCreated)) $o['DateCreated'] = JsonConverters::to('DateTime', $this->DateCreated);
        if (isset($this->RegName)) $o['RegName'] = $this->RegName;
        if (isset($this->IsAF)) $o['IsAF'] = $this->IsAF;
        if (isset($this->afTitle)) $o['afTitle'] = $this->afTitle;
        if (isset($this->ConferenceRegistrationDetailId)) $o['ConferenceRegistrationDetailId'] = $this->ConferenceRegistrationDetailId;
        return empty($o) ? new class(){} : $o;
    }
}

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

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

class ConferenceRegistrationDetail implements JsonSerializable
{
    public function __construct(
        /** @var string */
        public string $ConferenceRegistrationDetailId='',
        /** @var string */
        public string $ConferenceRegistrationId='',
        /** @var string|null */
        public ?string $Name=null,
        /** @var bool|null */
        public ?bool $IsAF=null,
        /** @var string|null */
        public ?string $AFTitle=null,
        /** @var string|null */
        public ?string $ConferencePackage=null,
        /** @var string|null */
        public ?string $RoommateRequest=null,
        /** @var bool|null */
        public ?bool $Spouse=null,
        /** @var string|null */
        public ?string $SpouseName=null,
        /** @var bool|null */
        public ?bool $VIP=null,
        /** @var bool|null */
        public ?bool $AttendingClass=null,
        /** @var bool|null */
        public ?bool $AttendingAcademy=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['ConferenceRegistrationDetailId'])) $this->ConferenceRegistrationDetailId = $o['ConferenceRegistrationDetailId'];
        if (isset($o['ConferenceRegistrationId'])) $this->ConferenceRegistrationId = $o['ConferenceRegistrationId'];
        if (isset($o['Name'])) $this->Name = $o['Name'];
        if (isset($o['IsAF'])) $this->IsAF = $o['IsAF'];
        if (isset($o['AFTitle'])) $this->AFTitle = $o['AFTitle'];
        if (isset($o['ConferencePackage'])) $this->ConferencePackage = $o['ConferencePackage'];
        if (isset($o['RoommateRequest'])) $this->RoommateRequest = $o['RoommateRequest'];
        if (isset($o['Spouse'])) $this->Spouse = $o['Spouse'];
        if (isset($o['SpouseName'])) $this->SpouseName = $o['SpouseName'];
        if (isset($o['VIP'])) $this->VIP = $o['VIP'];
        if (isset($o['AttendingClass'])) $this->AttendingClass = $o['AttendingClass'];
        if (isset($o['AttendingAcademy'])) $this->AttendingAcademy = $o['AttendingAcademy'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->ConferenceRegistrationDetailId)) $o['ConferenceRegistrationDetailId'] = $this->ConferenceRegistrationDetailId;
        if (isset($this->ConferenceRegistrationId)) $o['ConferenceRegistrationId'] = $this->ConferenceRegistrationId;
        if (isset($this->Name)) $o['Name'] = $this->Name;
        if (isset($this->IsAF)) $o['IsAF'] = $this->IsAF;
        if (isset($this->AFTitle)) $o['AFTitle'] = $this->AFTitle;
        if (isset($this->ConferencePackage)) $o['ConferencePackage'] = $this->ConferencePackage;
        if (isset($this->RoommateRequest)) $o['RoommateRequest'] = $this->RoommateRequest;
        if (isset($this->Spouse)) $o['Spouse'] = $this->Spouse;
        if (isset($this->SpouseName)) $o['SpouseName'] = $this->SpouseName;
        if (isset($this->VIP)) $o['VIP'] = $this->VIP;
        if (isset($this->AttendingClass)) $o['AttendingClass'] = $this->AttendingClass;
        if (isset($this->AttendingAcademy)) $o['AttendingAcademy'] = $this->AttendingAcademy;
        return empty($o) ? new class(){} : $o;
    }
}

class ConferenceRegistrationRequest implements JsonSerializable
{
    public function __construct(
        /** @var string */
        public string $ConferenceId='',
        /** @var string */
        public string $UserId='',
        /** @var array<ConferenceRegistration>|null */
        public ?array $ConferenceRegistration=null,
        /** @var array<ConferenceRegistrationDetail>|null */
        public ?array $ConferenceRegistrationDetails=null,
        /** @var string|null */
        public ?string $StripeToken=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['ConferenceId'])) $this->ConferenceId = $o['ConferenceId'];
        if (isset($o['UserId'])) $this->UserId = $o['UserId'];
        if (isset($o['ConferenceRegistration'])) $this->ConferenceRegistration = JsonConverters::fromArray('ConferenceRegistration', $o['ConferenceRegistration']);
        if (isset($o['ConferenceRegistrationDetails'])) $this->ConferenceRegistrationDetails = JsonConverters::fromArray('ConferenceRegistrationDetail', $o['ConferenceRegistrationDetails']);
        if (isset($o['StripeToken'])) $this->StripeToken = $o['StripeToken'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->ConferenceId)) $o['ConferenceId'] = $this->ConferenceId;
        if (isset($this->UserId)) $o['UserId'] = $this->UserId;
        if (isset($this->ConferenceRegistration)) $o['ConferenceRegistration'] = JsonConverters::toArray('ConferenceRegistration', $this->ConferenceRegistration);
        if (isset($this->ConferenceRegistrationDetails)) $o['ConferenceRegistrationDetails'] = JsonConverters::toArray('ConferenceRegistrationDetail', $this->ConferenceRegistrationDetails);
        if (isset($this->StripeToken)) $o['StripeToken'] = $this->StripeToken;
        return empty($o) ? new class(){} : $o;
    }
}

PHP ConferenceRegistrationRequest DTOs

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

HTTP + JSV

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

POST /v1/ConferenceRegistration HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	ConferenceId: 00000000000000000000000000000000,
	UserId: 00000000000000000000000000000000,
	ConferenceRegistration: 
	[
		{
			ConferenceRegistrationId: 00000000000000000000000000000000,
			ConferenceId: 00000000000000000000000000000000,
			UserId: 00000000000000000000000000000000,
			ConferencePackage: String,
			PaymentMethod: String,
			TotalCost: 0,
			TotalEditCost: 0,
			StripeChargeId: String,
			DateCreated: 0001-01-01,
			RegName: String,
			IsAF: 0,
			afTitle: String,
			ConferenceRegistrationDetailId: 00000000000000000000000000000000
		}
	],
	ConferenceRegistrationDetails: 
	[
		{
			ConferenceRegistrationDetailId: 00000000000000000000000000000000,
			ConferenceRegistrationId: 00000000000000000000000000000000,
			Name: String,
			IsAF: False,
			AFTitle: String,
			ConferencePackage: String,
			RoommateRequest: String,
			Spouse: False,
			SpouseName: String,
			VIP: False,
			AttendingClass: False,
			AttendingAcademy: False
		}
	],
	StripeToken: String
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	ResponseStatus: 
	{
		ErrorCode: String,
		Message: String,
		StackTrace: String,
		Errors: 
		[
			{
				ErrorCode: String,
				FieldName: String,
				Message: String,
				Meta: 
				{
					String: String
				}
			}
		],
		Meta: 
		{
			String: String
		}
	},
	ConferenceRegistration: 
	[
		{
			ConferenceRegistrationId: 00000000000000000000000000000000,
			ConferenceId: 00000000000000000000000000000000,
			UserId: 00000000000000000000000000000000,
			ConferencePackage: String,
			PaymentMethod: String,
			TotalCost: 0,
			TotalEditCost: 0,
			StripeChargeId: String,
			DateCreated: 0001-01-01,
			RegName: String,
			IsAF: 0,
			afTitle: String,
			ConferenceRegistrationDetailId: 00000000000000000000000000000000
		}
	]
}