| GET | /api/v1/objekte/ |
|---|
import 'package:servicestack/servicestack.dart';
import 'dart:typed_data';
// @DataContract
class CustomerObjekt implements IConvertible
{
// @DataMember(Name="Guid")
String? Guid;
// @DataMember(Name="ZeitraumVon")
DateTime? ZeitraumVon;
// @DataMember(Name="ZeitraumBis")
DateTime? ZeitraumBis;
// @DataMember(Name="IstKunde")
bool? IstKunde;
// @DataMember(Name="IstEigentümer")
bool? IstEigent_mer;
// @DataMember(Name="IstEigentümerPseudo")
bool? IstEigent_merPseudo;
// @DataMember(Name="ObjektGuid")
String? ObjektGuid;
// @DataMember(Name="KundeGuid")
String? KundeGuid;
CustomerObjekt({this.Guid,this.ZeitraumVon,this.ZeitraumBis,this.IstKunde,this.IstEigent_mer,this.IstEigent_merPseudo,this.ObjektGuid,this.KundeGuid});
CustomerObjekt.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Guid = json['guid'];
ZeitraumVon = JsonConverters.fromJson(json['rangeFrom'],'DateTime',context!);
ZeitraumBis = JsonConverters.fromJson(json['rangeTo'],'DateTime',context!);
IstKunde = json['isCustomer'];
IstEigent_mer = json['isOwner'];
IstEigent_merPseudo = json['isOwnerPseudo'];
ObjektGuid = json['objektGuid'];
KundeGuid = json['customerGuid'];
return this;
}
Map<String, dynamic> toJson() => {
'guid': Guid,
'zeitraumVon': JsonConverters.toJson(ZeitraumVon,'DateTime',context!),
'zeitraumBis': JsonConverters.toJson(ZeitraumBis,'DateTime',context!),
'istKunde': IstKunde,
'istEigent_mer': IstEigent_mer,
'istEigent_merPseudo': IstEigent_merPseudo,
'objektGuid': ObjektGuid,
'kundeGuid': KundeGuid
};
getTypeName() => "CustomerObjekt";
TypeContext? context = _ctx;
}
class GetObjektListResponse implements IConvertible
{
List<CustomerObjekt>? customerObjekteList;
ResponseStatus? responseStatus;
GetObjektListResponse({this.customerObjekteList,this.responseStatus});
GetObjektListResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
customerObjekteList = JsonConverters.fromJson(json['customerObjekteList'],'List<CustomerObjekt>',context!);
responseStatus = JsonConverters.fromJson(json['responseStatus'],'ResponseStatus',context!);
return this;
}
Map<String, dynamic> toJson() => {
'customerObjekteList': JsonConverters.toJson(customerObjekteList,'List<CustomerObjekt>',context!),
'responseStatus': JsonConverters.toJson(responseStatus,'ResponseStatus',context!)
};
getTypeName() => "GetObjektListResponse";
TypeContext? context = _ctx;
}
class GetObjektList implements IHasBearerToken, IConvertible
{
// @ApiMember(IsRequired=true, ParameterType="query")
String? bearerToken;
// @ApiMember(ParameterType="query")
String? include;
/**
* Optional! Follow the format : /api/v1/objekte?filter[Customer]=*
*/
// @DataMember(Name="filter[Customer]")
// @ApiMember(Description="Optional! Follow the format : /api/v1/objekte?filter[Customer]=*", ParameterType="query")
String? filter_Customer_;
/**
* Optional! Follow the format : /api/v1/objekte?filter[Number]=*
*/
// @DataMember(Name="filter[Number]")
// @ApiMember(Description="Optional! Follow the format : /api/v1/objekte?filter[Number]=*", ParameterType="query")
String? filter_Number_;
/**
* Optional! Follow the format : /api/v1/objekte?filter[Address]=*
*/
// @DataMember(Name="filter[Address]")
// @ApiMember(Description="Optional! Follow the format : /api/v1/objekte?filter[Address]=*", ParameterType="query")
String? filter_Address_;
GetObjektList({this.bearerToken,this.include,this.filter_Customer_,this.filter_Number_,this.filter_Address_});
GetObjektList.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
bearerToken = json['bearerToken'];
include = json['include'];
filter_Customer_ = json['filterByCustomer'];
filter_Number_ = json['filterByNumber'];
filter_Address_ = json['filterByAddress'];
return this;
}
Map<String, dynamic> toJson() => {
'bearerToken': bearerToken,
'include': include,
'filter_Customer_': filter_Customer_,
'filter_Number_': filter_Number_,
'filter_Address_': filter_Address_
};
getTypeName() => "GetObjektList";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'fairtherm_servdesk.eras_online.de', types: <String, TypeInfo> {
'CustomerObjekt': TypeInfo(TypeOf.Class, create:() => CustomerObjekt()),
'GetObjektListResponse': TypeInfo(TypeOf.Class, create:() => GetObjektListResponse()),
'List<CustomerObjekt>': TypeInfo(TypeOf.Class, create:() => <CustomerObjekt>[]),
'GetObjektList': TypeInfo(TypeOf.Class, create:() => GetObjektList()),
});
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/objekte/ HTTP/1.1 Host: fairtherm-servdesk.eras-online.de Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<GetObjektListResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Eras2Web.Service.Desktop.Server.ServiceModel.Eras2WebExt.Get">
<CustomerObjekteList 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>
</GetObjektListResponse>