/* Options: Date: 2025-06-28 05:37:54 Version: 8.23 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://api.bookmore.com //Package: //AddServiceStackTypes: True //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True IncludeTypes: CreateIncentive.* //ExcludeTypes: //InitializeCollections: True //TreatTypesAsStrings: //DefaultImports: java.math.*,java.util.*,net.servicestack.client.* */ import java.math.* import java.util.* import net.servicestack.client.* @Route(Path="/superadmin/incentives", Verbs="POST") @ValidateRequest(Validator="IsAuthenticated") @ApiResponse(Description="You were unauthorized to call this service", StatusCode=401) open class CreateIncentive : IReturn { @ApiMember(IsRequired=true) var Heading:String? = null @ApiMember() var StorageUrl:String? = null @ApiMember() var Body:String? = null @ApiMember(IsRequired=true) var SuccessButtonText:String? = null @ApiMember(IsRequired=true) var ActionId:Int? = null @ApiMember(IsRequired=true) var Frequency:IncentiveRecurrenceFrequency? = null @ApiMember() var RecurrenceInterval:Long? = null @ApiMember(IsRequired=true) var InitialDelayInSeconds:Int? = null @ApiMember(IsRequired=true) var MaxDisplayCount:Int? = null @ApiMember(IsRequired=true) var ValidFrom:Date? = null @ApiMember(IsRequired=true) var ValidTo:Date? = null @ApiMember() var Active:Boolean? = null @ApiMember() var Payload:String? = null var CompanyIds:ArrayList = ArrayList() var Criteria:ArrayList = ArrayList() /** * Number of days to wait after first display attempt before displaying the incentive. Set to 0 to show immediately. */ @ApiMember(Description="Number of days to wait after first display attempt before displaying the incentive. Set to 0 to show immediately.", IsRequired=true) var InitialDeferredDays:Int? = null companion object { private val responseType = AdminIncentiveQueryResponse::class.java } override fun getResponseType(): Any? = CreateIncentive.responseType } open class AdminIncentiveQueryResponse : CompanyIncentiveResponse() { var Frequency:IncentiveRecurrenceFrequency? = null var RecurrenceInterval:Long? = null var CreatedDate:Date? = null var ModifiedDate:Date? = null var CompanyIds:ArrayList = ArrayList() var Criteria:ArrayList = ArrayList() var ApplyToAllCompanies:Boolean? = null var Action:IncentiveActionResponse? = null } enum class IncentiveRecurrenceFrequency(val value:Int) { OneTime(1), Weekly(2), Monthly(3), } open class IncentiveCriteriaDto { var CriteriaType:CriteriaType? = null var Value:String? = null var InvertCondition:Boolean? = null } open class CompanyIncentiveResponse { var Id:Int? = null var Heading:String? = null var StorageUrl:String? = null var SuccessButtonText:String? = null var ActionId:Int? = null var InitialDelayInSeconds:Int? = null var MaxDisplayCount:Int? = null var ValidFrom:Date? = null var ValidTo:Date? = null var Action:IncentiveActionResponse? = null var Payload:String? = null @ApiMember() var Body:String? = null @ApiMember(IsRequired=true) var Frequency:IncentiveRecurrenceFrequency? = null @ApiMember(IsRequired=true) var InitialDeferredDays:Int? = null @ApiMember() var RecurrenceInterval:Long? = null @ApiMember() var Active:Boolean? = null var CompanyIds:ArrayList = ArrayList() var Criteria:ArrayList = ArrayList() } open class IncentiveCriteria : BaseModel() { var Id:Int? = null var IncentiveId:Int? = null var CriteriaType:CriteriaType? = null var Value:String? = null var InvertCondition:Boolean? = null var CreatedDate:Date? = null } open class BaseModel { } enum class CriteriaType { LicenseAvailability, SmsActivation, EAccountingActivation, CodeLockActivation, SocialActivation, OnlinePaymentActivation, FollowUpMessageActivation, RatingActivation, } open class IncentiveActionResponse { var Id:Int? = null var Description:String? = null var ActionType:IncentiveActionType? = null var Page:String? = null var Segment:String? = null var Element:String? = null var LicenseTypeId:Int? = null var SuggestedLicenseToUpgrade:LicenseTypeQueryResponse? = null }