GET | /changelog | ||
---|---|---|---|
GET | /changelog/{Country}/{Language} | ||
GET | /changelog/{Country}/{Language}/{Section} | ||
GET | /changelog/{Country}/{Language}/{Section}/{ItemCode} |
import 'package:servicestack/servicestack.dart';
import 'dart:typed_data';
class Entity implements IEntity, IConvertible
{
String? id;
Entity({this.id});
Entity.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
id = json['id'];
return this;
}
Map<String, dynamic> toJson() => {
'id': id
};
getTypeName() => "Entity";
TypeContext? context = _ctx;
}
class ChangeHistory implements IConvertible
{
String? updatedBy;
DateTime? dateCreated;
String? element;
String? old;
String? new;
String? status;
String? approvedBy;
DateTime? dateApproved;
ChangeHistory({this.updatedBy,this.dateCreated,this.element,this.old,this.new,this.status,this.approvedBy,this.dateApproved});
ChangeHistory.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
updatedBy = json['updatedBy'];
dateCreated = JsonConverters.fromJson(json['dateCreated'],'DateTime',context!);
element = json['element'];
old = json['old'];
new = json['new'];
status = json['status'];
approvedBy = json['approvedBy'];
dateApproved = JsonConverters.fromJson(json['dateApproved'],'DateTime',context!);
return this;
}
Map<String, dynamic> toJson() => {
'updatedBy': updatedBy,
'dateCreated': JsonConverters.toJson(dateCreated,'DateTime',context!),
'element': element,
'old': old,
'new': new,
'status': status,
'approvedBy': approvedBy,
'dateApproved': JsonConverters.toJson(dateApproved,'DateTime',context!)
};
getTypeName() => "ChangeHistory";
TypeContext? context = _ctx;
}
class ChangeLog extends Entity implements IConvertible
{
String? referenceId;
String? country;
String? language;
String? section;
String? itemCode;
String? itemId;
List<ChangeHistory>? history;
ChangeLog({this.referenceId,this.country,this.language,this.section,this.itemCode,this.itemId,this.history});
ChangeLog.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
super.fromMap(json);
referenceId = json['referenceId'];
country = json['country'];
language = json['language'];
section = json['section'];
itemCode = json['itemCode'];
itemId = json['itemId'];
history = JsonConverters.fromJson(json['history'],'List<ChangeHistory>',context!);
return this;
}
Map<String, dynamic> toJson() => super.toJson()..addAll({
'referenceId': referenceId,
'country': country,
'language': language,
'section': section,
'itemCode': itemCode,
'itemId': itemId,
'history': JsonConverters.toJson(history,'List<ChangeHistory>',context!)
});
getTypeName() => "ChangeLog";
TypeContext? context = _ctx;
}
class ChangeLogReq implements IConvertible
{
String? country;
String? language;
String? section;
String? itemCode;
ChangeLogReq({this.country,this.language,this.section,this.itemCode});
ChangeLogReq.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
country = json['country'];
language = json['language'];
section = json['section'];
itemCode = json['itemCode'];
return this;
}
Map<String, dynamic> toJson() => {
'country': country,
'language': language,
'section': section,
'itemCode': itemCode
};
getTypeName() => "ChangeLogReq";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'hcbtas_q_albamfs_api.azurewebsites.net', types: <String, TypeInfo> {
'Entity': TypeInfo(TypeOf.Class, create:() => Entity()),
'ChangeHistory': TypeInfo(TypeOf.Class, create:() => ChangeHistory()),
'ChangeLog': TypeInfo(TypeOf.Class, create:() => ChangeLog()),
'List<ChangeHistory>': TypeInfo(TypeOf.Class, create:() => <ChangeHistory>[]),
'ChangeLogReq': TypeInfo(TypeOf.Class, create:() => ChangeLogReq()),
});
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /changelog HTTP/1.1 Host: hcbtas-q-albamfs-api.azurewebsites.net Accept: application/xml
HTTP/1.1 200 OK Content-Type: application/xml Content-Length: length <ChangeLog xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/AlbaApi.Model"> <Id xmlns="http://schemas.datacontract.org/2004/07/TasSyd.Model.Base">String</Id> <Country>String</Country> <History> <ChangeHistory> <ApprovedBy>String</ApprovedBy> <DateApproved>0001-01-01T00:00:00</DateApproved> <DateCreated>0001-01-01T00:00:00</DateCreated> <Element>String</Element> <New>String</New> <Old>String</Old> <Status>String</Status> <UpdatedBy>String</UpdatedBy> </ChangeHistory> </History> <ItemCode>String</ItemCode> <ItemId>String</ItemId> <Language>String</Language> <ReferenceId>String</ReferenceId> <Section>String</Section> </ChangeLog>