All Verbs | /BookingEventsSummary |
---|
import 'package:servicestack/servicestack.dart';
// @DataContract(Name="Metadata", Namespace="schemas.agentivity.com/types")
class PagingMetadata implements IConvertible
{
/**
* Starting Record
*/
// @DataMember
// @ApiMember(DataType="string", Description="Starting Record", Name="Offset", ParameterType="query")
String? Offset;
/**
* Number of records to return (PageSize)
*/
// @DataMember
// @ApiMember(DataType="string", Description="Number of records to return (PageSize)", Name="Limit", ParameterType="query")
String? Limit;
/**
* Total Number of Records in a Full Reponse (if no paging)
*/
// @DataMember
// @ApiMember(DataType="string", Description="Total Number of Records in a Full Reponse (if no paging)", Name="TotalRecords", ParameterType="query")
int? TotalRecords;
/**
* Total Number of Records in this Reponse (on this page)
*/
// @DataMember
// @ApiMember(DataType="string", Description="Total Number of Records in this Reponse (on this page)", Name="ResponseRecords", ParameterType="query")
int? ResponseRecords;
PagingMetadata({this.Offset,this.Limit,this.TotalRecords,this.ResponseRecords});
PagingMetadata.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Offset = json['Offset'];
Limit = json['Limit'];
TotalRecords = json['TotalRecords'];
ResponseRecords = json['ResponseRecords'];
return this;
}
Map<String, dynamic> toJson() => {
'Offset': Offset,
'Limit': Limit,
'TotalRecords': TotalRecords,
'ResponseRecords': ResponseRecords
};
getTypeName() => "PagingMetadata";
TypeContext? context = _ctx;
}
// @DataContract(Namespace="schemas.agentivity.com/types")
abstract class CompanyLevelRequestBase extends PagingMetadata implements IMemberUsername, IMemberOwningCompanyCode
{
/**
* Comma Delimited List of Owning Company Codes
*/
// @DataMember
List<String>? OwningCompanyCode;
/**
* UserName in form of an email address
*/
// @DataMember
String? UserName;
CompanyLevelRequestBase({this.OwningCompanyCode,this.UserName});
CompanyLevelRequestBase.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
super.fromMap(json);
OwningCompanyCode = JsonConverters.fromJson(json['OwningCompanyCode'],'List<String>',context!);
UserName = json['UserName'];
return this;
}
Map<String, dynamic> toJson() => super.toJson()..addAll({
'OwningCompanyCode': JsonConverters.toJson(OwningCompanyCode,'List<String>',context!),
'UserName': UserName
});
getTypeName() => "CompanyLevelRequestBase";
TypeContext? context = _ctx;
}
// @DataContract(Name="Events", Namespace="schemas.agentivity.com/types")
class EventsSummary implements IConvertible
{
// @DataMember(Order=10)
String? Create;
// @DataMember(Order=20)
String? Cancel;
// @DataMember(Order=30)
String? Change;
// @DataMember(Order=50)
String? Ticketing;
// @DataMember(Order=60)
String? Service;
// @DataMember(Order=70)
int? TicketsIssued;
EventsSummary({this.Create,this.Cancel,this.Change,this.Ticketing,this.Service,this.TicketsIssued});
EventsSummary.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Create = json['Create'];
Cancel = json['Cancel'];
Change = json['Change'];
Ticketing = json['Ticketing'];
Service = json['Service'];
TicketsIssued = json['TicketsIssued'];
return this;
}
Map<String, dynamic> toJson() => {
'Create': Create,
'Cancel': Cancel,
'Change': Change,
'Ticketing': Ticketing,
'Service': Service,
'TicketsIssued': TicketsIssued
};
getTypeName() => "EventsSummary";
TypeContext? context = _ctx;
}
// @DataContract(Name="Consultant", Namespace="schemas.agentivity.com/types")
class ConsultantEventsSummary implements IConvertible
{
// @DataMember(Order=10)
String? ConsultantId;
// @DataMember(Order=20)
EventsSummary? Events;
ConsultantEventsSummary({this.ConsultantId,this.Events});
ConsultantEventsSummary.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
ConsultantId = json['ConsultantId'];
Events = JsonConverters.fromJson(json['Events'],'EventsSummary',context!);
return this;
}
Map<String, dynamic> toJson() => {
'ConsultantId': ConsultantId,
'Events': JsonConverters.toJson(Events,'EventsSummary',context!)
};
getTypeName() => "ConsultantEventsSummary";
TypeContext? context = _ctx;
}
// @DataContract(Name="Account", Namespace="schemas.agentivity.com/types")
class AccountEventsSummary implements IConvertible
{
// @DataMember(Order=10)
String? AccountId;
// @DataMember(Order=20)
EventsSummary? Events;
// @DataMember(Order=30)
List<ConsultantEventsSummary>? Consultants;
AccountEventsSummary({this.AccountId,this.Events,this.Consultants});
AccountEventsSummary.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
AccountId = json['AccountId'];
Events = JsonConverters.fromJson(json['Events'],'EventsSummary',context!);
Consultants = JsonConverters.fromJson(json['Consultants'],'List<ConsultantEventsSummary>',context!);
return this;
}
Map<String, dynamic> toJson() => {
'AccountId': AccountId,
'Events': JsonConverters.toJson(Events,'EventsSummary',context!),
'Consultants': JsonConverters.toJson(Consultants,'List<ConsultantEventsSummary>',context!)
};
getTypeName() => "AccountEventsSummary";
TypeContext? context = _ctx;
}
// @DataContract(Name="Branch", Namespace="schemas.agentivity.com/types")
class OwningAgencyLocationIdEventsSummary implements IConvertible
{
// @DataMember(Order=10)
String? BranchId;
// @DataMember(Order=20)
EventsSummary? Events;
// @DataMember(Order=30)
List<AccountEventsSummary>? Accounts;
OwningAgencyLocationIdEventsSummary({this.BranchId,this.Events,this.Accounts});
OwningAgencyLocationIdEventsSummary.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
BranchId = json['BranchId'];
Events = JsonConverters.fromJson(json['Events'],'EventsSummary',context!);
Accounts = JsonConverters.fromJson(json['Accounts'],'List<AccountEventsSummary>',context!);
return this;
}
Map<String, dynamic> toJson() => {
'BranchId': BranchId,
'Events': JsonConverters.toJson(Events,'EventsSummary',context!),
'Accounts': JsonConverters.toJson(Accounts,'List<AccountEventsSummary>',context!)
};
getTypeName() => "OwningAgencyLocationIdEventsSummary";
TypeContext? context = _ctx;
}
// @DataContract(Name="BookingEventsSummary", Namespace="schemas.agentivity.com/types")
class BookingEventsSummary implements IConvertible
{
// @DataMember(Order=10)
DateTime? DateStart;
// @DataMember(Order=20)
DateTime? DateEnd;
// @DataMember(Order=30)
EventsSummary? Events;
// @DataMember(Order=40)
List<OwningAgencyLocationIdEventsSummary>? Branches;
BookingEventsSummary({this.DateStart,this.DateEnd,this.Events,this.Branches});
BookingEventsSummary.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
DateStart = JsonConverters.fromJson(json['DateStart'],'DateTime',context!);
DateEnd = JsonConverters.fromJson(json['DateEnd'],'DateTime',context!);
Events = JsonConverters.fromJson(json['Events'],'EventsSummary',context!);
Branches = JsonConverters.fromJson(json['Branches'],'List<OwningAgencyLocationIdEventsSummary>',context!);
return this;
}
Map<String, dynamic> toJson() => {
'DateStart': JsonConverters.toJson(DateStart,'DateTime',context!),
'DateEnd': JsonConverters.toJson(DateEnd,'DateTime',context!),
'Events': JsonConverters.toJson(Events,'EventsSummary',context!),
'Branches': JsonConverters.toJson(Branches,'List<OwningAgencyLocationIdEventsSummary>',context!)
};
getTypeName() => "BookingEventsSummary";
TypeContext? context = _ctx;
}
// @DataContract(Namespace="schemas.agentivity.com/types")
class Report<TItemResponse,TItem> implements IConvertible
{
// @DataMember(Order=1, EmitDefaultValue=false)
TItem? Item;
Report({this.Item});
Report.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Item = JsonConverters.fromJson(json['Item'],'TItem',context!);
return this;
}
Map<String, dynamic> toJson() => {
'Item': JsonConverters.toJson(Item,'TItem',context!)
};
getTypeName() => "Report<$TItemResponse,$TItem>";
TypeContext? context = _ctx;
}
// @DataContract(Name="BookingEventsSummary", Namespace="schemas.agentivity.com/types")
class BookingEventsSummaryRequestResponseReport extends Report<BookingEventsSummaryRequestItemResponse,BookingEventsSummary> implements IConvertible
{
BookingEventsSummaryRequestResponseReport();
BookingEventsSummaryRequestResponseReport.fromJson(Map<String, dynamic> json) : super.fromJson(json);
fromMap(Map<String, dynamic> json) {
super.fromMap(json);
return this;
}
Map<String, dynamic> toJson() => super.toJson();
getTypeName() => "BookingEventsSummaryRequestResponseReport";
TypeContext? context = _ctx;
}
// @DataContract(Name="CacheMetadata", Namespace="schemas.agentivity.com/types")
class CacheMetadata implements IConvertible
{
// @DataMember(Order=1)
DateTime? CachedAt;
// @DataMember(Order=2)
DateTime? CacheExpiresAt;
// @DataMember(Order=0)
bool? IsFromCache;
CacheMetadata({this.CachedAt,this.CacheExpiresAt,this.IsFromCache});
CacheMetadata.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
CachedAt = JsonConverters.fromJson(json['CachedAt'],'DateTime',context!);
CacheExpiresAt = JsonConverters.fromJson(json['CacheExpiresAt'],'DateTime',context!);
IsFromCache = json['IsFromCache'];
return this;
}
Map<String, dynamic> toJson() => {
'CachedAt': JsonConverters.toJson(CachedAt,'DateTime',context!),
'CacheExpiresAt': JsonConverters.toJson(CacheExpiresAt,'DateTime',context!),
'IsFromCache': IsFromCache
};
getTypeName() => "CacheMetadata";
TypeContext? context = _ctx;
}
// @DataContract(Name="ResponseMetadata", Namespace="schemas.agentivity.com/types")
class ResponseMetadata implements IConvertible
{
// @DataMember(Order=0)
bool? Success;
// @DataMember(Order=1)
bool? HasCache;
// @DataMember(Order=2)
bool? HasPaging;
// @DataMember(Order=3, EmitDefaultValue=false)
CacheMetadata? CacheMetadata;
// @DataMember(Order=4, EmitDefaultValue=false)
PagingMetadata? PagingMetadata;
ResponseMetadata({this.Success,this.HasCache,this.HasPaging,this.CacheMetadata,this.PagingMetadata});
ResponseMetadata.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Success = json['Success'];
HasCache = json['HasCache'];
HasPaging = json['HasPaging'];
CacheMetadata = JsonConverters.fromJson(json['CacheMetadata'],'CacheMetadata',context!);
PagingMetadata = JsonConverters.fromJson(json['PagingMetadata'],'PagingMetadata',context!);
return this;
}
Map<String, dynamic> toJson() => {
'Success': Success,
'HasCache': HasCache,
'HasPaging': HasPaging,
'CacheMetadata': JsonConverters.toJson(CacheMetadata,'CacheMetadata',context!),
'PagingMetadata': JsonConverters.toJson(PagingMetadata,'PagingMetadata',context!)
};
getTypeName() => "ResponseMetadata";
TypeContext? context = _ctx;
}
// @DataContract(Name="ResponseMetadata", Namespace="schemas.agentivity.com/types")
class AgentivityError implements IConvertible
{
// @DataMember
String? ErrorCode;
// @DataMember
String? Message;
// @DataMember
String? StatusCode;
// @DataMember
String? VerboseMessage;
AgentivityError({this.ErrorCode,this.Message,this.StatusCode,this.VerboseMessage});
AgentivityError.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
ErrorCode = json['ErrorCode'];
Message = json['Message'];
StatusCode = json['StatusCode'];
VerboseMessage = json['VerboseMessage'];
return this;
}
Map<String, dynamic> toJson() => {
'ErrorCode': ErrorCode,
'Message': Message,
'StatusCode': StatusCode,
'VerboseMessage': VerboseMessage
};
getTypeName() => "AgentivityError";
TypeContext? context = _ctx;
}
// @DataContract(Name="AgentivityResponse", Namespace="schemas.agentivity.com/types")
class ItemResponse<TItem,TReport> implements IConvertible
{
// @DataMember(Order=1)
ResponseMetadata? ResponseMetadata;
// @DataMember(Order=2, EmitDefaultValue=false)
TReport? ResponseReport;
// @DataMember(Order=3, EmitDefaultValue=false)
AgentivityError? ResponseError;
ItemResponse({this.ResponseMetadata,this.ResponseReport,this.ResponseError});
ItemResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
ResponseMetadata = JsonConverters.fromJson(json['ResponseMetadata'],'ResponseMetadata',context!);
ResponseReport = JsonConverters.fromJson(json['ResponseReport'],'TReport',context!);
ResponseError = JsonConverters.fromJson(json['ResponseError'],'AgentivityError',context!);
return this;
}
Map<String, dynamic> toJson() => {
'ResponseMetadata': JsonConverters.toJson(ResponseMetadata,'ResponseMetadata',context!),
'ResponseReport': JsonConverters.toJson(ResponseReport,'TReport',context!),
'ResponseError': JsonConverters.toJson(ResponseError,'AgentivityError',context!)
};
getTypeName() => "ItemResponse<$TItem,$TReport>";
TypeContext? context = _ctx;
}
// @DataContract(Name="AgentivityResponse", Namespace="schemas.agentivity.com/types")
class BookingEventsSummaryRequestItemResponse extends ItemResponse<BookingEventsSummary,BookingEventsSummaryRequestResponseReport> implements IConvertible
{
BookingEventsSummaryRequestItemResponse();
BookingEventsSummaryRequestItemResponse.fromJson(Map<String, dynamic> json) : super.fromJson(json);
fromMap(Map<String, dynamic> json) {
super.fromMap(json);
return this;
}
Map<String, dynamic> toJson() => super.toJson();
getTypeName() => "BookingEventsSummaryRequestItemResponse";
TypeContext? context = _ctx;
}
// @DataContract(Namespace="schemas.agentivity.com/types")
class BookingEventsSummaryRequest extends CompanyLevelRequestBase implements IConvertible
{
/**
* Date in format YYYYMMDD
*/
// @DataMember
String? EventDateStart;
/**
* Date in format YYYYMMDD
*/
// @DataMember
String? EventDateEnd;
/**
* Comma Delimited List of PCCs
*/
// @DataMember
List<String>? OwningAgencyLocationID;
BookingEventsSummaryRequest({this.EventDateStart,this.EventDateEnd,this.OwningAgencyLocationID});
BookingEventsSummaryRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
super.fromMap(json);
EventDateStart = json['EventDateStart'];
EventDateEnd = json['EventDateEnd'];
OwningAgencyLocationID = JsonConverters.fromJson(json['OwningAgencyLocationID'],'List<String>',context!);
return this;
}
Map<String, dynamic> toJson() => super.toJson()..addAll({
'EventDateStart': EventDateStart,
'EventDateEnd': EventDateEnd,
'OwningAgencyLocationID': JsonConverters.toJson(OwningAgencyLocationID,'List<String>',context!)
});
getTypeName() => "BookingEventsSummaryRequest";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'api.agentivity.com', types: <String, TypeInfo> {
'PagingMetadata': TypeInfo(TypeOf.Class, create:() => PagingMetadata()),
'CompanyLevelRequestBase': TypeInfo(TypeOf.AbstractClass),
'EventsSummary': TypeInfo(TypeOf.Class, create:() => EventsSummary()),
'ConsultantEventsSummary': TypeInfo(TypeOf.Class, create:() => ConsultantEventsSummary()),
'AccountEventsSummary': TypeInfo(TypeOf.Class, create:() => AccountEventsSummary()),
'List<ConsultantEventsSummary>': TypeInfo(TypeOf.Class, create:() => <ConsultantEventsSummary>[]),
'OwningAgencyLocationIdEventsSummary': TypeInfo(TypeOf.Class, create:() => OwningAgencyLocationIdEventsSummary()),
'List<AccountEventsSummary>': TypeInfo(TypeOf.Class, create:() => <AccountEventsSummary>[]),
'BookingEventsSummary': TypeInfo(TypeOf.Class, create:() => BookingEventsSummary()),
'List<OwningAgencyLocationIdEventsSummary>': TypeInfo(TypeOf.Class, create:() => <OwningAgencyLocationIdEventsSummary>[]),
'Report<TItemResponse,TItem>': TypeInfo(TypeOf.GenericDef,create:() => Report()),
'BookingEventsSummaryRequestResponseReport': TypeInfo(TypeOf.Class, create:() => BookingEventsSummaryRequestResponseReport()),
'CacheMetadata': TypeInfo(TypeOf.Class, create:() => CacheMetadata()),
'ResponseMetadata': TypeInfo(TypeOf.Class, create:() => ResponseMetadata()),
'AgentivityError': TypeInfo(TypeOf.Class, create:() => AgentivityError()),
'ItemResponse<TItem,TReport>': TypeInfo(TypeOf.GenericDef,create:() => ItemResponse()),
'BookingEventsSummaryRequestItemResponse': TypeInfo(TypeOf.Class, create:() => BookingEventsSummaryRequestItemResponse()),
'BookingEventsSummaryRequest': TypeInfo(TypeOf.Class, create:() => BookingEventsSummaryRequest()),
});
Dart BookingEventsSummaryRequest 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.
POST /BookingEventsSummary HTTP/1.1
Host: api.agentivity.com
Accept: text/csv
Content-Type: text/csv
Content-Length: length
{"EventDateStart":"String","EventDateEnd":"String","OwningAgencyLocationID":["String"],"OwningCompanyCode":["String"],"UserName":"String","Offset":"String","Limit":"String","TotalRecords":0,"ResponseRecords":0}
HTTP/1.1 200 OK Content-Type: text/csv Content-Length: length {"ResponseMetadata":{"Success":false,"HasCache":false,"HasPaging":false,"CacheMetadata":{"IsFromCache":false,"CachedAt":"\/Date(-62135596800000-0000)\/","CacheExpiresAt":"\/Date(-62135596800000-0000)\/"},"PagingMetadata":{"Offset":"String","Limit":"String","TotalRecords":0,"ResponseRecords":0}},"ResponseReport":{"Item":{"DateStart":"\/Date(-62135596800000-0000)\/","DateEnd":"\/Date(-62135596800000-0000)\/","Events":{"Create":"String","Cancel":"String","Change":"String","Ticketing":"String","Service":"String","TicketsIssued":0},"Branches":[{"BranchId":"String","Events":{"Create":"String","Cancel":"String","Change":"String","Ticketing":"String","Service":"String","TicketsIssued":0},"Accounts":[{"AccountId":"String","Events":{"Create":"String","Cancel":"String","Change":"String","Ticketing":"String","Service":"String","TicketsIssued":0},"Consultants":[{"ConsultantId":"String","Events":{"Create":"String","Cancel":"String","Change":"String","Ticketing":"String","Service":"String","TicketsIssued":0}}]}]}]}},"ResponseError":{"ErrorCode":"String","Message":"String","StatusCode":"String","VerboseMessage":"String"}}