/* Options: Date: 2025-09-07 12:49:46 Version: 8.81 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://account.servicestack.net //GlobalNamespace: //AddServiceStackTypes: True //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True IncludeTypes: QueryOrders.* //ExcludeTypes: //DefaultImports: package:servicestack/servicestack.dart,dart:typed_data */ import 'package:servicestack/servicestack.dart'; import 'dart:typed_data'; abstract class IAddress { String? addressLine1; String? addressLine2; String? addressCity; String? addressZip; String? addressState; String? addressCountry; } enum SkuType { Product, PerDev, PerCore, Site, Support, Training, Register, Payment, } class OrderDetail implements IConvertible { int? id; int? orderId; int? skuId; SkuType? skuType; int? price; String? description; int? quantity; int? total; OrderDetail({this.id,this.orderId,this.skuId,this.skuType,this.price,this.description,this.quantity,this.total}); OrderDetail.fromJson(Map json) { fromMap(json); } fromMap(Map json) { id = json['id']; orderId = json['orderId']; skuId = json['skuId']; skuType = JsonConverters.fromJson(json['skuType'],'SkuType',context!); price = json['price']; description = json['description']; quantity = json['quantity']; total = json['total']; return this; } Map toJson() => { 'id': id, 'orderId': orderId, 'skuId': skuId, 'skuType': JsonConverters.toJson(skuType,'SkuType',context!), 'price': price, 'description': description, 'quantity': quantity, 'total': total }; getTypeName() => "OrderDetail"; TypeContext? context = _ctx; } class Order implements IAddress, IConvertible { int? id; int? customerId; String? productName; String? firstName; String? lastName; String? email; String? company; String? phoneNumber; String? addressLine1; String? addressLine2; String? addressCity; String? addressZip; String? addressState; String? addressCountry; bool? agreeTerms; String? notes; String? last4; int? subTotal; String? couponId; int? discount; int? tax; int? total; int? itemQuantity; int? authorizedQuantity; int? subscriptionId; String? licenseRef; int? paymentId; int? emailId; bool? paid; DateTime? createdDate; DateTime? modifiedDate; String? modifiedBy; DateTime? cancelledDate; String? cancelledReason; String? ipAddress; List? orderDetails; Order({this.id,this.customerId,this.productName,this.firstName,this.lastName,this.email,this.company,this.phoneNumber,this.addressLine1,this.addressLine2,this.addressCity,this.addressZip,this.addressState,this.addressCountry,this.agreeTerms,this.notes,this.last4,this.subTotal,this.couponId,this.discount,this.tax,this.total,this.itemQuantity,this.authorizedQuantity,this.subscriptionId,this.licenseRef,this.paymentId,this.emailId,this.paid,this.createdDate,this.modifiedDate,this.modifiedBy,this.cancelledDate,this.cancelledReason,this.ipAddress,this.orderDetails}); Order.fromJson(Map json) { fromMap(json); } fromMap(Map json) { id = json['id']; customerId = json['customerId']; productName = json['productName']; firstName = json['firstName']; lastName = json['lastName']; email = json['email']; company = json['company']; phoneNumber = json['phoneNumber']; addressLine1 = json['addressLine1']; addressLine2 = json['addressLine2']; addressCity = json['addressCity']; addressZip = json['addressZip']; addressState = json['addressState']; addressCountry = json['addressCountry']; agreeTerms = json['agreeTerms']; notes = json['notes']; last4 = json['last4']; subTotal = json['subTotal']; couponId = json['couponId']; discount = json['discount']; tax = json['tax']; total = json['total']; itemQuantity = json['itemQuantity']; authorizedQuantity = json['authorizedQuantity']; subscriptionId = json['subscriptionId']; licenseRef = json['licenseRef']; paymentId = json['paymentId']; emailId = json['emailId']; paid = json['paid']; createdDate = JsonConverters.fromJson(json['createdDate'],'DateTime',context!); modifiedDate = JsonConverters.fromJson(json['modifiedDate'],'DateTime',context!); modifiedBy = json['modifiedBy']; cancelledDate = JsonConverters.fromJson(json['cancelledDate'],'DateTime',context!); cancelledReason = json['cancelledReason']; ipAddress = json['ipAddress']; orderDetails = JsonConverters.fromJson(json['orderDetails'],'List',context!); return this; } Map toJson() => { 'id': id, 'customerId': customerId, 'productName': productName, 'firstName': firstName, 'lastName': lastName, 'email': email, 'company': company, 'phoneNumber': phoneNumber, 'addressLine1': addressLine1, 'addressLine2': addressLine2, 'addressCity': addressCity, 'addressZip': addressZip, 'addressState': addressState, 'addressCountry': addressCountry, 'agreeTerms': agreeTerms, 'notes': notes, 'last4': last4, 'subTotal': subTotal, 'couponId': couponId, 'discount': discount, 'tax': tax, 'total': total, 'itemQuantity': itemQuantity, 'authorizedQuantity': authorizedQuantity, 'subscriptionId': subscriptionId, 'licenseRef': licenseRef, 'paymentId': paymentId, 'emailId': emailId, 'paid': paid, 'createdDate': JsonConverters.toJson(createdDate,'DateTime',context!), 'modifiedDate': JsonConverters.toJson(modifiedDate,'DateTime',context!), 'modifiedBy': modifiedBy, 'cancelledDate': JsonConverters.toJson(cancelledDate,'DateTime',context!), 'cancelledReason': cancelledReason, 'ipAddress': ipAddress, 'orderDetails': JsonConverters.toJson(orderDetails,'List',context!) }; getTypeName() => "Order"; TypeContext? context = _ctx; } // @ValidateRequest(Validator="IsAdmin") class QueryOrders extends QueryDb implements IReturn>, IConvertible, IGet { QueryOrders(); QueryOrders.fromJson(Map json) : super.fromJson(json); fromMap(Map json) { super.fromMap(json); return this; } Map toJson() => super.toJson(); createResponse() => QueryResponse(); getResponseTypeName() => "QueryResponse"; getTypeName() => "QueryOrders"; TypeContext? context = _ctx; } TypeContext _ctx = TypeContext(library: 'account.servicestack.net', types: { 'IAddress': TypeInfo(TypeOf.Interface), 'SkuType': TypeInfo(TypeOf.Enum, enumValues:SkuType.values), 'OrderDetail': TypeInfo(TypeOf.Class, create:() => OrderDetail()), 'Order': TypeInfo(TypeOf.Class, create:() => Order()), 'List': TypeInfo(TypeOf.Class, create:() => []), 'QueryResponse': TypeInfo(TypeOf.Class, create:() => QueryResponse()), 'QueryOrders': TypeInfo(TypeOf.Class, create:() => QueryOrders()), 'List': TypeInfo(TypeOf.Class, create:() => []), });