| POST | /signup/api/formBuilder/genericPost |
|---|
import 'package:servicestack/servicestack.dart';
class FormBuilderGenericPostRq implements IApiRequest, IConvertible
{
int? service;
List<BhNameValue>? nameValues;
FormBuilderGenericPostRq({this.service,this.nameValues});
FormBuilderGenericPostRq.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
service = json['service'];
nameValues = JsonConverters.fromJson(json['nameValues'],'List<BhNameValue>',context!);
return this;
}
Map<String, dynamic> toJson() => {
'service': service,
'nameValues': JsonConverters.toJson(nameValues,'List<BhNameValue>',context!)
};
getTypeName() => "FormBuilderGenericPostRq";
TypeContext? context = _ctx;
}
class BhNameValue implements IConvertible
{
String? name;
String? value;
BhNameValue({this.name,this.value});
BhNameValue.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
name = json['name'];
value = json['value'];
return this;
}
Map<String, dynamic> toJson() => {
'name': name,
'value': value
};
getTypeName() => "BhNameValue";
TypeContext? context = _ctx;
}
class FormBuilderGenericPostRs implements IConvertible
{
List<BhNameValue>? postResults;
FormBuilderGenericPostRs({this.postResults});
FormBuilderGenericPostRs.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
postResults = JsonConverters.fromJson(json['postResults'],'List<BhNameValue>',context!);
return this;
}
Map<String, dynamic> toJson() => {
'postResults': JsonConverters.toJson(postResults,'List<BhNameValue>',context!)
};
getTypeName() => "FormBuilderGenericPostRs";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'devapi.billhighway.com', types: <String, TypeInfo> {
'FormBuilderGenericPostRq': TypeInfo(TypeOf.Class, create:() => FormBuilderGenericPostRq()),
'List<BhNameValue>': TypeInfo(TypeOf.Class, create:() => <BhNameValue>[]),
'BhNameValue': TypeInfo(TypeOf.Class, create:() => BhNameValue()),
'FormBuilderGenericPostRs': TypeInfo(TypeOf.Class, create:() => FormBuilderGenericPostRs()),
});
Dart FormBuilderGenericPostRq DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /signup/api/formBuilder/genericPost HTTP/1.1
Host: devapi.billhighway.com
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<FormBuilderGenericPostRq xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/BH.CloudAPI.Common4.DTO.FormBuilder.Request">
<nameValues xmlns:d2p1="http://schemas.datacontract.org/2004/07/BH.API.DataAccess.Dto.FormBuilder">
<d2p1:BhNameValue>
<d2p1:name>String</d2p1:name>
<d2p1:value>String</d2p1:value>
</d2p1:BhNameValue>
</nameValues>
<service>0</service>
</FormBuilderGenericPostRq>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<FormBuilderGenericPostRs xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/BH.CloudAPI.Common4.DTO.FormBuilder.Response">
<postResults xmlns:d2p1="http://schemas.datacontract.org/2004/07/BH.API.DataAccess.Dto.FormBuilder">
<d2p1:BhNameValue>
<d2p1:name>String</d2p1:name>
<d2p1:value>String</d2p1:value>
</d2p1:BhNameValue>
</postResults>
</FormBuilderGenericPostRs>