| POST | /signup/api/formbuilder/model |
|---|
import 'package:servicestack/servicestack.dart';
class FormBuilderModelNameValue implements IConvertible
{
String? Name;
dynamic? Value;
FormBuilderModelNameValue({this.Name,this.Value});
FormBuilderModelNameValue.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Name = json['Name'];
Value = JsonConverters.fromJson(json['Value'],'dynamic',context!);
return this;
}
Map<String, dynamic> toJson() => {
'Name': Name,
'Value': JsonConverters.toJson(Value,'dynamic',context!)
};
getTypeName() => "FormBuilderModelNameValue";
TypeContext? context = _ctx;
}
class FormBuilderModelRq implements IConvertible
{
int? TemplateId;
String? BhUserID;
String? UserType;
String? ClientDocNo;
String? FormType;
int? ConfirmationNumber;
List<FormBuilderModelNameValue>? NameValues;
String? GroupPlans;
int? natId;
int? chapId;
FormBuilderModelRq({this.TemplateId,this.BhUserID,this.UserType,this.ClientDocNo,this.FormType,this.ConfirmationNumber,this.NameValues,this.GroupPlans,this.natId,this.chapId});
FormBuilderModelRq.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
TemplateId = json['TemplateId'];
BhUserID = json['BhUserID'];
UserType = json['UserType'];
ClientDocNo = json['ClientDocNo'];
FormType = json['FormType'];
ConfirmationNumber = json['ConfirmationNumber'];
NameValues = JsonConverters.fromJson(json['NameValues'],'List<FormBuilderModelNameValue>',context!);
GroupPlans = json['GroupPlans'];
natId = json['natId'];
chapId = json['chapId'];
return this;
}
Map<String, dynamic> toJson() => {
'TemplateId': TemplateId,
'BhUserID': BhUserID,
'UserType': UserType,
'ClientDocNo': ClientDocNo,
'FormType': FormType,
'ConfirmationNumber': ConfirmationNumber,
'NameValues': JsonConverters.toJson(NameValues,'List<FormBuilderModelNameValue>',context!),
'GroupPlans': GroupPlans,
'natId': natId,
'chapId': chapId
};
getTypeName() => "FormBuilderModelRq";
TypeContext? context = _ctx;
}
class FormBuilderModelRs implements IConvertible
{
String? message;
int? modelStateId;
FormBuilderModelRs({this.message,this.modelStateId});
FormBuilderModelRs.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
message = json['message'];
modelStateId = json['modelStateId'];
return this;
}
Map<String, dynamic> toJson() => {
'message': message,
'modelStateId': modelStateId
};
getTypeName() => "FormBuilderModelRs";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'devapi.billhighway.com', types: <String, TypeInfo> {
'FormBuilderModelNameValue': TypeInfo(TypeOf.Class, create:() => FormBuilderModelNameValue()),
'FormBuilderModelRq': TypeInfo(TypeOf.Class, create:() => FormBuilderModelRq()),
'List<FormBuilderModelNameValue>': TypeInfo(TypeOf.Class, create:() => <FormBuilderModelNameValue>[]),
'FormBuilderModelRs': TypeInfo(TypeOf.Class, create:() => FormBuilderModelRs()),
});
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/model HTTP/1.1
Host: devapi.billhighway.com
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<FormBuilderModelRq xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/BH.CloudAPI.Common4.DTO.FormBuilder.Request">
<BhUserID>String</BhUserID>
<ClientDocNo>String</ClientDocNo>
<ConfirmationNumber>0</ConfirmationNumber>
<FormType>String</FormType>
<GroupPlans>String</GroupPlans>
<NameValues>
<FormBuilderModelNameValue>
<Name>String</Name>
<Value />
</FormBuilderModelNameValue>
</NameValues>
<TemplateId>0</TemplateId>
<UserType>String</UserType>
<chapId>0</chapId>
<natId>0</natId>
</FormBuilderModelRq>
HTTP/1.1 200 OK Content-Type: application/xml Content-Length: length <FormBuilderModelRs xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/BH.CloudAPI.Common4.DTO.FormBuilder.Response"> <message>String</message> <modelStateId>0</modelStateId> </FormBuilderModelRs>