/* Options: Date: 2025-07-18 08:26:59 Version: 6.110 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: http://portal-api.migrantleap.com //GlobalNamespace: //AddServiceStackTypes: True //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True IncludeTypes: SubsRequest.* //ExcludeTypes: //DefaultImports: package:servicestack/servicestack.dart */ import 'package:servicestack/servicestack.dart'; class MSubBenefit implements IConvertible { int? id; String? name; bool? status; int? order; bool? hasContent; String? image; String? rssHash; MSubBenefit({this.id,this.name,this.status,this.order,this.hasContent,this.image,this.rssHash}); MSubBenefit.fromJson(Map json) { fromMap(json); } fromMap(Map json) { id = json['id']; name = json['name']; status = json['status']; order = json['order']; hasContent = json['hasContent']; image = json['image']; rssHash = json['rssHash']; return this; } Map toJson() => { 'id': id, 'name': name, 'status': status, 'order': order, 'hasContent': hasContent, 'image': image, 'rssHash': rssHash }; getTypeName() => "MSubBenefit"; TypeContext? context = _ctx; } class MBenefit implements IConvertible { int? id; String? name; bool? status; int? order; String? image; List? subBenefits; MBenefit({this.id,this.name,this.status,this.order,this.image,this.subBenefits}); MBenefit.fromJson(Map json) { fromMap(json); } fromMap(Map json) { id = json['id']; name = json['name']; status = json['status']; order = json['order']; image = json['image']; subBenefits = JsonConverters.fromJson(json['subBenefits'],'List',context!); return this; } Map toJson() => { 'id': id, 'name': name, 'status': status, 'order': order, 'image': image, 'subBenefits': JsonConverters.toJson(subBenefits,'List',context!) }; getTypeName() => "MBenefit"; TypeContext? context = _ctx; } class MSubscription implements IConvertible { int? id; String? name; String? description; bool? status; double? yearlyPrice; double? price; int? order; String? icon; String? paymentLink; String? yearlyPaymentLink; String? sid; String? yearlySid; double? discount; List? benefits; MSubscription({this.id,this.name,this.description,this.status,this.yearlyPrice,this.price,this.order,this.icon,this.paymentLink,this.yearlyPaymentLink,this.sid,this.yearlySid,this.discount,this.benefits}); MSubscription.fromJson(Map json) { fromMap(json); } fromMap(Map json) { id = json['id']; name = json['name']; description = json['description']; status = json['status']; yearlyPrice = JsonConverters.toDouble(json['yearlyPrice']); price = JsonConverters.toDouble(json['price']); order = json['order']; icon = json['icon']; paymentLink = json['paymentLink']; yearlyPaymentLink = json['yearlyPaymentLink']; sid = json['sid']; yearlySid = json['yearlySid']; discount = JsonConverters.toDouble(json['discount']); benefits = JsonConverters.fromJson(json['benefits'],'List',context!); return this; } Map toJson() => { 'id': id, 'name': name, 'description': description, 'status': status, 'yearlyPrice': yearlyPrice, 'price': price, 'order': order, 'icon': icon, 'paymentLink': paymentLink, 'yearlyPaymentLink': yearlyPaymentLink, 'sid': sid, 'yearlySid': yearlySid, 'discount': discount, 'benefits': JsonConverters.toJson(benefits,'List',context!) }; getTypeName() => "MSubscription"; TypeContext? context = _ctx; } class SubsResponse implements IConvertible { List? subscriptions; int? responseCode; String? responseMessage; SubsResponse({this.subscriptions,this.responseCode,this.responseMessage}); SubsResponse.fromJson(Map json) { fromMap(json); } fromMap(Map json) { subscriptions = JsonConverters.fromJson(json['subscriptions'],'List',context!); responseCode = json['responseCode']; responseMessage = json['responseMessage']; return this; } Map toJson() => { 'subscriptions': JsonConverters.toJson(subscriptions,'List',context!), 'responseCode': responseCode, 'responseMessage': responseMessage }; getTypeName() => "SubsResponse"; TypeContext? context = _ctx; } // @Route("/subs", "GET") class SubsRequest implements IReturn, IConvertible, IGet { String? lang; SubsRequest({this.lang}); SubsRequest.fromJson(Map json) { fromMap(json); } fromMap(Map json) { lang = json['lang']; return this; } Map toJson() => { 'lang': lang }; createResponse() => SubsResponse(); getResponseTypeName() => "SubsResponse"; getTypeName() => "SubsRequest"; TypeContext? context = _ctx; } TypeContext _ctx = TypeContext(library: 'portal_api.migrantleap.com', types: { 'MSubBenefit': TypeInfo(TypeOf.Class, create:() => MSubBenefit()), 'MBenefit': TypeInfo(TypeOf.Class, create:() => MBenefit()), 'List': TypeInfo(TypeOf.Class, create:() => []), 'MSubscription': TypeInfo(TypeOf.Class, create:() => MSubscription()), 'List': TypeInfo(TypeOf.Class, create:() => []), 'SubsResponse': TypeInfo(TypeOf.Class, create:() => SubsResponse()), 'List': TypeInfo(TypeOf.Class, create:() => []), 'SubsRequest': TypeInfo(TypeOf.Class, create:() => SubsRequest()), });