import 'package:servicestack/servicestack.dart';
class GenericResponse implements IConvertible
{
String? Message;
bool? Success;
GenericResponse({this.Message,this.Success});
GenericResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Message = json['Message'];
Success = json['Success'];
return this;
}
Map<String, dynamic> toJson() => {
'Message': Message,
'Success': Success
};
getTypeName() => "GenericResponse";
TypeContext? context = _ctx;
}
class AuctionFloorVehicle implements IConvertible
{
// @ApiMember(IsRequired=true)
DateTime? BOSDate;
// @ApiMember(IsRequired=true)
String? DealerId;
/**
* Must be 17 characters
*/
// @ApiMember(Description="Must be 17 characters", IsRequired=true)
String? Vin;
// @ApiMember(IsRequired=true)
int? Year;
// @ApiMember(IsRequired=true)
String? Make;
// @ApiMember(IsRequired=true)
String? Model;
// @ApiMember(IsRequired=true)
int? Miles;
// @ApiMember(IsRequired=true)
String? Color;
// @ApiMember(IsRequired=true)
double? BOSAmount;
// @ApiMember()
String? TitleNumber;
// @ApiMember()
String? TitleState;
AuctionFloorVehicle({this.BOSDate,this.DealerId,this.Vin,this.Year,this.Make,this.Model,this.Miles,this.Color,this.BOSAmount,this.TitleNumber,this.TitleState});
AuctionFloorVehicle.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
BOSDate = JsonConverters.fromJson(json['BOSDate'],'DateTime',context!);
DealerId = json['DealerId'];
Vin = json['Vin'];
Year = json['Year'];
Make = json['Make'];
Model = json['Model'];
Miles = json['Miles'];
Color = json['Color'];
BOSAmount = JsonConverters.toDouble(json['BOSAmount']);
TitleNumber = json['TitleNumber'];
TitleState = json['TitleState'];
return this;
}
Map<String, dynamic> toJson() => {
'BOSDate': JsonConverters.toJson(BOSDate,'DateTime',context!),
'DealerId': DealerId,
'Vin': Vin,
'Year': Year,
'Make': Make,
'Model': Model,
'Miles': Miles,
'Color': Color,
'BOSAmount': BOSAmount,
'TitleNumber': TitleNumber,
'TitleState': TitleState
};
getTypeName() => "AuctionFloorVehicle";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'staging_api.my1stchoicefs.net', types: <String, TypeInfo> {
'GenericResponse': TypeInfo(TypeOf.Class, create:() => GenericResponse()),
'AuctionFloorVehicle': TypeInfo(TypeOf.Class, create:() => AuctionFloorVehicle()),
});
To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /csv/reply/AuctionFloorVehicle HTTP/1.1
Host: staging-api.my1stchoicefs.net
Accept: text/csv
Content-Type: text/csv
Content-Length: length
{"BOSDate":"0001-01-01T00:00:00.0000000","Vin":"String","Year":0,"Make":"String","Model":"String","Miles":0,"Color":"String","BOSAmount":0,"TitleNumber":"String","TitleState":"String"}
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length
{"Message":"String","Success":false}