GET | /homepage/widget/settings | Get homepage widget settings | Get 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;
}
class HomepageWidgetSettingsQuery implements ICompany, ICompanyRequest, 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;
/**
* The homepage sitepath.
*/
// @ApiMember(Description="The homepage sitepath.")
String? SitePath;
/**
* If you want to include what service layout options to select from
*/
// @ApiMember(Description="If you want to include what service layout options to select from")
bool? IncludeServiceLayoutOptions;
/**
* If you want to include what time layout options to select from
*/
// @ApiMember(Description="If you want to include what time layout options to select from")
bool? IncludeTimeLayoutOptions;
/**
* If you want to include what booking layout options to select from
*/
// @ApiMember(Description="If you want to include what booking layout options to select from")
bool? IncludeBookingLayoutOptions;
/**
* If you want to include what booking method options to select from
*/
// @ApiMember(Description="If you want to include what booking method options to select from")
bool? IncludeBookingMethodOptions;
HomepageWidgetSettingsQuery({this.CompanyId,this.SitePath,this.IncludeServiceLayoutOptions,this.IncludeTimeLayoutOptions,this.IncludeBookingLayoutOptions,this.IncludeBookingMethodOptions});
HomepageWidgetSettingsQuery.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
CompanyId = json['CompanyId'];
SitePath = json['SitePath'];
IncludeServiceLayoutOptions = json['IncludeServiceLayoutOptions'];
IncludeTimeLayoutOptions = json['IncludeTimeLayoutOptions'];
IncludeBookingLayoutOptions = json['IncludeBookingLayoutOptions'];
IncludeBookingMethodOptions = json['IncludeBookingMethodOptions'];
return this;
}
Map<String, dynamic> toJson() => {
'CompanyId': CompanyId,
'SitePath': SitePath,
'IncludeServiceLayoutOptions': IncludeServiceLayoutOptions,
'IncludeTimeLayoutOptions': IncludeTimeLayoutOptions,
'IncludeBookingLayoutOptions': IncludeBookingLayoutOptions,
'IncludeBookingMethodOptions': IncludeBookingMethodOptions
};
getTypeName() => "HomepageWidgetSettingsQuery";
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>[]),
'HomepageWidgetSettingsQuery': TypeInfo(TypeOf.Class, create:() => HomepageWidgetSettingsQuery()),
});
Dart HomepageWidgetSettingsQuery 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.
GET /homepage/widget/settings HTTP/1.1 Host: api.bokamera.se Accept: text/jsv
HTTP/1.1 200 OK Content-Type: text/jsv 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 } ] }