POST | /BatchCheckElsterAsync | An asynchronous service to perform basic checks on a batch of tax data. |
---|
import 'package:servicestack/servicestack.dart';
import 'dart:typed_data';
/**
* Represents a structure that encapsulates a tax declaration.
*/
// @Api(Description="Represents a structure that encapsulates a tax declaration.")
class TaxData implements IConvertible
{
/**
* The unique identifier of the tax data.
*/
// @ApiMember(Description="The unique identifier of the tax data.", IsRequired=true)
String? id;
/**
* The XML-based tax declaration.
*/
// @ApiMember(Description="The XML-based tax declaration.", IsRequired=true)
String? content;
TaxData({this.id,this.content});
TaxData.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
id = json['id'];
content = json['content'];
return this;
}
Map<String, dynamic> toJson() => {
'id': id,
'content': content
};
getTypeName() => "TaxData";
TypeContext? context = _ctx;
}
/**
* A base service to perform basic checks on a batch of tax data.
*/
// @Api(Description="A base service to perform basic checks on a batch of tax data.")
abstract class BatchCheckElsterBase implements IPost
{
/**
* The batch of ELSTER tax data to check.
*/
// @ApiMember(Description="The batch of ELSTER tax data to check.", Name="Data")
List<TaxData>? data;
BatchCheckElsterBase({this.data});
BatchCheckElsterBase.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
data = JsonConverters.fromJson(json['data'],'List<TaxData>',context!);
return this;
}
Map<String, dynamic> toJson() => {
'data': JsonConverters.toJson(data,'List<TaxData>',context!)
};
getTypeName() => "BatchCheckElsterBase";
TypeContext? context = _ctx;
}
/**
* An asynchronous service to perform basic checks on a batch of tax data.
*/
// @Api(Description="An asynchronous service to perform basic checks on a batch of tax data.")
class BatchCheckElsterAsync extends BatchCheckElsterBase implements IConvertible
{
/**
* The batch of ELSTER tax data to check.
*/
// @ApiMember(Description="The batch of ELSTER tax data to check.", Name="Data")
List<TaxData>? data;
BatchCheckElsterAsync({this.data});
BatchCheckElsterAsync.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
super.fromMap(json);
data = JsonConverters.fromJson(json['data'],'List<TaxData>',context!);
return this;
}
Map<String, dynamic> toJson() => super.toJson()..addAll({
'data': JsonConverters.toJson(data,'List<TaxData>',context!)
});
getTypeName() => "BatchCheckElsterAsync";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'taxfiling.pwc.de', types: <String, TypeInfo> {
'TaxData': TypeInfo(TypeOf.Class, create:() => TaxData()),
'BatchCheckElsterBase': TypeInfo(TypeOf.AbstractClass),
'List<TaxData>': TypeInfo(TypeOf.Class, create:() => <TaxData>[]),
'BatchCheckElsterAsync': TypeInfo(TypeOf.Class, create:() => BatchCheckElsterAsync()),
});
Dart BatchCheckElsterAsync DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .x-msgpack suffix or ?format=x-msgpack
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /BatchCheckElsterAsync HTTP/1.1
Host: taxfiling.pwc.de
Accept: application/x-msgpack
Content-Type: application/x-msgpack
Content-Length: length
{"data":[{"id":"String","content":"String"}]}
HTTP/1.1 200 OK Content-Type: application/x-msgpack Content-Length: length [{"zertifikatErforderlich":false,"hatHerstellerId":false,"hatDatenlieferant":false,"stagingEnabled":false,"transferProtokollDruckbar":false,"id":"String","index":0,"responseStatus":{"errorCode":"String","message":"String","stackTrace":"String","errors":[{"errorCode":"String","fieldName":"String","message":"String","meta":{"String":"String"}}],"meta":{"String":"String"}}}]