/* Options: Date: 2026-10-06 07:23:43 Version: 10.08 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://dev-api-booster.richemont.com //GlobalNamespace: //AddServiceStackTypes: True //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True IncludeTypes: GetBuyInPaginated.* //ExcludeTypes: //DefaultImports: package:servicestack/servicestack.dart */ import 'package:servicestack/servicestack.dart'; class BuyIn implements IConvertible { /** * Brand Trigram, e.g. CAR, IWC; compulsory only if articleCode is not provided */ // @ApiMember(Description="Brand Trigram, e.g. CAR, IWC; compulsory only if articleCode is not provided", IsRequired=true) String brand = ""; /** * Code of BuyIn */ // @ApiMember(Description="Code of BuyIn", IsRequired=true) int buyInOrderId = 0; /** * Richemont POS code */ // @ApiMember(Description="Richemont POS code", IsRequired=true) String posCode = ""; /** * Richemont Reference Code of the item */ // @ApiMember(Description="Richemont Reference Code of the item", IsRequired=true) String articleCode = ""; /** * Serial Number of the item */ // @ApiMember(Description="Serial Number of the item") String serialNumber = ""; /** * Buy-in order status code */ // @ApiMember(Description="Buy-in order status code") String buyInStatusId = ""; /** * Buy-in creation date */ // @ApiMember(Description="Buy-in creation date") DateTime? buyInDate; /** * Emails of Sale Representatives */ // @ApiMember(Description="Emails of Sale Representatives") List saleRepresentativeEmails = []; /** * True is the buy-in’s piece is in stock, False otherwise */ // @ApiMember(Description="True is the buy-in’s piece is in stock, False otherwise") bool? isInStock; BuyIn({this.brand="",this.buyInOrderId=0,this.posCode="",this.articleCode="",this.serialNumber="",this.buyInStatusId="",this.buyInDate,this.saleRepresentativeEmails=const [],this.isInStock}); BuyIn.fromJson(Map json) { fromMap(json); } fromMap(Map json) { brand = json['brand'] ?? ""; buyInOrderId = json['buyInOrderId'] ?? 0; posCode = json['posCode'] ?? ""; articleCode = json['articleCode'] ?? ""; serialNumber = json['serialNumber'] ?? ""; buyInStatusId = json['buyInStatusId'] ?? ""; buyInDate = JsonConverters.fromJson(json['buyInDate'],'DateTime',context!) ?? DateTime(0); saleRepresentativeEmails = JsonConverters.fromJson(json['saleRepresentativeEmails'],'List',context!) ?? []; isInStock = json['isInStock']; return this; } Map toJson() => { 'brand': brand, 'buyInOrderId': buyInOrderId, 'posCode': posCode, 'articleCode': articleCode, 'serialNumber': serialNumber, 'buyInStatusId': buyInStatusId, 'buyInDate': JsonConverters.toJson(buyInDate,'DateTime',context!), 'saleRepresentativeEmails': JsonConverters.toJson(saleRepresentativeEmails,'List',context!), 'isInStock': isInStock }; getTypeName() => "BuyIn"; TypeContext? context = _ctx; } class GetBuyInPaginatedResponse implements IConvertible { /** * Index of the result set returnedr */ // @ApiMember(Description="Index of the result set returnedr", IsRequired=true) int page = 0; /** * Size of the result set returned */ // @ApiMember(Description="Size of the result set returned", IsRequired=true) int items = 0; /** * Total amount of pages / result sets */ // @ApiMember(Description="Total amount of pages / result sets", IsRequired=true) int totalPages = 0; /** * Total amount of results */ // @ApiMember(Description="Total amount of results", IsRequired=true) int totalResults = 0; /** * List of Sale Details */ // @ApiMember(Description="List of Sale Details", IsRequired=true) List? elements; GetBuyInPaginatedResponse({this.page=0,this.items=0,this.totalPages=0,this.totalResults=0,this.elements}); GetBuyInPaginatedResponse.fromJson(Map json) { fromMap(json); } fromMap(Map json) { page = json['page'] ?? 0; items = json['items'] ?? 0; totalPages = json['totalPages'] ?? 0; totalResults = json['totalResults'] ?? 0; elements = JsonConverters.fromJson(json['elements'],'List',context!); return this; } Map toJson() => { 'page': page, 'items': items, 'totalPages': totalPages, 'totalResults': totalResults, 'elements': JsonConverters.toJson(elements,'List',context!) }; getTypeName() => "GetBuyInPaginatedResponse"; TypeContext? context = _ctx; } // @Route("/buyin/{brand}", "GET") class GetBuyInPaginated implements IReturn, IConvertible, IGet { /** * Richemont Brand ID */ // @ApiMember(Description="Richemont Brand ID") String brand = ""; /** * Richemont POS code */ // @ApiMember(Description="Richemont POS code", IsRequired=true) String posCode = ""; /** * Richemont Reference Code of the item */ // @ApiMember(Description="Richemont Reference Code of the item") String articleCode = ""; /** * Serial Number of the item */ // @ApiMember(Description="Serial Number of the item") String serialNumber = ""; /** * Buy-in order status code */ // @ApiMember(Description="Buy-in order status code") String buyInStatusId = ""; /** * True is the buy-in’s piece is in stock, False otherwise */ // @ApiMember(Description="True is the buy-in’s piece is in stock, False otherwise") bool? isInStock; /** * Index of the result set returned */ // @ApiMember(Description="Index of the result set returned", IsRequired=true) int page = 0; /** * Size of the result set returned */ // @ApiMember(Description="Size of the result set returned", IsRequired=true) int items = 0; /** * Omit precise record count - save on performance */ // @ApiMember(Description="Omit precise record count - save on performance") bool? noCount; /** * Sort Expression, Possible values: 'SaleDetailIdDESC', 'DocumentDate'. */ // @ApiMember(Description="Sort Expression, Possible values: 'SaleDetailIdDESC', 'DocumentDate'.") String sortBy = ""; GetBuyInPaginated({this.brand="",this.posCode="",this.articleCode="",this.serialNumber="",this.buyInStatusId="",this.isInStock,this.page=0,this.items=0,this.noCount,this.sortBy=""}); GetBuyInPaginated.fromJson(Map json) { fromMap(json); } fromMap(Map json) { brand = json['brand'] ?? ""; posCode = json['posCode'] ?? ""; articleCode = json['articleCode'] ?? ""; serialNumber = json['serialNumber'] ?? ""; buyInStatusId = json['buyInStatusId'] ?? ""; isInStock = json['isInStock']; page = json['page'] ?? 0; items = json['items'] ?? 0; noCount = json['noCount']; sortBy = json['sortBy'] ?? ""; return this; } Map toJson() => { 'brand': brand, 'posCode': posCode, 'articleCode': articleCode, 'serialNumber': serialNumber, 'buyInStatusId': buyInStatusId, 'isInStock': isInStock, 'page': page, 'items': items, 'noCount': noCount, 'sortBy': sortBy }; createResponse() => GetBuyInPaginatedResponse(); getResponseTypeName() => "GetBuyInPaginatedResponse"; getTypeName() => "GetBuyInPaginated"; TypeContext? context = _ctx; } TypeContext _ctx = TypeContext(library: 'dev_api_booster.richemont.com', types: { 'BuyIn': TypeInfo(TypeOf.Class, create:() => BuyIn()), 'GetBuyInPaginatedResponse': TypeInfo(TypeOf.Class, create:() => GetBuyInPaginatedResponse()), 'List': TypeInfo(TypeOf.Class, create:() => []), 'GetBuyInPaginated': TypeInfo(TypeOf.Class, create:() => GetBuyInPaginated()), });