/* Options: Date: 2024-06-16 21:56:56 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: CreateArticle.* //ExcludeTypes: //DefaultImports: package:servicestack/servicestack.dart */ import 'package:servicestack/servicestack.dart'; abstract class ICompany { String? CompanyId; } class BaseArticleDto implements IConvertible { String? ArticleId; double? ArticlePrice; String? ArticleName; DateTime? CreatedDate; BaseArticleDto({this.ArticleId,this.ArticlePrice,this.ArticleName,this.CreatedDate}); BaseArticleDto.fromJson(Map json) { fromMap(json); } fromMap(Map json) { ArticleId = json['ArticleId']; ArticlePrice = JsonConverters.toDouble(json['ArticlePrice']); ArticleName = json['ArticleName']; CreatedDate = JsonConverters.fromJson(json['CreatedDate'],'DateTime',context!); return this; } Map toJson() => { 'ArticleId': ArticleId, 'ArticlePrice': ArticlePrice, 'ArticleName': ArticleName, 'CreatedDate': JsonConverters.toJson(CreatedDate,'DateTime',context!) }; getTypeName() => "BaseArticleDto"; TypeContext? context = _ctx; } class ArticleQueryResponse extends BaseArticleDto implements IConvertible { String? UnitId; String? CodingId; String? VatRate; String? VatRatePercent; String? CurrencySign; ArticleQueryResponse({this.UnitId,this.CodingId,this.VatRate,this.VatRatePercent,this.CurrencySign}); ArticleQueryResponse.fromJson(Map json) { fromMap(json); } fromMap(Map json) { super.fromMap(json); UnitId = json['UnitId']; CodingId = json['CodingId']; VatRate = json['VatRate']; VatRatePercent = json['VatRatePercent']; CurrencySign = json['CurrencySign']; return this; } Map toJson() => super.toJson()..addAll({ 'UnitId': UnitId, 'CodingId': CodingId, 'VatRate': VatRate, 'VatRatePercent': VatRatePercent, 'CurrencySign': CurrencySign }); getTypeName() => "ArticleQueryResponse"; TypeContext? context = _ctx; } // @Route("/eaccounting/articles", "POST") class CreateArticle extends BaseArticleDto implements IReturn, ICompany, IConvertible, IPost { int? ServiceId; String? CompanyId; CreateArticle({this.ServiceId,this.CompanyId}); CreateArticle.fromJson(Map json) { fromMap(json); } fromMap(Map json) { super.fromMap(json); ServiceId = json['ServiceId']; CompanyId = json['CompanyId']; return this; } Map toJson() => super.toJson()..addAll({ 'ServiceId': ServiceId, 'CompanyId': CompanyId }); createResponse() => ArticleQueryResponse(); getResponseTypeName() => "ArticleQueryResponse"; getTypeName() => "CreateArticle"; TypeContext? context = _ctx; } TypeContext _ctx = TypeContext(library: 'testapi.bokamera.se', types: { 'ICompany': TypeInfo(TypeOf.Interface), 'BaseArticleDto': TypeInfo(TypeOf.Class, create:() => BaseArticleDto()), 'ArticleQueryResponse': TypeInfo(TypeOf.Class, create:() => ArticleQueryResponse()), 'CreateArticle': TypeInfo(TypeOf.Class, create:() => CreateArticle()), });