/* Options: Date: 2024-12-23 12:10:05 Version: 8.0 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://consumer-api.brovs.com //GlobalNamespace: ConsumerApi //AddServiceStackTypes: True //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True IncludeTypes: GetRewardsStatusRequest.* //ExcludeTypes: //DefaultImports: package:servicestack/servicestack.dart */ library ConsumerApi; import 'package:servicestack/servicestack.dart'; class RewardInfo implements IConvertible { int? points; int? count; int? pointsGrantedOnSuccess; RewardInfo({this.points,this.count,this.pointsGrantedOnSuccess}); RewardInfo.fromJson(Map json) { fromMap(json); } fromMap(Map json) { points = json['points']; count = json['count']; pointsGrantedOnSuccess = json['pointsGrantedOnSuccess']; return this; } Map toJson() => { 'points': points, 'count': count, 'pointsGrantedOnSuccess': pointsGrantedOnSuccess }; getTypeName() => "RewardInfo"; TypeContext? context = _ctx; } class ActiveLottery implements IConvertible { int? id; DateTime? firstDay; DateTime? lastDay; String? contentBeforeSharing; String? contentAfterSharing; String? countryCode; int? yourNumberOfTicketsInThisLottery; ActiveLottery({this.id,this.firstDay,this.lastDay,this.contentBeforeSharing,this.contentAfterSharing,this.countryCode,this.yourNumberOfTicketsInThisLottery}); ActiveLottery.fromJson(Map json) { fromMap(json); } fromMap(Map json) { id = json['id']; firstDay = JsonConverters.fromJson(json['firstDay'],'DateTime',context!); lastDay = JsonConverters.fromJson(json['lastDay'],'DateTime',context!); contentBeforeSharing = json['contentBeforeSharing']; contentAfterSharing = json['contentAfterSharing']; countryCode = json['countryCode']; yourNumberOfTicketsInThisLottery = json['yourNumberOfTicketsInThisLottery']; return this; } Map toJson() => { 'id': id, 'firstDay': JsonConverters.toJson(firstDay,'DateTime',context!), 'lastDay': JsonConverters.toJson(lastDay,'DateTime',context!), 'contentBeforeSharing': contentBeforeSharing, 'contentAfterSharing': contentAfterSharing, 'countryCode': countryCode, 'yourNumberOfTicketsInThisLottery': yourNumberOfTicketsInThisLottery }; getTypeName() => "ActiveLottery"; TypeContext? context = _ctx; } class GetRewardsStatusResponse implements IConvertible { int? pointsInTotal; int? pointsExpiringAtEndOfThisYear; RewardInfo? referFriend; RewardInfo? sharePlace; RewardInfo? shareAdMessage; RewardInfo? referBusiness; int? pointsAwardedForSignup; ActiveLottery? activeLottery; GetRewardsStatusResponse({this.pointsInTotal,this.pointsExpiringAtEndOfThisYear,this.referFriend,this.sharePlace,this.shareAdMessage,this.referBusiness,this.pointsAwardedForSignup,this.activeLottery}); GetRewardsStatusResponse.fromJson(Map json) { fromMap(json); } fromMap(Map json) { pointsInTotal = json['pointsInTotal']; pointsExpiringAtEndOfThisYear = json['pointsExpiringAtEndOfThisYear']; referFriend = JsonConverters.fromJson(json['referFriend'],'RewardInfo',context!); sharePlace = JsonConverters.fromJson(json['sharePlace'],'RewardInfo',context!); shareAdMessage = JsonConverters.fromJson(json['shareAdMessage'],'RewardInfo',context!); referBusiness = JsonConverters.fromJson(json['referBusiness'],'RewardInfo',context!); pointsAwardedForSignup = json['pointsAwardedForSignup']; activeLottery = JsonConverters.fromJson(json['activeLottery'],'ActiveLottery',context!); return this; } Map toJson() => { 'pointsInTotal': pointsInTotal, 'pointsExpiringAtEndOfThisYear': pointsExpiringAtEndOfThisYear, 'referFriend': JsonConverters.toJson(referFriend,'RewardInfo',context!), 'sharePlace': JsonConverters.toJson(sharePlace,'RewardInfo',context!), 'shareAdMessage': JsonConverters.toJson(shareAdMessage,'RewardInfo',context!), 'referBusiness': JsonConverters.toJson(referBusiness,'RewardInfo',context!), 'pointsAwardedForSignup': pointsAwardedForSignup, 'activeLottery': JsonConverters.toJson(activeLottery,'ActiveLottery',context!) }; getTypeName() => "GetRewardsStatusResponse"; TypeContext? context = _ctx; } // @Route("/user/rewards", "GET") class GetRewardsStatusRequest implements IReturn, IGet, IConvertible { GetRewardsStatusRequest(); GetRewardsStatusRequest.fromJson(Map json) : super(); fromMap(Map json) { return this; } Map toJson() => {}; createResponse() => GetRewardsStatusResponse(); getResponseTypeName() => "GetRewardsStatusResponse"; getTypeName() => "GetRewardsStatusRequest"; TypeContext? context = _ctx; } TypeContext _ctx = TypeContext(library: 'ConsumerApi', types: { 'RewardInfo': TypeInfo(TypeOf.Class, create:() => RewardInfo()), 'ActiveLottery': TypeInfo(TypeOf.Class, create:() => ActiveLottery()), 'GetRewardsStatusResponse': TypeInfo(TypeOf.Class, create:() => GetRewardsStatusResponse()), 'GetRewardsStatusRequest': TypeInfo(TypeOf.Class, create:() => GetRewardsStatusRequest()), });