/* Options: Date: 2024-07-03 13:05:36 Version: 8.23 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://api.bokamera.se //Package: //AddServiceStackTypes: True //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True IncludeTypes: GetRebateCode.* //ExcludeTypes: //InitializeCollections: True //TreatTypesAsStrings: //DefaultImports: java.math.*,java.util.*,net.servicestack.client.*,com.google.gson.annotations.*,com.google.gson.reflect.* */ import java.math.* import java.util.* import net.servicestack.client.* import com.google.gson.annotations.* import com.google.gson.reflect.* @Route(Path="/rebatecodes", Verbs="GET") @ApiResponse(Description="You were unauthorized to call this service", StatusCode=401) @ValidateRequest(Validator="IsAuthenticated") open class GetRebateCode : QueryDb(), IReturn>, ICompany { /** * Enter the company and id you want to see the information for a rebate code, if blank company id and you are an admin, your company id will be used. If blank id, all rebate codes will be shown */ @ApiMember(Description="Enter the company and id you want to see the information for a rebate code, if blank company id and you are an admin, your company id will be used. If blank id, all rebate codes will be shown ", ParameterType="query") var CompanyId:UUID? = null /** * RebateCodeId */ @ApiMember(Description="RebateCodeId") var Id:Int? = null /** * */ @ApiMember(Description="") var Active:Boolean? = null /** * */ @ApiMember(Description="") var IncludeCodeTypeOptions:Boolean? = null /** * */ @ApiMember(Description="") var IncludeStatusOptions:Boolean? = null /** * */ @ApiMember(Description="") var IncludeConnectedServices:Boolean? = null /** * */ @ApiMember(Description="") var IncludeConnectedDaysOfWeek:Boolean? = null /** * */ @ApiMember(Description="") var IncludeConnectedCustomers:Boolean? = null companion object { private val responseType = object : TypeToken>(){}.type } override fun getResponseType(): Any? = GetRebateCode.responseType } @DataContract open class QueryResponse { @DataMember(Order=1) var Offset:Int? = null @DataMember(Order=2) var Total:Int? = null @DataMember(Order=3) var Results:ArrayList = ArrayList() @DataMember(Order=4) var Meta:HashMap = HashMap() @DataMember(Order=5) var ResponseStatus:ResponseStatus? = null } open class QueryDb : QueryBase() { } open interface ICompany { var CompanyId:UUID? } open class Customer : BaseModel(), IUser, ICustomFieldTable { var IdentityId:Int? = null var Id:UUID? = null @Ignore() var CustomerId:UUID? = null @Ignore() var AccessKeys:IList? = null var Email:String? = null @Ignore() var ExternalReferences:IList? = null @Ignore() var CustomFieldsConfig:IList? = null @Ignore() var CustomFieldsData:IList? = null @Ignore() var Comments:IList? = null var Firstname:String? = null @Ignore() var ImageUrl:String? = null @Required() var Active:Boolean? = null var FacebookUsername:String? = null @Required() var Updated:Date? = null @Required() var Created:Date? = null var IpAddress:String? = null var ModifiedDate:Date? = null var TextField1:String? = null var TextField2:String? = null var TextField3:String? = null var TextField4:String? = null var TextField5:String? = null var TextField6:String? = null var TextField7:String? = null var TextField8:String? = null var TextField9:String? = null var TextField10:String? = null var TextField11:String? = null var TextField12:String? = null var TextField13:String? = null var TextField14:String? = null var TextField15:String? = null var TextField16:String? = null var TextField17:String? = null var TextField18:String? = null var TextField19:String? = null var TextField20:String? = null var UserId:UUID? = null var Lastname:String? = null var Phone:String? = null var CorporateIdentityNumber:String? = null var InvoiceAddress1:String? = null var InvoiceAddress2:String? = null var InvoiceCity:String? = null var InvoicePostalCode:String? = null var InvoiceCountryCode:String? = null @Required() var CompanyId:UUID? = null var SubscribedToNewsletter:Boolean? = null } open class RebateCode : BaseModel() { @References(RebateCodeType.class) var RebateCodeTypeId:Int? = null var RebateCodeTypeInfo:RebateCodeType? = null @References(RebateCodeStatus.class) var RebateCodeStatusId:Int? = null var RebateCodeStatusInfo:RebateCodeType? = null @Ignore() var Services:ArrayList = ArrayList() var RebateCodeDayOfWeekRelation:ArrayList = ArrayList() var RebateCodeServiceRelation:ArrayList = ArrayList() var RebateCodeBookingPriceRelation:ArrayList = ArrayList() var RebateCodeCustomerRelation:ArrayList = ArrayList() @Ignore() var DaysOfWeek:ArrayList = ArrayList() @Ignore() var Customers:ArrayList = ArrayList() @Ignore() var RebateCodeStatus:RebateCodeStatus? = null @Ignore() var RebateCodeType:RebateCodeType? = null @Ignore() var CurrentNumberOfUsesPerCustomer:Int? = null @Ignore() var IsSpecificByDayOfWeek:Boolean? = null @Ignore() var Active:Boolean? = null var CompanyId:UUID? = null @Required() var ValidFrom:Date? = null @Required() var ValidTo:Date? = null @Required() var RebateCodeSign:String? = null @Required() var RebateCodeValue:Int? = null @Required() var MaxNumberOfUses:Int? = null @Required() var MaxNumberOfUsesPerCustomer:Int? = null @Required() var NumberOfUsesUsed:Int? = null var PersonalNote:String? = null @Required() var CreatedBy:String? = null @Required() var Created:Date? = null @Required() var UpdatedBy:String? = null @Required() var Updated:Date? = null @Required() var FromTime:TimeSpan? = null @Required() var ToTime:TimeSpan? = null var ModifiedDate:Date? = null var Id:Int? = null } open class DaysOfWeekResponse { var Id:Int? = null var DayOfWeek:String? = null var DayOfWeekTranslation:String? = null var DayOfWeekActive:Boolean? = null var DayOfWeekSortOrder:Short? = null } open class RebateCodeServiceResponse { var Id:Int? = null var Name:String? = null var Description:String? = null var Active:Boolean? = null } open class RebateCodeCustomerResponse { var Id:UUID? = null var Firstname:String? = null var Lastname:String? = null var Email:String? = null var Phone:String? = null var ImageUrl:String? = null } @DataContract open class QueryBase { /** * Skip over a given number of elements in a sequence and then return the remainder. Use this when you need paging.

Example:
?skip=10&orderBy=Id */ @DataMember(Order=1) var Skip:Int? = null /** * Return a given number of elements in a sequence and then skip over the remainder. Use this when you need paging.

Example:
?take=20 */ @DataMember(Order=2) var Take:Int? = null /** * Comma separated list of fields to order by. Prefix the field name with a minus if you wan't to invert the sort for that field.

Example:
?orderBy=Id,-Age,FirstName */ @DataMember(Order=3) var OrderBy:String? = null /** * Comma separated list of fields to order by in descending order. Prefix the field name with a minus if you wan't to invert the sort for that field.

Example:
?orderByDesc=Id,-Age,FirstName */ @DataMember(Order=4) var OrderByDesc:String? = null /** * Include any of the aggregates AVG, COUNT, FIRST, LAST, MAX, MIN, SUM in your result set. The results will be returned in the meta field.

Example:
?include=COUNT(*) as Total

or multiple fields with
?include=Count(*) Total, Min(Age), AVG(Age) AverageAge

or unique with
?include=COUNT(DISTINCT LivingStatus) as UniqueStatus */ @DataMember(Order=5) var Include:String? = null @DataMember(Order=6) var Fields:String? = null @DataMember(Order=7) var Meta:HashMap = HashMap() } open class BaseModel { } open class RebateCodeType : BaseModel() { @Required() var Name:String? = null var Description:String? = null var ModifiedDate:Date? = null var Id:Int? = null } open class RebateCodeDayOfWeekRelation : BaseModel() { @Ignore() var DayOfWeek:BokaMeraDayOfWeek? = null @Required() var DayOfWeekId:Int? = null @Required() var RebateCodeId:Int? = null @Required() var CompanyId:UUID? = null var Id:Int? = null var ModifiedDate:Date? = null } open class RebateCodeServiceRelation : BaseModel() { @Required() var CompanyId:UUID? = null @Required() var ServiceId:Int? = null @Required() var RebateCodeId:Int? = null var Id:Int? = null var ModifiedDate:Date? = null } open class RebateCodeBookingPriceRelation : BaseModel() { @Required() var CompanyId:UUID? = null @Required() var PriceId:Int? = null @Required() var RebateCodeId:Int? = null var Id:Int? = null var ModifiedDate:Date? = null } open class RebateCodeCustomerRelation : BaseModel() { @Required() var CompanyId:UUID? = null @Required() var CustomerId:UUID? = null @Required() var RebateCodeId:Int? = null var Id:Int? = null var ModifiedDate:Date? = null } open class DaysOfWeek : BaseModel() { @Required() var DayOfWeek:String? = null @Required() var DayOfWeekTranslation:String? = null var DayOfWeekActive:Boolean? = null var DayOfWeekSortOrder:Short? = null var ModifiedDate:Date? = null var Id:Int? = null } open class RebateCodeStatus : BaseModel() { @Required() var Name:String? = null var Description:String? = null var ModifiedDate:Date? = null var Id:Int? = null } enum class BokaMeraDayOfWeek(val value:Int) { Monday(1), Tuesday(2), Wednesday(3), Thursday(4), Friday(5), Saturday(6), Sunday(7), } open class Customer { var City:String? = null var CountryCode:String? = null var IdentityNumber:String? = null var Email:String? = null var FirstName:String? = null var LastName:String? = null var Phone:String? = null var PostalCode:String? = null var Street:String? = null var Reference:String? = null var Type:CustomerType? = null } open class RebateCodeResponse { var Id:Int? = null var CompanyId:UUID? = null var ValidFrom:Date? = null var ValidTo:Date? = null /** * If the price is only valid for specific days in week add a comma separated list of which days this day price belongs to, 1 = Monday .. 7 = Sunday. All old days connected will be removed on update. */ @ApiMember(Description="If the price is only valid for specific days in week add a comma separated list of which days this day price belongs to, 1 = Monday .. 7 = Sunday. All old days connected will be removed on update.") var FromTime:TimeSpan? = null /** * If the price is only valid for a specific time span during a time of day enter the FromTime and ToTime parameters. */ @ApiMember(Description="If the price is only valid for a specific time span during a time of day enter the FromTime and ToTime parameters.") var ToTime:TimeSpan? = null var CreatedBy:String? = null var Created:Date? = null var UpdatedBy:String? = null var Updated:Date? = null var PersonalNote:String? = null var RebateCodeSign:String? = null var RebateCodeValue:Int? = null var RebateCodeTypeId:Int? = null var Name:String? = null var RebateCodeStatusId:Int? = null var StatusName:String? = null var MaxNumberOfUses:Int? = null var MaxNumberOfUsesPerCustomer:Int? = null var NumberOfUsesUsed:Int? = null var NumberOfUsesPerCustomerUsed:Int? = null var DaysOfWeek:ArrayList = ArrayList() var Services:ArrayList = ArrayList() var Customers:ArrayList = ArrayList() var RebateCodeTypesOptions:ArrayList = ArrayList() var RebateCodeStatusOptions:ArrayList = ArrayList() var ResponseStatus:ResponseStatus? = null } open class RebateCodeTypeResponse { var ResponseStatus:ResponseStatus? = null var RebateCodeTypeItems:ArrayList = ArrayList() } open class RebateCodeStatusResponse { var ResponseStatus:ResponseStatus? = null var RebateCodeStatusItems:ArrayList = ArrayList() }