/* Options: Date: 2024-06-17 12:39:29 Version: 8.23 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://testapi.bokamera.se //GlobalNamespace: //MakePropertiesOptional: False //AddServiceStackTypes: True //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True IncludeTypes: CreateBookings.* //ExcludeTypes: //DefaultImports: */ export interface IReturn { createResponse(): T; } // @DataContract export class ResponseError { // @DataMember(Order=1) public ErrorCode: string; // @DataMember(Order=2) public FieldName: string; // @DataMember(Order=3) public Message: string; // @DataMember(Order=4) public Meta: { [index: string]: string; }; public constructor(init?: Partial) { (Object as any).assign(this, init); } } // @DataContract export class ResponseStatus { // @DataMember(Order=1) public ErrorCode: string; // @DataMember(Order=2) public Message: string; // @DataMember(Order=3) public StackTrace: string; // @DataMember(Order=4) public Errors: ResponseError[]; // @DataMember(Order=5) public Meta: { [index: string]: string; }; public constructor(init?: Partial) { (Object as any).assign(this, init); } } export class AddCustomField { public Id: number; public Value: string; public constructor(init?: Partial) { (Object as any).assign(this, init); } } export enum PaymentOptions { DefaultSetting = 'DefaultSetting', BookWithoutPayment = 'BookWithoutPayment', BookWithPaymentMessageToCustomer = 'BookWithPaymentMessageToCustomer', BookWithManualPayment = 'BookWithManualPayment', } export class DatesToRepeat implements IInterval { /** @description Booking start */ // @ApiMember(Description="Booking start") public From: string; /** @description Booking end */ // @ApiMember(Description="Booking end") public To: string; /** @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. */ // @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.") public Quantities: QuantityToBook[]; public constructor(init?: Partial) { (Object as any).assign(this, init); } } export class CustomerToBook { /** @description Customers firstname */ // @ApiMember(Description="Customers firstname", IsRequired=true) public Firstname: string; /** @description Customers lastname */ // @ApiMember(Description="Customers lastname", IsRequired=true) public Lastname: string; /** @description Customers email */ // @ApiMember(Description="Customers email", IsRequired=true) public Email: string; /** @description 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) public Phone: string; public constructor(init?: Partial) { (Object as any).assign(this, init); } } export class ResourceToBook { public ResourceTypeId: number; public ResourceId: number; public constructor(init?: Partial) { (Object as any).assign(this, init); } } export class CreateBookingBase { /** @description 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.") public CompanyId?: string; /** @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. */ // @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.") public CustomerId?: string; /** @description 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.") public PinCode: string; /** @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. */ // @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. ") public Customer: CustomerToBook; /** @description The service to be booked */ // @ApiMember(Description="The service to be booked", IsRequired=true) public ServiceId: number; /** @description 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") public BookedComments: string; /** @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 */ // @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") public CommentsToCustomer: string; public Resources: ResourceToBook[]; /** @description Rebate code ids as an array of integer */ // @ApiMember(Description="Rebate code ids as an array of integer") public RebateCodeIds: number[]; /** @description If you want to send Email reminder */ // @ApiMember(Description="If you want to send Email reminder") public SendEmailReminder?: boolean; /** @description If you want to send SMS reminder */ // @ApiMember(Description="If you want to send SMS reminder") public SendSmsReminder?: boolean; /** @description If you want to send SMS confirmation */ // @ApiMember(Description="If you want to send SMS confirmation") public SendSmsConfirmation?: boolean; /** @description 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") public SendEmailConfirmation?: boolean; /** @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). */ // @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).") public PaymentOption: PaymentOptions; /** @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 */ // @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") public CustomFields: AddCustomField[]; /** @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 */ // @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") public CustomerCustomFields: AddCustomField[]; /** @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 */ // @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") public AllowBookingOutsideSchedules: boolean; public constructor(init?: Partial) { (Object as any).assign(this, init); } } export interface IInterval { From: string; To: string; } export class FailedBookings { public From: string; public To: string; public Reason: string; /** @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. */ // @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.") public Quantities: QuantityToBook[]; public constructor(init?: Partial) { (Object as any).assign(this, init); } } export class BookingQueryResponse { public Id: number; public CompanyId: string; public From: string; public To: string; public Status: BookingStatusEnum; public StatusId: number; public StatusName: string; public StatusInfo: BookingStatusQueryResponse; public SendEmailReminder: boolean; public SendSmsReminder: boolean; public SendSmsConfirmation: boolean; public SendEmailConfirmation: boolean; public LastTimeToUnBook?: string; public CustomFields: CustomFieldConfigData[]; public CustomFieldValues: CustomFieldDataResponse[]; public BookedResourceTypes: BookedResourceType[]; public Company: BookedCompany; public Customer: BookedCustomer; public Quantities: BookedQuantity[]; public Service: ServiceInfoResponse; public PaymentExpiration?: string; public Log: BookingLogQueryResponse[]; public PaymentLog: BookingPaymentLogQueryResponse[]; public CheckoutLog: BookingCheckoutQueryResponse[]; public ExternalReference: ExternalReferenceResponse[]; public ResponseStatus: ResponseStatus; public CalendarExportStatus: BookingCalendarExportStatus; public LengthInMinutes?: number; public BookedBy: string; public BookedComments: string; public UnbookedComments: string; public CommentsToCustomer: string; public CreatedDate: string; public UpdatedDate: string; public UnbookedOn?: string; public CancellationCode: string; public RatingCode: string; public constructor(init?: Partial) { (Object as any).assign(this, init); } } export class CreateBookingsResponse { /** @description The datetime you want to end the booking. */ // @ApiMember(Description="The datetime you want to end the booking.", IsRequired=true) public Created: BookingQueryResponse[]; /** @description The dates that didn't work to book. */ // @ApiMember(Description="The dates that didn't work to book.", IsRequired=true) public Failed: FailedBookings[]; public ResponseStatus: ResponseStatus; public constructor(init?: Partial) { (Object as any).assign(this, init); } } // @Route("/bookings/repeat", "POST") // @ApiResponse(Description="You were unauthorized to call this service", StatusCode=401) export class CreateBookings extends CreateBookingBase implements IReturn { /** @description 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) public DatesToRepeat: DatesToRepeat[]; public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } public getTypeName() { return 'CreateBookings'; } public getMethod() { return 'POST'; } public createResponse() { return new CreateBookingsResponse(); } }