Server

<back to all web services

GetDirektkosten

Direktkosten
Requires Authentication
The following routes are available for this service:
GET/api/v1/direktkosten/{Guid}
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 GetDirektkostenResponse implements IConvertible
{
    Direktkosten? direktkosten;
    ResponseStatus? responseStatus;

    GetDirektkostenResponse({this.direktkosten,this.responseStatus});
    GetDirektkostenResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        direktkosten = JsonConverters.fromJson(json['direktkosten'],'Direktkosten',context!);
        responseStatus = JsonConverters.fromJson(json['responseStatus'],'ResponseStatus',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'direktkosten': JsonConverters.toJson(direktkosten,'Direktkosten',context!),
        'responseStatus': JsonConverters.toJson(responseStatus,'ResponseStatus',context!)
    };

    getTypeName() => "GetDirektkostenResponse";
    TypeContext? context = _ctx;
}

class GetDirektkosten implements IHasBearerToken, IConvertible
{
    // @ApiMember(IsRequired=true, ParameterType="query")
    String? bearerToken;

    // @ApiMember(IsRequired=true, ParameterType="path")
    String? guid;

    GetDirektkosten({this.bearerToken,this.guid});
    GetDirektkosten.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        bearerToken = json['bearerToken'];
        guid = json['guid'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'bearerToken': bearerToken,
        'guid': guid
    };

    getTypeName() => "GetDirektkosten";
    TypeContext? context = _ctx;
}

TypeContext _ctx = TypeContext(library: 'plasa_servdesk.eras_online.de', types: <String, TypeInfo> {
    'BillingInformation': TypeInfo(TypeOf.Class, create:() => BillingInformation()),
    'Direktkosten': TypeInfo(TypeOf.Class, create:() => Direktkosten()),
    'GetDirektkostenResponse': TypeInfo(TypeOf.Class, create:() => GetDirektkostenResponse()),
    'GetDirektkosten': TypeInfo(TypeOf.Class, create:() => GetDirektkosten()),
});

Dart GetDirektkosten DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other

HTTP + OTHER

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

GET /api/v1/direktkosten/{Guid} HTTP/1.1 
Host: plasa-servdesk.eras-online.de 
Accept: text/jsonl
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length

{"direktkosten":{"guid":"00000000000000000000000000000000","label":"String","date":"0001-01-01T00:00:00.0000000Z","brutto":0,"salesTax":0,"quantity":0,"type":"String","isDeleted":false,"isCreatedByApp":false,"nutzerGuid":"00000000000000000000000000000000","billingInformation":{"guid":"String","from":"0001-01-01T00:00:00.0000000Z","to":"0001-01-01T00:00:00.0000000Z","isCompleted":false,"hasNebenkosten":false}},"responseStatus":{"errorCode":"String","message":"String","stackTrace":"String","errors":[{"errorCode":"String","fieldName":"String","message":"String","meta":{"String":"String"}}],"meta":{"String":"String"}}}