/* Options: Date: 2024-11-23 09:04:15 Version: 8.23 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://testapi.bokamera.se //GlobalNamespace: //MakePartial: True //MakeVirtual: True //MakeInternal: False //MakeDataContractsExtensible: False //AddNullableAnnotations: False //AddReturnMarker: True //AddDescriptionAsComments: True //AddDataContractAttributes: False //AddIndexesToDataMembers: False //AddGeneratedCodeAttributes: False //AddResponseStatus: False //AddImplicitVersion: //InitializeCollections: True //ExportValueTypes: False IncludeTypes: UpdateResource.* //ExcludeTypes: //AddNamespaces: //AddDefaultXmlNamespace: http://schemas.servicestack.net/types */ using System; using System.Collections; using System.Collections.Generic; using System.Runtime.Serialization; using ServiceStack; using ServiceStack.DataAnnotations; using System.Globalization; using ServiceStack.Data; using System.Net; using System.Net.Http.Headers; using BokaMera.API.ServiceModel.Interfaces; using BokaMera.API.ServiceModel.Enums; using BokaMera.API.ServiceModel.Dtos; namespace BokaMera.API.ServiceModel.Dtos { public partial class AddCustomField { public virtual int Id { get; set; } public virtual string Value { get; set; } } public partial class BookedCustomer { public virtual Guid Id { get; set; } public virtual string Firstname { get; set; } public virtual string Lastname { get; set; } public virtual string Email { get; set; } public virtual string Phone { get; set; } public virtual string FacebookUserName { get; set; } public virtual string ImageUrl { get; set; } public virtual string CorporateIdentityNumber { get; set; } public virtual string InvoiceAddress1 { get; set; } public virtual string InvoiceAddress2 { get; set; } public virtual string InvoiceCity { get; set; } public virtual string InvoicePostalCode { get; set; } public virtual string InvoiceCountryCode { get; set; } } public partial class BookedTime : IBookedTime { /// ///Booking id /// [ApiMember(Description="Booking id")] public virtual int Id { get; set; } /// ///The booked service /// [ApiMember(Description="The booked service")] public virtual int ServiceId { get; set; } /// ///Booking start /// [ApiMember(Description="Booking start")] public virtual DateTime From { get; set; } /// ///Booking end /// [ApiMember(Description="Booking end")] public virtual DateTime To { get; set; } /// ///Number of booked spots /// [ApiMember(Description="Number of booked spots")] public virtual int BookedSpots { get; set; } /// ///Number of total spots for the service /// [ApiMember(Description="Number of total spots for the service")] public virtual int TotalSpots { get; set; } /// ///The pause after the booking /// [ApiMember(Description="The pause after the booking")] public virtual int PauseAfterInMinutes { get; set; } /// ///The booking status /// [ApiMember(Description="The booking status")] public virtual int StatusId { get; set; } public virtual BookingStatusEnum Status { get; set; } /// ///The customer the booking belongs to /// [ApiMember(Description="The customer the booking belongs to")] public virtual BookedCustomer Customer { get; set; } } public partial class ResourceQueryResponse { public ResourceQueryResponse() { Exceptions = new List{}; Bookings = new List{}; } /// ///The resource id /// [ApiMember(Description="The resource id")] public virtual int Id { get; set; } /// ///The resource name /// [ApiMember(Description="The resource name")] public virtual string Name { get; set; } /// ///The resource description /// [ApiMember(Description="The resource description")] public virtual string Description { get; set; } /// ///If resource is active or not /// [ApiMember(Description="If resource is active or not")] public virtual bool Active { get; set; } /// ///The resource color in scheduler in hexadecimal color code. Example: #00b0f0 for blue. /// [ApiMember(Description="The resource color in scheduler in hexadecimal color code. Example: #00b0f0 for blue.")] public virtual string Color { get; set; } /// ///The email of the resource /// [ApiMember(Description="The email of the resource")] public virtual string Email { get; set; } /// ///The image url of the resource /// [ApiMember(Description="The image url of the resource")] public virtual Uri ImageUrl { get; set; } /// ///The mobile phone number of the resource /// [ApiMember(Description="The mobile phone number of the resource")] public virtual string MobilePhone { get; set; } /// ///Used by example code locks to know what access group the resource is assigned to /// [ApiMember(Description="Used by example code locks to know what access group the resource is assigned to")] public virtual string AccessGroup { get; set; } /// ///If the resource should receive email notification when booked /// [ApiMember(Description="If the resource should receive email notification when booked")] public virtual bool EmailNotification { get; set; } /// ///If the resource should receive SMS notification when booked /// [ApiMember(Description="If the resource should receive SMS notification when booked")] public virtual bool SMSNotification { get; set; } /// ///If the resource should receive email reminders on bookings /// [ApiMember(Description="If the resource should receive email reminders on bookings")] public virtual bool? SendEmailReminder { get; set; } /// ///If the resource should receive SMS reminders on bookings /// [ApiMember(Description="If the resource should receive SMS reminders on bookings")] public virtual bool? SendSMSReminder { get; set; } /// ///The resource time exceptions /// [ApiMember(Description="The resource time exceptions")] public virtual List Exceptions { get; set; } /// ///The resource bookings /// [ApiMember(Description="The resource bookings")] public virtual List Bookings { get; set; } /// ///Then date when the resource was created /// [ApiMember(Description="Then date when the resource was created")] public virtual DateTime Created { get; set; } /// ///Then date when the resource was updated /// [ApiMember(Description="Then date when the resource was updated")] public virtual DateTime Updated { get; set; } public virtual ResponseStatus ResponseStatus { get; set; } } public partial class TimeException : ITimeException { public TimeException() { ResourceIds = new int[]{}; } /// ///Time exception id /// [ApiMember(Description="Time exception id")] public virtual int Id { get; set; } /// ///Indicates whether or not the time exception is recurring /// [ApiMember(Description="Indicates whether or not the time exception is recurring")] public virtual bool IsRecurring { get; set; } /// ///Indicates whether the time exception is blocking the time or not /// [ApiMember(Description="Indicates whether the time exception is blocking the time or not")] public virtual bool IsBlock { get; set; } /// ///The reason of the time exception, example: Vacation, doctors appointment, ... /// [ApiMember(Description="The reason of the time exception, example: Vacation, doctors appointment, ...")] public virtual string ReasonText { get; set; } /// ///The public reason of the time exception, example: Vacation, doctors appointment, ... /// [ApiMember(Description="The public reason of the time exception, example: Vacation, doctors appointment, ...")] public virtual string ReasonTextPublic { get; set; } /// ///Time exception start /// [ApiMember(Description="Time exception start")] public virtual DateTime From { get; set; } /// ///Time exception end /// [ApiMember(Description="Time exception end")] public virtual DateTime To { get; set; } /// ///Resources that owns this exception /// [ApiMember(Description="Resources that owns this exception")] public virtual int[] ResourceIds { get; set; } } [Route("/resource/{Id}", "PUT")] [ApiResponse(Description="You were unauthorized to call this service", StatusCode=401)] [ValidateRequest("IsAuthenticated")] public partial class UpdateResource : IReturn, ICompany { public UpdateResource() { CustomFields = new List{}; } /// ///Enter the company id, if blank company id and you are an admin, your company id will be used. /// [ApiMember(Description="Enter the company id, if blank company id and you are an admin, your company id will be used.", IsRequired=true)] public virtual Guid? CompanyId { get; set; } /// ///Id of the resource /// [ApiMember(Description="Id of the resource", IsRequired=true, ParameterType="path")] public virtual int Id { get; set; } /// ///The resource name /// [ApiMember(Description="The resource name")] public virtual string Name { get; set; } /// ///The resource description /// [ApiMember(Description="The resource description")] public virtual string Description { get; set; } /// ///If resource is active or not /// [ApiMember(Description="If resource is active or not")] public virtual bool? Active { get; set; } /// ///The resource color in scheduler /// [ApiMember(Description="The resource color in scheduler")] public virtual string Color { get; set; } /// ///The image url of the resource /// [ApiMember(Description="The image url of the resource")] public virtual Uri ImageUrl { get; set; } /// ///The email of the resource /// [ApiMember(Description="The email of the resource")] public virtual string Email { get; set; } /// ///The mobile phone number of the resource /// [ApiMember(Description="The mobile phone number of the resource")] public virtual string MobilePhone { get; set; } /// ///Used by example code locks to know what access group the resource is assigned to /// [ApiMember(Description="Used by example code locks to know what access group the resource is assigned to")] public virtual string AccessGroup { get; set; } /// ///If the resource should receive email notification when booked /// [ApiMember(Description="If the resource should receive email notification when booked")] public virtual bool? EmailNotification { get; set; } /// ///If the resource should receive SMS notification when booked /// [ApiMember(Description="If the resource should receive SMS notification when booked")] public virtual bool? SMSNotification { get; set; } /// ///If the resource should receive email reminders on bookings /// [ApiMember(Description="If the resource should receive email reminders on bookings")] public virtual bool? SendEmailReminder { get; set; } /// ///If the resource should receive SMS reminders on bookings /// [ApiMember(Description="If the resource should receive SMS reminders on bookings")] public virtual bool? SendSMSReminder { get; set; } /// ///If Custom Fields are added to the resource, 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 resource, here you will send the id and the value for each custom field to be saved")] public virtual List CustomFields { get; set; } } } namespace BokaMera.API.ServiceModel.Enums { public enum BookingStatusEnum { Booked = 1, Unbooked = 2, Reserved = 3, Canceled = 4, AwaitingPayment = 5, AwaitingPaymentNoTimeLimit = 6, Payed = 7, AwaitingPaymentRequestFromAdmin = 8, AwaitingPaymentFromProvider = 9, Invoiced = 10, } } namespace BokaMera.API.ServiceModel.Interfaces { public partial interface IBookedTime : IInterval { int Id { get; set; } int ServiceId { get; set; } int BookedSpots { get; set; } int TotalSpots { get; set; } int PauseAfterInMinutes { get; set; } BookingStatusEnum Status { get; set; } int StatusId { get; set; } BookedCustomer Customer { get; set; } } public partial interface ICompany { Guid? CompanyId { get; set; } } public partial interface IInterval { DateTime From { get; set; } DateTime To { get; set; } } public partial interface ITimeException : IInterval { int Id { get; set; } string ReasonText { get; set; } bool IsBlock { get; set; } string ReasonTextPublic { get; set; } bool IsRecurring { get; set; } int[] ResourceIds { get; set; } } }