/* Options: Date: 2025-09-15 18:23:31 Version: 8.80 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://api.bookmore.com //Package: //AddServiceStackTypes: True //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True IncludeTypes: CustomerQuery.* //ExcludeTypes: //InitializeCollections: False //TreatTypesAsStrings: //DefaultImports: java.math.*,java.util.*,java.io.InputStream,net.servicestack.client.*,com.google.gson.annotations.*,com.google.gson.reflect.* */ import java.math.* import java.util.* import java.io.InputStream import net.servicestack.client.* import com.google.gson.annotations.* import com.google.gson.reflect.* @Route(Path="/customers", Verbs="GET") @ApiResponse(Description="You were unauthorized to call this service", StatusCode=401) @ValidateRequest(Validator="IsAuthenticated") open class CustomerQuery : QueryDb(), IReturn> { /** * Enter the company and id you want to see the information for a customer, if blank company id and you are an admin, your company id will be used. If blank id, all resources will be shown */ @ApiMember(Description="Enter the company and id you want to see the information for a customer, if blank company id and you are an admin, your company id will be used. If blank id, all resources will be shown ", IsRequired=true, ParameterType="query") open var CompanyId:UUID? = null /** * Enter the customer id you want to see the information for a customer. Only admins are allowed to see all customers on their company, users can only see their own customer info. */ @ApiMember(Description="Enter the customer id you want to see the information for a customer. Only admins are allowed to see all customers on their company, users can only see their own customer info.", ParameterType="query") open var CustomerId:UUID? = null /** * Enter the user id you want to see the information for a customer. Only admins are allowed to see all customers on their company, users can only see their own customer info. User Id is the userprofile */ @ApiMember(Description="Enter the user id you want to see the information for a customer. Only admins are allowed to see all customers on their company, users can only see their own customer info. User Id is the userprofile", ParameterType="query") open var UserId:UUID? = null /** * Will search by any customer name,phone or email that contains the searchstring provided. */ @ApiMember(Description="Will search by any customer name,phone or email that contains the searchstring provided.", ParameterType="query") open var Search:String? = null /** * If you want to filter on visible customers. */ @ApiMember(Description="If you want to filter on visible customers.", ParameterType="query") open var Visible:Boolean? = null /** * If you want to include the connected custom fields */ @ApiMember(DataType="boolean", Description="If you want to include the connected custom fields", ParameterType="query") open var IncludeCustomFieldValues:Boolean? = null /** * If you want to include the connected custom fields */ @ApiMember(DataType="boolean", Description="If you want to include the connected custom fields", ParameterType="query") open var IncludeCustomFields:Boolean? = null /** * If you want to include the comments on the customer */ @ApiMember(DataType="boolean", Description="If you want to include the comments on the customer", ParameterType="query") open var IncludeComments:Boolean? = null /** * If you want to include the accesskeys */ @ApiMember(Description="If you want to include the accesskeys") open var IncludeAccessKeys:Boolean? = null /** * If you want to include invoice address */ @ApiMember(Description="If you want to include invoice address") open var IncludeInvoiceAddress:Boolean? = null companion object { private val responseType = object : TypeToken>(){}.type } override fun getResponseType(): Any? = CustomerQuery.responseType } @DataContract open class QueryResponse { @DataMember(Order=1) open var Offset:Int? = null @DataMember(Order=2) open var Total:Int? = null @DataMember(Order=3) open var Results:ArrayList? = null @DataMember(Order=4) open var Meta:HashMap? = null @DataMember(Order=5) open var ResponseStatus:ResponseStatus? = null } open class QueryDb : QueryBase() { } open class Customer : BaseModel(), IUser, ICustomFieldTable { open var IdentityId:Int? = null override var Id:UUID? = null @Ignore() open var CustomerId:UUID? = null @Ignore() open var AccessKeys:IList? = null override var Email:String? = null @Ignore() open var ExternalReferences:IList? = null @Ignore() open var InvoiceAddress:IList? = null @Ignore() open var MainInvoiceAddress:InvoiceAddress? = null @Ignore() open var Company:Company? = null @Ignore() override var CustomFieldsConfig:IList? = null @Ignore() override var CustomFieldsData:IList? = null @Ignore() open var Comments:IList? = null @Ignore() open var RebateCodes:IList? = null override var Firstname:String? = null @Ignore() open var FullName:String? = null @Ignore() open var ImageUrl:String? = null @Required() open var Active:Boolean? = null open var FacebookUsername:String? = null @Required() open var Updated:Date? = null @Required() open var Created:Date? = null open var IpAddress:String? = null open var ModifiedDate:Date? = null override var TextField1:String? = null override var TextField2:String? = null override var TextField3:String? = null override var TextField4:String? = null override var TextField5:String? = null override var TextField6:String? = null override var TextField7:String? = null override var TextField8:String? = null override var TextField9:String? = null override var TextField10:String? = null override var TextField11:String? = null override var TextField12:String? = null override var TextField13:String? = null override var TextField14:String? = null override var TextField15:String? = null override var TextField16:String? = null override var TextField17:String? = null override var TextField18:String? = null override var TextField19:String? = null override var TextField20:String? = null override var UserId:UUID? = null override var Lastname:String? = null override var Phone:String? = null open var CorporateIdentityNumber:String? = null open var InvoiceAddress1:String? = null open var InvoiceAddress2:String? = null open var InvoiceCity:String? = null open var InvoicePostalCode:String? = null open var InvoiceCountryCode:String? = null @Required() open var CompanyId:UUID? = null open var SubscribedToNewsletter:Boolean? = null } open class InvoiceAddressResponse { open var InvoiceAddressId:UUID? = null open var UserId:UUID? = null open var CorporateIdentityNumber:String? = null open var InvoiceAddress1:String? = null open var InvoiceAddress2:String? = null open var InvoiceCity:String? = null open var InvoicePostalCode:String? = null open var InvoiceCountryCode:String? = null } open class CustomFieldConfigData { /** * Custom field id */ @ApiMember(Description="Custom field id") open var Id:Int? = null /** * Configuration name. Example: 'Number of persons'. */ @ApiMember(Description="Configuration name. Example: 'Number of persons'.") open var Name:String? = null /** * Custom field description. Example: 'For how many persons is this booking?' */ @ApiMember(Description="Custom field description. Example: 'For how many persons is this booking?'") open var Description:String? = null /** * Field width. Example: 20 for 20px */ @ApiMember(Description="Field width. Example: 20 for 20px") open var Width:Int? = null /** * Data field of custom field. Valid values are: TextBox, ... Example: 'TextBox' */ @ApiMember(Description="Data field of custom field. Valid values are: TextBox, ... Example: 'TextBox'") open var DataType:String? = null /** * Default value of the field. Example: '3' */ @ApiMember(Description="Default value of the field. Example: '3'") open var DefaultValue:String? = null /** * Determines if the field is required to have a value or not */ @ApiMember(Description="Determines if the field is required to have a value or not") open var IsMandatory:Boolean? = null /** * Error message shown to the user if the field data is required but not entered */ @ApiMember(Description="Error message shown to the user if the field data is required but not entered") open var MandatoryErrorMessage:String? = null /** * Max lenght of the field */ @ApiMember(Description="Max lenght of the field") open var MaxLength:Int? = null /** * If the field should have multiple lines */ @ApiMember(Description="If the field should have multiple lines") open var MultipleLineText:Boolean? = null /** * Regular expression used for validation of the field */ @ApiMember(Description="Regular expression used for validation of the field") open var RegEx:String? = null /** * Error message shown if the regular expression validation failed */ @ApiMember(Description="Error message shown if the regular expression validation failed") open var RegExErrorMessage:String? = null /** * The values to select from if Datatype is DropDown for this custom field */ @ApiMember(Description="The values to select from if Datatype is DropDown for this custom field") open var Values:ArrayList? = null } open class CustomFieldDataResponse { open var Id:Int? = null open var Column:String? = null open var Name:String? = null open var Description:String? = null open var Value:String? = null /** * Data field of custom field. Valid values are: TextBox, ... Example: 'TextBox' */ @ApiMember(Description="Data field of custom field. Valid values are: TextBox, ... Example: 'TextBox'") open var DataType:String? = null } open class UserAccessKeys : BaseModel() { @Required() open var CompanyId:UUID? = null @Required() open var AccessKeyTypeId:Int? = null @Required() open var Value:String? = null @Required() open var CustomerId:UUID? = null open var Description:String? = null @Required() open var Id:UUID? = 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) open 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) open 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) open 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) open 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) open var Include:String? = null @DataMember(Order=6) open var Fields:String? = null @DataMember(Order=7) open var Meta:HashMap? = null } open class BaseModel { } open class CustomFieldValueResponse { open var Value:String? = null } open class Customer { open var City:String? = null open var CountryCode:String? = null open var IdentityNumber:String? = null open var Email:String? = null open var FirstName:String? = null open var LastName:String? = null open var Phone:String? = null open var PostalCode:String? = null open var Street:String? = null open var Reference:String? = null open var Type:CustomerType? = null } open class CustomerQueryResponse { open var Id:UUID? = null open var Firstname:String? = null open var Lastname:String? = null open var Email:String? = null open var Phone:String? = null open var ImageUrl:String? = null open var CustomFields:ArrayList? = null open var CustomFieldValues:ArrayList? = null open var Comments:ArrayList? = null open var AccessKeys:ArrayList? = null open var Updated:Date? = null open var Created:Date? = null open var ResponseStatus:Object? = null open var SubscribedToNewsletter:Boolean? = null open var InvoiceAddress:InvoiceAddressResponse? = null } open class CustomerCommentsResponse { open var Id:Int? = null open var CustomerId:UUID? = null open var Comments:String? = null open var Updated:Date? = null open var Created:Date? = null open var ImageUrl:Uri? = null }