| GET | /api/v1/eras2files |
|---|
import 'package:servicestack/servicestack.dart';
import 'dart:typed_data';
enum Eras2FileType
{
DSatz,
Hka,
E835Satz,
E898Satz,
Abrechnung,
ArgeSatz,
NutzerFile,
DevicePdf,
}
// @DataContract
class Eras2File implements IConvertible
{
// @DataMember(Name="Guid")
String? Guid;
// @DataMember(Name="Name")
String? Name;
// @DataMember(Name="FileType")
Eras2FileType? FileType;
// @DataMember(Name="ObjektGuid")
String? ObjektGuid;
// @DataMember(Name="NutzerGuid")
String? NutzerGuid;
Eras2File({this.Guid,this.Name,this.FileType,this.ObjektGuid,this.NutzerGuid});
Eras2File.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Guid = json['guid'];
Name = json['name'];
FileType = JsonConverters.fromJson(json['fileType'],'Eras2FileType',context!);
ObjektGuid = json['objektGuid'];
NutzerGuid = json['nutzerGuid'];
return this;
}
Map<String, dynamic> toJson() => {
'guid': Guid,
'name': Name,
'fileType': JsonConverters.toJson(FileType,'Eras2FileType',context!),
'objektGuid': ObjektGuid,
'nutzerGuid': NutzerGuid
};
getTypeName() => "Eras2File";
TypeContext? context = _ctx;
}
class GetEras2FileListResponse implements IConvertible
{
List<Eras2File>? eras2FileList;
ResponseStatus? responseStatus;
GetEras2FileListResponse({this.eras2FileList,this.responseStatus});
GetEras2FileListResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
eras2FileList = JsonConverters.fromJson(json['eras2FileList'],'List<Eras2File>',context!);
responseStatus = JsonConverters.fromJson(json['responseStatus'],'ResponseStatus',context!);
return this;
}
Map<String, dynamic> toJson() => {
'eras2FileList': JsonConverters.toJson(eras2FileList,'List<Eras2File>',context!),
'responseStatus': JsonConverters.toJson(responseStatus,'ResponseStatus',context!)
};
getTypeName() => "GetEras2FileListResponse";
TypeContext? context = _ctx;
}
class GetEras2FileList implements IHasBearerToken, IConvertible
{
// @ApiMember(IsRequired=true, ParameterType="query")
String? bearerToken;
/**
* Optional! Follow the format : /api/v1/eras2files?filter[FileType]=*
*/
// @DataMember(Name="filter[FileType]")
// @ApiMember(Description="Optional! Follow the format : /api/v1/eras2files?filter[FileType]=*", ParameterType="query")
String? filter_FileType_;
/**
* Optional! Follow the format : /api/v1/eras2files?filter[Name]=*
*/
// @DataMember(Name="filter[Name]")
// @ApiMember(Description="Optional! Follow the format : /api/v1/eras2files?filter[Name]=*", ParameterType="query")
String? filter_Name_;
GetEras2FileList({this.bearerToken,this.filter_FileType_,this.filter_Name_});
GetEras2FileList.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
bearerToken = json['bearerToken'];
filter_FileType_ = json['filterByFileType'];
filter_Name_ = json['filterByName'];
return this;
}
Map<String, dynamic> toJson() => {
'bearerToken': bearerToken,
'filter_FileType_': filter_FileType_,
'filter_Name_': filter_Name_
};
getTypeName() => "GetEras2FileList";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'faabrechnungen_servdesk.eras_online.de', types: <String, TypeInfo> {
'Eras2FileType': TypeInfo(TypeOf.Enum, enumValues:Eras2FileType.values),
'Eras2File': TypeInfo(TypeOf.Class, create:() => Eras2File()),
'GetEras2FileListResponse': TypeInfo(TypeOf.Class, create:() => GetEras2FileListResponse()),
'List<Eras2File>': TypeInfo(TypeOf.Class, create:() => <Eras2File>[]),
'GetEras2FileList': TypeInfo(TypeOf.Class, create:() => GetEras2FileList()),
});
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 /api/v1/eras2files HTTP/1.1 Host: faabrechnungen-servdesk.eras-online.de Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<GetEras2FileListResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Eras2Web.Service.Desktop.Server.ServiceModel.Eras2WebExt.Get">
<Eras2FileList xmlns:d2p1="http://schemas.datacontract.org/2004/07/Eras2Web.Service.Desktop.Server.ServiceModel.Eras2WebExt.Models" i:nil="true" />
<ResponseStatus xmlns:d2p1="http://schemas.servicestack.net/types">
<d2p1:ErrorCode>String</d2p1:ErrorCode>
<d2p1:Message>String</d2p1:Message>
<d2p1:StackTrace>String</d2p1:StackTrace>
<d2p1:Errors>
<d2p1:ResponseError>
<d2p1:ErrorCode>String</d2p1:ErrorCode>
<d2p1:FieldName>String</d2p1:FieldName>
<d2p1:Message>String</d2p1:Message>
<d2p1:Meta xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d5p1:KeyValueOfstringstring>
<d5p1:Key>String</d5p1:Key>
<d5p1:Value>String</d5p1:Value>
</d5p1:KeyValueOfstringstring>
</d2p1:Meta>
</d2p1:ResponseError>
</d2p1:Errors>
<d2p1:Meta xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d3p1:KeyValueOfstringstring>
<d3p1:Key>String</d3p1:Key>
<d3p1:Value>String</d3p1:Value>
</d3p1:KeyValueOfstringstring>
</d2p1:Meta>
</ResponseStatus>
</GetEras2FileListResponse>