/* Options: Date: 2024-11-21 11:30:28 Version: 8.23 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://api.bokamera.se //GlobalNamespace: //AddServiceStackTypes: True //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True IncludeTypes: UpdateServicePrice.* //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; int? MinNumberOfSpotsPerBooking; GroupBookingSettings? GroupBooking; MultipleResourceSettings? MultipleResource; bool? IsGroupBooking; bool? IsPaymentEnabled; ServiceInfoResponse({this.Id,this.Name,this.Description,this.ImageUrl,this.LengthInMinutes,this.MaxNumberOfSpotsPerBooking,this.MinNumberOfSpotsPerBooking,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']; MinNumberOfSpotsPerBooking = json['MinNumberOfSpotsPerBooking']; 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, 'MinNumberOfSpotsPerBooking': MinNumberOfSpotsPerBooking, '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; 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}); 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']; 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 }; getTypeName() => "ServicePriceResponse"; TypeContext? context = _ctx; } // @Route("/services/prices/{Id}", "PUT") // @ValidateRequest(Validator="IsAuthenticated") class UpdateServicePrice implements IReturn, ICompany, IConvertible, IPut { /** * 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; /** * Id of the price */ // @ApiMember(Description="Id of the price", IsRequired=true, ParameterType="path") int? Id; /** * The price */ // @ApiMember(Description="The price") double? Price; /** * The price currency */ // @ApiMember(Description="The price currency") 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") int? CalculationTypeId; /** * 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 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; UpdateServicePrice({this.CompanyId,this.Id,this.Price,this.CurrencyId,this.CalculationTypeId,this.VAT,this.Category,this.From,this.To,this.DaysOfWeek,this.FromTime,this.ToTime}); UpdateServicePrice.fromJson(Map json) { fromMap(json); } fromMap(Map json) { CompanyId = json['CompanyId']; Id = json['Id']; 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, 'Id': Id, '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() => "UpdateServicePrice"; TypeContext? context = _ctx; } TypeContext _ctx = TypeContext(library: 'api.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:() => []), 'UpdateServicePrice': TypeInfo(TypeOf.Class, create:() => UpdateServicePrice()), });