/* Options: Date: 2026-11-20 23:45:39 Version: 10.40 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://api.testenv.webhop.biz //GlobalNamespace: //AddServiceStackTypes: True //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True IncludeTypes: GetSelfServiceDeviceBettingSession.* //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; } class Ref implements IConvertible { String id = ""; String val = ""; Ref({this.id="",this.val=""}); Ref.fromJson(Map json) { fromMap(json); } fromMap(Map json) { id = json['id'] ?? ""; val = json['val'] ?? ""; return this; } Map toJson() => { 'id': id, 'val': val }; getTypeName() => "Ref"; TypeContext? context = _ctx; } class RecordList extends ListBase implements IConvertible { final List l = []; set length(int newLength) { l.length = newLength; } int get length => l.length; T operator [](int index) => l[index]; void operator []=(int index, T value) { l[index] = value; } RecordList(); RecordList.fromJson(Map json) : super(); fromMap(Map json) { return this; } Map toJson() => {}; getTypeName() => "RecordList<$T>"; TypeContext? context = _ctx; } class SessionStatus { static const SessionStatus Opening = const SessionStatus._(1); static const SessionStatus Open = const SessionStatus._(2); static const SessionStatus Ending = const SessionStatus._(3); static const SessionStatus Ended = const SessionStatus._(4); static const SessionStatus Rejected = const SessionStatus._(5); final int _value; const SessionStatus._(this._value); int get value => _value; static List get values => const [Opening,Open,Ending,Ended,Rejected]; } class TopUpStatus { static const TopUpStatus Pending = const TopUpStatus._(1); static const TopUpStatus Completed = const TopUpStatus._(2); static const TopUpStatus Failed = const TopUpStatus._(3); final int _value; const TopUpStatus._(this._value); int get value => _value; static List get values => const [Pending,Completed,Failed]; } class SessionTopUp implements IConvertible { String? id; Money? amount; Ref? clerk; TopUpStatus? status; String? failureReason; SessionTopUp({this.id,this.amount,this.clerk,this.status,this.failureReason}); SessionTopUp.fromJson(Map json) { fromMap(json); } fromMap(Map json) { id = json['id']; amount = JsonConverters.fromJson(json['amount'],'Money',context!); clerk = JsonConverters.fromJson(json['clerk'],'Ref',context!); status = JsonConverters.fromJson(json['status'],'TopUpStatus',context!); failureReason = json['failureReason']; return this; } Map toJson() => { 'id': id, 'amount': JsonConverters.toJson(amount,'Money',context!), 'clerk': JsonConverters.toJson(clerk,'Ref',context!), 'status': JsonConverters.toJson(status,'TopUpStatus',context!), 'failureReason': failureReason }; getTypeName() => "SessionTopUp"; TypeContext? context = _ctx; } class SelfServiceDeviceBettingSession implements IConvertible { String? id; Ref? device; Ref? location; SessionStatus? status; DateTime? startedAt; Ref? issuedByClerk; String? patronName; Money? initialCredit; RecordList? topUps; String? payoutId; Money? payout; String? rejectionReason; SelfServiceDeviceBettingSession({this.id,this.device,this.location,this.status,this.startedAt,this.issuedByClerk,this.patronName,this.initialCredit,this.topUps,this.payoutId,this.payout,this.rejectionReason}); SelfServiceDeviceBettingSession.fromJson(Map json) { fromMap(json); } fromMap(Map json) { id = json['id']; device = JsonConverters.fromJson(json['device'],'Ref',context!); location = JsonConverters.fromJson(json['location'],'Ref',context!); status = JsonConverters.fromJson(json['status'],'SessionStatus',context!); startedAt = JsonConverters.fromJson(json['startedAt'],'DateTime',context!) ?? DateTime(0); issuedByClerk = JsonConverters.fromJson(json['issuedByClerk'],'Ref',context!); patronName = json['patronName']; initialCredit = JsonConverters.fromJson(json['initialCredit'],'Money',context!); topUps = JsonConverters.fromJson(json['topUps'],'RecordList',context!); payoutId = json['payoutId']; payout = JsonConverters.fromJson(json['payout'],'Money',context!); rejectionReason = json['rejectionReason']; return this; } Map toJson() => { 'id': id, 'device': JsonConverters.toJson(device,'Ref',context!), 'location': JsonConverters.toJson(location,'Ref',context!), 'status': JsonConverters.toJson(status,'SessionStatus',context!), 'startedAt': JsonConverters.toJson(startedAt,'DateTime',context!), 'issuedByClerk': JsonConverters.toJson(issuedByClerk,'Ref',context!), 'patronName': patronName, 'initialCredit': JsonConverters.toJson(initialCredit,'Money',context!), 'topUps': JsonConverters.toJson(topUps,'RecordList',context!), 'payoutId': payoutId, 'payout': JsonConverters.toJson(payout,'Money',context!), 'rejectionReason': rejectionReason }; getTypeName() => "SelfServiceDeviceBettingSession"; TypeContext? context = _ctx; } // @Route("/qry/self-service-device-betting-sessions/{Id}", "GET") class GetSelfServiceDeviceBettingSession implements IReturn, IConvertible, IGet { String? id; GetSelfServiceDeviceBettingSession({this.id}); GetSelfServiceDeviceBettingSession.fromJson(Map json) { fromMap(json); } fromMap(Map json) { id = json['id']; return this; } Map toJson() => { 'id': id }; createResponse() => SelfServiceDeviceBettingSession(); getResponseTypeName() => "SelfServiceDeviceBettingSession"; getTypeName() => "GetSelfServiceDeviceBettingSession"; TypeContext? context = _ctx; } TypeContext _ctx = TypeContext(library: 'api.testenv.webhop.biz', types: { 'Money': TypeInfo(TypeOf.Class, create:() => Money()), 'Ref': TypeInfo(TypeOf.Class, create:() => Ref()), 'RecordList': TypeInfo(TypeOf.GenericDef,create:() => RecordList()), 'SessionStatus': TypeInfo(TypeOf.Enum, enumValues:SessionStatus.values), 'TopUpStatus': TypeInfo(TypeOf.Enum, enumValues:TopUpStatus.values), 'SessionTopUp': TypeInfo(TypeOf.Class, create:() => SessionTopUp()), 'SelfServiceDeviceBettingSession': TypeInfo(TypeOf.Class, create:() => SelfServiceDeviceBettingSession()), 'RecordList': TypeInfo(TypeOf.Class, create:() => RecordList()), 'GetSelfServiceDeviceBettingSession': TypeInfo(TypeOf.Class, create:() => GetSelfServiceDeviceBettingSession()), });