/* Options: Date: 2024-06-26 11:05:14 Version: 8.23 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: True //TreatTypesAsStrings: //DefaultImports: java.math.*,java.util.*,net.servicestack.client.* */ import java.math.* import java.util.* 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) 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) var Created:ArrayList = ArrayList() /** * The dates that didn't work to book. */ @ApiMember(Description="The dates that didn't work to book.", IsRequired=true) var Failed:ArrayList = ArrayList() var ResponseStatus:ResponseStatus? = null } open class AddCustomField { var Id:Int? = null var Value:String? = null } enum class PaymentOptions { DefaultSetting, BookWithoutPayment, BookWithPaymentMessageToCustomer, BookWithManualPayment, } open class DatesToRepeat : IInterval { /** * Booking start */ @ApiMember(Description="Booking start") var From:Date? = null /** * Booking end */ @ApiMember(Description="Booking end") 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.") var Quantities:ArrayList? = null } open class CustomerToBook { /** * Customers firstname */ @ApiMember(Description="Customers firstname", IsRequired=true) var Firstname:String? = null /** * Customers lastname */ @ApiMember(Description="Customers lastname", IsRequired=true) var Lastname:String? = null /** * Customers email */ @ApiMember(Description="Customers email", IsRequired=true) var Email:String? = null /** * Customers phone number. Mobile phone number is required for SMS messages to be sent. */ @ApiMember(Description="Customers phone number. Mobile phone number is required for SMS messages to be sent.", IsRequired=true) var Phone:String? = null } open class ResourceToBook { var ResourceTypeId:Int? = null var ResourceId:Int? = null } open class CreateBookingBase { /** * 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.") 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.") 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.") 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 ordinairy 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 ordinairy profile. ") var Customer:CustomerToBook? = null /** * The service to be booked */ @ApiMember(Description="The service to be booked", IsRequired=true) 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") 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") var CommentsToCustomer:String? = null var Resources:ArrayList = ArrayList() /** * Rebate code ids as an array of integer */ @ApiMember(Description="Rebate code ids as an array of integer") var RebateCodeIds:ArrayList = ArrayList() /** * If you want to send Email reminder */ @ApiMember(Description="If you want to send Email reminder") var SendEmailReminder:Boolean? = null /** * If you want to send SMS reminder */ @ApiMember(Description="If you want to send SMS reminder") var SendSmsReminder:Boolean? = null /** * If you want to send SMS confirmation */ @ApiMember(Description="If you want to send SMS confirmation") 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") 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).") 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") 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") 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") var AllowBookingOutsideSchedules:Boolean? = null } open interface IInterval { var From:Date? var To:Date? } open class FailedBookings { var From:Date? = null var To:Date? = null 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.") var Quantities:ArrayList? = null } open class BookingQueryResponse { var Id:Int? = null var CompanyId:UUID? = null var From:Date? = null var To:Date? = null var Status:BookingStatusEnum? = null var StatusId:Int? = null var StatusName:String? = null var StatusInfo:BookingStatusQueryResponse? = null var SendEmailReminder:Boolean? = null var SendSmsReminder:Boolean? = null var SendSmsConfirmation:Boolean? = null var SendEmailConfirmation:Boolean? = null var LastTimeToUnBook:Date? = null var CustomFields:ArrayList = ArrayList() var CustomFieldValues:ArrayList = ArrayList() var BookedResourceTypes:ArrayList = ArrayList() var Company:BookedCompany? = null var Customer:BookedCustomer? = null var Quantities:ArrayList = ArrayList() var Service:ServiceInfoResponse? = null var PaymentExpiration:Date? = null var Log:ArrayList = ArrayList() var PaymentLog:ArrayList = ArrayList() var CheckoutLog:ArrayList = ArrayList() var ExternalReference:ArrayList = ArrayList() var ResponseStatus:ResponseStatus? = null var CalendarExportStatus:BookingCalendarExportStatus? = null var LengthInMinutes:Int? = null var BookedBy:String? = null var BookedComments:String? = null var UnbookedComments:String? = null var CommentsToCustomer:String? = null var CreatedDate:Date? = null var UpdatedDate:Date? = null var UnbookedOn:Date? = null var CancellationCode:String? = null var RatingCode:String? = null }