/* Options: Date: 2025-09-23 03:02:01 Version: 6.21 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://accounts.dev.healthmonix.com/api/ //GlobalNamespace: //AddServiceStackTypes: True //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True IncludeTypes: GetPurchaseOrder.* //ExcludeTypes: //DefaultImports: package:servicestack/servicestack.dart */ import 'package:servicestack/servicestack.dart'; class PurchaseOrderItem implements IConvertible { int? id; // @References(typeof(PurchaseOrder)) int? purchaseOrderId; // @References(typeof(Product)) String? productId; String? productName; int? quantity; double? price; String? discountDescription; String? discountSource; double? discount; DateTime? createdDate; PurchaseOrderItem({this.id,this.purchaseOrderId,this.productId,this.productName,this.quantity,this.price,this.discountDescription,this.discountSource,this.discount,this.createdDate}); PurchaseOrderItem.fromJson(Map json) { fromMap(json); } fromMap(Map json) { id = json['id']; purchaseOrderId = json['purchaseOrderId']; productId = json['productId']; productName = json['productName']; quantity = json['quantity']; price = JsonConverters.toDouble(json['price']); discountDescription = json['discountDescription']; discountSource = json['discountSource']; discount = JsonConverters.toDouble(json['discount']); createdDate = JsonConverters.fromJson(json['createdDate'],'DateTime',context!); return this; } Map toJson() => { 'id': id, 'purchaseOrderId': purchaseOrderId, 'productId': productId, 'productName': productName, 'quantity': quantity, 'price': price, 'discountDescription': discountDescription, 'discountSource': discountSource, 'discount': discount, 'createdDate': JsonConverters.toJson(createdDate,'DateTime',context!) }; getTypeName() => "PurchaseOrderItem"; TypeContext? context = _ctx; } class PurchaseOrderDto implements IConvertible { int? id; String? userId; DateTime? createdDate; String? paymentType; bool? Void; bool? paid; String? transactionIdentifier; String? couponCode; List? orderItems; String? payer; String? billingAddressLine1; String? billingAddressCity; String? billingAddressState; String? billingAddressPostalCode; String? billingAddressCountryCode; PurchaseOrderDto({this.id,this.userId,this.createdDate,this.paymentType,this.Void,this.paid,this.transactionIdentifier,this.couponCode,this.orderItems,this.payer,this.billingAddressLine1,this.billingAddressCity,this.billingAddressState,this.billingAddressPostalCode,this.billingAddressCountryCode}); PurchaseOrderDto.fromJson(Map json) { fromMap(json); } fromMap(Map json) { id = json['id']; userId = json['userId']; createdDate = JsonConverters.fromJson(json['createdDate'],'DateTime',context!); paymentType = json['paymentType']; Void = json['void']; paid = json['paid']; transactionIdentifier = json['transactionIdentifier']; couponCode = json['couponCode']; orderItems = JsonConverters.fromJson(json['orderItems'],'List',context!); payer = json['payer']; billingAddressLine1 = json['billingAddressLine1']; billingAddressCity = json['billingAddressCity']; billingAddressState = json['billingAddressState']; billingAddressPostalCode = json['billingAddressPostalCode']; billingAddressCountryCode = json['billingAddressCountryCode']; return this; } Map toJson() => { 'id': id, 'userId': userId, 'createdDate': JsonConverters.toJson(createdDate,'DateTime',context!), 'paymentType': paymentType, 'void': Void, 'paid': paid, 'transactionIdentifier': transactionIdentifier, 'couponCode': couponCode, 'orderItems': JsonConverters.toJson(orderItems,'List',context!), 'payer': payer, 'billingAddressLine1': billingAddressLine1, 'billingAddressCity': billingAddressCity, 'billingAddressState': billingAddressState, 'billingAddressPostalCode': billingAddressPostalCode, 'billingAddressCountryCode': billingAddressCountryCode }; getTypeName() => "PurchaseOrderDto"; TypeContext? context = _ctx; } // @Route("/purchaseorders/{id}", "GET") class GetPurchaseOrder implements IReturn, IConvertible { int? id; GetPurchaseOrder({this.id}); GetPurchaseOrder.fromJson(Map json) { fromMap(json); } fromMap(Map json) { id = json['id']; return this; } Map toJson() => { 'id': id }; createResponse() => PurchaseOrderDto(); getResponseTypeName() => "PurchaseOrderDto"; getTypeName() => "GetPurchaseOrder"; TypeContext? context = _ctx; } TypeContext _ctx = TypeContext(library: 'accounts.dev.healthmonix.com', types: { 'PurchaseOrderItem': TypeInfo(TypeOf.Class, create:() => PurchaseOrderItem()), 'PurchaseOrderDto': TypeInfo(TypeOf.Class, create:() => PurchaseOrderDto()), 'List': TypeInfo(TypeOf.Class, create:() => []), 'GetPurchaseOrder': TypeInfo(TypeOf.Class, create:() => GetPurchaseOrder()), });