/* Options: Date: 2026-09-09 11:04:52 Version: 10.08 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://services.acct.2service.nl //GlobalNamespace: //AddServiceStackTypes: True //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True IncludeTypes: GetPartInfoById.* //ExcludeTypes: //DefaultImports: package:servicestack/servicestack.dart */ import 'package:servicestack/servicestack.dart'; abstract class AuthenticatedRequest { /** * Session token received from successful authentication. */ // @ApiMember(Description="Session token received from successful authentication.", IsRequired=true, ParameterType="query") String SessionToken = ""; AuthenticatedRequest({this.SessionToken=""}); AuthenticatedRequest.fromJson(Map json) { fromMap(json); } fromMap(Map json) { SessionToken = json['SessionToken'] ?? ""; return this; } Map toJson() => { 'SessionToken': SessionToken }; getTypeName() => "AuthenticatedRequest"; TypeContext? context = _ctx; } class OperationResult implements IConvertible { /** * Specifies if the operation was successful. */ // @ApiMember(Description="Specifies if the operation was successful.", ParameterType="model") bool? IsSuccessful; /** * States error message in case of unsuccessful operation. */ // @ApiMember(Description="States error message in case of unsuccessful operation.", ParameterType="model") String? ErrorMessage; OperationResult({this.IsSuccessful,this.ErrorMessage}); OperationResult.fromJson(Map json) { fromMap(json); } fromMap(Map json) { IsSuccessful = json['IsSuccessful']; ErrorMessage = json['ErrorMessage']; return this; } Map toJson() => { 'IsSuccessful': IsSuccessful, 'ErrorMessage': ErrorMessage }; getTypeName() => "OperationResult"; TypeContext? context = _ctx; } class OperationResult1 extends OperationResult implements IConvertible { /** * Result value */ // @ApiMember(Description="Result value", ParameterType="model") T? Result; OperationResult1({this.Result}); OperationResult1.fromJson(Map json) { fromMap(json); } fromMap(Map json) { super.fromMap(json); Result = JsonConverters.fromJson(json['Result'],'T',context!); return this; } Map toJson() => super.toJson()..addAll({ 'Result': JsonConverters.toJson(Result,'T',context!) }); getTypeName() => "OperationResult<$T>"; TypeContext? context = _ctx; } class PartInfoResultImage implements IConvertible { /** * Image number */ // @ApiMember(Description="Image number") int ImageNumber = 0; /** * Image URL */ // @ApiMember(Description="Image URL") String? ImageUrl; PartInfoResultImage({this.ImageNumber=0,this.ImageUrl}); PartInfoResultImage.fromJson(Map json) { fromMap(json); } fromMap(Map json) { ImageNumber = json['ImageNumber'] ?? 0; ImageUrl = json['ImageUrl']; return this; } Map toJson() => { 'ImageNumber': ImageNumber, 'ImageUrl': ImageUrl }; getTypeName() => "PartInfoResultImage"; TypeContext? context = _ctx; } class PartStockQuantity implements IConvertible { /** * Location ID */ // @ApiMember(Description="Location ID") int LocationId = 0; /** * Location code */ // @ApiMember(Description="Location code") String? LocationCode; /** * Stock quantity in location */ // @ApiMember(Description="Stock quantity in location") int StockQuantity = 0; PartStockQuantity({this.LocationId=0,this.LocationCode,this.StockQuantity=0}); PartStockQuantity.fromJson(Map json) { fromMap(json); } fromMap(Map json) { LocationId = json['LocationId'] ?? 0; LocationCode = json['LocationCode']; StockQuantity = json['StockQuantity'] ?? 0; return this; } Map toJson() => { 'LocationId': LocationId, 'LocationCode': LocationCode, 'StockQuantity': StockQuantity }; getTypeName() => "PartStockQuantity"; TypeContext? context = _ctx; } class PartInfoResult implements IConvertible { /** * Unique ID for the part. */ // @ApiMember(Description="Unique ID for the part.") int Id = 0; /** * Part number. */ // @ApiMember(Description="Part number.") String? PartNumber; /** * Description of the part. */ // @ApiMember(Description="Description of the part.") String? Description; /** * Part manufacturer. */ // @ApiMember(Description="Part manufacturer.") String? Manufacturer; /** * Determines if the part can be ordered. */ // @ApiMember(Description="Determines if the part can be ordered.") bool? CanBeOrdered; /** * Textual representation of the status of the part. */ // @ApiMember(Description="Textual representation of the status of the part.") String? StatusText; /** * Available stock to order. */ // @ApiMember(Description="Available stock to order.") int AvailableStockQuantity = 0; /** * Average days needed for delivery. */ // @ApiMember(Description="Average days needed for delivery.") int? AverageDeliveryInDays; /** * Price of a single unit, excluding VAT. */ // @ApiMember(Description="Price of a single unit, excluding VAT.") double? UnitPrice; /** * EAN number. */ // @ApiMember(Description="EAN number.") String? EanNumber; /** * Images */ // @ApiMember(Description="Images") List? Images; /** * Secondary article numbers */ // @ApiMember(Description="Secondary article numbers") List? SecondaryArticleNumbers; /** * Replacement article numbers */ // @ApiMember(Description="Replacement article numbers") List? ReplacementArticleNumbers; /** * Stock quantities */ // @ApiMember(Description="Stock quantities") List? StockQuantities; PartInfoResult({this.Id=0,this.PartNumber,this.Description,this.Manufacturer,this.CanBeOrdered,this.StatusText,this.AvailableStockQuantity=0,this.AverageDeliveryInDays,this.UnitPrice,this.EanNumber,this.Images,this.SecondaryArticleNumbers,this.ReplacementArticleNumbers,this.StockQuantities}); PartInfoResult.fromJson(Map json) { fromMap(json); } fromMap(Map json) { Id = json['Id'] ?? 0; PartNumber = json['PartNumber']; Description = json['Description']; Manufacturer = json['Manufacturer']; CanBeOrdered = json['CanBeOrdered']; StatusText = json['StatusText']; AvailableStockQuantity = json['AvailableStockQuantity'] ?? 0; AverageDeliveryInDays = json['AverageDeliveryInDays']; UnitPrice = JsonConverters.toDouble(json['UnitPrice']); EanNumber = json['EanNumber']; Images = JsonConverters.fromJson(json['Images'],'List',context!); SecondaryArticleNumbers = JsonConverters.fromJson(json['SecondaryArticleNumbers'],'List',context!); ReplacementArticleNumbers = JsonConverters.fromJson(json['ReplacementArticleNumbers'],'List',context!); StockQuantities = JsonConverters.fromJson(json['StockQuantities'],'List',context!); return this; } Map toJson() => { 'Id': Id, 'PartNumber': PartNumber, 'Description': Description, 'Manufacturer': Manufacturer, 'CanBeOrdered': CanBeOrdered, 'StatusText': StatusText, 'AvailableStockQuantity': AvailableStockQuantity, 'AverageDeliveryInDays': AverageDeliveryInDays, 'UnitPrice': UnitPrice, 'EanNumber': EanNumber, 'Images': JsonConverters.toJson(Images,'List',context!), 'SecondaryArticleNumbers': JsonConverters.toJson(SecondaryArticleNumbers,'List',context!), 'ReplacementArticleNumbers': JsonConverters.toJson(ReplacementArticleNumbers,'List',context!), 'StockQuantities': JsonConverters.toJson(StockQuantities,'List',context!) }; getTypeName() => "PartInfoResult"; TypeContext? context = _ctx; } class PartInfoResponse extends OperationResult1 implements IConvertible { PartInfoResponse(); PartInfoResponse.fromJson(Map json) : super.fromJson(json); fromMap(Map json) { super.fromMap(json); return this; } Map toJson() => super.toJson(); getTypeName() => "PartInfoResponse"; TypeContext? context = _ctx; } // @Route("/dealers/part/{PartId}", "GET") class GetPartInfoById extends AuthenticatedRequest implements IReturn, IConvertible, IGet { /** * Part id to retrieve info for. */ // @ApiMember(Description="Part id to retrieve info for.", IsRequired=true, ParameterType="path") int PartId = 0; GetPartInfoById({this.PartId=0}); GetPartInfoById.fromJson(Map json) { fromMap(json); } fromMap(Map json) { super.fromMap(json); PartId = json['PartId'] ?? 0; return this; } Map toJson() => super.toJson()..addAll({ 'PartId': PartId }); createResponse() => PartInfoResponse(); getResponseTypeName() => "PartInfoResponse"; getTypeName() => "GetPartInfoById"; TypeContext? context = _ctx; } TypeContext _ctx = TypeContext(library: 'services.acct.2service.nl', types: { 'AuthenticatedRequest': TypeInfo(TypeOf.AbstractClass), 'OperationResult': TypeInfo(TypeOf.Class, create:() => OperationResult()), 'OperationResult1': TypeInfo(TypeOf.GenericDef,create:() => OperationResult1()), 'PartInfoResultImage': TypeInfo(TypeOf.Class, create:() => PartInfoResultImage()), 'PartStockQuantity': TypeInfo(TypeOf.Class, create:() => PartStockQuantity()), 'PartInfoResult': TypeInfo(TypeOf.Class, create:() => PartInfoResult()), 'List': TypeInfo(TypeOf.Class, create:() => []), 'List': TypeInfo(TypeOf.Class, create:() => []), 'PartInfoResponse': TypeInfo(TypeOf.Class, create:() => PartInfoResponse()), 'GetPartInfoById': TypeInfo(TypeOf.Class, create:() => GetPartInfoById()), });