/* Options: Date: 2025-06-28 08:13:59 Version: 8.23 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://api.bookmore.com //GlobalNamespace: //AddServiceStackTypes: True //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True IncludeTypes: CompanyIncentiveQuery.* //ExcludeTypes: //DefaultImports: package:servicestack/servicestack.dart */ import 'package:servicestack/servicestack.dart'; abstract class ICompany { String? CompanyId; } enum IncentiveRecurrenceFrequency { OneTime, Weekly, Monthly, } enum CriteriaType { LicenseAvailability, SmsActivation, eAccountingActivation, CodeLockActivation, SocialActivation, OnlinePaymentActivation, FollowUpMessageActivation, RatingActivation, } class IncentiveCriteriaDto implements IConvertible { CriteriaType? CriteriaType; String? Value; bool? InvertCondition; IncentiveCriteriaDto({this.CriteriaType,this.Value,this.InvertCondition}); IncentiveCriteriaDto.fromJson(Map json) { fromMap(json); } fromMap(Map json) { CriteriaType = JsonConverters.fromJson(json['CriteriaType'],'CriteriaType',context!); Value = json['Value']; InvertCondition = json['InvertCondition']; return this; } Map toJson() => { 'CriteriaType': JsonConverters.toJson(CriteriaType,'CriteriaType',context!), 'Value': Value, 'InvertCondition': InvertCondition }; getTypeName() => "IncentiveCriteriaDto"; TypeContext? context = _ctx; } class IncentiveActionResponse implements IConvertible { int? Id; String? Description; IncentiveActionType? ActionType; String? Page; String? Segment; String? Element; int? LicenseTypeId; LicenseTypeQueryResponse? SuggestedLicenseToUpgrade; IncentiveActionResponse({this.Id,this.Description,this.ActionType,this.Page,this.Segment,this.Element,this.LicenseTypeId,this.SuggestedLicenseToUpgrade}); IncentiveActionResponse.fromJson(Map json) { fromMap(json); } fromMap(Map json) { Id = json['Id']; Description = json['Description']; ActionType = JsonConverters.fromJson(json['ActionType'],'IncentiveActionType',context!); Page = json['Page']; Segment = json['Segment']; Element = json['Element']; LicenseTypeId = json['LicenseTypeId']; SuggestedLicenseToUpgrade = JsonConverters.fromJson(json['SuggestedLicenseToUpgrade'],'LicenseTypeQueryResponse',context!); return this; } Map toJson() => { 'Id': Id, 'Description': Description, 'ActionType': JsonConverters.toJson(ActionType,'IncentiveActionType',context!), 'Page': Page, 'Segment': Segment, 'Element': Element, 'LicenseTypeId': LicenseTypeId, 'SuggestedLicenseToUpgrade': JsonConverters.toJson(SuggestedLicenseToUpgrade,'LicenseTypeQueryResponse',context!) }; getTypeName() => "IncentiveActionResponse"; TypeContext? context = _ctx; } class CompanyIncentiveResponse implements IConvertible { int? Id; String? Heading; String? StorageUrl; String? SuccessButtonText; int? ActionId; int? InitialDelayInSeconds; int? MaxDisplayCount; DateTime? ValidFrom; DateTime? ValidTo; IncentiveActionResponse? Action; String? Payload; // @ApiMember() String? Body; // @ApiMember(IsRequired=true) IncentiveRecurrenceFrequency? Frequency; // @ApiMember(IsRequired=true) int? InitialDeferredDays; // @ApiMember() int? RecurrenceInterval; // @ApiMember() bool? Active; List? CompanyIds; List? Criteria; CompanyIncentiveResponse({this.Id,this.Heading,this.StorageUrl,this.SuccessButtonText,this.ActionId,this.InitialDelayInSeconds,this.MaxDisplayCount,this.ValidFrom,this.ValidTo,this.Action,this.Payload,this.Body,this.Frequency,this.InitialDeferredDays,this.RecurrenceInterval,this.Active,this.CompanyIds,this.Criteria}); CompanyIncentiveResponse.fromJson(Map json) { fromMap(json); } fromMap(Map json) { Id = json['Id']; Heading = json['Heading']; StorageUrl = json['StorageUrl']; SuccessButtonText = json['SuccessButtonText']; ActionId = json['ActionId']; InitialDelayInSeconds = json['InitialDelayInSeconds']; MaxDisplayCount = json['MaxDisplayCount']; ValidFrom = JsonConverters.fromJson(json['ValidFrom'],'DateTime',context!); ValidTo = JsonConverters.fromJson(json['ValidTo'],'DateTime',context!); Action = JsonConverters.fromJson(json['Action'],'IncentiveActionResponse',context!); Payload = json['Payload']; Body = json['Body']; Frequency = JsonConverters.fromJson(json['Frequency'],'IncentiveRecurrenceFrequency',context!); InitialDeferredDays = json['InitialDeferredDays']; RecurrenceInterval = json['RecurrenceInterval']; Active = json['Active']; CompanyIds = JsonConverters.fromJson(json['CompanyIds'],'List',context!); Criteria = JsonConverters.fromJson(json['Criteria'],'List',context!); return this; } Map toJson() => { 'Id': Id, 'Heading': Heading, 'StorageUrl': StorageUrl, 'SuccessButtonText': SuccessButtonText, 'ActionId': ActionId, 'InitialDelayInSeconds': InitialDelayInSeconds, 'MaxDisplayCount': MaxDisplayCount, 'ValidFrom': JsonConverters.toJson(ValidFrom,'DateTime',context!), 'ValidTo': JsonConverters.toJson(ValidTo,'DateTime',context!), 'Action': JsonConverters.toJson(Action,'IncentiveActionResponse',context!), 'Payload': Payload, 'Body': Body, 'Frequency': JsonConverters.toJson(Frequency,'IncentiveRecurrenceFrequency',context!), 'InitialDeferredDays': InitialDeferredDays, 'RecurrenceInterval': RecurrenceInterval, 'Active': Active, 'CompanyIds': JsonConverters.toJson(CompanyIds,'List',context!), 'Criteria': JsonConverters.toJson(Criteria,'List',context!) }; getTypeName() => "CompanyIncentiveResponse"; TypeContext? context = _ctx; } class CompanyIncentivesQueryResponse implements IConvertible { List? Incentives; String? CompanyId; CompanyIncentivesQueryResponse({this.Incentives,this.CompanyId}); CompanyIncentivesQueryResponse.fromJson(Map json) { fromMap(json); } fromMap(Map json) { Incentives = JsonConverters.fromJson(json['Incentives'],'List',context!); CompanyId = json['CompanyId']; return this; } Map toJson() => { 'Incentives': JsonConverters.toJson(Incentives,'List',context!), 'CompanyId': CompanyId }; getTypeName() => "CompanyIncentivesQueryResponse"; TypeContext? context = _ctx; } // @Route("/companies/{CompanyId}/incentives", "GET") // @ValidateRequest(Validator="IsAuthenticated") // @ApiResponse(Description="You were unauthorized to call this service", StatusCode=401) class CompanyIncentiveQuery implements IReturn, ICompany, IConvertible, IGet { /** * The company id, if empty will use the company id for the user you are logged in with. */ // @ApiMember(Description="The company id, if empty will use the company id for the user you are logged in with.", IsRequired=true, ParameterType="path") String? CompanyId; CompanyIncentiveQuery({this.CompanyId}); CompanyIncentiveQuery.fromJson(Map json) { fromMap(json); } fromMap(Map json) { CompanyId = json['CompanyId']; return this; } Map toJson() => { 'CompanyId': CompanyId }; createResponse() => CompanyIncentivesQueryResponse(); getResponseTypeName() => "CompanyIncentivesQueryResponse"; getTypeName() => "CompanyIncentiveQuery"; TypeContext? context = _ctx; } TypeContext _ctx = TypeContext(library: 'api.bookmore.com', types: { 'ICompany': TypeInfo(TypeOf.Interface), 'IncentiveRecurrenceFrequency': TypeInfo(TypeOf.Enum, enumValues:IncentiveRecurrenceFrequency.values), 'CriteriaType': TypeInfo(TypeOf.Enum, enumValues:CriteriaType.values), 'IncentiveCriteriaDto': TypeInfo(TypeOf.Class, create:() => IncentiveCriteriaDto()), 'IncentiveActionResponse': TypeInfo(TypeOf.Class, create:() => IncentiveActionResponse()), 'IncentiveActionType': TypeInfo(TypeOf.Class, create:() => IncentiveActionType()), 'LicenseTypeQueryResponse': TypeInfo(TypeOf.Class, create:() => LicenseTypeQueryResponse()), 'CompanyIncentiveResponse': TypeInfo(TypeOf.Class, create:() => CompanyIncentiveResponse()), 'List': TypeInfo(TypeOf.Class, create:() => []), 'CompanyIncentivesQueryResponse': TypeInfo(TypeOf.Class, create:() => CompanyIncentivesQueryResponse()), 'List': TypeInfo(TypeOf.Class, create:() => []), 'CompanyIncentiveQuery': TypeInfo(TypeOf.Class, create:() => CompanyIncentiveQuery()), });