| Requires the role: | Admin | Requires the permission: | ReadData |
| GET | /stig/history |
|---|
import 'package:servicestack/servicestack.dart';
class LocalizedMessage implements IConvertible
{
String? Is;
String? en;
LocalizedMessage({this.Is,this.en});
LocalizedMessage.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Is = json['is'];
en = json['en'];
return this;
}
Map<String, dynamic> toJson() => {
'is': Is,
'en': en
};
getTypeName() => "LocalizedMessage";
TypeContext? context = _ctx;
}
class StigHistoryEntry implements IConvertible
{
int? id;
String? kind;
LocalizedMessage? label;
int? amount;
bool? affectsBalance;
int? eventId;
String? eventName;
DateTime? eventTimeUtc;
int? ownerId;
String? ownerName;
int? ticketId;
String? orderReference;
int? sourceAmountMinor;
int? multiplierBasisPoints;
String? campaignCode;
String? status;
DateTime? createdUtc;
String? note;
StigHistoryEntry({this.id,this.kind,this.label,this.amount,this.affectsBalance,this.eventId,this.eventName,this.eventTimeUtc,this.ownerId,this.ownerName,this.ticketId,this.orderReference,this.sourceAmountMinor,this.multiplierBasisPoints,this.campaignCode,this.status,this.createdUtc,this.note});
StigHistoryEntry.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
id = json['id'];
kind = json['kind'];
label = JsonConverters.fromJson(json['label'],'LocalizedMessage',context!);
amount = json['amount'];
affectsBalance = json['affectsBalance'];
eventId = json['eventId'];
eventName = json['eventName'];
eventTimeUtc = JsonConverters.fromJson(json['eventTimeUtc'],'DateTime',context!);
ownerId = json['ownerId'];
ownerName = json['ownerName'];
ticketId = json['ticketId'];
orderReference = json['orderReference'];
sourceAmountMinor = json['sourceAmountMinor'];
multiplierBasisPoints = json['multiplierBasisPoints'];
campaignCode = json['campaignCode'];
status = json['status'];
createdUtc = JsonConverters.fromJson(json['createdUtc'],'DateTime',context!);
note = json['note'];
return this;
}
Map<String, dynamic> toJson() => {
'id': id,
'kind': kind,
'label': JsonConverters.toJson(label,'LocalizedMessage',context!),
'amount': amount,
'affectsBalance': affectsBalance,
'eventId': eventId,
'eventName': eventName,
'eventTimeUtc': JsonConverters.toJson(eventTimeUtc,'DateTime',context!),
'ownerId': ownerId,
'ownerName': ownerName,
'ticketId': ticketId,
'orderReference': orderReference,
'sourceAmountMinor': sourceAmountMinor,
'multiplierBasisPoints': multiplierBasisPoints,
'campaignCode': campaignCode,
'status': status,
'createdUtc': JsonConverters.toJson(createdUtc,'DateTime',context!),
'note': note
};
getTypeName() => "StigHistoryEntry";
TypeContext? context = _ctx;
}
class StigHistoryResult implements IConvertible
{
String? fullPhoneNumber;
bool? known;
List<StigHistoryEntry>? items;
int? totalCount;
int? skip;
int? take;
int? statusCode;
String? message;
StigHistoryResult({this.fullPhoneNumber,this.known,this.items,this.totalCount,this.skip,this.take,this.statusCode,this.message});
StigHistoryResult.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
fullPhoneNumber = json['fullPhoneNumber'];
known = json['known'];
items = JsonConverters.fromJson(json['items'],'List<StigHistoryEntry>',context!);
totalCount = json['totalCount'];
skip = json['skip'];
take = json['take'];
statusCode = json['statusCode'];
message = json['message'];
return this;
}
Map<String, dynamic> toJson() => {
'fullPhoneNumber': fullPhoneNumber,
'known': known,
'items': JsonConverters.toJson(items,'List<StigHistoryEntry>',context!),
'totalCount': totalCount,
'skip': skip,
'take': take,
'statusCode': statusCode,
'message': message
};
getTypeName() => "StigHistoryResult";
TypeContext? context = _ctx;
}
class StigHistoryRequest implements IConvertible
{
String? fullPhoneNumber;
int? skip;
int? take;
bool? includeHolds;
StigHistoryRequest({this.fullPhoneNumber,this.skip,this.take,this.includeHolds});
StigHistoryRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
fullPhoneNumber = json['fullPhoneNumber'];
skip = json['skip'];
take = json['take'];
includeHolds = json['includeHolds'];
return this;
}
Map<String, dynamic> toJson() => {
'fullPhoneNumber': fullPhoneNumber,
'skip': skip,
'take': take,
'includeHolds': includeHolds
};
getTypeName() => "StigHistoryRequest";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'stubbur_app.azurewebsites.net', types: <String, TypeInfo> {
'LocalizedMessage': TypeInfo(TypeOf.Class, create:() => LocalizedMessage()),
'StigHistoryEntry': TypeInfo(TypeOf.Class, create:() => StigHistoryEntry()),
'StigHistoryResult': TypeInfo(TypeOf.Class, create:() => StigHistoryResult()),
'List<StigHistoryEntry>': TypeInfo(TypeOf.Class, create:() => <StigHistoryEntry>[]),
'StigHistoryRequest': TypeInfo(TypeOf.Class, create:() => StigHistoryRequest()),
});
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 /stig/history HTTP/1.1 Host: stubbur-app.azurewebsites.net Accept: text/csv
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length
{"fullPhoneNumber":"String","known":false,"items":[{"id":0,"kind":"String","label":{"is":"String","en":"String"},"amount":0,"affectsBalance":false,"eventId":0,"eventName":"String","eventTimeUtc":"0001-01-01T00:00:00.0000000","ownerId":0,"ownerName":"String","ticketId":0,"orderReference":"String","sourceAmountMinor":0,"multiplierBasisPoints":0,"campaignCode":"String","status":"String","createdUtc":"0001-01-01T00:00:00.0000000","note":"String"}],"totalCount":0,"skip":0,"take":0,"statusCode":0,"message":"String"}