Requires any of the roles: | bookingsupplier-administrator-write, superadmin |
PUT | /homepage/widget/settings | Update homepage widget settings | Update homepage widget settings on the company of the currently logged in user, only administrators are allowed to update homepage menu. |
---|
import 'package:servicestack/servicestack.dart';
class HomepageWidgetServiceLayoutsResponse implements IConvertible
{
/**
* The layout id.
*/
// @ApiMember(Description="The layout id.")
int? Id;
/**
* The layout name.
*/
// @ApiMember(Description="The layout name.")
String? Name;
/**
* The layout description.
*/
// @ApiMember(Description="The layout description.")
String? Description;
/**
* The layout code.
*/
// @ApiMember(Description="The layout code.")
String? Code;
HomepageWidgetServiceLayoutsResponse({this.Id,this.Name,this.Description,this.Code});
HomepageWidgetServiceLayoutsResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Id = json['Id'];
Name = json['Name'];
Description = json['Description'];
Code = json['Code'];
return this;
}
Map<String, dynamic> toJson() => {
'Id': Id,
'Name': Name,
'Description': Description,
'Code': Code
};
getTypeName() => "HomepageWidgetServiceLayoutsResponse";
TypeContext? context = _ctx;
}
class HomepageWidgetTimeLayoutsResponse implements IConvertible
{
/**
* The layout id.
*/
// @ApiMember(Description="The layout id.")
int? Id;
/**
* The layout name.
*/
// @ApiMember(Description="The layout name.")
String? Name;
/**
* The layout description.
*/
// @ApiMember(Description="The layout description.")
String? Description;
/**
* The layout code.
*/
// @ApiMember(Description="The layout code.")
String? Code;
HomepageWidgetTimeLayoutsResponse({this.Id,this.Name,this.Description,this.Code});
HomepageWidgetTimeLayoutsResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Id = json['Id'];
Name = json['Name'];
Description = json['Description'];
Code = json['Code'];
return this;
}
Map<String, dynamic> toJson() => {
'Id': Id,
'Name': Name,
'Description': Description,
'Code': Code
};
getTypeName() => "HomepageWidgetTimeLayoutsResponse";
TypeContext? context = _ctx;
}
class HomepageWidgetBookingLayoutsResponse implements IConvertible
{
/**
* The layout id.
*/
// @ApiMember(Description="The layout id.")
int? Id;
/**
* The layout name.
*/
// @ApiMember(Description="The layout name.")
String? Name;
/**
* The layout description.
*/
// @ApiMember(Description="The layout description.")
String? Description;
/**
* The layout code.
*/
// @ApiMember(Description="The layout code.")
String? Code;
HomepageWidgetBookingLayoutsResponse({this.Id,this.Name,this.Description,this.Code});
HomepageWidgetBookingLayoutsResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Id = json['Id'];
Name = json['Name'];
Description = json['Description'];
Code = json['Code'];
return this;
}
Map<String, dynamic> toJson() => {
'Id': Id,
'Name': Name,
'Description': Description,
'Code': Code
};
getTypeName() => "HomepageWidgetBookingLayoutsResponse";
TypeContext? context = _ctx;
}
class HomepageWidgetBookingMethodsResponse implements IConvertible
{
/**
* The layout id.
*/
// @ApiMember(Description="The layout id.")
int? Id;
/**
* The layout name.
*/
// @ApiMember(Description="The layout name.")
String? Name;
/**
* The layout description.
*/
// @ApiMember(Description="The layout description.")
String? Description;
/**
* The layout code.
*/
// @ApiMember(Description="The layout code.")
String? Code;
HomepageWidgetBookingMethodsResponse({this.Id,this.Name,this.Description,this.Code});
HomepageWidgetBookingMethodsResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Id = json['Id'];
Name = json['Name'];
Description = json['Description'];
Code = json['Code'];
return this;
}
Map<String, dynamic> toJson() => {
'Id': Id,
'Name': Name,
'Description': Description,
'Code': Code
};
getTypeName() => "HomepageWidgetBookingMethodsResponse";
TypeContext? context = _ctx;
}
class HomepageWidgetSettingsQueryResponse implements IConvertible
{
/**
* The company id.
*/
// @ApiMember(Description="The company id.")
String? CompanyId;
/**
* The service layouts id.
*/
// @ApiMember(Description="The service layouts id.")
int? ServiceLayoutId;
/**
* The time layouts id.
*/
// @ApiMember(Description="The time layouts id.")
int? TimeLayoutId;
/**
* The booking layouts id.
*/
// @ApiMember(Description="The booking layouts id.")
int? BookingLayoutId;
/**
* The primary color of the booking widget.
*/
// @ApiMember(Description="The primary color of the booking widget.")
String? PrimaryColor;
/**
* If you should show the service image in the booking widget.
*/
// @ApiMember(Description="If you should show the service image in the booking widget.")
bool? ShowServiceImage;
/**
* If you should show the rebate code field in the booking widget.
*/
// @ApiMember(Description="If you should show the rebate code field in the booking widget.")
bool? ShowRebateCodeField;
/**
* If you should show the next available time in the booking widget.
*/
// @ApiMember(Description="If you should show the next available time in the booking widget.")
bool? ShowNextAvailableTime;
/**
* If you should show the subscribe to newsletter checkbox in the booking widget.
*/
// @ApiMember(Description="If you should show the subscribe to newsletter checkbox in the booking widget.")
bool? ShowSubscribeToNewsletter;
/**
* If you should show the create account option.
*/
// @ApiMember(Description="If you should show the create account option.")
bool? EnableCreateAccount;
/**
* If you should show the login to account option.
*/
// @ApiMember(Description="If you should show the login to account option.")
bool? EnableLogin;
/**
* If you should show the facebook login to account option.
*/
// @ApiMember(Description="If you should show the facebook login to account option.")
bool? EnableFacebookLogin;
/**
* If you should show the direct booking option. This enables customer to book with entering contact information.
*/
// @ApiMember(Description="If you should show the direct booking option. This enables customer to book with entering contact information.")
bool? EnableDirectBooking;
/**
* If the site should have dark theme or not.
*/
// @ApiMember(Description="If the site should have dark theme or not.")
bool? DarkTheme;
/**
* If you should show the end time in the booking widget.
*/
// @ApiMember(Description="If you should show the end time in the booking widget.")
bool? ShowEndTime;
/**
* What text to show on booked time slots. Default text is Booked
*/
// @ApiMember(Description="What text to show on booked time slots. Default text is Booked")
String? BookedTimeSlotText;
List<HomepageWidgetServiceLayoutsResponse>? ServiceLayoutOptions;
List<HomepageWidgetTimeLayoutsResponse>? TimeLayoutOptions;
List<HomepageWidgetBookingLayoutsResponse>? BookingLayoutOptions;
List<HomepageWidgetBookingMethodsResponse>? BookingMethodOptions;
HomepageWidgetSettingsQueryResponse({this.CompanyId,this.ServiceLayoutId,this.TimeLayoutId,this.BookingLayoutId,this.PrimaryColor,this.ShowServiceImage,this.ShowRebateCodeField,this.ShowNextAvailableTime,this.ShowSubscribeToNewsletter,this.EnableCreateAccount,this.EnableLogin,this.EnableFacebookLogin,this.EnableDirectBooking,this.DarkTheme,this.ShowEndTime,this.BookedTimeSlotText,this.ServiceLayoutOptions,this.TimeLayoutOptions,this.BookingLayoutOptions,this.BookingMethodOptions});
HomepageWidgetSettingsQueryResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
CompanyId = json['CompanyId'];
ServiceLayoutId = json['ServiceLayoutId'];
TimeLayoutId = json['TimeLayoutId'];
BookingLayoutId = json['BookingLayoutId'];
PrimaryColor = json['PrimaryColor'];
ShowServiceImage = json['ShowServiceImage'];
ShowRebateCodeField = json['ShowRebateCodeField'];
ShowNextAvailableTime = json['ShowNextAvailableTime'];
ShowSubscribeToNewsletter = json['ShowSubscribeToNewsletter'];
EnableCreateAccount = json['EnableCreateAccount'];
EnableLogin = json['EnableLogin'];
EnableFacebookLogin = json['EnableFacebookLogin'];
EnableDirectBooking = json['EnableDirectBooking'];
DarkTheme = json['DarkTheme'];
ShowEndTime = json['ShowEndTime'];
BookedTimeSlotText = json['BookedTimeSlotText'];
ServiceLayoutOptions = JsonConverters.fromJson(json['ServiceLayoutOptions'],'List<HomepageWidgetServiceLayoutsResponse>',context!);
TimeLayoutOptions = JsonConverters.fromJson(json['TimeLayoutOptions'],'List<HomepageWidgetTimeLayoutsResponse>',context!);
BookingLayoutOptions = JsonConverters.fromJson(json['BookingLayoutOptions'],'List<HomepageWidgetBookingLayoutsResponse>',context!);
BookingMethodOptions = JsonConverters.fromJson(json['BookingMethodOptions'],'List<HomepageWidgetBookingMethodsResponse>',context!);
return this;
}
Map<String, dynamic> toJson() => {
'CompanyId': CompanyId,
'ServiceLayoutId': ServiceLayoutId,
'TimeLayoutId': TimeLayoutId,
'BookingLayoutId': BookingLayoutId,
'PrimaryColor': PrimaryColor,
'ShowServiceImage': ShowServiceImage,
'ShowRebateCodeField': ShowRebateCodeField,
'ShowNextAvailableTime': ShowNextAvailableTime,
'ShowSubscribeToNewsletter': ShowSubscribeToNewsletter,
'EnableCreateAccount': EnableCreateAccount,
'EnableLogin': EnableLogin,
'EnableFacebookLogin': EnableFacebookLogin,
'EnableDirectBooking': EnableDirectBooking,
'DarkTheme': DarkTheme,
'ShowEndTime': ShowEndTime,
'BookedTimeSlotText': BookedTimeSlotText,
'ServiceLayoutOptions': JsonConverters.toJson(ServiceLayoutOptions,'List<HomepageWidgetServiceLayoutsResponse>',context!),
'TimeLayoutOptions': JsonConverters.toJson(TimeLayoutOptions,'List<HomepageWidgetTimeLayoutsResponse>',context!),
'BookingLayoutOptions': JsonConverters.toJson(BookingLayoutOptions,'List<HomepageWidgetBookingLayoutsResponse>',context!),
'BookingMethodOptions': JsonConverters.toJson(BookingMethodOptions,'List<HomepageWidgetBookingMethodsResponse>',context!)
};
getTypeName() => "HomepageWidgetSettingsQueryResponse";
TypeContext? context = _ctx;
}
// @ValidateRequest(Validator="IsAuthenticated")
class UpdateHomepageWidgetSettings implements ICompany, IConvertible
{
/**
* 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.")
String? CompanyId;
/**
* Serivce Layout.
*/
// @ApiMember(Description="Serivce Layout.")
int? ServiceLayoutId;
/**
* Time Layout.
*/
// @ApiMember(Description="Time Layout.")
int? TimeLayoutId;
/**
* Booking Layout.
*/
// @ApiMember(Description="Booking Layout.")
int? BookingLayoutId;
/**
* The primary color of the booking widget.
*/
// @ApiMember(Description="The primary color of the booking widget.")
String? PrimaryColor;
/**
* If the site should have dark theme or not.
*/
// @ApiMember(Description="If the site should have dark theme or not.")
bool? DarkTheme;
/**
* If you should show the service image in the booking widget.
*/
// @ApiMember(Description="If you should show the service image in the booking widget.")
bool? ShowServiceImage;
/**
* If you should show the rebate code field in the booking widget.
*/
// @ApiMember(Description="If you should show the rebate code field in the booking widget.")
bool? ShowRebateCodeField;
/**
* If you should show the next available time in the booking widget.
*/
// @ApiMember(Description="If you should show the next available time in the booking widget.")
bool? ShowNextAvailableTime;
/**
* If you should show the end time in the booking widget.
*/
// @ApiMember(Description="If you should show the end time in the booking widget.")
bool? ShowEndTime;
/**
* Show subscribe to newsletter checkbox on the page
*/
// @ApiMember(Description="Show subscribe to newsletter checkbox on the page")
bool? ShowSubscribeToNewsletter;
/**
* What text to show on booked time slots. Default text is Booked
*/
// @ApiMember(Description="What text to show on booked time slots. Default text is Booked")
String? BookedTimeSlotText;
/**
* If you should show the create account option.
*/
// @ApiMember(Description="If you should show the create account option.")
bool? EnableCreateAccount;
/**
* If you should show the login to account option.
*/
// @ApiMember(Description="If you should show the login to account option.")
bool? EnableLogin;
/**
* If you should show the facebook login to account option.
*/
// @ApiMember(Description="If you should show the facebook login to account option.")
bool? EnableFacebookLogin;
/**
* If you should show the direct booking option. This enables customer to book with entering contact information.
*/
// @ApiMember(Description="If you should show the direct booking option. This enables customer to book with entering contact information.")
bool? EnableDirectBooking;
UpdateHomepageWidgetSettings({this.CompanyId,this.ServiceLayoutId,this.TimeLayoutId,this.BookingLayoutId,this.PrimaryColor,this.DarkTheme,this.ShowServiceImage,this.ShowRebateCodeField,this.ShowNextAvailableTime,this.ShowEndTime,this.ShowSubscribeToNewsletter,this.BookedTimeSlotText,this.EnableCreateAccount,this.EnableLogin,this.EnableFacebookLogin,this.EnableDirectBooking});
UpdateHomepageWidgetSettings.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
CompanyId = json['CompanyId'];
ServiceLayoutId = json['ServiceLayoutId'];
TimeLayoutId = json['TimeLayoutId'];
BookingLayoutId = json['BookingLayoutId'];
PrimaryColor = json['PrimaryColor'];
DarkTheme = json['DarkTheme'];
ShowServiceImage = json['ShowServiceImage'];
ShowRebateCodeField = json['ShowRebateCodeField'];
ShowNextAvailableTime = json['ShowNextAvailableTime'];
ShowEndTime = json['ShowEndTime'];
ShowSubscribeToNewsletter = json['ShowSubscribeToNewsletter'];
BookedTimeSlotText = json['BookedTimeSlotText'];
EnableCreateAccount = json['EnableCreateAccount'];
EnableLogin = json['EnableLogin'];
EnableFacebookLogin = json['EnableFacebookLogin'];
EnableDirectBooking = json['EnableDirectBooking'];
return this;
}
Map<String, dynamic> toJson() => {
'CompanyId': CompanyId,
'ServiceLayoutId': ServiceLayoutId,
'TimeLayoutId': TimeLayoutId,
'BookingLayoutId': BookingLayoutId,
'PrimaryColor': PrimaryColor,
'DarkTheme': DarkTheme,
'ShowServiceImage': ShowServiceImage,
'ShowRebateCodeField': ShowRebateCodeField,
'ShowNextAvailableTime': ShowNextAvailableTime,
'ShowEndTime': ShowEndTime,
'ShowSubscribeToNewsletter': ShowSubscribeToNewsletter,
'BookedTimeSlotText': BookedTimeSlotText,
'EnableCreateAccount': EnableCreateAccount,
'EnableLogin': EnableLogin,
'EnableFacebookLogin': EnableFacebookLogin,
'EnableDirectBooking': EnableDirectBooking
};
getTypeName() => "UpdateHomepageWidgetSettings";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'api.bokamera.se', types: <String, TypeInfo> {
'HomepageWidgetServiceLayoutsResponse': TypeInfo(TypeOf.Class, create:() => HomepageWidgetServiceLayoutsResponse()),
'HomepageWidgetTimeLayoutsResponse': TypeInfo(TypeOf.Class, create:() => HomepageWidgetTimeLayoutsResponse()),
'HomepageWidgetBookingLayoutsResponse': TypeInfo(TypeOf.Class, create:() => HomepageWidgetBookingLayoutsResponse()),
'HomepageWidgetBookingMethodsResponse': TypeInfo(TypeOf.Class, create:() => HomepageWidgetBookingMethodsResponse()),
'HomepageWidgetSettingsQueryResponse': TypeInfo(TypeOf.Class, create:() => HomepageWidgetSettingsQueryResponse()),
'List<HomepageWidgetServiceLayoutsResponse>': TypeInfo(TypeOf.Class, create:() => <HomepageWidgetServiceLayoutsResponse>[]),
'List<HomepageWidgetTimeLayoutsResponse>': TypeInfo(TypeOf.Class, create:() => <HomepageWidgetTimeLayoutsResponse>[]),
'List<HomepageWidgetBookingLayoutsResponse>': TypeInfo(TypeOf.Class, create:() => <HomepageWidgetBookingLayoutsResponse>[]),
'List<HomepageWidgetBookingMethodsResponse>': TypeInfo(TypeOf.Class, create:() => <HomepageWidgetBookingMethodsResponse>[]),
'UpdateHomepageWidgetSettings': TypeInfo(TypeOf.Class, create:() => UpdateHomepageWidgetSettings()),
});
Dart UpdateHomepageWidgetSettings DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
PUT /homepage/widget/settings HTTP/1.1
Host: api.bokamera.se
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length
{"CompanyId":"00000000-0000-0000-0000-000000000000","ServiceLayoutId":0,"TimeLayoutId":0,"BookingLayoutId":0,"PrimaryColor":"String","DarkTheme":false,"ShowServiceImage":false,"ShowRebateCodeField":false,"ShowNextAvailableTime":false,"ShowEndTime":false,"ShowSubscribeToNewsletter":false,"BookedTimeSlotText":"String","EnableCreateAccount":false,"EnableLogin":false,"EnableFacebookLogin":false,"EnableDirectBooking":false}
HTTP/1.1 200 OK Content-Type: text/jsonl Content-Length: length {"ServiceLayoutId":0,"TimeLayoutId":0,"BookingLayoutId":0,"PrimaryColor":"String","ShowServiceImage":false,"ShowRebateCodeField":false,"ShowNextAvailableTime":false,"ShowSubscribeToNewsletter":false,"EnableCreateAccount":false,"EnableLogin":false,"EnableFacebookLogin":false,"EnableDirectBooking":false,"DarkTheme":false,"ShowEndTime":false,"BookedTimeSlotText":"String","ServiceLayoutOptions":[{"Id":0,"Name":"String","Description":"String","Code":"String"}],"TimeLayoutOptions":[{"Id":0,"Name":"String","Description":"String","Code":"String"}],"BookingLayoutOptions":[{"Id":0,"Name":"String","Description":"String","Code":"String"}],"BookingMethodOptions":[{"Id":0,"Name":"String","Description":"String","Code":"String"}]}