Trendsic Platform Service

<back to all web services

EventRegistrationRequest

Requires Authentication
Requires any of the roles:Worker, Agent, Administrator, Agent, Administrator
The following routes are available for this service:
GET,POST,PUT,OPTIONS/v1/EventRegistration
import 'package:servicestack/servicestack.dart';
import 'dart:typed_data';

class EventRegistration implements IConvertible
{
    String? EventRegistrationId;
    String? Description;
    String? Summary;
    String? PageContent;
    DateTime? RegistrationStart;
    DateTime? RegistrationEnd;
    int? RegistrationCount;
    bool? Active;

    EventRegistration({this.EventRegistrationId,this.Description,this.Summary,this.PageContent,this.RegistrationStart,this.RegistrationEnd,this.RegistrationCount,this.Active});
    EventRegistration.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        EventRegistrationId = json['EventRegistrationId'];
        Description = json['Description'];
        Summary = json['Summary'];
        PageContent = json['PageContent'];
        RegistrationStart = JsonConverters.fromJson(json['RegistrationStart'],'DateTime',context!);
        RegistrationEnd = JsonConverters.fromJson(json['RegistrationEnd'],'DateTime',context!);
        RegistrationCount = json['RegistrationCount'];
        Active = json['Active'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'EventRegistrationId': EventRegistrationId,
        'Description': Description,
        'Summary': Summary,
        'PageContent': PageContent,
        'RegistrationStart': JsonConverters.toJson(RegistrationStart,'DateTime',context!),
        'RegistrationEnd': JsonConverters.toJson(RegistrationEnd,'DateTime',context!),
        'RegistrationCount': RegistrationCount,
        'Active': Active
    };

    getTypeName() => "EventRegistration";
    TypeContext? context = _ctx;
}

class EventRegistrationResponse implements IConvertible
{
    ResponseStatus? ResponseStatus;
    List<EventRegistration>? EventRegistration = [];

    EventRegistrationResponse({this.ResponseStatus,this.EventRegistration});
    EventRegistrationResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        ResponseStatus = JsonConverters.fromJson(json['ResponseStatus'],'ResponseStatus',context!);
        EventRegistration = JsonConverters.fromJson(json['EventRegistration'],'List<EventRegistration>',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'ResponseStatus': JsonConverters.toJson(ResponseStatus,'ResponseStatus',context!),
        'EventRegistration': JsonConverters.toJson(EventRegistration,'List<EventRegistration>',context!)
    };

    getTypeName() => "EventRegistrationResponse";
    TypeContext? context = _ctx;
}

class EventRegistrationRequest implements IConvertible
{
    List<EventRegistration>? EventRegistration = [];

    EventRegistrationRequest({this.EventRegistration});
    EventRegistrationRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        EventRegistration = JsonConverters.fromJson(json['EventRegistration'],'List<EventRegistration>',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'EventRegistration': JsonConverters.toJson(EventRegistration,'List<EventRegistration>',context!)
    };

    getTypeName() => "EventRegistrationRequest";
    TypeContext? context = _ctx;
}

TypeContext _ctx = TypeContext(library: 'api.dev.dynamics.trendsic.com', types: <String, TypeInfo> {
    'EventRegistration': TypeInfo(TypeOf.Class, create:() => EventRegistration()),
    'EventRegistrationResponse': TypeInfo(TypeOf.Class, create:() => EventRegistrationResponse()),
    'List<EventRegistration>': TypeInfo(TypeOf.Class, create:() => <EventRegistration>[]),
    'EventRegistrationRequest': TypeInfo(TypeOf.Class, create:() => EventRegistrationRequest()),
});

Dart EventRegistrationRequest 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.

POST /v1/EventRegistration HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: application/xml
Content-Type: application/xml
Content-Length: length

<EventRegistrationRequest 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>
</EventRegistrationRequest>
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>