/* Options: Date: 2025-10-14 12:53:37 Version: 8.80 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://testapi.bokamera.se //Package: //AddServiceStackTypes: True //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True IncludeTypes: CreateBookings.* //ExcludeTypes: //InitializeCollections: False //TreatTypesAsStrings: //DefaultImports: java.math.*,java.util.*,java.io.InputStream,net.servicestack.client.* */ import java.math.* import java.util.* import java.io.InputStream import net.servicestack.client.* @Route(Path="/bookings/repeat", Verbs="POST") @ApiResponse(Description="You were unauthorized to call this service", StatusCode=401) open class CreateBookings : CreateBookingBase(), IReturn { /** * Set the dates you want to book and it's quantities. It's an array of dates and quantities. */ @ApiMember(DataType="List", Description="Set the dates you want to book and it's quantities. It's an array of dates and quantities.", IsRequired=true) open var DatesToRepeat:ArrayList = ArrayList() companion object { private val responseType = CreateBookingsResponse::class.java } override fun getResponseType(): Any? = CreateBookings.responseType } open class CreateBookingsResponse { /** * The datetime you want to end the booking. */ @ApiMember(Description="The datetime you want to end the booking.", IsRequired=true) open var Created:ArrayList = ArrayList() /** * The dates that didn't work to book. */ @ApiMember(Description="The dates that didn't work to book.", IsRequired=true) open var Failed:ArrayList = ArrayList() open var ResponseStatus:ResponseStatus? = null } open class AddCustomField { open var Id:Int? = null open var Value:String? = null } enum class PaymentOptions { DefaultSetting, BookWithoutPayment, BookWithPaymentMessageToCustomer, BookWithManualPayment, } open class DatesToRepeat : IInterval { /** * Booking start */ @ApiMember(Description="Booking start") override var From:Date? = null /** * Booking end */ @ApiMember(Description="Booking end") override var To:Date? = null /** * Set the number of spots you want to book. You add number of spots per price category. Multiple spots require that the service has GroupBooking enabled. Default is one spot. */ @ApiMember(Description="Set the number of spots you want to book. You add number of spots per price category. Multiple spots require that the service has GroupBooking enabled. Default is one spot.") open var Quantities:ArrayList = ArrayList() } open class CustomerToHandle : CustomerBase() { } open class InvoiceAddressToHandle : IInvoiceAddress { override var CorporateIdentityNumber:String? = null override var InvoiceAddress1:String? = null override var InvoiceAddress2:String? = null override var InvoiceCity:String? = null override var InvoicePostalCode:String? = null override var InvoiceCountryCode:String? = null } open class ResourceToBook { open var ResourceTypeId:Int? = null open var ResourceId:Int? = null } open class CreateBookingBase : ICreateBookingBase { /** * 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.") override var CompanyId:UUID? = null /** * If you want to book on an existing customer instead of CustomerToBook info set the CustomerId here. Set Empty Guid (00000000-0000-0000-0000-000000000000) if you want to book without any customer, this is only allowed by admin. The customer id is shown in the customer list named as id. When booking as customer (no admin) leave this field blank. */ @ApiMember(Description="If you want to book on an existing customer instead of CustomerToBook info set the CustomerId here. Set Empty Guid (00000000-0000-0000-0000-000000000000) if you want to book without any customer, this is only allowed by admin. The customer id is shown in the customer list named as id. When booking as customer (no admin) leave this field blank.") override var CustomerId:UUID? = null /** * If company requires to be authenticated or a pin code entered to book on a specific customer, enter it here. */ @ApiMember(Description="If company requires to be authenticated or a pin code entered to book on a specific customer, enter it here.") override var PinCode:String? = null /** * If you want to book with customer information instead of the Customer Id send the customer information here. Note: If customer profile already exists with the same email the information will not be changed, instead the provided information will be added as BookingsComments if it differs from the ordinary profile. */ @ApiMember(Description="If you want to book with customer information instead of the Customer Id send the customer information here. Note: If customer profile already exists with the same email the information will not be changed, instead the provided information will be added as BookingsComments if it differs from the ordinary profile. ") override var Customer:CustomerToHandle? = null /** * If you want to book with customer information instead of the Customer Id send the customer information here. Note: If customer profile already exists with the same email the information will not be changed, instead the provided information will be added as BookingsComments if it differs from the ordinary profile. */ @ApiMember(Description="If you want to book with customer information instead of the Customer Id send the customer information here. Note: If customer profile already exists with the same email the information will not be changed, instead the provided information will be added as BookingsComments if it differs from the ordinary profile. ") override var InvoiceAddress:InvoiceAddressToHandle? = null /** * The service to be booked */ @ApiMember(Description="The service to be booked", IsRequired=true) override var ServiceId:Int? = null /** * If you want to add comments to a booking you can add them here, this comments are never shared with the customer */ @ApiMember(Description="If you want to add comments to a booking you can add them here, this comments are never shared with the customer") override var BookedComments:String? = null /** * If you want to add comments to the booking that is sent to the customer, you can add them here. Comments will be sent in the booking confirmation */ @ApiMember(Description="If you want to add comments to the booking that is sent to the customer, you can add them here. Comments will be sent in the booking confirmation") override var CommentsToCustomer:String? = null override var Resources:ArrayList = ArrayList() /** * Rebate codes applied to booking */ @ApiMember(Description="Rebate codes applied to booking") override var RebateCodeIds:ArrayList = ArrayList() /** * If you want to send Email reminder */ @ApiMember(Description="If you want to send Email reminder") override var SendEmailReminder:Boolean? = null /** * If you want to send SMS reminder */ @ApiMember(Description="If you want to send SMS reminder") override var SendSmsReminder:Boolean? = null /** * If you want to send SMS confirmation */ @ApiMember(Description="If you want to send SMS confirmation") override var SendSmsConfirmation:Boolean? = null /** * Only admins are allowed to not send an email confirmation. Default is true */ @ApiMember(Description="Only admins are allowed to not send an email confirmation. Default is true") override var SendEmailConfirmation:Boolean? = null /** * If payment is enabled and you're an administrator, optional to choose payment option, if empty then the default settings will be used. Following payment options exists. DefaultSetting = 0, BookWithoutPayment = 1 (will be direcyly booked without payment), BookWithPaymentMessageToCustomer = 2 (will set status AwaitingPayment and send payment instructions to customer), BookWithManualPayment = 3 (Will set status AwaitingPaymentNoTimeLimit and Admin will need to manually mark the booking as payed when recieved payment). */ @ApiMember(Description="If payment is enabled and you're an administrator, optional to choose payment option, if empty then the default settings will be used. Following payment options exists. DefaultSetting = 0, BookWithoutPayment = 1 (will be direcyly booked without payment), BookWithPaymentMessageToCustomer = 2 (will set status AwaitingPayment and send payment instructions to customer), BookWithManualPayment = 3 (Will set status AwaitingPaymentNoTimeLimit and Admin will need to manually mark the booking as payed when recieved payment).") override var PaymentOption:PaymentOptions? = null /** * If Custom Fields are added to the booking, here you will send the id and the value for each custom field to be saved */ @ApiMember(Description="If Custom Fields are added to the booking, here you will send the id and the value for each custom field to be saved") override var CustomFields:ArrayList = ArrayList() /** * If Custom Fields are added to the customer, here you will send the id and the value for each custom field to be updated */ @ApiMember(Description="If Custom Fields are added to the customer, here you will send the id and the value for each custom field to be updated") override var CustomerCustomFields:ArrayList = ArrayList() /** * If want to allow to book outside the service schedules. This means you can book a time after the schedule opening hours as long as the resource are available. This is only allowed by administrators */ @ApiMember(Description="If want to allow to book outside the service schedules. This means you can book a time after the schedule opening hours as long as the resource are available. This is only allowed by administrators") override var AllowBookingOutsideSchedules:Boolean? = null } interface ICreateBookingBase { var CompanyId:UUID? var CustomerId:UUID? var PinCode:String? var Customer:CustomerToHandle? var InvoiceAddress:InvoiceAddressToHandle? var ServiceId:Int? var BookedComments:String? var CommentsToCustomer:String? var Resources:ArrayList = ArrayList() var RebateCodeIds:ArrayList = ArrayList() var SendEmailReminder:Boolean? var SendSmsReminder:Boolean? var SendSmsConfirmation:Boolean? var SendEmailConfirmation:Boolean? var PaymentOption:PaymentOptions? var CustomFields:ArrayList = ArrayList() var CustomerCustomFields:ArrayList = ArrayList() var AllowBookingOutsideSchedules:Boolean? } interface IInterval { var From:Date? var To:Date? } open class CustomerBase : ICustomerBase { override var CustomerId:UUID? = null override var Firstname:String? = null override var Lastname:String? = null override var Email:String? = null override var Phone:String? = null override var SubscribedToNewsletter:Boolean? = null } interface ICustomerBase { var CustomerId:UUID? var Firstname:String? var Lastname:String? var Email:String? var Phone:String? var SubscribedToNewsletter:Boolean? } open class FailedBookings { open var From:Date? = null open var To:Date? = null open var Reason:String? = null /** * Set the number of spots you want to book. You add number of spots per price category. Multiple spots require that the service has GroupBooking enabled. Default is one spot. */ @ApiMember(Description="Set the number of spots you want to book. You add number of spots per price category. Multiple spots require that the service has GroupBooking enabled. Default is one spot.") open var Quantities:ArrayList = ArrayList() } interface IInvoiceAddress { var CorporateIdentityNumber:String? var InvoiceAddress1:String? var InvoiceAddress2:String? var InvoiceCity:String? var InvoicePostalCode:String? var InvoiceCountryCode:String? } open class BookingQueryResponse { open var Id:Int? = null open var CompanyId:UUID? = null open var From:Date? = null open var To:Date? = null open var Status:BookingStatusEnum? = null open var StatusId:Int? = null open var StatusName:String? = null open var StatusInfo:BookingStatusQueryResponse? = null open var SendEmailReminder:Boolean? = null open var SendSmsReminder:Boolean? = null open var SendSmsConfirmation:Boolean? = null open var SendEmailConfirmation:Boolean? = null open var LastTimeToUnBook:Date? = null open var CustomFields:ArrayList = ArrayList() open var CustomFieldValues:ArrayList = ArrayList() open var BookedResourceTypes:ArrayList = ArrayList() open var Company:BookedCompany? = null open var Customer:BookedCustomer? = null open var Quantities:ArrayList = ArrayList() open var Service:ServiceInfoResponse? = null open var InvoiceAddress:InvoiceAddressResponse? = null open var PaymentExpiration:Date? = null open var Log:ArrayList = ArrayList() open var PaymentLog:ArrayList = ArrayList() open var CheckoutLog:ArrayList = ArrayList() open var ExternalReference:ArrayList = ArrayList() open var ResponseStatus:ResponseStatus? = null open var LengthInMinutes:Int? = null open var BookedBy:String? = null open var BookedComments:String? = null open var UnbookedComments:String? = null open var CommentsToCustomer:String? = null open var CreatedDate:Date? = null open var UpdatedDate:Date? = null open var UnbookedOn:Date? = null open var CancellationCode:String? = null open var RatingCode:String? = null }