/* Options: Date: 2026-11-07 03:13:21 Version: 10.40 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://api.bettor.webhop.biz //GlobalNamespace: //AddServiceStackTypes: True //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True IncludeTypes: CreateCashbookEntry.* //ExcludeTypes: //DefaultImports: package:servicestack/servicestack.dart */ import 'package:servicestack/servicestack.dart'; class Money implements IConvertible { double amount = 0; String currency = ""; Money({this.amount=0,this.currency=""}); Money.fromJson(Map json) { fromMap(json); } fromMap(Map json) { amount = JsonConverters.toDouble(json['amount']) ?? 0; currency = json['currency'] ?? ""; return this; } Map toJson() => { 'amount': amount, 'currency': currency }; getTypeName() => "Money"; TypeContext? context = _ctx; } // @Route("/cmd/cashbook/entries", "POST") class CreateCashbookEntry implements IReturn, IConvertible, IPost { String? id; String? locationId; DateTime? chargedAt; Money? amount; String? description; CreateCashbookEntry({this.id,this.locationId,this.chargedAt,this.amount,this.description}); CreateCashbookEntry.fromJson(Map json) { fromMap(json); } fromMap(Map json) { id = json['id']; locationId = json['locationId']; chargedAt = JsonConverters.fromJson(json['chargedAt'],'DateTime',context!) ?? DateTime(0); amount = JsonConverters.fromJson(json['amount'],'Money',context!); description = json['description']; return this; } Map toJson() => { 'id': id, 'locationId': locationId, 'chargedAt': JsonConverters.toJson(chargedAt,'DateTime',context!), 'amount': JsonConverters.toJson(amount,'Money',context!), 'description': description }; createResponse() => ResponseStatus(); getResponseTypeName() => "ResponseStatus"; getTypeName() => "CreateCashbookEntry"; TypeContext? context = _ctx; } TypeContext _ctx = TypeContext(library: 'api.bettor.webhop.biz', types: { 'Money': TypeInfo(TypeOf.Class, create:() => Money()), 'CreateCashbookEntry': TypeInfo(TypeOf.Class, create:() => CreateCashbookEntry()), });