/* Options: Date: 2024-06-16 23:26:14 Version: 8.23 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://testapi.bokamera.se //GlobalNamespace: //AddServiceStackTypes: True //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True IncludeTypes: CreateServicePrice.* //ExcludeTypes: //DefaultImports: package:servicestack/servicestack.dart */ import 'package:servicestack/servicestack.dart'; abstract class ICompany { String? CompanyId; } class GroupBookingSettings implements IConvertible { bool? Active; int? Min; int? Max; GroupBookingSettings({this.Active,this.Min,this.Max}); GroupBookingSettings.fromJson(Map json) { fromMap(json); } fromMap(Map json) { Active = json['Active']; Min = json['Min']; Max = json['Max']; return this; } Map toJson() => { 'Active': Active, 'Min': Min, 'Max': Max }; getTypeName() => "GroupBookingSettings"; TypeContext? context = _ctx; } class MultipleResourceSettings implements IConvertible { bool? Active; int? Min; int? Max; MultipleResourceSettings({this.Active,this.Min,this.Max}); MultipleResourceSettings.fromJson(Map json) { fromMap(json); } fromMap(Map json) { Active = json['Active']; Min = json['Min']; Max = json['Max']; return this; } Map toJson() => { 'Active': Active, 'Min': Min, 'Max': Max }; getTypeName() => "MultipleResourceSettings"; TypeContext? context = _ctx; } class ServiceInfoResponse implements IConvertible { int? Id; String? Name; String? Description; Uri? ImageUrl; int? LengthInMinutes; int? MaxNumberOfSpotsPerBooking; GroupBookingSettings? GroupBooking; MultipleResourceSettings? MultipleResource; bool? IsGroupBooking; bool? IsPaymentEnabled; ServiceInfoResponse({this.Id,this.Name,this.Description,this.ImageUrl,this.LengthInMinutes,this.MaxNumberOfSpotsPerBooking,this.GroupBooking,this.MultipleResource,this.IsGroupBooking,this.IsPaymentEnabled}); ServiceInfoResponse.fromJson(Map json) { fromMap(json); } fromMap(Map json) { Id = json['Id']; Name = json['Name']; Description = json['Description']; ImageUrl = JsonConverters.fromJson(json['ImageUrl'],'Uri',context!); LengthInMinutes = json['LengthInMinutes']; MaxNumberOfSpotsPerBooking = json['MaxNumberOfSpotsPerBooking']; GroupBooking = JsonConverters.fromJson(json['GroupBooking'],'GroupBookingSettings',context!); MultipleResource = JsonConverters.fromJson(json['MultipleResource'],'MultipleResourceSettings',context!); IsGroupBooking = json['IsGroupBooking']; IsPaymentEnabled = json['IsPaymentEnabled']; return this; } Map toJson() => { 'Id': Id, 'Name': Name, 'Description': Description, 'ImageUrl': JsonConverters.toJson(ImageUrl,'Uri',context!), 'LengthInMinutes': LengthInMinutes, 'MaxNumberOfSpotsPerBooking': MaxNumberOfSpotsPerBooking, 'GroupBooking': JsonConverters.toJson(GroupBooking,'GroupBookingSettings',context!), 'MultipleResource': JsonConverters.toJson(MultipleResource,'MultipleResourceSettings',context!), 'IsGroupBooking': IsGroupBooking, 'IsPaymentEnabled': IsPaymentEnabled }; getTypeName() => "ServiceInfoResponse"; TypeContext? context = _ctx; } class DayOfWeekDto implements IConvertible { int? DayOfWeekId; int? DotNetDayOfWeekId; String? DayOfWeek; DayOfWeekDto({this.DayOfWeekId,this.DotNetDayOfWeekId,this.DayOfWeek}); DayOfWeekDto.fromJson(Map json) { fromMap(json); } fromMap(Map json) { DayOfWeekId = json['DayOfWeekId']; DotNetDayOfWeekId = json['DotNetDayOfWeekId']; DayOfWeek = json['DayOfWeek']; return this; } Map toJson() => { 'DayOfWeekId': DayOfWeekId, 'DotNetDayOfWeekId': DotNetDayOfWeekId, 'DayOfWeek': DayOfWeek }; getTypeName() => "DayOfWeekDto"; TypeContext? context = _ctx; } class ServicePriceResponse implements IConvertible { /** * The company id */ // @ApiMember(Description="The company id") String? CompanyId; /** * The price id */ // @ApiMember(Description="The price id") int? Id; /** * The service id */ // @ApiMember(Description="The service id") int? ServiceId; /** * The price */ // @ApiMember(Description="The price") double? Price; /** * The price calculation type id, 1 = Normal, price is for the service total duration, 2 = Price is per minute, 3 = Price is per hour, 4= Price is per day */ // @ApiMember(Description="The price calculation type id, 1 = Normal, price is for the service total duration, 2 = Price is per minute, 3 = Price is per hour, 4= Price is per day") int? CalculationTypeId; /** * The price currency */ // @ApiMember(Description="The price currency") String? CurrencyId; /** * The price sign */ // @ApiMember(Description="The price sign") String? PriceSign; /** * The price VAT in percent */ // @ApiMember(Description="The price VAT in percent") double? VAT; /** * The price category if price has a category */ // @ApiMember(Description="The price category if price has a category") String? Category; /** * The price text to display */ // @ApiMember(Description="The price text to display") String? PriceText; /** * The valid from date for the price. */ // @ApiMember(Description="The valid from date for the price.") DateTime? From; /** * The valid to date for the price. */ // @ApiMember(Description="The valid to date for the price.") DateTime? To; /** * If the price is only valid for specific days in week add a comma separated list of which days this day price belongs to, 1 = Monday .. 7 = Sunday. All old days connected will be removed on update. */ // @ApiMember(Description="If the price is only valid for specific days in week add a comma separated list of which days this day price belongs to, 1 = Monday .. 7 = Sunday. All old days connected will be removed on update.") List? DaysOfWeek; /** * If the price is only valid for specific days in week add a comma separated list of which days this day price belongs to, 1 = Monday .. 7 = Sunday. All old days connected will be removed on update. */ // @ApiMember(Description="If the price is only valid for specific days in week add a comma separated list of which days this day price belongs to, 1 = Monday .. 7 = Sunday. All old days connected will be removed on update.") Duration? FromTime; /** * If the price is only valid for a specific time span during a time of day enter the FromTime and ToTime parameters. */ // @ApiMember(Description="If the price is only valid for a specific time span during a time of day enter the FromTime and ToTime parameters.") Duration? ToTime; ServiceInfoResponse? Service; /** * If the price is only valid for a specific time span */ // @ApiMember(Description="If the price is only valid for a specific time span") bool? IsTimeSpecific; /** * If the price is only valid for specific days of week */ // @ApiMember(Description="If the price is only valid for specific days of week") bool? IsDaysOfWeekSpecific; /** * If the price is Weighted */ // @ApiMember(Description="If the price is Weighted") bool? IsWeighted; ServicePriceResponse({this.CompanyId,this.Id,this.ServiceId,this.Price,this.CalculationTypeId,this.CurrencyId,this.PriceSign,this.VAT,this.Category,this.PriceText,this.From,this.To,this.DaysOfWeek,this.FromTime,this.ToTime,this.Service,this.IsTimeSpecific,this.IsDaysOfWeekSpecific,this.IsWeighted}); ServicePriceResponse.fromJson(Map json) { fromMap(json); } fromMap(Map json) { CompanyId = json['CompanyId']; Id = json['Id']; ServiceId = json['ServiceId']; Price = JsonConverters.toDouble(json['Price']); CalculationTypeId = json['CalculationTypeId']; CurrencyId = json['CurrencyId']; PriceSign = json['PriceSign']; VAT = JsonConverters.toDouble(json['VAT']); Category = json['Category']; PriceText = json['PriceText']; From = JsonConverters.fromJson(json['From'],'DateTime',context!); To = JsonConverters.fromJson(json['To'],'DateTime',context!); DaysOfWeek = JsonConverters.fromJson(json['DaysOfWeek'],'List',context!); FromTime = JsonConverters.fromJson(json['FromTime'],'Duration',context!); ToTime = JsonConverters.fromJson(json['ToTime'],'Duration',context!); Service = JsonConverters.fromJson(json['Service'],'ServiceInfoResponse',context!); IsTimeSpecific = json['IsTimeSpecific']; IsDaysOfWeekSpecific = json['IsDaysOfWeekSpecific']; IsWeighted = json['IsWeighted']; return this; } Map toJson() => { 'CompanyId': CompanyId, 'Id': Id, 'ServiceId': ServiceId, 'Price': Price, 'CalculationTypeId': CalculationTypeId, 'CurrencyId': CurrencyId, 'PriceSign': PriceSign, 'VAT': VAT, 'Category': Category, 'PriceText': PriceText, 'From': JsonConverters.toJson(From,'DateTime',context!), 'To': JsonConverters.toJson(To,'DateTime',context!), 'DaysOfWeek': JsonConverters.toJson(DaysOfWeek,'List',context!), 'FromTime': JsonConverters.toJson(FromTime,'Duration',context!), 'ToTime': JsonConverters.toJson(ToTime,'Duration',context!), 'Service': JsonConverters.toJson(Service,'ServiceInfoResponse',context!), 'IsTimeSpecific': IsTimeSpecific, 'IsDaysOfWeekSpecific': IsDaysOfWeekSpecific, 'IsWeighted': IsWeighted }; getTypeName() => "ServicePriceResponse"; TypeContext? context = _ctx; } // @Route("/services/prices/", "POST") // @ValidateRequest(Validator="IsAuthenticated") class CreateServicePrice implements IReturn, ICompany, IConvertible, IPost { /** * 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 service id */ // @ApiMember(Description="The service id", IsRequired=true) int? ServiceId; /** * The price */ // @ApiMember(Description="The price", IsRequired=true) double? Price; /** * The price currency */ // @ApiMember(Description="The price currency", IsRequired=true) String? CurrencyId; /** * The price calculation type id, 1 = Normal, price is for the service total duration, 2 = Price is per minute, 3 = Price is per hour, 4= Price is per day */ // @ApiMember(Description="The price calculation type id, 1 = Normal, price is for the service total duration, 2 = Price is per minute, 3 = Price is per hour, 4= Price is per day", IsRequired=true) int? CalculationTypeId; /** * The price VAT in percent */ // @ApiMember(Description="The price VAT in percent", IsRequired=true) double? VAT; /** * The price category if price has a category */ // @ApiMember(Description="The price category if price has a category") String? Category; /** * The valid from date for the price. */ // @ApiMember(Description="The valid from date for the price.") DateTime? From; /** * The valid to date for the price. */ // @ApiMember(Description="The valid to date for the price.") DateTime? To; /** * If the price is only valid for specific days in week add a comma separated list of which days this day price belongs to, 1 = Monday .. 7 = Sunday. All old days connected will be removed on update. */ // @ApiMember(Description="If the price is only valid for specific days in week add a comma separated list of which days this day price belongs to, 1 = Monday .. 7 = Sunday. All old days connected will be removed on update.") List? DaysOfWeek; /** * If the price is only valid for specific days in week add a comma separated list of which days this day price belongs to, 1 = Monday .. 7 = Sunday. All old days connected will be removed on update. */ // @ApiMember(Description="If the price is only valid for specific days in week add a comma separated list of which days this day price belongs to, 1 = Monday .. 7 = Sunday. All old days connected will be removed on update.") Duration? FromTime; /** * If the price is only valid for a specific time span during a time of day enter the FromTime and ToTime parameters. */ // @ApiMember(Description="If the price is only valid for a specific time span during a time of day enter the FromTime and ToTime parameters.") Duration? ToTime; CreateServicePrice({this.CompanyId,this.ServiceId,this.Price,this.CurrencyId,this.CalculationTypeId,this.VAT,this.Category,this.From,this.To,this.DaysOfWeek,this.FromTime,this.ToTime}); CreateServicePrice.fromJson(Map json) { fromMap(json); } fromMap(Map json) { CompanyId = json['CompanyId']; ServiceId = json['ServiceId']; Price = JsonConverters.toDouble(json['Price']); CurrencyId = json['CurrencyId']; CalculationTypeId = json['CalculationTypeId']; VAT = JsonConverters.toDouble(json['VAT']); Category = json['Category']; From = JsonConverters.fromJson(json['From'],'DateTime',context!); To = JsonConverters.fromJson(json['To'],'DateTime',context!); DaysOfWeek = JsonConverters.fromJson(json['DaysOfWeek'],'List',context!); FromTime = JsonConverters.fromJson(json['FromTime'],'Duration',context!); ToTime = JsonConverters.fromJson(json['ToTime'],'Duration',context!); return this; } Map toJson() => { 'CompanyId': CompanyId, 'ServiceId': ServiceId, 'Price': Price, 'CurrencyId': CurrencyId, 'CalculationTypeId': CalculationTypeId, 'VAT': VAT, 'Category': Category, 'From': JsonConverters.toJson(From,'DateTime',context!), 'To': JsonConverters.toJson(To,'DateTime',context!), 'DaysOfWeek': JsonConverters.toJson(DaysOfWeek,'List',context!), 'FromTime': JsonConverters.toJson(FromTime,'Duration',context!), 'ToTime': JsonConverters.toJson(ToTime,'Duration',context!) }; createResponse() => ServicePriceResponse(); getResponseTypeName() => "ServicePriceResponse"; getTypeName() => "CreateServicePrice"; TypeContext? context = _ctx; } TypeContext _ctx = TypeContext(library: 'testapi.bokamera.se', types: { 'ICompany': TypeInfo(TypeOf.Interface), 'GroupBookingSettings': TypeInfo(TypeOf.Class, create:() => GroupBookingSettings()), 'MultipleResourceSettings': TypeInfo(TypeOf.Class, create:() => MultipleResourceSettings()), 'ServiceInfoResponse': TypeInfo(TypeOf.Class, create:() => ServiceInfoResponse()), 'Uri': TypeInfo(TypeOf.Class, create:() => Uri()), 'DayOfWeekDto': TypeInfo(TypeOf.Class, create:() => DayOfWeekDto()), 'ServicePriceResponse': TypeInfo(TypeOf.Class, create:() => ServicePriceResponse()), 'List': TypeInfo(TypeOf.Class, create:() => []), 'CreateServicePrice': TypeInfo(TypeOf.Class, create:() => CreateServicePrice()), });