/* Options: Date: 2025-09-22 22:29:03 Version: 6.21 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://accounts.dev.healthmonix.com/api/ //GlobalNamespace: //AddServiceStackTypes: True //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True IncludeTypes: GetCoupons.* //ExcludeTypes: //DefaultImports: package:servicestack/servicestack.dart */ import 'package:servicestack/servicestack.dart'; class CouponDto implements IConvertible { int? id; String? name; String? description; DateTime? effectiveDate; String? discountType; Map? productDiscounts; CouponDto({this.id,this.name,this.description,this.effectiveDate,this.discountType,this.productDiscounts}); CouponDto.fromJson(Map json) { fromMap(json); } fromMap(Map json) { id = json['id']; name = json['name']; description = json['description']; effectiveDate = JsonConverters.fromJson(json['effectiveDate'],'DateTime',context!); discountType = json['discountType']; productDiscounts = JsonConverters.fromJson(json['productDiscounts'],'Map',context!); return this; } Map toJson() => { 'id': id, 'name': name, 'description': description, 'effectiveDate': JsonConverters.toJson(effectiveDate,'DateTime',context!), 'discountType': discountType, 'productDiscounts': JsonConverters.toJson(productDiscounts,'Map',context!) }; getTypeName() => "CouponDto"; TypeContext? context = _ctx; } class GetCouponsResponse implements IConvertible { List? results; GetCouponsResponse({this.results}); GetCouponsResponse.fromJson(Map json) { fromMap(json); } fromMap(Map json) { results = JsonConverters.fromJson(json['results'],'List',context!); return this; } Map toJson() => { 'results': JsonConverters.toJson(results,'List',context!) }; getTypeName() => "GetCouponsResponse"; TypeContext? context = _ctx; } // @Route("/coupons", "GET") class GetCoupons implements IReturn, IConvertible { String? name; DateTime? fromDate; DateTime? toDate; String? discountType; GetCoupons({this.name,this.fromDate,this.toDate,this.discountType}); GetCoupons.fromJson(Map json) { fromMap(json); } fromMap(Map json) { name = json['name']; fromDate = JsonConverters.fromJson(json['fromDate'],'DateTime',context!); toDate = JsonConverters.fromJson(json['toDate'],'DateTime',context!); discountType = json['discountType']; return this; } Map toJson() => { 'name': name, 'fromDate': JsonConverters.toJson(fromDate,'DateTime',context!), 'toDate': JsonConverters.toJson(toDate,'DateTime',context!), 'discountType': discountType }; createResponse() => GetCouponsResponse(); getResponseTypeName() => "GetCouponsResponse"; getTypeName() => "GetCoupons"; TypeContext? context = _ctx; } TypeContext _ctx = TypeContext(library: 'accounts.dev.healthmonix.com', types: { 'CouponDto': TypeInfo(TypeOf.Class, create:() => CouponDto()), 'Map': TypeInfo(TypeOf.Class, create:() => Map()), 'GetCouponsResponse': TypeInfo(TypeOf.Class, create:() => GetCouponsResponse()), 'List': TypeInfo(TypeOf.Class, create:() => []), 'GetCoupons': TypeInfo(TypeOf.Class, create:() => GetCoupons()), });