/* Options: Date: 2024-12-03 18:15:07 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: AddCompanyTrial.* //ExcludeTypes: //DefaultImports: package:servicestack/servicestack.dart */ import 'package:servicestack/servicestack.dart'; abstract class ICompany { String? CompanyId; } class TrialQueryResponse implements IConvertible { int? Id; String? Name; int? TrialDays; TrialQueryResponse({this.Id,this.Name,this.TrialDays}); TrialQueryResponse.fromJson(Map json) { fromMap(json); } fromMap(Map json) { Id = json['Id']; Name = json['Name']; TrialDays = json['TrialDays']; return this; } Map toJson() => { 'Id': Id, 'Name': Name, 'TrialDays': TrialDays }; getTypeName() => "TrialQueryResponse"; TypeContext? context = _ctx; } class CompanyTrialQueryResponse implements IConvertible { int? TrialTypeId; TrialQueryResponse? TrialType; DateTime? Started; DateTime? Created; DateTime? ValidTo; bool? Active; CompanyTrialQueryResponse({this.TrialTypeId,this.TrialType,this.Started,this.Created,this.ValidTo,this.Active}); CompanyTrialQueryResponse.fromJson(Map json) { fromMap(json); } fromMap(Map json) { TrialTypeId = json['TrialTypeId']; TrialType = JsonConverters.fromJson(json['TrialType'],'TrialQueryResponse',context!); Started = JsonConverters.fromJson(json['Started'],'DateTime',context!); Created = JsonConverters.fromJson(json['Created'],'DateTime',context!); ValidTo = JsonConverters.fromJson(json['ValidTo'],'DateTime',context!); Active = json['Active']; return this; } Map toJson() => { 'TrialTypeId': TrialTypeId, 'TrialType': JsonConverters.toJson(TrialType,'TrialQueryResponse',context!), 'Started': JsonConverters.toJson(Started,'DateTime',context!), 'Created': JsonConverters.toJson(Created,'DateTime',context!), 'ValidTo': JsonConverters.toJson(ValidTo,'DateTime',context!), 'Active': Active }; getTypeName() => "CompanyTrialQueryResponse"; TypeContext? context = _ctx; } // @Route("/trials/company/", "POST") // @ApiResponse(Description="You were unauthorized to call this service", StatusCode=401) // @ValidateRequest(Validator="IsAuthenticated") class AddCompanyTrial 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; /** * Id of the trial type */ // @ApiMember(Description="Id of the trial type", IsRequired=true) int? TrialTypeId; AddCompanyTrial({this.CompanyId,this.TrialTypeId}); AddCompanyTrial.fromJson(Map json) { fromMap(json); } fromMap(Map json) { CompanyId = json['CompanyId']; TrialTypeId = json['TrialTypeId']; return this; } Map toJson() => { 'CompanyId': CompanyId, 'TrialTypeId': TrialTypeId }; createResponse() => CompanyTrialQueryResponse(); getResponseTypeName() => "CompanyTrialQueryResponse"; getTypeName() => "AddCompanyTrial"; TypeContext? context = _ctx; } TypeContext _ctx = TypeContext(library: 'api.bokamera.se', types: { 'ICompany': TypeInfo(TypeOf.Interface), 'TrialQueryResponse': TypeInfo(TypeOf.Class, create:() => TrialQueryResponse()), 'CompanyTrialQueryResponse': TypeInfo(TypeOf.Class, create:() => CompanyTrialQueryResponse()), 'AddCompanyTrial': TypeInfo(TypeOf.Class, create:() => AddCompanyTrial()), });