/* Options: Date: 2024-12-23 11:51:46 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: ReferFriendLinkUsedRequest.* //ExcludeTypes: //DefaultImports: package:servicestack/servicestack.dart */ library ConsumerApi; import 'package:servicestack/servicestack.dart'; class ReferFriendUser implements IConvertible { String? firstName; String? lastName; String? profilePhotoUrl; ReferFriendUser({this.firstName,this.lastName,this.profilePhotoUrl}); ReferFriendUser.fromJson(Map json) { fromMap(json); } fromMap(Map json) { firstName = json['firstName']; lastName = json['lastName']; profilePhotoUrl = json['profilePhotoUrl']; return this; } Map toJson() => { 'firstName': firstName, 'lastName': lastName, 'profilePhotoUrl': profilePhotoUrl }; getTypeName() => "ReferFriendUser"; TypeContext? context = _ctx; } enum ReferFriendState { Available, Awarded, CanNotReferYourself, YouWereAlreadySignedUp, Expired, } class ReferFriendLinkUsedResponse implements IConvertible { ReferFriendUser? referringUser; DateTime? expiresAt; ReferFriendState? state; ReferFriendLinkUsedResponse({this.referringUser,this.expiresAt,this.state}); ReferFriendLinkUsedResponse.fromJson(Map json) { fromMap(json); } fromMap(Map json) { referringUser = JsonConverters.fromJson(json['referringUser'],'ReferFriendUser',context!); expiresAt = JsonConverters.fromJson(json['expiresAt'],'DateTime',context!); state = JsonConverters.fromJson(json['state'],'ReferFriendState',context!); return this; } Map toJson() => { 'referringUser': JsonConverters.toJson(referringUser,'ReferFriendUser',context!), 'expiresAt': JsonConverters.toJson(expiresAt,'DateTime',context!), 'state': JsonConverters.toJson(state,'ReferFriendState',context!) }; getTypeName() => "ReferFriendLinkUsedResponse"; TypeContext? context = _ctx; } // @Route("/share/refer-friend-link-used", "POST") class ReferFriendLinkUsedRequest implements IReturn, IPost, IConvertible { String? referFriendToken; ReferFriendLinkUsedRequest({this.referFriendToken}); ReferFriendLinkUsedRequest.fromJson(Map json) { fromMap(json); } fromMap(Map json) { referFriendToken = json['referFriendToken']; return this; } Map toJson() => { 'referFriendToken': referFriendToken }; createResponse() => ReferFriendLinkUsedResponse(); getResponseTypeName() => "ReferFriendLinkUsedResponse"; getTypeName() => "ReferFriendLinkUsedRequest"; TypeContext? context = _ctx; } TypeContext _ctx = TypeContext(library: 'ConsumerApi', types: { 'ReferFriendUser': TypeInfo(TypeOf.Class, create:() => ReferFriendUser()), 'ReferFriendState': TypeInfo(TypeOf.Enum, enumValues:ReferFriendState.values), 'ReferFriendLinkUsedResponse': TypeInfo(TypeOf.Class, create:() => ReferFriendLinkUsedResponse()), 'ReferFriendLinkUsedRequest': TypeInfo(TypeOf.Class, create:() => ReferFriendLinkUsedRequest()), });