| GET | /v1/EventAgentRegistration/ByAgent/{AgentId} |
|---|
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 EventAgentRegistration extends EventRegistration implements IConvertible
{
int? EventAgentRegistrationId;
int? AgentId;
DateTime? DateCreated;
bool? IsRegistered;
EventAgentRegistration({this.EventAgentRegistrationId,this.AgentId,this.DateCreated,this.IsRegistered});
EventAgentRegistration.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
super.fromMap(json);
EventAgentRegistrationId = json['EventAgentRegistrationId'];
AgentId = json['AgentId'];
DateCreated = JsonConverters.fromJson(json['DateCreated'],'DateTime',context!);
IsRegistered = json['IsRegistered'];
return this;
}
Map<String, dynamic> toJson() => super.toJson()..addAll({
'EventAgentRegistrationId': EventAgentRegistrationId,
'AgentId': AgentId,
'DateCreated': JsonConverters.toJson(DateCreated,'DateTime',context!),
'IsRegistered': IsRegistered
});
getTypeName() => "EventAgentRegistration";
TypeContext? context = _ctx;
}
class EventAgentRegistrationResponse implements IConvertible
{
ResponseStatus? ResponseStatus;
List<EventAgentRegistration>? EventAgentRegistration = [];
EventAgentRegistrationResponse({this.ResponseStatus,this.EventAgentRegistration});
EventAgentRegistrationResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
ResponseStatus = JsonConverters.fromJson(json['ResponseStatus'],'ResponseStatus',context!);
EventAgentRegistration = JsonConverters.fromJson(json['EventAgentRegistration'],'List<EventAgentRegistration>',context!);
return this;
}
Map<String, dynamic> toJson() => {
'ResponseStatus': JsonConverters.toJson(ResponseStatus,'ResponseStatus',context!),
'EventAgentRegistration': JsonConverters.toJson(EventAgentRegistration,'List<EventAgentRegistration>',context!)
};
getTypeName() => "EventAgentRegistrationResponse";
TypeContext? context = _ctx;
}
class EventAgentRegistrationByAgentRequest implements IConvertible
{
int? AgentId;
EventAgentRegistrationByAgentRequest({this.AgentId});
EventAgentRegistrationByAgentRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
AgentId = json['AgentId'];
return this;
}
Map<String, dynamic> toJson() => {
'AgentId': AgentId
};
getTypeName() => "EventAgentRegistrationByAgentRequest";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'api.dev.dynamics.trendsic.com', types: <String, TypeInfo> {
'EventRegistration': TypeInfo(TypeOf.Class, create:() => EventRegistration()),
'EventAgentRegistration': TypeInfo(TypeOf.Class, create:() => EventAgentRegistration()),
'EventAgentRegistrationResponse': TypeInfo(TypeOf.Class, create:() => EventAgentRegistrationResponse()),
'List<EventAgentRegistration>': TypeInfo(TypeOf.Class, create:() => <EventAgentRegistration>[]),
'EventAgentRegistrationByAgentRequest': TypeInfo(TypeOf.Class, create:() => EventAgentRegistrationByAgentRequest()),
});
Dart EventAgentRegistrationByAgentRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /v1/EventAgentRegistration/ByAgent/{AgentId} HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: text/csv
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length
{"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}},"EventAgentRegistration":[{"EventAgentRegistrationId":0,"AgentId":0,"DateCreated":"0001-01-01T00:00:00.0000000","IsRegistered":false,"EventRegistrationId":"00000000000000000000000000000000","Description":"String","Summary":"String","PageContent":"String","RegistrationStart":"0001-01-01T00:00:00.0000000","RegistrationEnd":"0001-01-01T00:00:00.0000000","RegistrationCount":0,"Active":false}]}