Requires any of the roles: | bookingsupplier-administrator-write, superadmin |
PUT | /homepage/scheduler/settings | Update homepage scheduler settings | Update homepage scheduler settings on the company of the currently logged in user, only administrators are allowed to update homepage menu. |
---|
import java.math.*;
import java.util.*;
import net.servicestack.client.*;
public class dtos
{
@ValidateRequest(Validator="IsAuthenticated")
public static class UpdateHomepageSchedulerSettings implements ICompany
{
/**
* 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 UUID CompanyId = null;
/**
* If the user schedule is activated.
*/
@ApiMember(Description="If the user schedule is activated.")
public Boolean Active = null;
/**
* If the user schedule views id.
*/
@ApiMember(Description="If the user schedule views id.")
public Integer ScheduleViewId = null;
/**
* If the user schedule time slots in minutes.
*/
@ApiMember(Description="If the user schedule time slots in minutes.")
public Integer ScheduleTimeSlotMinutes = null;
/**
* If the user schedule time start time.
*/
@ApiMember(Description="If the user schedule time start time.")
public TimeSpan StartTime = null;
/**
* If the user schedule time end time.
*/
@ApiMember(Description="If the user schedule time end time.")
public TimeSpan EndTime = null;
/**
* If the user schedule should contain time exceptions.
*/
@ApiMember(Description="If the user schedule should contain time exceptions.")
public Boolean ShowTimeExceptions = null;
/**
* If allow booking in the scheduler.
*/
@ApiMember(Description="If allow booking in the scheduler.")
public Boolean EnableBooking = null;
/**
* What resources you want to be shown in scheduler.
*/
@ApiMember(Description="What resources you want to be shown in scheduler.")
public ArrayList<HomepageSchedulerResource> Resources = null;
/**
* What services you want to be shown in scheduler.
*/
@ApiMember(Description="What services you want to be shown in scheduler.")
public ArrayList<HomepageSchedulerService> Services = null;
/**
* What fields you want to be shown in scheduler.
*/
@ApiMember(Description="What fields you want to be shown in scheduler.")
public ArrayList<HomepageScheduleField> Fields = null;
public UUID getCompanyId() { return CompanyId; }
public UpdateHomepageSchedulerSettings setCompanyId(UUID value) { this.CompanyId = value; return this; }
public Boolean isActive() { return Active; }
public UpdateHomepageSchedulerSettings setActive(Boolean value) { this.Active = value; return this; }
public Integer getScheduleViewId() { return ScheduleViewId; }
public UpdateHomepageSchedulerSettings setScheduleViewId(Integer value) { this.ScheduleViewId = value; return this; }
public Integer getScheduleTimeSlotMinutes() { return ScheduleTimeSlotMinutes; }
public UpdateHomepageSchedulerSettings setScheduleTimeSlotMinutes(Integer value) { this.ScheduleTimeSlotMinutes = value; return this; }
public TimeSpan getStartTime() { return StartTime; }
public UpdateHomepageSchedulerSettings setStartTime(TimeSpan value) { this.StartTime = value; return this; }
public TimeSpan getEndTime() { return EndTime; }
public UpdateHomepageSchedulerSettings setEndTime(TimeSpan value) { this.EndTime = value; return this; }
public Boolean isShowTimeExceptions() { return ShowTimeExceptions; }
public UpdateHomepageSchedulerSettings setShowTimeExceptions(Boolean value) { this.ShowTimeExceptions = value; return this; }
public Boolean isEnableBooking() { return EnableBooking; }
public UpdateHomepageSchedulerSettings setEnableBooking(Boolean value) { this.EnableBooking = value; return this; }
public ArrayList<HomepageSchedulerResource> getResources() { return Resources; }
public UpdateHomepageSchedulerSettings setResources(ArrayList<HomepageSchedulerResource> value) { this.Resources = value; return this; }
public ArrayList<HomepageSchedulerService> getServices() { return Services; }
public UpdateHomepageSchedulerSettings setServices(ArrayList<HomepageSchedulerService> value) { this.Services = value; return this; }
public ArrayList<HomepageScheduleField> getFields() { return Fields; }
public UpdateHomepageSchedulerSettings setFields(ArrayList<HomepageScheduleField> value) { this.Fields = value; return this; }
}
public static class HomepageSchedulerResource
{
/**
* The resource id.
*/
@ApiMember(Description="The resource id.")
public Integer Id = null;
public Integer getId() { return Id; }
public HomepageSchedulerResource setId(Integer value) { this.Id = value; return this; }
}
public static class HomepageSchedulerService
{
/**
* The service id.
*/
@ApiMember(Description="The service id.")
public Integer Id = null;
public Integer getId() { return Id; }
public HomepageSchedulerService setId(Integer value) { this.Id = value; return this; }
}
public static class HomepageScheduleField
{
/**
* The field id.
*/
@ApiMember(Description="The field id.", IsRequired=true)
public Integer Id = null;
/**
* If the field showed on the booking.
*/
@ApiMember(Description="If the field showed on the booking.", IsRequired=true)
public Boolean ShowOnBooking = null;
/**
* If the field showed on the bookings tooltip.
*/
@ApiMember(Description="If the field showed on the bookings tooltip.", IsRequired=true)
public Boolean ShowOnTooltip = null;
public Integer getId() { return Id; }
public HomepageScheduleField setId(Integer value) { this.Id = value; return this; }
public Boolean isShowOnBooking() { return ShowOnBooking; }
public HomepageScheduleField setShowOnBooking(Boolean value) { this.ShowOnBooking = value; return this; }
public Boolean isShowOnTooltip() { return ShowOnTooltip; }
public HomepageScheduleField setShowOnTooltip(Boolean value) { this.ShowOnTooltip = value; return this; }
}
public static class HomepageSchedulerSettingsQueryResponse
{
/**
* The company id.
*/
@ApiMember(Description="The company id.")
public UUID CompanyId = null;
/**
* If the user schedule is activated.
*/
@ApiMember(Description="If the user schedule is activated.")
public Boolean Active = null;
/**
* If the user schedule views id.
*/
@ApiMember(Description="If the user schedule views id.")
public Integer ScheduleViewId = null;
/**
* If the user schedule time slots in minutes.
*/
@ApiMember(Description="If the user schedule time slots in minutes.")
public Integer ScheduleTimeSlotMinutes = null;
/**
* If the user schedule time start time.
*/
@ApiMember(Description="If the user schedule time start time.")
public TimeSpan StartTime = null;
/**
* If the user schedule time end time.
*/
@ApiMember(Description="If the user schedule time end time.")
public TimeSpan EndTime = null;
/**
* If the user schedule should contain time exceptions.
*/
@ApiMember(Description="If the user schedule should contain time exceptions.")
public Boolean ShowTimeExceptions = null;
/**
* If allow booking in the scheduler.
*/
@ApiMember(Description="If allow booking in the scheduler.")
public Boolean EnableBooking = null;
/**
* The homepage schedule services that are selected
*/
@ApiMember(Description="The homepage schedule services that are selected")
public ArrayList<HomepageSchedulerServiceResponse> Services = null;
/**
* The homepage schedule resources that are selected
*/
@ApiMember(Description="The homepage schedule resources that are selected")
public ArrayList<HomepageSchedulerResourceResponse> Resources = null;
/**
* The homepage schedule fields that are selected
*/
@ApiMember(Description="The homepage schedule fields that are selected")
public ArrayList<HomepageSchedulerFieldResponse> Fields = null;
/**
* The homepage schedule fields select from
*/
@ApiMember(Description="The homepage schedule fields select from")
public ArrayList<HomepageSchedulerFieldOptionsResponse> FieldOptions = null;
/**
* The available schedule view options to choose from
*/
@ApiMember(Description="The available schedule view options to choose from")
public ArrayList<ScheduleViewResponse> ScheduleViewOptions = null;
public UUID getCompanyId() { return CompanyId; }
public HomepageSchedulerSettingsQueryResponse setCompanyId(UUID value) { this.CompanyId = value; return this; }
public Boolean isActive() { return Active; }
public HomepageSchedulerSettingsQueryResponse setActive(Boolean value) { this.Active = value; return this; }
public Integer getScheduleViewId() { return ScheduleViewId; }
public HomepageSchedulerSettingsQueryResponse setScheduleViewId(Integer value) { this.ScheduleViewId = value; return this; }
public Integer getScheduleTimeSlotMinutes() { return ScheduleTimeSlotMinutes; }
public HomepageSchedulerSettingsQueryResponse setScheduleTimeSlotMinutes(Integer value) { this.ScheduleTimeSlotMinutes = value; return this; }
public TimeSpan getStartTime() { return StartTime; }
public HomepageSchedulerSettingsQueryResponse setStartTime(TimeSpan value) { this.StartTime = value; return this; }
public TimeSpan getEndTime() { return EndTime; }
public HomepageSchedulerSettingsQueryResponse setEndTime(TimeSpan value) { this.EndTime = value; return this; }
public Boolean isShowTimeExceptions() { return ShowTimeExceptions; }
public HomepageSchedulerSettingsQueryResponse setShowTimeExceptions(Boolean value) { this.ShowTimeExceptions = value; return this; }
public Boolean isEnableBooking() { return EnableBooking; }
public HomepageSchedulerSettingsQueryResponse setEnableBooking(Boolean value) { this.EnableBooking = value; return this; }
public ArrayList<HomepageSchedulerServiceResponse> getServices() { return Services; }
public HomepageSchedulerSettingsQueryResponse setServices(ArrayList<HomepageSchedulerServiceResponse> value) { this.Services = value; return this; }
public ArrayList<HomepageSchedulerResourceResponse> getResources() { return Resources; }
public HomepageSchedulerSettingsQueryResponse setResources(ArrayList<HomepageSchedulerResourceResponse> value) { this.Resources = value; return this; }
public ArrayList<HomepageSchedulerFieldResponse> getFields() { return Fields; }
public HomepageSchedulerSettingsQueryResponse setFields(ArrayList<HomepageSchedulerFieldResponse> value) { this.Fields = value; return this; }
public ArrayList<HomepageSchedulerFieldOptionsResponse> getFieldOptions() { return FieldOptions; }
public HomepageSchedulerSettingsQueryResponse setFieldOptions(ArrayList<HomepageSchedulerFieldOptionsResponse> value) { this.FieldOptions = value; return this; }
public ArrayList<ScheduleViewResponse> getScheduleViewOptions() { return ScheduleViewOptions; }
public HomepageSchedulerSettingsQueryResponse setScheduleViewOptions(ArrayList<ScheduleViewResponse> value) { this.ScheduleViewOptions = value; return this; }
}
public static class HomepageSchedulerServiceResponse
{
/**
* The service id.
*/
@ApiMember(Description="The service id.")
public Integer Id = null;
/**
* The service name.
*/
@ApiMember(Description="The service name.")
public String Name = null;
/**
* The service description.
*/
@ApiMember(Description="The service description.")
public String Description = null;
/**
* The service image url.
*/
@ApiMember(Description="The service image url.")
public Uri ImageUrl = null;
public Integer getId() { return Id; }
public HomepageSchedulerServiceResponse setId(Integer value) { this.Id = value; return this; }
public String getName() { return Name; }
public HomepageSchedulerServiceResponse setName(String value) { this.Name = value; return this; }
public String getDescription() { return Description; }
public HomepageSchedulerServiceResponse setDescription(String value) { this.Description = value; return this; }
public Uri getImageUrl() { return ImageUrl; }
public HomepageSchedulerServiceResponse setImageUrl(Uri value) { this.ImageUrl = value; return this; }
}
public static class HomepageSchedulerResourceResponse
{
/**
* The resource id.
*/
@ApiMember(Description="The resource id.")
public Integer Id = null;
/**
* The resource name.
*/
@ApiMember(Description="The resource name.")
public String Name = null;
/**
* The resource description.
*/
@ApiMember(Description="The resource description.")
public String Description = null;
/**
* The resource image url.
*/
@ApiMember(Description="The resource image url.")
public Uri ImageUrl = null;
public Integer getId() { return Id; }
public HomepageSchedulerResourceResponse setId(Integer value) { this.Id = value; return this; }
public String getName() { return Name; }
public HomepageSchedulerResourceResponse setName(String value) { this.Name = value; return this; }
public String getDescription() { return Description; }
public HomepageSchedulerResourceResponse setDescription(String value) { this.Description = value; return this; }
public Uri getImageUrl() { return ImageUrl; }
public HomepageSchedulerResourceResponse setImageUrl(Uri value) { this.ImageUrl = value; return this; }
}
public static class HomepageSchedulerFieldResponse
{
/**
* The field id.
*/
@ApiMember(Description="The field id.")
public Integer Id = null;
/**
* If the field should be shown on booking.
*/
@ApiMember(Description="If the field should be shown on booking.")
public Boolean ShowOnBooking = null;
/**
* If the field should be shown on tooltip.
*/
@ApiMember(Description="If the field should be shown on tooltip.")
public Boolean ShowOnTooltip = null;
public Integer getId() { return Id; }
public HomepageSchedulerFieldResponse setId(Integer value) { this.Id = value; return this; }
public Boolean isShowOnBooking() { return ShowOnBooking; }
public HomepageSchedulerFieldResponse setShowOnBooking(Boolean value) { this.ShowOnBooking = value; return this; }
public Boolean isShowOnTooltip() { return ShowOnTooltip; }
public HomepageSchedulerFieldResponse setShowOnTooltip(Boolean value) { this.ShowOnTooltip = value; return this; }
}
public static class HomepageSchedulerFieldOptionsResponse
{
/**
* The field id.
*/
@ApiMember(Description="The field id.")
public Integer Id = null;
/**
* The field name.
*/
@ApiMember(Description="The field name.")
public String Name = null;
/**
* The field description.
*/
@ApiMember(Description="The field description.")
public String Description = null;
/**
* The field sort order when listing.
*/
@ApiMember(Description="The field sort order when listing.")
public Integer SortOrder = null;
public Integer getId() { return Id; }
public HomepageSchedulerFieldOptionsResponse setId(Integer value) { this.Id = value; return this; }
public String getName() { return Name; }
public HomepageSchedulerFieldOptionsResponse setName(String value) { this.Name = value; return this; }
public String getDescription() { return Description; }
public HomepageSchedulerFieldOptionsResponse setDescription(String value) { this.Description = value; return this; }
public Integer getSortOrder() { return SortOrder; }
public HomepageSchedulerFieldOptionsResponse setSortOrder(Integer value) { this.SortOrder = value; return this; }
}
public static class ScheduleViewResponse
{
public Integer Id = null;
public String Name = null;
public Integer getId() { return Id; }
public ScheduleViewResponse setId(Integer value) { this.Id = value; return this; }
public String getName() { return Name; }
public ScheduleViewResponse setName(String value) { this.Name = value; return this; }
}
}
Java UpdateHomepageSchedulerSettings DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
PUT /homepage/scheduler/settings HTTP/1.1
Host: testapi.bokamera.se
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
CompanyId: 00000000-0000-0000-0000-000000000000,
Active: False,
ScheduleViewId: 0,
ScheduleTimeSlotMinutes: 0,
StartTime: PT0S,
EndTime: PT0S,
ShowTimeExceptions: False,
EnableBooking: False,
Resources:
[
{
Id: 0
}
],
Services:
[
{
Id: 0
}
],
Fields:
[
{
Id: 0,
ShowOnBooking: False,
ShowOnTooltip: False
}
]
}
HTTP/1.1 200 OK Content-Type: text/jsv Content-Length: length { Active: False, ScheduleViewId: 0, ScheduleTimeSlotMinutes: 0, StartTime: PT0S, EndTime: PT0S, ShowTimeExceptions: False, EnableBooking: False, Services: [ { Id: 0, Name: String, Description: String } ], Resources: [ { Id: 0, Name: String, Description: String } ], Fields: [ { Id: 0, ShowOnBooking: False, ShowOnTooltip: False } ], FieldOptions: [ { Id: 0, Name: String, Description: String, SortOrder: 0 } ], ScheduleViewOptions: [ { Id: 0, Name: String } ] }