| GET | /api/v1/direktkosten |
|---|
import 'package:servicestack/servicestack.dart';
import 'dart:typed_data';
// @DataContract
class BillingInformation implements IConvertible
{
// @DataMember
String? guid;
// @DataMember
DateTime? from;
// @DataMember
DateTime? to;
// @DataMember
bool? isCompleted;
// @DataMember
bool? hasNebenkosten;
BillingInformation({this.guid,this.from,this.to,this.isCompleted,this.hasNebenkosten});
BillingInformation.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
guid = json['guid'];
from = JsonConverters.fromJson(json['from'],'DateTime',context!);
to = JsonConverters.fromJson(json['to'],'DateTime',context!);
isCompleted = json['isCompleted'];
hasNebenkosten = json['hasNebenkosten'];
return this;
}
Map<String, dynamic> toJson() => {
'guid': guid,
'from': JsonConverters.toJson(from,'DateTime',context!),
'to': JsonConverters.toJson(to,'DateTime',context!),
'isCompleted': isCompleted,
'hasNebenkosten': hasNebenkosten
};
getTypeName() => "BillingInformation";
TypeContext? context = _ctx;
}
// @DataContract
class Direktkosten implements IConvertible
{
// @DataMember
String? guid;
// @DataMember
String? label;
// @DataMember
DateTime? date;
// @DataMember
double? brutto;
// @DataMember
double? salesTax;
// @DataMember
double? quantity;
// @DataMember
String? type;
// @DataMember
bool? isDeleted;
// @DataMember
bool? isCreatedByApp;
// @DataMember
String? nutzerGuid;
// @DataMember
BillingInformation? billingInformation;
Direktkosten({this.guid,this.label,this.date,this.brutto,this.salesTax,this.quantity,this.type,this.isDeleted,this.isCreatedByApp,this.nutzerGuid,this.billingInformation});
Direktkosten.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
guid = json['guid'];
label = json['label'];
date = JsonConverters.fromJson(json['date'],'DateTime',context!);
brutto = JsonConverters.toDouble(json['brutto']);
salesTax = JsonConverters.toDouble(json['salesTax']);
quantity = JsonConverters.toDouble(json['quantity']);
type = json['type'];
isDeleted = json['isDeleted'];
isCreatedByApp = json['isCreatedByApp'];
nutzerGuid = json['nutzerGuid'];
billingInformation = JsonConverters.fromJson(json['billingInformation'],'BillingInformation',context!);
return this;
}
Map<String, dynamic> toJson() => {
'guid': guid,
'label': label,
'date': JsonConverters.toJson(date,'DateTime',context!),
'brutto': brutto,
'salesTax': salesTax,
'quantity': quantity,
'type': type,
'isDeleted': isDeleted,
'isCreatedByApp': isCreatedByApp,
'nutzerGuid': nutzerGuid,
'billingInformation': JsonConverters.toJson(billingInformation,'BillingInformation',context!)
};
getTypeName() => "Direktkosten";
TypeContext? context = _ctx;
}
class GetDirektkostenListResponse implements IConvertible
{
List<Direktkosten>? direktkostenList;
ResponseStatus? responseStatus;
GetDirektkostenListResponse({this.direktkostenList,this.responseStatus});
GetDirektkostenListResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
direktkostenList = JsonConverters.fromJson(json['direktkostenList'],'List<Direktkosten>',context!);
responseStatus = JsonConverters.fromJson(json['responseStatus'],'ResponseStatus',context!);
return this;
}
Map<String, dynamic> toJson() => {
'direktkostenList': JsonConverters.toJson(direktkostenList,'List<Direktkosten>',context!),
'responseStatus': JsonConverters.toJson(responseStatus,'ResponseStatus',context!)
};
getTypeName() => "GetDirektkostenListResponse";
TypeContext? context = _ctx;
}
class GetDirektkostenList implements IHasBearerToken, IConvertible
{
// @ApiMember(IsRequired=true, ParameterType="query")
String? bearerToken;
/**
* Optional! Follow the format : /api/v1/direktkosten?filter[ObjektGuid]=*
*/
// @DataMember(Name="filter[ObjektGuid]")
// @ApiMember(Description="Optional! Follow the format : /api/v1/direktkosten?filter[ObjektGuid]=*", ParameterType="query")
String? filter_ObjektGuid_;
/**
* Optional! Follow the format : /api/v1/direktkosten?filter[NutzerGuid]=*
*/
// @DataMember(Name="filter[NutzerGuid]")
// @ApiMember(Description="Optional! Follow the format : /api/v1/direktkosten?filter[NutzerGuid]=*", ParameterType="query")
String? filter_NutzerGuid_;
/**
* Optional! Follow the format : /api/v1/direktkosten?filter[BillingInformationGuid]=*
*/
// @DataMember(Name="filter[BillingInformationGuid]")
// @ApiMember(Description="Optional! Follow the format : /api/v1/direktkosten?filter[BillingInformationGuid]=*", ParameterType="query")
String? filter_BillingInformationGuid_;
GetDirektkostenList({this.bearerToken,this.filter_ObjektGuid_,this.filter_NutzerGuid_,this.filter_BillingInformationGuid_});
GetDirektkostenList.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
bearerToken = json['bearerToken'];
filter_ObjektGuid_ = json['filterByObjektGuid'];
filter_NutzerGuid_ = json['filterByNutzerGuid'];
filter_BillingInformationGuid_ = json['filterByBillingInformationGuid'];
return this;
}
Map<String, dynamic> toJson() => {
'bearerToken': bearerToken,
'filter_ObjektGuid_': filter_ObjektGuid_,
'filter_NutzerGuid_': filter_NutzerGuid_,
'filter_BillingInformationGuid_': filter_BillingInformationGuid_
};
getTypeName() => "GetDirektkostenList";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'mi_waerme_servdesk.eras_online.de', types: <String, TypeInfo> {
'BillingInformation': TypeInfo(TypeOf.Class, create:() => BillingInformation()),
'Direktkosten': TypeInfo(TypeOf.Class, create:() => Direktkosten()),
'GetDirektkostenListResponse': TypeInfo(TypeOf.Class, create:() => GetDirektkostenListResponse()),
'List<Direktkosten>': TypeInfo(TypeOf.Class, create:() => <Direktkosten>[]),
'GetDirektkostenList': TypeInfo(TypeOf.Class, create:() => GetDirektkostenList()),
});
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 /api/v1/direktkosten HTTP/1.1 Host: mi-waerme-servdesk.eras-online.de Accept: text/csv
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length
{"responseStatus":{"errorCode":"String","message":"String","stackTrace":"String","errors":[{"errorCode":"String","fieldName":"String","message":"String","meta":{"String":"String"}}],"meta":{"String":"String"}}}