/* Options: Date: 2026-09-09 09:28:12 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: PostNewOrder.* //ExcludeTypes: //DefaultImports: package:servicestack/servicestack.dart */ import 'package:servicestack/servicestack.dart'; class NewOrderItem implements IConvertible { /** * Unique ID for the part. */ // @ApiMember(Description="Unique ID for the part.", IsRequired=true, ParameterType="body") int PartId = 0; /** * Quantity to order. */ // @ApiMember(Description="Quantity to order.", IsRequired=true, ParameterType="body") int Quantity = 0; /** * Custom reference. */ // @ApiMember(Description="Custom reference.", ParameterType="body") String? Reference; NewOrderItem({this.PartId=0,this.Quantity=0,this.Reference}); NewOrderItem.fromJson(Map json) { fromMap(json); } fromMap(Map json) { PartId = json['PartId'] ?? 0; Quantity = json['Quantity'] ?? 0; Reference = json['Reference']; return this; } Map toJson() => { 'PartId': PartId, 'Quantity': Quantity, 'Reference': Reference }; getTypeName() => "NewOrderItem"; TypeContext? context = _ctx; } class NewOrderItemList extends ListBase implements IConvertible { final List l = []; set length(int newLength) { l.length = newLength; } int get length => l.length; NewOrderItem operator [](int index) => l[index]; void operator []=(int index, NewOrderItem value) { l[index] = value; } NewOrderItemList(); NewOrderItemList.fromJson(Map json) : super(); fromMap(Map json) { return this; } Map toJson() => {}; getTypeName() => "NewOrderItemList"; TypeContext? context = _ctx; } class NewOrderAddress implements IAddress, IConvertible { /** * Company name. */ // @ApiMember(Description="Company name.", ParameterType="body") String? CompanyName; /** * First name. */ // @ApiMember(Description="First name.", ParameterType="body") String? FirstName; /** * Last name. */ // @ApiMember(Description="Last name.", ParameterType="body") String? LastName; /** * Street name. */ // @ApiMember(Description="Street name.", IsRequired=true, ParameterType="body") String StreetName = ""; /** * House number. */ // @ApiMember(Description="House number.", IsRequired=true, ParameterType="body") String HouseNumber = ""; /** * House number addition. */ // @ApiMember(Description="House number addition.", ParameterType="body") String? HouseNumberAddition; /** * Postal code. */ // @ApiMember(Description="Postal code.", IsRequired=true, ParameterType="body") String PostalCode = ""; /** * City. */ // @ApiMember(Description="City.", IsRequired=true, ParameterType="body") String City = ""; /** * Country code. */ // @ApiMember(Description="Country code.", IsRequired=true, ParameterType="body") String CountryCode = ""; /** * Telephone number. */ // @ApiMember(Description="Telephone number.", ParameterType="body") String? TelephoneNumber; NewOrderAddress({this.CompanyName,this.FirstName,this.LastName,this.StreetName="",this.HouseNumber="",this.HouseNumberAddition,this.PostalCode="",this.City="",this.CountryCode="",this.TelephoneNumber}); NewOrderAddress.fromJson(Map json) { fromMap(json); } fromMap(Map json) { CompanyName = json['CompanyName']; FirstName = json['FirstName']; LastName = json['LastName']; StreetName = json['StreetName'] ?? ""; HouseNumber = json['HouseNumber'] ?? ""; HouseNumberAddition = json['HouseNumberAddition']; PostalCode = json['PostalCode'] ?? ""; City = json['City'] ?? ""; CountryCode = json['CountryCode'] ?? ""; TelephoneNumber = json['TelephoneNumber']; return this; } Map toJson() => { 'CompanyName': CompanyName, 'FirstName': FirstName, 'LastName': LastName, 'StreetName': StreetName, 'HouseNumber': HouseNumber, 'HouseNumberAddition': HouseNumberAddition, 'PostalCode': PostalCode, 'City': City, 'CountryCode': CountryCode, 'TelephoneNumber': TelephoneNumber }; getTypeName() => "NewOrderAddress"; TypeContext? context = _ctx; } 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 NewOrderResult implements IConvertible { /** * Number for the order that has been placed. */ // @ApiMember(Description="Number for the order that has been placed.", ParameterType="model") String? OrderNumber; NewOrderResult({this.OrderNumber}); NewOrderResult.fromJson(Map json) { fromMap(json); } fromMap(Map json) { OrderNumber = json['OrderNumber']; return this; } Map toJson() => { 'OrderNumber': OrderNumber }; getTypeName() => "NewOrderResult"; 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; } enum AddressType { Invoice, Delivery, Dropshipment, } abstract class IAddress extends ITaxRateContainer { int Id = 0; int CustomerId = 0; AddressType? Type; String? CompanyName; String? FirstName; String? LastName; String? StreetName; String? HouseNumber; String? HouseNumberAddition; String? PostalCode; String? City; String? CountryCode; String? TelephoneNumber; } abstract class ITaxRateContainer { double? TaxRate; } class NewOrderResponse extends OperationResult1 implements IConvertible { NewOrderResponse(); NewOrderResponse.fromJson(Map json) : super.fromJson(json); fromMap(Map json) { super.fromMap(json); return this; } Map toJson() => super.toJson(); getTypeName() => "NewOrderResponse"; TypeContext? context = _ctx; } // @Route("/dealers/order", "POST") class PostNewOrder extends AuthenticatedRequest implements IReturn, IConvertible, IPost { /** * Items to order. */ // @ApiMember(Description="Items to order.", IsRequired=true, ParameterType="body") NewOrderItemList? Items; /** * Dropshipment indication. */ // @ApiMember(Description="Dropshipment indication.", ParameterType="body") bool? UseDropshipment; /** * Delivery address. */ // @ApiMember(Description="Delivery address.", ParameterType="body") NewOrderAddress? DeliveryAddress; PostNewOrder({this.Items,this.UseDropshipment,this.DeliveryAddress}); PostNewOrder.fromJson(Map json) { fromMap(json); } fromMap(Map json) { super.fromMap(json); Items = JsonConverters.fromJson(json['Items'],'NewOrderItemList',context!); UseDropshipment = json['UseDropshipment']; DeliveryAddress = JsonConverters.fromJson(json['DeliveryAddress'],'NewOrderAddress',context!); return this; } Map toJson() => super.toJson()..addAll({ 'Items': JsonConverters.toJson(Items,'NewOrderItemList',context!), 'UseDropshipment': UseDropshipment, 'DeliveryAddress': JsonConverters.toJson(DeliveryAddress,'NewOrderAddress',context!) }); createResponse() => NewOrderResponse(); getResponseTypeName() => "NewOrderResponse"; getTypeName() => "PostNewOrder"; TypeContext? context = _ctx; } TypeContext _ctx = TypeContext(library: 'services.acct.2service.nl', types: { 'NewOrderItem': TypeInfo(TypeOf.Class, create:() => NewOrderItem()), 'NewOrderItemList': TypeInfo(TypeOf.Class, create:() => NewOrderItemList()), 'NewOrderAddress': TypeInfo(TypeOf.Class, create:() => NewOrderAddress()), 'AuthenticatedRequest': TypeInfo(TypeOf.AbstractClass), 'NewOrderResult': TypeInfo(TypeOf.Class, create:() => NewOrderResult()), 'OperationResult': TypeInfo(TypeOf.Class, create:() => OperationResult()), 'OperationResult1': TypeInfo(TypeOf.GenericDef,create:() => OperationResult1()), 'AddressType': TypeInfo(TypeOf.Enum, enumValues:AddressType.values), 'IAddress': TypeInfo(TypeOf.Interface), 'ITaxRateContainer': TypeInfo(TypeOf.Interface), 'NewOrderResponse': TypeInfo(TypeOf.Class, create:() => NewOrderResponse()), 'PostNewOrder': TypeInfo(TypeOf.Class, create:() => PostNewOrder()), });