POST | /support/request |
---|
import 'package:servicestack/servicestack.dart';
class BettingApp implements IConvertible
{
String? name;
String? version;
BettingApp({this.name,this.version});
BettingApp.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
name = json['name'];
version = json['version'];
return this;
}
Map<String, dynamic> toJson() => {
'name': name,
'version': version
};
getTypeName() => "BettingApp";
TypeContext? context = _ctx;
}
class Ref implements IConvertible
{
String? id;
String? val;
Ref({this.id,this.val});
Ref.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
id = json['id'];
val = json['val'];
return this;
}
Map<String, dynamic> toJson() => {
'id': id,
'val': val
};
getTypeName() => "Ref";
TypeContext? context = _ctx;
}
class Origin implements IConvertible
{
BettingApp? application;
String? ip;
Ref? organization;
Ref? region;
Ref? locationGroup;
Ref? location;
Ref? device;
Ref? clerk;
Origin({this.application,this.ip,this.organization,this.region,this.locationGroup,this.location,this.device,this.clerk});
Origin.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
application = JsonConverters.fromJson(json['application'],'BettingApp',context!);
ip = json['ip'];
organization = JsonConverters.fromJson(json['organization'],'Ref',context!);
region = JsonConverters.fromJson(json['region'],'Ref',context!);
locationGroup = JsonConverters.fromJson(json['locationGroup'],'Ref',context!);
location = JsonConverters.fromJson(json['location'],'Ref',context!);
device = JsonConverters.fromJson(json['device'],'Ref',context!);
clerk = JsonConverters.fromJson(json['clerk'],'Ref',context!);
return this;
}
Map<String, dynamic> toJson() => {
'application': JsonConverters.toJson(application,'BettingApp',context!),
'ip': ip,
'organization': JsonConverters.toJson(organization,'Ref',context!),
'region': JsonConverters.toJson(region,'Ref',context!),
'locationGroup': JsonConverters.toJson(locationGroup,'Ref',context!),
'location': JsonConverters.toJson(location,'Ref',context!),
'device': JsonConverters.toJson(device,'Ref',context!),
'clerk': JsonConverters.toJson(clerk,'Ref',context!)
};
getTypeName() => "Origin";
TypeContext? context = _ctx;
}
class RequestSupport implements IConvertible
{
Origin? origin;
RequestSupport({this.origin});
RequestSupport.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
origin = JsonConverters.fromJson(json['origin'],'Origin',context!);
return this;
}
Map<String, dynamic> toJson() => {
'origin': JsonConverters.toJson(origin,'Origin',context!)
};
getTypeName() => "RequestSupport";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'support.bettor_dual_stage.webhop.biz', types: <String, TypeInfo> {
'BettingApp': TypeInfo(TypeOf.Class, create:() => BettingApp()),
'Ref': TypeInfo(TypeOf.Class, create:() => Ref()),
'Origin': TypeInfo(TypeOf.Class, create:() => Origin()),
'RequestSupport': TypeInfo(TypeOf.Class, create:() => RequestSupport()),
});
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 /support/request HTTP/1.1
Host: support.bettor-dual-stage.webhop.biz
Accept: text/csv
Content-Type: text/csv
Content-Length: length
{"origin":{"application":{"name":"String","version":"String"},"ip":"String","organization":{"id":"String","val":"String"},"region":{"id":"String","val":"String"},"locationGroup":{"id":"String","val":"String"},"location":{"id":"String","val":"String"},"device":{"id":"String","val":"String"},"clerk":{"id":"String","val":"String"}}}
HTTP/1.1 200 OK Content-Type: text/csv Content-Length: length {"errorCode":"String","message":"String","stackTrace":"String","errors":[{"errorCode":"String","fieldName":"String","message":"String","meta":{"String":"String"}}],"meta":{"String":"String"}}