/* Options: Date: 2026-08-17 10:08:37 Version: 6.10 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://stubbur-app.azurewebsites.net //GlobalNamespace: //AddServiceStackTypes: True //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True IncludeTypes: WebshopOrderPreviewRequest.* //ExcludeTypes: //DefaultImports: package:servicestack/servicestack.dart */ import 'package:servicestack/servicestack.dart'; class WebshopPurchaseLine implements IConvertible { int? variantId; int? quantity; WebshopPurchaseLine({this.variantId,this.quantity}); WebshopPurchaseLine.fromJson(Map json) { fromMap(json); } fromMap(Map json) { variantId = json['variantId']; quantity = json['quantity']; return this; } Map toJson() => { 'variantId': variantId, 'quantity': quantity }; getTypeName() => "WebshopPurchaseLine"; TypeContext? context = _ctx; } class OrderTender implements IConvertible { String? kind; String? code; int? amountMinor; String? idempotencyKey; int? holdId; int? appliedMinor; OrderTender({this.kind,this.code,this.amountMinor,this.idempotencyKey,this.holdId,this.appliedMinor}); OrderTender.fromJson(Map json) { fromMap(json); } fromMap(Map json) { kind = json['kind']; code = json['code']; amountMinor = json['amountMinor']; idempotencyKey = json['idempotencyKey']; holdId = json['holdId']; appliedMinor = json['appliedMinor']; return this; } Map toJson() => { 'kind': kind, 'code': code, 'amountMinor': amountMinor, 'idempotencyKey': idempotencyKey, 'holdId': holdId, 'appliedMinor': appliedMinor }; getTypeName() => "OrderTender"; TypeContext? context = _ctx; } class LocalizedMessage implements IConvertible { String? Is; String? en; LocalizedMessage({this.Is,this.en}); LocalizedMessage.fromJson(Map json) { fromMap(json); } fromMap(Map json) { Is = json['is']; en = json['en']; return this; } Map toJson() => { 'is': Is, 'en': en }; getTypeName() => "LocalizedMessage"; TypeContext? context = _ctx; } class WebshopPreviewLine implements IConvertible { int? variantId; int? productId; String? productName; String? size; String? color; int? quantity; int? unitBeforeMinor; int? unitAfterMinor; int? lineBeforeMinor; int? lineAfterMinor; bool? discounted; WebshopPreviewLine({this.variantId,this.productId,this.productName,this.size,this.color,this.quantity,this.unitBeforeMinor,this.unitAfterMinor,this.lineBeforeMinor,this.lineAfterMinor,this.discounted}); WebshopPreviewLine.fromJson(Map json) { fromMap(json); } fromMap(Map json) { variantId = json['variantId']; productId = json['productId']; productName = json['productName']; size = json['size']; color = json['color']; quantity = json['quantity']; unitBeforeMinor = json['unitBeforeMinor']; unitAfterMinor = json['unitAfterMinor']; lineBeforeMinor = json['lineBeforeMinor']; lineAfterMinor = json['lineAfterMinor']; discounted = json['discounted']; return this; } Map toJson() => { 'variantId': variantId, 'productId': productId, 'productName': productName, 'size': size, 'color': color, 'quantity': quantity, 'unitBeforeMinor': unitBeforeMinor, 'unitAfterMinor': unitAfterMinor, 'lineBeforeMinor': lineBeforeMinor, 'lineAfterMinor': lineAfterMinor, 'discounted': discounted }; getTypeName() => "WebshopPreviewLine"; TypeContext? context = _ctx; } class WebshopPreviewTender implements IConvertible { String? code; int? appliedMinor; bool? ok; String? reason; LocalizedMessage? message; WebshopPreviewTender({this.code,this.appliedMinor,this.ok,this.reason,this.message}); WebshopPreviewTender.fromJson(Map json) { fromMap(json); } fromMap(Map json) { code = json['code']; appliedMinor = json['appliedMinor']; ok = json['ok']; reason = json['reason']; message = JsonConverters.fromJson(json['message'],'LocalizedMessage',context!); return this; } Map toJson() => { 'code': code, 'appliedMinor': appliedMinor, 'ok': ok, 'reason': reason, 'message': JsonConverters.toJson(message,'LocalizedMessage',context!) }; getTypeName() => "WebshopPreviewTender"; TypeContext? context = _ctx; } class DiscountSummary implements IConvertible { String? type; double? value; DiscountSummary({this.type,this.value}); DiscountSummary.fromJson(Map json) { fromMap(json); } fromMap(Map json) { type = json['type']; value = JsonConverters.toDouble(json['value']); return this; } Map toJson() => { 'type': type, 'value': value }; getTypeName() => "DiscountSummary"; TypeContext? context = _ctx; } class WebshopOrderPreviewResult implements IConvertible { int? statusCode; bool? success; LocalizedMessage? message; String? reason; List? lines; int? subtotalMinor; int? deliveryFeeMinor; int? discountMinor; int? giftAppliedMinor; int? cardRemainderMinor; List? tenders; DiscountSummary? discount; WebshopOrderPreviewResult({this.statusCode,this.success,this.message,this.reason,this.lines,this.subtotalMinor,this.deliveryFeeMinor,this.discountMinor,this.giftAppliedMinor,this.cardRemainderMinor,this.tenders,this.discount}); WebshopOrderPreviewResult.fromJson(Map json) { fromMap(json); } fromMap(Map json) { statusCode = json['statusCode']; success = json['success']; message = JsonConverters.fromJson(json['message'],'LocalizedMessage',context!); reason = json['reason']; lines = JsonConverters.fromJson(json['lines'],'List',context!); subtotalMinor = json['subtotalMinor']; deliveryFeeMinor = json['deliveryFeeMinor']; discountMinor = json['discountMinor']; giftAppliedMinor = json['giftAppliedMinor']; cardRemainderMinor = json['cardRemainderMinor']; tenders = JsonConverters.fromJson(json['tenders'],'List',context!); discount = JsonConverters.fromJson(json['discount'],'DiscountSummary',context!); return this; } Map toJson() => { 'statusCode': statusCode, 'success': success, 'message': JsonConverters.toJson(message,'LocalizedMessage',context!), 'reason': reason, 'lines': JsonConverters.toJson(lines,'List',context!), 'subtotalMinor': subtotalMinor, 'deliveryFeeMinor': deliveryFeeMinor, 'discountMinor': discountMinor, 'giftAppliedMinor': giftAppliedMinor, 'cardRemainderMinor': cardRemainderMinor, 'tenders': JsonConverters.toJson(tenders,'List',context!), 'discount': JsonConverters.toJson(discount,'DiscountSummary',context!) }; getTypeName() => "WebshopOrderPreviewResult"; TypeContext? context = _ctx; } // @Route("/Webshop/Order/Preview", "POST") class WebshopOrderPreviewRequest implements IReturn, IConvertible { int? ownerId; String? externalId; List? lines; String? deliveryType; String? discountCode; String? buyerPhone; List? tenders; WebshopOrderPreviewRequest({this.ownerId,this.externalId,this.lines,this.deliveryType,this.discountCode,this.buyerPhone,this.tenders}); WebshopOrderPreviewRequest.fromJson(Map json) { fromMap(json); } fromMap(Map json) { ownerId = json['ownerId']; externalId = json['externalId']; lines = JsonConverters.fromJson(json['lines'],'List',context!); deliveryType = json['deliveryType']; discountCode = json['discountCode']; buyerPhone = json['buyerPhone']; tenders = JsonConverters.fromJson(json['tenders'],'List',context!); return this; } Map toJson() => { 'ownerId': ownerId, 'externalId': externalId, 'lines': JsonConverters.toJson(lines,'List',context!), 'deliveryType': deliveryType, 'discountCode': discountCode, 'buyerPhone': buyerPhone, 'tenders': JsonConverters.toJson(tenders,'List',context!) }; createResponse() => WebshopOrderPreviewResult(); getResponseTypeName() => "WebshopOrderPreviewResult"; getTypeName() => "WebshopOrderPreviewRequest"; TypeContext? context = _ctx; } TypeContext _ctx = TypeContext(library: 'stubbur_app.azurewebsites.net', types: { 'WebshopPurchaseLine': TypeInfo(TypeOf.Class, create:() => WebshopPurchaseLine()), 'OrderTender': TypeInfo(TypeOf.Class, create:() => OrderTender()), 'LocalizedMessage': TypeInfo(TypeOf.Class, create:() => LocalizedMessage()), 'WebshopPreviewLine': TypeInfo(TypeOf.Class, create:() => WebshopPreviewLine()), 'WebshopPreviewTender': TypeInfo(TypeOf.Class, create:() => WebshopPreviewTender()), 'DiscountSummary': TypeInfo(TypeOf.Class, create:() => DiscountSummary()), 'WebshopOrderPreviewResult': TypeInfo(TypeOf.Class, create:() => WebshopOrderPreviewResult()), 'List': TypeInfo(TypeOf.Class, create:() => []), 'List': TypeInfo(TypeOf.Class, create:() => []), 'WebshopOrderPreviewRequest': TypeInfo(TypeOf.Class, create:() => WebshopOrderPreviewRequest()), 'List': TypeInfo(TypeOf.Class, create:() => []), 'List': TypeInfo(TypeOf.Class, create:() => []), });