| Requires any of the roles: | Worker, Agent, Administrator, Agent, Administrator |
| 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 .jsv suffix or ?format=jsv
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: text/jsv
Content-Type: text/jsv
Content-Length: length
{
EventRegistration:
[
{
EventRegistrationId: 00000000000000000000000000000000,
Description: String,
Summary: String,
PageContent: String,
RegistrationStart: 0001-01-01,
RegistrationEnd: 0001-01-01,
RegistrationCount: 0,
Active: False
}
]
}
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
}
},
EventRegistration:
[
{
EventRegistrationId: 00000000000000000000000000000000,
Description: String,
Summary: String,
PageContent: String,
RegistrationStart: 0001-01-01,
RegistrationEnd: 0001-01-01,
RegistrationCount: 0,
Active: False
}
]
}